Jump to content
Sign in to follow this  
Nebula

Procedural Distributions

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.

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...