Item Spawner (Compatibility Fix)
Please uninstall the original Item Spawner before installing this version.
This is a compatibility-focused rebuild of Ryhon’s Item Spawner that fixes crashes when using larger gameplay mods such as Oldman Immersive.
The original spawner assumed every object in the game’s item database followed the exact vanilla structure. Some mods add pickups, furniture, or custom objects that do not match those assumptions, which could cause the menu to crash when opening or when spawning certain items.
This version restructures how the spawner discovers and spawns items so it can safely handle modded content.
Technical Explanation
The original Item Spawner iterated directly through
Database.master.items
and created UI entries from those objects. When an item was selected it created a SlotData object and inserted it directly into the player inventory.
This works for vanilla items but assumes every object contains fields such as:
- name
- icon
- type
- defaultAmount
Some mod packs introduce items or pickups that do not contain these fields, which can cause the spawner to crash when it tries to access them.
This version introduces an intermediate catalog layer that builds a safe list of spawnable entries before the UI is created.
Items are discovered in two ways:
Primary method
Database.master.items
Fallback method
Scanning database script constants for PackedScene pickups
This allows the spawner to detect both traditional inventory items and scene-based pickups added by mods.
Additional validation checks ensure missing fields or unusual objects are skipped rather than crashing the menu.
The catalog is also cached so the database is not scanned every time the menu opens.
Credits
Original Item Spawner concept by
https://github.com/Ryhon0/VostokMods
This release is simply a compatibility fix to keep the mod working alongside newer Road to Vostok mod packs.

