Item spawning, making some items rarer than others?

maldruzard

Member
Reaction score
2
Hey there! (Yes, it's me again, and no, I will not stop asking for help, I'm a noob!)

I am having a system in which items will randomly spawn in random points of random regions periodically, and then disappear when the next spawns come (I have that part down alright... theoretically). However, I do not wish there to be an overload of super rare/powerful items, so is it possible to make some items less likely/rarer to be spawned by the generation?

Sorry if that doesn't make much sense, even reading through it myself got me a little bit confused! ;)
 

keychup

Active Member
Reaction score
34
use a real variable to give the chance of an item appearing.

example:
super rare item: 1.00-2.50 (2.50% chance for a super rare to appear)
ultra rare item: 2.51-10.00 (7.50% chance for an ultra rare to appear)
rare item: 11.00-20.00 (10.00% chance for a rare to appear)
uncommon item: 21.00-50.00 (30.00% chance for an uncommon item to appear)
common item: 51.00-100.00 (50.00% chance for a common item to appear)

To make a super rare item appear:
-If
--"And" Conditions
---If (Random Real from 1.oo-100.00) is less than or equal to (2.50)
---If (Random Real from 1.oo-100.00) is greater than or equal to (1.00)
--"Then" Actions
---Create a random super rare item

To make an ultra rare item appear:
-If
--"And" Conditions
---If (Random Real from 1.oo-100.00) is less than or equal to (10.00)
---If (Random Real from 1.oo-100.00) is greater than or equal to (2.51)
--"Then" Actions
---Create a random ultra rare item

To make a rare item appear:
-If
--"And" Conditions
---If (Random Real from 1.oo-100.00) is less than or equal to (20.00)
---If (Random Real from 1.oo-100.00) is greater than or equal to (11.00)
--"Then" Actions
---Create a random rare item

To make an uncommon item appear:
-If
--"And" Conditions
---If (Random Real from 1.oo-100.00) is less than or equal to (50.00)
---If (Random Real from 1.oo-100.00) is greater than or equal to (21.00)
--"Then" Actions
---Create a random uncommon item

To make a common item appear:
-If
--"And" Conditions
---If (Random Real from 1.oo-100.00) is less than or equal to (100.00)
---If (Random Real from 1.oo-100.00) is greater than or equal to (51.00)
--"Then" Actions
---Create a random common item
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top