SelfReviveUpgrade

v1.0.0·Updated 2026-04-09

Adds a self revive upgrade to the shop

About this mod Author’s original text

Self Revive Upgrade

A simple mod that adds self-revival upgrade. You buy this expensive upgrade in the shop, and then use it. You get a stack of SELF REVIVE. Once you die, and you have more than one SELF REVIVE stacks, that stack decreases and respawns you with all of the items in your inventory in the truck.

This mod relies on REPOLib to add the upgrade and the item upgrade.

How to make new upgrades

It's been a quite complicated journey, so I'd like to share how I achieved adding an upgrade in REPO with REPOLib.

  • I started with setting up Unity project with REPOLib. Install dotnet 9.*, install Unity Hub, and follow this and this tutorials to get Unity project working.
  • Create a new folder in the Assets/ for your mod name.
  • Create a new REPOLib > Mod in your mod folder.
  • Follow this tutorial to create ItemContent, Item Prefab and Item. See below for more information on how to setup that.
  • Export the mod like instructed here.
  • In your.csproj include the bundle like ``.
  • In your repoharmony mod, you can load the bundle from embedded bundle, see SelfReviveUpgrade.RegisterBundledItemAndUpgrade() for more information.
  • Register your upgrade and item with REPOLib as well.

And that should be it! The rest is up to you what you are going to do with the logic.

Setting up Item prefab

While creating ItemContent and Item is covered by the wiki, it was a bit tricky to setup the item prefab (the object itself), so here is a breakdown:

  • Copy over following resources from REPO to your mod:
  • Assets/REPO/Game/Prefabs/Item Upgrae Player Grab Strength.prefab
  • Assets/REPO/Game/Materials/upgrade_strength.mat
  • Assets/REPO/Game/Textures/Texture2Ds/Upgrade_Grab-Strength_Albedo.png
  • Use albedo as a reference for your own upgrade. I drew mine in Krita.
  • Open the material (.mat) and drag and drop albedo into Albedo in the sidebar.
  • Open (double click) the prefab.prefab, and find in the Hierarchy Mesh. Expand Materials and drag and drop over your.mat copy (it took me a while to make my prefab display the correct texture).
  • While stile being in the.prefab, click the root element in Hierarchy (in my case it was Item Prefab, and in Inspector you should see Photon View, Item Upgrade (Script), Item Toggle (Script) and other components).
  • Remove Item Upgrade Player Grab Strength (Script).
  • Add a component named REPO Lib Item Upgrade (Script), and in Upgrade Id specify the ID of an upgrade you'll register with REPOLib.
  • In Item Upgrade (Script) component, under Upgrade Event (), drag and drop into the field under Runtime Only the recently added REPO Lib Item Upgrade (Script) component.
  • Select No Function > REPOLibItemUpgrade > Upgrade () one row above.

That should be it. No need to implement your own class for incrementing your own upgrade stat or creating a patch for it. Congratulations on creating your own upgrade! 🎉

Улучшение на самовоскрешение

Простой мод, который добавляет улучшение самовоскрешения. Вы покупаете это дорогое улучшение в магазине, а затем используете его. Вы получаете стопку SELF REVIVE. Когда вы умираете и у вас больше одной стопки SELF REVIVE, одна стопка расходуется, и вы возрождаетесь со всеми предметами из вашего инвентаря в грузовике.

Этот мод использует REPOLib для добавления улучшения и его предмета.

Install & use Install: BepInEx plugin

  1. The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
  2. Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
  3. Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
  4. Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.

Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPackZehs-REPOLib

File & checksum

Filename
SelfReviveUpgrade-1.0.0.zip
File size
460.7 KiB