File "itempools.xml"⚓︎
This page needs some content. You can contribute to it using the Edit Button!
Resource-Folder: Using this file in a resource folder of a mod is not tested yet.
Content-Folder: Using this file in a content folder of a mod is not tested yet.
Variable-Name | Possible Values | Description |
---|---|---|
Id | int | (Optional) The id of the item in the itempool When using this variable, you can't use the "name" variable. |
Name | String | (Optional, recommended) The name of the item in the itempool. When using this variable, you can't use the "id" variable. |
Weight | float | Relative "likelyhood" that this item can be drawn from the pool. Default = 1 . If this value reaches the "RemoveOn" value, the item will no longer be drawn from the pool |
DecreaseBy | float | Value on how often the item can be drawn from the pool. Default = 1 Everytime an item is drawn from the pool, this value is substracted from its Weight. This makes the item appear less likely on reroll till the weight reaches the "RemoveOn" value. |
RemoveOn | float | Value on which Weight value the item is no longer able to be drawn from the pool. Default = "0.1" |
Item count calculation⚓︎
The amount on how often an item will be in the itempool is determined with the following equation:
1 |
|
math.ceil
rounds a number to the next biggest integer )
Example⚓︎
Example Code
This code describes an item pool with 3 items in it.
1 2 3 4 5 6 7 8 9 10 |
|
Last update:
September 14, 2022