How could one make random mods on a weapon when it drops like in diablo?and display those mods in your inventory.

does anyone have any suggestions?

i dont even know were to begin.