Fixes resources/consumables/big pickups failing to spawn.
Specifically, this improves the spawning logic to reduce the possibility that there may not be enough space to spawn them, but if there still isn't, they will spawn on the ground instead.
This includes fixing "Surprise!" boxes so they actually work.
ItemSpawnFix adds a Custom subfolder (Custom/ItemSpawnFix) to further adjust spawn behavior if needed.
It accepts json files containing lists of settings; for example, the template:
[
{
"Levels": 420,
"RundownID": 0,
"RaiseObjectSpawnPriority": false,
"AllowRedistributeObjects": false,
"SetConsumableSpawns": [],
"SetResourceSpawns": []
},
{
"Levels": "A",
"RundownID": 0,
"RaiseObjectSpawnPriority": false,
"AllowRedistributeObjects": false,
"SetConsumableSpawns": [],
"SetResourceSpawns": [
{
"PackType": "AmmoWeapon",
"Amount": 0,
"DimensionIndex": "Reality",
"Layer": "MainLayer",
"LocalIndex": "Zone_0",
"AreaIndex": [
0,
1
],
"PreferEmpty": true,
"Count": 1
}
]
},
{
"Levels": [
4115,
"B1"
],
"RundownID": 0,
"RaiseObjectSpawnPriority": false,
"AllowRedistributeObjects": false,
"SetConsumableSpawns": [
{
"ItemID": 0,
"DimensionIndex": "Reality",
"Layer": "MainLayer",
"LocalIndex": "Zone_0",
"AreaIndex": 0,
"PreferEmpty": true,
"Count": 1
}
],
"SetResourceSpawns": []
}
]
The fields are:
Levels | Level: A single level or list of levels to apply to. Valid level formats:
RundownID: The rundown to restrict the setting to. If 0, has no restriction.RaiseObjectSpawnPriority: Reverses spawn order so Terminals/Generators/Disinfect Stations spawn first, then big pickups/consumables, then resources.
AllowRedistributeObjects: Allows Terminals/Generators/Disinfect Stations to be moved to other areas if there is no space in their spawn area.SetConsumableSpawns: Spawns a specific set of consumables in an area.
ItemID: The item datablock ID to spawn.SetResourceSpawns: Spawns a specific set of resources in an area.
PackType: The type of pack to spawn (Health, AmmoWeapon, AmmoTool, or Disinfection).Amount: The amount to put in the pack. Affected by ExpeditionBalance settings.Shared Set_Spawns fields:
DimensionIndex: Dimension to spawn in.Layer: Main/Secondary/Overload layer to spawn in.LocalIndex: Zone index to spawn in.AreaIndex: Area index to spawn in. Can optionally be a list of possible spawn locations.PreferEmpty: Prioritize spawning in an empty container if possible.Count: How many copies to spawn. Identical effect to adding multiple of the same set spawn object.Supports live edit - you do not need to reboot to apply changes, just redrop.