Topic category: Help with modding (Java Edition)
I'm working to make a Naruto RPG Mod for Minecraft and am very excited to learn how to use the MCreator interface. Upon a player loading into a new world, they will be greeted with a GUI that will have a button to generate their clan. I attempted to make a Procedure connected to the button that when pressed displays a randomly generated clan but I think my logic is a little off. There are 50 or so clans in Naruto so the probability of generating one for the player should be around ~2% or 0.02.
Here is an example of my Procedure:
if Random[0,1]<= 0.02
do Set Global: clan_Name to : "Aburame"
else if Random[0,1]<= 0.04
do Set Global: clan_Name to : "Akimichi"
if Random[0,1]<= 0.98
do Set Global: clan_Name to: "Yuki"
Upon pressing the button for clan generation I get "Yuki" returned which I understand since all values would be less than or equal to 0.98 so the question is how can I create this Procedure to have distinct random occurences so that each clan name has an equal chance of being generated. Thank you for your help!