Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
ItemSpawner REPOLib42 Compat
Spawn any item or valuable from an in-game window. A rewritten, working replacement for ItemSpawner_Fixed, updated for REPOLib 4.2.
By BestM0neyInc
| Date uploaded | a day ago |
| Version | 1.0.0 |
| Download link | BestM0neyInc-ItemSpawner_REPOLib42_Compat-1.0.0.zip |
| Downloads | 325 |
| Dependency string | BestM0neyInc-ItemSpawner_REPOLib42_Compat-1.0.0 |
This mod requires the following mods to function
README
ItemSpawner REPOLib 4.2 Compatibility
A rewritten, working replacement for Spoopylocal's original ItemSpawner mod
(https://thunderstore.io/c/repo/p/Spoopylocal/ItemSpawner_Fixed), which broke
after the game updated and REPOLib moved past its pre-3.0 API
(RegisteredValuables, etc.).
Target:
- R.E.P.O. 0.4.4.x
- REPOLib 4.2.0
- BepInEx 5.x
How it works
- Uses
REPOLib.Modules.Items.SpawnItemandREPOLib.Modules.Valuables.AllValuables/Valuables.SpawnValuable(REPOLib 4.2 API), instead of the old pre-3.0 calls the original mod used. - The GUI is not attached to the plugin's own GameObject. In this game
that object never receives
Update/OnGUIcallbacks (unclear why - possibly how BepInEx's manager object is parented/hidden here). Instead, a Harmony postfix onPlayerAvatar.Startadds theItemSpawnerGuicomponent directly onto the local player's own GameObject, which the game guarantees is active and ticking. This mirrors what the original mod did (it patchedShopManager.Awakefor the same reason). - Item lookups do not use
REPOLib.Modules.Items.AllItems. That property readsStatsManager.itemDictionary, which the game only populates on a full progress reset (StatsManager.RunStartStats) - in an ordinary session with an existing save it stays empty, silently hiding every item (weapons included). Instead we callResources.FindObjectsOfTypeAll<Item>(), which finds everyItemasset actually loaded in memory regardless of that dictionary. - Name matching checks both the REPOLib "friendly" name (
itemName) and the raw Unity asset name (e.g."Item Gun Handgun", which is what the original mod matched on), first for an exact match, then a partial (contains) match.
Controls
- The spawn window is visible by default when you load into a level - no key press needed.
- If you click "Hide", a small "ItemSpawner" tab stays in the top-left corner to bring the window back.
- Type or paste (Ctrl+V works) an item/valuable name into the text field and
click Spawn. Pasting a full slash command like
/additem Item Gun Handgunalso works - the/additempart is stripped automatically. - Click All Items or All Valuables to browse everything currently loaded (base game + any REPOLib-registered mod content), with a filter box. Clicking an entry fills the text field for you.
Why there's no hardcoded item list here
Earlier versions of this README shipped a hand-maintained list of every valuable/item name. That list goes stale the moment the base game or any REPOLib mod adds new content. Instead of maintaining a list by hand, the mod reads the live list from the game at runtime - use the in-game All Items / All Valuables buttons described above to see exactly what's spawnable in your current modded setup, always up to date.
Notes
- Do not replace REPOLib with 1.4.2. Keep REPOLib 4.2.0.
- Build with Visual Studio/MSBuild on Windows. The
.csprojHintPathentries point at a Thunderstore Mod Manager profile and the Steam game install - update them if your paths differ.