Mods that appear on more than one weapon can be taken off and put on another weapon without making a new one. Proof of concept with small issues, only covers dot reflex sight and short scope.
Permissions and credits
Credits and distribution permission
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou are allowed to modify my files and release bug fixes or improve on the features so long as you credit me as the original creator
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou are allowed to use the assets in this file without permission as long as you credit me
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are allowed to earn Donation Points for your mods if they use my assets
Console modding permissionThis mod will not be available on Bethesda.net for console users
Author notes
This author has not provided any additional notes regarding file permissions
File credits
This author has not credited anyone else in this file
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
In vanilla, there is a bug where if you set multiple objectmods to have the same loose mod in the creation kit, the game still requires you to build a new copy. This proof of concept mod gets around this and allows sharing of a single loose mod between multiple weapons, without the use of an intermediate attachment point and still allows different effects to be applied to each weapon; the separate objectmod records are retained.
The way I did this was by giving the loose mod its own new scrap component, and adding a new recipe that uses that component instead of the base components. Which recipe is shown depends on if you have a copy of the loose mod or not; the base recipe shows when you have none, the new recipe shows when you have at least one. It can be in any caravan-linked workshop, which is what the script checks for.
There is only one small but fairly annoying bug. If you have only one of a universal mod available and you take it off of a gun, you cannot reapply it (to anything) until you either exit and re-enter the workbench or build another mod from scratch (attaching another existing one does not work).
This is due to how the crafting requirements are checked. From testing I've found that the game only checks if you meet the requirements for all of the current recipes when you build a mod, and not when you attach a mod. This makes sense from an efficiency standpoint; your perks and how much scrap you have are not changing when you attach a mod so why waste calculations updating requirement checks.
If anyone thinks of a fix for this (e.g. making the game update requirements when attaching a mod, fixing the original bug directly, etc.) please let me know; this has bugged me since the game launched and I'd like to find a way to fix it seamlessly. You could do this in New Vegas for cryin' out loud.