-
Notifications
You must be signed in to change notification settings - Fork 0
Custom Random Inventories
amione edited this page Oct 24, 2024
·
1 revision
This guide will help you modify CustomRandomInventories.json to customize the loot and inventory of different characters or NPCs in the game.
The CustomRandomInventories.json file defines the randomized loot that can be found in the inventories of various characters or NPCs. Each entry specifies the items that can be found, along with their quantity ranges and probabilities.
Each character or NPC has an associated entry, containing presets for their inventory. Each preset has a unique identifier (like "0"), which contains the items that can be included in their inventory.
{
"Wolfman_att": {
"presets": {
"0": {
"toolbox": {
"type": "toolbox",
"amountMin": 0,
"amountMax": 0,
"chance": 1.0
},
...
}
}
},
"NightTrader": {
"presets": {
"0": {
"exp_nightMushroom": {
"type": "exp_nightMushroom",
"amountMin": 1,
"amountMax": 1,
"chance": 1.0
},
...
}
}
}
}In this example:
- The character Wolfman_att has a preset that includes various items such as
toolbox,battery9v,bottle, etc., each with specific amounts and chances of appearing. - The character NightTrader has a different preset with its own set of items like
exp_nightMushroom,gasoline, andnail. - Notice: Do not copy this as it is trimmed (...) to not have this page be half of the example.
To add or modify random inventories:
- Identify the character you want to edit or create a new entry for.
- Copy an existing preset or create a new one under the character's
presets. - Change the item type to the item you want to include.
- Adjust the amountMin and amountMax to define the quantity range for the item.
- Set the chance to determine the likelihood of the item appearing in the inventory (0.0 to 1.0).
To add a new item to Wolfman_att's inventory, you might include:
"new_item": {
"type": "new_item",
"amountMin": 1,
"amountMax": 3,
"chance": 0.5
}In this example:
- The item new_item will have a 50% chance of appearing in Wolfman_att’s inventory and can appear in quantities ranging from 1 to 3.
- Ensure that all item types you reference are defined in your game.
- You can add multiple presets for different situations by using unique identifiers (like
"1","2", etc.)- I don't know the use for this and it wasn't tested, try at your own risk.
- Keep the formatting consistent to avoid errors when the game loads the file.
- Darkwood Customizer GitHub Repository – Check out the source code and contribute to the project, or report issues.
- Darkwood Customizer on Nexus Mods – Download the latest version of the Darkwood Customizer and see user feedback.
- Darkwood on Steam – Purchase or learn more about the base game.