Fallout 4 legendary weapons

Legendary weapon effects are effects applied to basic weapons that use special prefix modifiers that cannot be obtained elsewhere. They cannot be scrapped, but can be modified and traded with vendors. They will appear on screen when picked up, and are marked with a star. Though unlike unique weapons, they are randomized and are never named. Legendary effects can provide the same effects as unique weapons; a "Relentless .44 pistol" is identical to Kellogg's pistol.

Legendary weapons are only found on the bodies of "Legendary" variants of enemies. They can spawn at random locations throughout the Commonwealth, depending on the difficulty setting. They are much more difficult to defeat than regular enemies, as each one has a chance to "mutate" after their health is depleted, restoring it to full. They will almost always have a legendary piece of equipment in their inventory. But there may be the case that a Legendary Mirelurk Hunter does not have a legendary equipment piece, just the normal mirelurk drops.

Legendary effects can be added to items by dropping them on the ground and using the console command "attachmod" while having them selected, followed by the mod ID. You can't stack several mods on a single item, but you can stack them by wearing multiple pieces. You can also replace a mod with another one via console.

The Two Shot mod scales best with heavy damage weapons such as missile launchers and sniper rifles, doubling the damage with whatever perks and skills the sole survivor has, while The Explosive Mod is exceptionally powerful when paired with Shotgun or Laser Rifle with Beam-Splitter Mod as each pellet or scattered beams will produce independent explosions, thereby multiplying it's damage based on the amount of pellets/beams in each shot.

Bugs
Applying mods to a weapon can result in a strange name for it, like Qu'est-ce que c'est? (what is it?).