tModLoader Durability

It's mainly about the value of the items. Spears are valued at 1000, AKA 10 silver coins (sells for 2 silver @ 20% of max value). Plugged into the formula, that gives them ~97 durability; 97 total 'uses' (hits). That isn't a lot.

The only solution I can currently think of would be to manually implement a table of item values to override the default values for these cases; some items weren't well balanced according to value.

Edit: Fixed durability formula and wear and tear errors, hopefully fixed the aforementioned loading crash.


  • I understand that, but the formula of uses does hurts some items (Mainly items that focus on piercing) . If you were to boost by 0.25 or 0.5 the durability of "mainly piercing" items like Spears, the durability would change to 122~146 for Spear, which in my opinion "feels more right", and would make people rely on less popular weapons (And make them somewhat more useful). I would need to test around more, but so far spears seem far too fragile for what they do, and in need of a balance.
  • Also, I am surprised there is no way to disable the smithing hammer in the config menu. I don't know about other people's mods, but in vanilla Terraria there's no such a thing as "unique armor", or extremely rare armor pieces. So repairing armor feels somewhat cheap to me, when I should instead work to make a new one. Any way to disable the Smithing Hammer in the near future? Just like how you can disable life-crafting in the Lives mod.
  • Another bullet point: Any reason why pets have durability? They are just cosmetic. I don't think people should be able to lose pets. I can understand losing Light pets and hooks, but pets?
  • And another thing... I haven't noticed it but... Armor in the vanity slot will not lose durability, right? Maybe you should make it so that the durability bar hides when the armor is in the vanity slot? Or would that be too much coding? I have ZERO knowledge of coding, I just give my suggestions based on what I think the mod is missing.
 
Well you can set 'CanRepair' to false to disable all repairing, if you really want the smithing hammer gone. I suppose I could add a 'SmithingHammerEnabled' setting as well...

Pets have durability because they're actually mortal It's just a side effect of the durability computing formula. I guess I could change it... it wouldn't make much sense to have to bludgeon a beloved pet with a smithing hammer now would it?`:confused:


Also, it is completely possible for me to control when the durability bar is rendered. I had to do something like that to fix durability appearing in crafting recipes. I'll argue that keeping a read on remaining durability even when in storage (e.g. as a vanity item) still makes sense, though.
 
Last edited:
Well you can set 'CanRepair' to false to disable all repairing, if you really want the smithing hammer gone. I suppose I could add a 'SmithingHammerEnabled' setting as well...

Pets have durability because they're actually mortal It's just a side effect of the durability computing formula. I guess I could change it... it wouldn't make much sense to have to bludgeon a beloved pet with a smithing hammer now would it?`:confused:


Also, it is completely possible for me to control when the durability bar is rendered. I had to do something like that to fix durability appearing in crafting recipes. I'll argue that keeping a read on remaining durability even when in storage (e.g. as a vanity item) still makes sense, though.


But I don't want to disable ALL repairing. I want to repair my weapons! But not my armour. An option for a Smithing Hammer disable would be neat. I mean... There is an option for the Lives mod, so this is all for equality-sake! But who knows... Maybe the capitalism mod can balance the Smithing hammer.

Exactly my point. Pets are too sacred for that. Smack all of the light pets tho. They aren't even pets!

That is fine I guess, as long as they don't go down while in vanity. Some people might believe they actually go down while in vanity.


Also... Anything about durability for accesories?
 
Last edited:
Accessories? Except by something generic like taking hits or elapsed time, it'd take a lot of work to have accessories have their respective fitting formulae. I wouldn't even attempt adding specific formulae for others' modded items.

One thing I can do is implement a way to input formulas by configuration, then have them apply for specific (or general sets of) items. That'd also take a lot of work, but it would allow modders to define rules for their custom items, or let others take up some of the heavy lifting for implementing durability for the game's many specific items.
 
Accessories? Except by something generic like taking hits or elapsed time, it'd take a lot of work to have accessories have their respective fitting formulae. I wouldn't even attempt adding specific formulae for others' modded items.

One thing I can do is implement a way to input formulas by configuration, then have them apply for specific (or general sets of) items. That'd also take a lot of work, but it would allow modders to define rules for their custom items, or let others take up some of the heavy lifting for implementing durability for the game's many specific items.


Yeah I suggested something before: Make accesories be time-based. By seconds or in-game "ticks". Elapsed equipped time (in the non-vanity slot) seems like the best option for now.
Then, when you feel like, you could start changing the formula of certain accesories, but the "main" formula is "elapsed time". So that accesories that you haven't worked on (Modded accesories, for example) work on elapsed time basis.

If I knew how to code, I could assign that, it seems like such an interesting concept! Tackle Bag's going doing per fishing catch. Shackle going down per hit you take, jump accesories going down each time you jump and boot accesories each time you sprint, etc.
 
Well... @hamstar , I just found a massive bug.

If you sell an item, and rebuy it, it will be at full durability again. How come I didn't noticed this before?
I was selling some weapons to the skeleton merchant, and the noticed this.

Look at this little video to see:
 
Looks like that's a limit of TML's ItemInfo with regards to keeping added data upon a given item. I'll look into a solution shortly.
 
Last edited:
Looks like that's a limit of TML's ItemInfo with regards to keeping added data upon a given item. I'll look into a solution shortly.

Solution soon pl0x.

Also, are you OK if I reword your opening threads to make them more user-friendly? Or do you like your minimalistic style?
 
Here should be your solution to the problem described above.
Does not seem to work.

I just now managed to fix this after a day of work by accounting for items disappearing out of the current npc's shop.
 

Attachments

  • Durability v1.7.3.zip
    15.1 KB · Views: 202
Hello first of all i love all of your mods! I love them so much because it gives another dimension to Terraria and makes it more difficult.
But i have a slight problem everytime i try to load your mod in my modlist i get this error:

error.png

Is there a way to get around this?
Greetings
 
Hello first of all i love all of your mods! I love them so much because it gives another dimension to Terraria and makes it more difficult.
But i have a slight problem everytime i try to load your mod in my modlist i get this error:
Is there a way to get around this?
Greetings
Try this.

Edit: 1.7.5 with improved code:
 

Attachments

  • Durability v1.7.4.zip
    15 KB · Views: 188
  • Durability v1.7.5.zip
    15.1 KB · Views: 192
Last edited:
1.7.8:
- Fixed a multiplayer bug.

Edit: 1.8.0:
- Meteors now limited in quantity (configurable)
- Goblin sells Smithing Hammer
- Tool durability increased
 

Attachments

  • Durability v1.7.8.zip
    15.2 KB · Views: 198
  • Durability v1.8.0.zip
    15.8 KB · Views: 205
Last edited:
So, I've been wanting to use this, but I'm getting a crash on re-joining:

Durability_Crash.jpg


This has happened multiple times, and, as much as I binge play, I don't plan on doing an entire run in one go...
 
Back
Top Bottom