Jump to content

How to edit armor durability?


Recommended Posts

If you want to change the starting values of an existing armor, do something like this at the bottom of your modmain.lua:

AddPrefabPostInit("armor_bramble", function(inst)
	inst.components.armor:InitCondition(450, 0.65)
end)

Now, this will change the default values of the armor, but if the server is already running, the Bramble Husk armors which currently exist in the game, will load their previous condition value, so even if they were unused, they will still have the old 375 as their current condition, and show that they have been "damaged" down from their new maximum. There is a workaround to fix that, but I don't think it's warranted. Let me know if that's a problem.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...