Jump to content

Procedural Distributions


Nebula

Recommended Posts

Good time! Is it possible to clarify the item distribution code?

Here is the code ...

ProceduralDistributions = {};

ProceduralDistributions.list = {

KitchenRandom = {
   rolls = 5,
   items = {
   "ItemName", 0.5,
},
    
   junk = {
     rolls = 5,
     items = {
     "ItemName", 4,
 },
},
},
}

What are rolls and junk responsible for?

 

What does the number do after rolls?

What does the number after the item name do?

 

Can someone please clarify? Preferably in detail. Thank you.

Link to comment
Share on other sites

  • 2 weeks later...
KitchenRandom = {
   rolls = 5,
   items = {
   "ItemName", 0.5,
},

What are rolls responsible for?
R: indicates the times that an opportunity will be made for an item to appear.

item: indicate the item you want to appear and its possibility for it to appear.

Junk, I haven't worked with that, but I assume it's a "place", trash cans, open world ... any place where it is declared to be used for junk ...

So:
junk = Place
Roll = chance that an item appeared in the place
Item, 0.5 = name of the item and the possibility of it appearing

Suppose a roll of 4/5, then there are 4 chances that an item with 0.5% will appear in place.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...