I have been trying to figure out how to make it so that I can have random stats and random parts to create weapons. I am not sure how to do this though. I did not try anything, because I am not sure where to start with this.
You could create 2 variables for each stat of the weapon like - maxPower, minPower, maxSpread, minSpread.
Then when you create the weapon you could set the stat to a random number between the minimum and maximum for example you would instantiate the random weapon and set the stats to random number using “Random.Range(min, max)”.
Also you could set the stats when the player picks up the weapon using the same method.
You should build a basic gun class with an array for different parts of the gun. In start, randomly pick from a list for every piece and have that effect the gun’s name, look, etc. then set up how bullets will look based on the parts of the gun and the stats that came along with it.