I saw there are some argument about random generated loot but no mod actually support that..I took a look at the mod structure, seems that there is no way to generate those randomness using current API provided.
So I write an affix generator to do the job, which modify the .csv and .wpn file to generate different weapon with different affix.
description file is not touched.. As you can see in the picture below.
Here are some results:
Consider as modifier:
"Rare": Overall enhance[+10%] (With rarity of 0.3)
"Epic": Overall enhance[+30%] (With rarity of 0.05)
"Lagendary": Overall enhance[+50%] (With rarity of 0.01)
Consider as manufacture(haven't go for the lore yet):
"Simplify": Weapon circuit is optimized, OP[-10%] (With rarity of 0.1)
"Spitfire": Rapid fire is the key to victory, Damage[-35%], Range[-20%], BurstSize[+100%], BurstDelay[-25%] (With rarity of 0.4)
"Deadshot": Can only fire one projectile at once, have long charge time and insane damage, Range[+100%], Projectile Speed[+200%] (With rarity of 0.2)
"Rechargeable": Missile ammo could recharge over time. (With rarity of 0.1)
Every affix will increase the rarity of that weapon, and some of them also increase the tier. So there are some very rare weapon that require grind.
In theory it could generate affix for any weapon, but the armory expanded very quick(7 affix cross generation(with some rules) produce 620 new weapons), so I think this might not be a good solution, but use them is quite fun in the game