Jump to content

Repairable or fuelable items


Recommended Posts

Did you look at the code for the Nightmare Amulet?

You can do this using the fueled-component, using one of the standard fuel-types (default is BURNABLE. Not sure what the others are. Nightmare Fuel, maybe? You can check that out in the game code).

It sounds like the repairable-component is a better fit for this case, but then you have to create a custom item which will function as a repair_material (technically, you could add the repairer-component to any existing game-prefab, and set it as the repair_material on the item, but that seems a bit intrusive. If you do this, at least make sure to check whether the prefab already has a repairer-component on it, because if it does, then it's already used to repair something else, and the repairer-component has the values for how much 1 unit of that repair_material repairs the item, so if you change it, you might mess something else up.

Link to comment
Share on other sites

Search the game files for "repairer" WITH the quotes. You'll find a bunch of examples of how it works. If you need starter-help look at this post. It should get you going with some QoL-stuff, game- and mod-files, as well as how to debug things.

It shouldn't be more than:

  • add a repairer-component to all silk, and set the appropriate settings on that component
  • add a repairable-component to your item
  • set the silk-prefab as the repairer_item in the repairable-component.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...