You are viewing a potentially older version of this package. View all versions.
TheMorningStar-Loot_Topup-1.2.2 icon

Loot Topup

Loot safety net: guarantees a minimum valuable count on sparse maps, plus a watchdog that tops up loot if destroyed items would softlock the run. Respects no-loot mutators. Host-authoritative. By TheMorningStar.

Date uploaded 3 days ago
Version 1.2.2
Download link TheMorningStar-Loot_Topup-1.2.2.zip
Downloads 16
Dependency string TheMorningStar-Loot_Topup-1.2.2

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
Zehs-REPOLib-4.2.0 icon
Zehs-REPOLib

Library for adding content to R.E.P.O.

Preferred version: 4.2.0

README

Loot Topup

Safety net for loot generation. Guarantees a minimum number of valuables on sparse maps, and a watchdog tops the level back up if enough loot gets destroyed that the haul goal stops being reachable. It never removes anything. It adds copies of the level's own valuables at the level's normal valuable spawn points, and it skips no-loot mutators like Hunting Season. The host runs the logic.

By TheMorningStar.

1.2.2

  • Top-up copies now appear at the map's own valuable spawn points instead of next to an existing valuable. Before this, if every remaining valuable was already on the extraction pad, the copy spawned on the pad too.
  • A copy goes to an empty spawn point of its own size first, then an empty larger one. Spawn points that the level turned into furniture are skipped.

1.2.1

  • The softlock watchdog reads the game's own valuables list instead of scanning the whole scene every 4 seconds, which removes a small periodic hitch on large modded levels.
For developers - detailed breakdown

v1.2.2: a Harmony prefix on ValuableVolume.Setup records each active volume's position, rotation and size before the game destroys the markers, and a postfix on ValuablePropSwitch.Setup drops volumes whose switch became a prop. A spot counts as taken when a live valuable or an earlier copy from the same pass is within 1 m. If no spot was recorded for the level, the mod logs a warning and spawns nothing.

v1.2.0: REPOLib-registered (modded) valuables now spawn through REPOLib 4.2.0's NetworkPrefabs.SpawnNetworkPrefab(PrefabRef, ...) instead of the removed string overload; base-game valuables keep the plain Photon Resources path, singleplayer uses a local Instantiate. Any template whose spawn fails (null return or exception) is blacklisted for the rest of the level and still counts toward the per-level spawn cap, so a bad prefab can't flood the log or retry forever.