Inspiration
When younger people get into coding they usually do it through video game creation, so I wanted to provide an example of how they could implement random weapon generation. Since it is public on GitHub I was hoping others would modify it to improve it or broaden its scope.
What it does
It takes an input of the rarity of the weapon, and randomly generates the type of weapon, attachments, and stats. The stats are generated then modified by the rarity of the weapon (higher rarity = higher stats).
How I built it
I used Java to take an input and declared the maximal and minimal values for the random variable. For the stats of the weapon I multiplied the random value by 1.(rarity) to increase them by a little amount.
Challenges I ran into
Figuring how I wanted to output the weapon array.
Accomplishments that I'm proud of
I'm proud of how simple and clean my code is.
What I learned
I learned how to randomly generate numbers between a range and how to output values to a file without overwriting the file.
What's next for RandomWeapon
I would like to implement this into a project that I am currently working on, and I will improve it when I come up with more ideas for it.
Log in or sign up for Devpost to join the conversation.