Jump to content

Thulecite Armor mod


Recommended Posts

You need to remove a component called "finiteuses", but also all its references in the related code.

 

The best way to do this, would be to copy the original files from "data/scripts" and put them into your mod folder. If you haven't already, put the two basic files in there too: You can just copy the "modinfo.lua" from any mod, and leave the "modmain.lua" empty.

 

Then, you would edit those files with a text editor (MS notepad works, but it's easier in programs like notepad++, eclipse, sublime, etc.). Remove all bits that say "components.finiteuses", as well as the line that says "AddComponent("finiteuses")".

 

If you encounter a problem with your mod, go to "documents/Klei/DoNotStarve" and read the last lines of the log.txt. The error message details are usually indented, the two lines above should say which file is problematic, and what line is broken. If you don't understand it, ask here and show the error message and the chunk of code that caused it.

 

 

Excuse me if that is too much to understand at once. Go through this step by step, and take frequent breaks. Feel free to ask here when you're stuck at some point.

Link to comment
Share on other sites

You need to remove a component called "finiteuses", but also all its references in the related code.

 

The best way to do this, would be to copy the original files from "data/scripts" and put them into your mod folder. If you haven't already, put the two basic files in there too: You can just copy the "modinfo.lua" from any mod, and leave the "modmain.lua" empty.

 

Then, you would edit those files with a text editor (MS notepad works, but it's easier in programs like notepad++, eclipse, sublime, etc.). Remove all bits that say "components.finiteuses", as well as the line that says "AddComponent("finiteuses")".

 

If you encounter a problem with your mod, go to "documents/Klei/DoNotStarve" and read the last lines of the log.txt. The error message details are usually indented, the two lines above should say which file is problematic, and what line is broken. If you don't understand it, ask here and show the error message and the chunk of code that caused it.

 

 

Excuse me if that is too much to understand at once. Go through this step by step, and take frequent breaks. Feel free to ask here when you're stuck at some point.

thanks for the help i'll try it out and let you know how it goes. :)

Link to comment
Share on other sites

after looking at the armor_ruins prefab there doesn't seem to be anything in there that uses that component, the ruins bat does but the armor and hat does not.

 

 TUNING.ARMORRUINS sets the armors durability, unfortunately you can only change that to a ridiculous number(this way it will take a long time till it breaks) and not remove the percentage, if you want to remove the percentage, you'd need to make a custom component that only has Armor absorption.

 

So i think this will work:

Prefabfiles = {"armor_ruins", }function RuinsPostInit(inst)	TUNING.ARMORRUINS = 9999999999endAddPrefabPostInit("armor_ruins", RuinsPostInit)
Link to comment
Share on other sites

Prefabfiles = {"armor_ruins", } function RuinsPostInit(inst)     TUNING.ARMORRUINS = (1/0) end AddPrefabPostInit("armor_ruins", RuinsPostInit)

If you are using the base game, try this, if you don't mind the percentage saying Nan, the uses becomes infinite.

 

Cool trick I learned when I was learning to an armor mod.

 

 

Also, if you have the ROG, another neat thing you can do is change how the armor works.

 

Instead of coding it as armor, you can code it as an infinite clothing item that has damage absorption, allowing for infinite use armor without the percentage indicator.

However, if you code it that way, the damage multiplier is calculated differently, the % absorption you set it at gets taken off the front of the calculation rather than where the armor calc normally occurs. 

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...