hamstar
Terrarian
Note: Requires Mod Helpers
This mod adds durability to weapons, tools, and armor. Durability (approx. number of uses) is calculated based on the following formula:
Sell value of = x, Avg hits per second = y:
0.71 * ( (y/4 * x^1.54) / (5 + x) ) + 50
Value of valueless items:
(dmg * y/4 * 1000 + def * 1000) * rarity
Increased x2 if the item is armor or a tool.
0.71 * ( (y/4 * x^1.54) / (5 + x) ) + 50
Value of valueless items:
(dmg * y/4 * 1000 + def * 1000) * rarity
Increased x2 if the item is armor or a tool.
Also, you may adjust mod settings in the configuration file found at 'Documents/My Games/Terraria/ModLoader/Mod Configs/Durability Config.json'.
Source code available. API now available.
Note for mod authors: Mods can freely adjust config settings via. weak reference, but they are not automatically saved to file.
Installation
Requires tModLoader (+0.11). Copy the above .tmod file to your 'Documents/My Games/Terraria/ModLoader/Mods' folder to play.
v2.6.1.1
v2.6.0
- Moved some code files
- Patched some logic errors with FixPurchasedItemInfo()
- Changed config ranges to not use extreme values
- Added durability formula output as config read-only properties
- Added possible fix for server errors upon items reaching critical states
- Added possible crash fix from item breakage for invalid players (?)
- Implemented FloatInputElement for config
- Obsoleted CustomDurabilityMultipliers in favor of PerItemDurabilityMultipliers
v2.6.0
- Added ModConfig Clone method
- Fixed config constructor
- Removed net code; mod config sync handled with TML
- Updated to TML11 and MH5b (including .csproj and configs)
- Updated to MH v4.2.3
- Changed snake case to camel case
- Added some minor error checks
- Switched config to use mod version for settings updates
- Updating for Mod Helpers v2.0.2
- Restructured player code
- Assorted updates
- NOTE: Repairs MAY still be non-functional. I haven't checked.
- Added mod icon
- Added support for Hamstar Helpers v1.2.0 issue report
- Refactored net protocol
- Minor internal refactoring
- Added API
- Refactored config file to preserve modified data between versions.
- Lowered default durability of all items to ~3/4 of its v2.3.0 amount.
- Set items to only be disabled; not destroyed.
- Updated for TML 0.10
- Offloaded utility/helper code to Hamstar's Helpers mod (now a dependency)
- Numerous fixes and tweaks
- Added 'Enabled' config setting (allows disabling mod without unloading)
- Modified fishing durability use (catches only)
- Set ore weapons to have higher durability (except bows/repeaters)
- Increased durability formula's exponent value
- Normalized some custom durability adjustments (especially meteor)
- Armor gives low durability warnings
- Fixed repairs not saving with item
- Added tooltip for items with max durability loss
- Tweaked various config settings
- Disabled repair recipes when at full durability
- Removed old config if present ("Durability 1.6.0.json")
- Altered durability formula: 0.71 * ( (y/4 * x^1.54) / (5 + x) ) + 50
- Fixed mouse item critical durability warning spam.
- Changed durability formula to factor in use time.
- Added simple audio + text cue for items that are about to break.
- Improved durability display for inventory items.
- Added new config settings.
- Added new config presets for special-case items.
- Fixed certain items being handled incorrectly (harpoons, projectile-casting swords, empty mana, etc.)
- Removed meteor drop limit.
- Config file relocated to Mod Configs subfolder.
- Numerous bug fixes and code improvements (special thanks to Dark-Assassin's mod fork DurabilityX).
- Repairs degrade max durability.
- Smithing hammer rebalanced.
- Valueless items given improved formula for value.
- Config option to hide bar.
- Fixed crash bug.
- Lowered durability for Demonite, Crimtane, and Hallowed tiers.
- Added manual durability adjustments for specific items via. config file.
- Added numeric display of durability.
- Meteors now limited in quantity (configurable)
- Goblin sells Smithing Hammer
- Tool durability increased
- Fix multiplayer bug.
- Improved code and fixed config loading glitch.
- Fixed modded armor support.
- Fixed buyback exploit.
- Normalized rate of use for rapid fire items.
- Improved durability formula.
- Fixed a durability use bug making some fast-use items unbreakable.
- (Hopefully) fixed a loading crash bug.
- Armor may now be repaired at an anvil with purchasable Smithing Hammers from the merchant.
- Reforges only repair in fixed chunks at a time. Let me know if this seems calibrated properly (can be configured).
- Improved durability formula a bit.
- Fixed a major multiplayer bug.
- Added proper multiplayer support. You know, just 'cause.
- Exposed classes for DLL reference use. No gameplay changes.
- Added config option to scale the wearing rate on items. Durability can be disabled by setting this to 0, for example.
Last edited: