You are viewing a potentially older version of this package.
View all versions.
ItemSpawnFix
[Required by All] Fixes items and resources failing to spawn.
| Date uploaded | 2 weeks ago |
| Version | 1.2.3 |
| Download link | Dinorush-ItemSpawnFix-1.2.3.zip |
| Downloads | 727 |
| Dependency string | Dinorush-ItemSpawnFix-1.2.3 |
This mod requires the following mods to function
BepInEx-BepInExPack_GTFO
BepInEx pack for GTFO. Preconfigured and includes Unity Base DLLs.
Preferred version: 3.2.1README
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.
Rundown Developer Options (Requires MTFO)
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
},
{
"Levels": "A",
"RundownID": 0,
"RaiseObjectSpawnPriority": false,
"AllowRedistributeObjects": false
},
{
"Levels": [
4115,
"B1"
],
"RundownID": 1234,
"RaiseObjectSpawnPriority": false,
"AllowRedistributeObjects": false
}
]
The fields are:
Levels | Level: A single level or list of levels to apply to. Valid level formats:- Main LevelLayoutID (e.g. 420)
- Tier (e.g. "A" or "TierA")
- TierIndex (e.g. "B1" or "TierB1")
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.- If you need consistent terminal/generator spawns, or just want it to not spawn on the floor, try this first.
AllowRedistributeObjects: Allows Terminals/Generators/Disinfect Stations to be moved to other areas if there is no space in their spawn area.
Supports live edit - you do not need to reboot to apply changes, just redrop.
Technical Details
- The game allocates a certain number of container spawns per room depending on its size. If these run out, the game allocates new spawns but it will never re-use them after creation, so only one item is added. The fix allows them to be re-used.
- If there are no markers left for one of the initially allocated spawns, it will not create anything. On the other hand, if it is one of the newly allocated spawns, it will create its item(s) randomly on the floor. The fix replaces this logic with the following:
- (Resources/Consumables) Try to place the items in empty containers in the area. If none exist, check the entire zone.
- Try to create the item(s) in a random area in the zone.
- (Resources/Consumables) Try to place the items in partially filled containers in the area. If none exist, check the entire zone.
- Create the item(s) on the ground. The vanilla logic for this is broken, but the fix corrects that too.
CHANGELOG
v1.2.3
- Fixed an issue where empty boxes that were redistributed to were still sometimes removed
v1.2.2
- Actually fixed the v1.2.1 error that tried to remove more empty boxes as valid placements than was correct during redistribution
v1.2.1
- Fixed an error that would occur rarely when redistributing
v1.2.0
- Moved config file options to Custom files
v1.1.0
- Fixed empty containers being deleted early, reducing possible spots to place resources
- Reduced the randomness incurred to marker spawns when redistributions occurred
- I.e. moved a bunch of things that would affect the global random to a mod-local random instead
- Added config file options for devs to adjust how objects are spawned
v1.0.5
- Fixed empty containers sometimes leaving parts behind when despawned.
v1.0.4
- Restored allowing markers to be consumed by container/pickup spawns that get deleted
- This feature affected level generation markers and fixed scans.
- Adjusted redistribution logic to work around this.
- Improved debug log information.
v1.0.3
- Fixed redistributed items being despawned occasionally
- Now prevents markers from being consumed by container/pickup spawns that get deleted
- Items/pickups now try to spawn in a new area before being redistributed/spawned on the floor
v1.0.2
- Actually fixed floor spawn boxes containing more items than they should hold
- Fixed redistribution logic not working correctly
- Now redistributes items to any storage in the zone, not only the same area
v1.0.1
- Fixed floor spawn boxes containing more items than they should hold
v1.0.0
- Initial release