You are viewing a potentially older version of this package. View all versions.
Dinorush-ItemSpawnFix-1.0.2 icon

ItemSpawnFix

[Required by All] Fixes items and resources failing to spawn.

Date uploaded 10 months ago
Version 1.0.2
Download link Dinorush-ItemSpawnFix-1.0.2.zip
Downloads 249
Dependency string Dinorush-ItemSpawnFix-1.0.2

This mod requires the following mods to function

BepInEx-BepInExPack_GTFO-3.2.1 icon
BepInEx-BepInExPack_GTFO

BepInEx pack for GTFO. Preconfigured and includes Unity Base DLLs.

Preferred version: 3.2.1

README

Fixes items failing to spawn in a few ways:

  1. A certain number of containers can spawn holding 2-3 items, but all following containers only hold 1 item. This allows those containers to hold 2-3.
  2. If there are no more locations to spawn a storage container, it will place the items in an existing container if able.
  3. If there are no more locations to spawn an item/container and all containers are full, items are placed randomly on the ground with the correct behavior.
  • For example, this fixes "Surprise!" boxes as well as cells failing to spawn.

Technical Details

  1. The game allocates a certain number of 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.
  2. If there are no markers left for one of the initially allocated spawns, the item will not be spawned at all. On the other hand, if it is one of the newly allocated spawns, it will place them randomly on the floor. The fix will try to fit the items into existing containers instead of making new containers.
  3. Following 2, if there is not enough space, items are placed on the ground. Normally, these are set up using a generic spawn function which causes the objects to spawn improperly. The fix causes them to use the correct spawn behavior.

CHANGELOG

v1.3.1

  • Added support for AreaIndex lists on SetSpawns objects.

v1.3.0

  • Added support for set spawns. defined in Custom files:
    • SetConsumableSpawns
    • SetResourceSpawns
  • Fixed boxes always being removed when used as an empty spawn locations, rather than only when they became full.
  • Fixed RundownID being ignored.

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