Mods / Tiered Superiority

Tags: #Tweak
Author: Landar
Side: Both
Created: Sep 13th 2023 at 4:05 PM
Last modified: Jun 12th at 8:51 PM
Downloads: 3294
Follow Unfollow 51

Latest release (for Vintage Story 1.20.12, outdated):
tieredsuperiority_1.2.0.zip  1-click install


Now supports ConfigLibThis is an optional dependancy, configs are still available the usual way.

New in v1.2.0: Configs will now automatically update themselves between versions! Configs from v1.1.2 or earlier will be completely regenerated, but going forward will keep your settings while migrating your configs to the newer version.


Features:

Tired of your hard-earned tools vanishing into dust after just a few swings?

 

This mod compares your tool's tool tier and the targeted block's mining tier to give a chance to refund some durability when the block is broken.

Refund Chance = (tool tier - mining tier) x 10% (by default).

To let you know that your tool has been refunded durability, a small 'ding' sound will also play upon a successful refund.

 

Tools that usually have a tool tier of 0 will act as if they are of the tier they're made of for the sake of calculating refund chances. For example, this means that a bronze shovel with a tool tier of 0 will still act as "tool tier 3" only when calculating refund chances.

Tools that this mod affects include:

  • Axe
  • Hammer (also when smithing)
  • Hoe
  • Knife
  • Pickaxe
  • Propick
  • Saw
  • Scythe
  • Shears
  • Shovel

Mod Configs:

A config file is available to adjust the refund chances, as well as to enable/disable the refund sound.

The config file can be found at 'VintageStoryData/ModConfig/tieredsuperiorityconfig.json' and will be generated upon first loading of a world with this mod enabled.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.2.0 tieredsuperiority 491 Jun 12th at 8:51 PM tieredsuperiority_1.2.0.zip 1-click install

Changelog v1.2.0

  • Fixed: When a tool broke while in use and was replaced with one from the inventory, the replacing tool would take on the durability of the broken tool.
  • Updated: Hammer will now correctly identify slag/metal voxels when smithing iron blooms, and treat slag voxels as tier 0.
  • Updated: Config files now have a 'version' field to check whether or not the current config file is out of date.
    • Out-of-date configs (with version numbers) will have any old settings migrated to the new config file.
    • Config files without a version number will be regenerated as a default config file.
  • Added: Config fields for toggling the refund behavior for certain materials groups:
    • Primitive (tier 1)
      • Stone
      • Bone
    • Soft Metals (tier 2)
      • Copper
      • Bismuth
      • Silver
      • Gold
      • Scrap
      • Ruined
    • Bronze Alloys (tier 3)
      • Tin Bronze
      • Bismuth Bronze
      • Black Bronze
    • Iron (tier 4)
      • Iron
      • Meteoric Iron
    • Steel (tier 5)
      • self explanatory :P
1.1.3 tieredsuperiority 639 Jan 29th at 3:43 PM tieredsuperiority_1.1.3.zip 1-click install

Changelog v1.1.3

  • Added: ConfigLib support, requires regeneration of config file
  • Fixed: Hopefully fixed additional bugs related to shears/scythe
  • Fixed: Forgot to turn off verbose debug logs lol
1.1.2 tieredsuperiority
1.19.7 - 1.19.8 1.20.0 - 1.20.1
762 Apr 19th 2024 at 12:42 AM tieredsuperiority_1.1.2.zip 1-click install

Changelog v1.1.2

  • Fixed: Hammer logic updated to work with vanilla code refactors
  • Fixed: Shears/scythe updated to work with vanilla code refactors
  • Fixed: Scythe always removing grass, even on trim mode
  • Fixed: Scythe causing crashes when block selection was null
1.1.1 tieredsuperiority
1.18.0 - 1.18.1 1.18.2 - 1.18.5 1.18.6 - 1.18.7 1.18.9 - 1.18.15
595 Oct 17th 2023 at 2:03 AM tieredsuperiority_1.1.1.zip 1-click install

Changelog v1.1.1:

  • Fixed edge case where player would sometimes crash if their tool broke while performing durability refund checks.
  • Also relaxed the version requirements to any 1.18.0+
1.1.0 tieredsuperiority
1.18.9 - 1.18.13
419 Sep 21st 2023 at 4:43 AM tieredsuperiority_1.1.0.zip 1-click install

Changelog v1.1.0

  • Added refund functionality to axes, scythes, and shears.
  • Added support for refunding variable amounts of durability lost at once (ex. an axe taking 5 durability damage when cutting down a tree).
  • Added support for tools with a tool tier of 0 to act at their material tier for refund calculations.
  • Fixed bug where durability would not refund correctly.
  • Fixed crash when incorrectly guessing API side.
1.0.0 tieredsuperiority 372 Sep 13th 2023 at 4:06 PM tieredsuperiority_1.0.0.zip 1-click install

initial release


14 Comments (oldest first | newest first)

💬 ArreLuisVolke, Aug 31st at 12:18 AM

Would be really nice if you could update this to 1.21, it's agonizing to play without it.

💬 VaelophisNyx, Jun 15th at 1:38 AM

Thank you!

💬 Landar , Jun 12th at 8:53 PM

VaelophisNyx Louse sorry for taking so long, but I've finally addressed these issues in the latest update!

💬 Louse, Apr 12th at 12:48 AM

This mod is causing any tool it replaces the breaking tool with to take on its durability (If you have a chert shovel with a max durability of 60 and you have a Steel shovel with 3000 and the chert shovel breaks the steel shovel will immediately replace it and have 60/3000 durability) Update: After a few weeks its happened again even with this mod off but it seems having it on guarantees this to happen

💬 VaelophisNyx, Feb 1st at 12:37 AM

weird request: could a config option be added to make stone tools not benefit from this mod? I think that's my only real gripe with this, as it can (randomly) add a ton of lifespan to stone tools

💬 Landar , Jan 31st at 11:02 PM

Mlodyowiec sorry, I accidentally uploaded a version with my debug logs on that I only caught a few hours after posting. The current version (still labeled v1.1.3) should have that fixed

💬 Mlodyowiec, Jan 31st at 3:21 PM

For some reason after the latest update there's a chat notification:

Durability Diff:1
Refund chance 15 x (1-0) = 15%

Doesn't seem like I can turn it off, is there any way to disable it?

💬 NastyFlytrap, Dec 19th 2024 at 4:42 PM

Configlib support, pls?

💬 Landar , Dec 12th 2024 at 3:02 AM

confirmed still working with game version v1.20.0-rc.1

💬 GrishkoJiggers, Apr 15th 2024 at 6:06 AM

Hi there, similar vein to previous comment, the scythe behaves strangely and frequently leads to crashes. Here's the associated log:

15.4.2024 06:02:27 [Error] Exception: Object reference not set to an instance of an object.
at TieredSuperiority.src.TSBehavior.PostfixOnBlockBrokenWith(CollectibleObject __instance, Entity byEntity, ItemSlot itemslot, BlockSelection blockSel) in C:\Users\heatb\Desktop\game dev\_vintage story modding\mods\TieredSuperiority\TieredSuperiority\src\TSBehavior.cs:line 64
at Vintagestory.GameContent.ItemShears.OnBlockBrokenWith_Patch3(ItemShears this, IWorldAccessor world, Entity byEntity, ItemSlot itemslot, BlockSelection blockSel, Single dropQuantityMultiplier)
at Vintagestory.GameContent.ItemScythe.performActions(Single secondsPassed, EntityAgent byEntity, ItemSlot slot, BlockSelection blockSelection) in VSSurvivalMod\Item\ItemScythe.cs:line 172
at Vintagestory.GameContent.ItemScythe.OnHeldAttackStep(Single secondsPassed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSelection, EntitySelection entitySel) in VSSurvivalMod\Item\ItemScythe.cs:line 135
at Vintagestory.API.Common.CollectibleObject.OnHeldUseStep(Single secondsPassed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel) in VintagestoryApi\Common\Collectible\Collectible.cs:line 1143
at Vintagestory.Server.ServerSystemInventory.callOnUsing(ItemSlot slot, ServerPlayer player, BlockSelection blockSel, EntitySelection entitySel, Single& secondsPassed, Boolean callStop) in VintagestoryLib\Server\Systems\Inventory.cs:line 519
at Vintagestory.Server.ServerSystemInventory.HandleHandInteraction(Packet_Client packet, ConnectedClient client) in VintagestoryLib\Server\Systems\Inventory.cs:line 252
at Vintagestory.Server.ServerMain.ProcessNetMessage(NetIncomingMessage msg, NetServer mainSocket) in VintagestoryLib\Server\ServerMainNetworking.cs:line 138

💬 Pervy_Sage, Jan 25th 2024 at 11:35 PM

Something is going on with the scyth and this mod. Even with trim grass function set on it will remove all grass as if the remove grass function is set on. Once I remove the mod and try again the scyth behaves as normal. The mod also seems to be burning the durability of the scyth at a higher rate than it should, at least double, when cutting grass.

💬 SwagPenguin, Jan 21st 2024 at 6:24 PM

This mod is a really cool Idea. I makes total sense that the material you are breaking should have an impact on how quickly it breaks the tool you are using. A steel shovel is never going to be broken by dirt. and a steel pickaxe would have almost no wear when mining sand stone. 

💬 GrishkoJiggers, Oct 7th 2023 at 1:14 AM

Issue on multiplayer where breaking a tool while destroying a block will throw an exception to the server resulting in immediate disconnect (game version 1.18.13):

[Server Error] System.NullReferenceException: Object reference not set to an instance of an object.
   at Vintagestory.API.Common.CollectibleObject.GetRemainingDurability(ItemStack itemstack) in C:\Users\Tyron\Documents\vintagestory\game\VintagestoryApi\Common\Collectible\Collectible.cs:line 396
   at TieredSuperiority.src.TSBehavior.PostfixOnBlockBrokenWith(CollectibleObject __instance, Entity byEntity, ItemSlot itemslot, BlockSelection blockSel) in C:\Users\heatb\Desktop\game dev\_vintage story modding\mods\TieredSuperiority\TieredSuperiority\src\TSBehavior.cs:line 58
   at Vintagestory.API.Common.CollectibleObject.OnBlockBrokenWith_Patch4(CollectibleObject this, IWorldAccessor world, Entity byEntity, ItemSlot itemslot, BlockSelection blockSel, Single dropQuantityMultiplier)
   at Vintagestory.Server.ServerSystemBlockSimulation.TryModifyBlockInWorld(ServerPlayer player, Packet_ClientBlockPlaceOrBreak cmd) in C:\Users\Tyron\Documents\vintagestory\game\VintagestoryLib\Server\Systems\World\BlockSimulation.cs:line 562
   at Vintagestory.Server.ServerSystemBlockSimulation.HandleBlockPlaceOrBreak(Packet_Client packet, ConnectedClient client) in C:\Users\Tyron\Documents\vintagestory\game\VintagestoryLib\Server\Systems\World\BlockSimulation.cs:line 336
   at Vintagestory.Server.ServerMain.ProcessNetMessage(NetIncomingMessage msg, NetServer mainSocket) in C:\Users\Tyron\Documents\vintagestory\game\VintagestoryLib\Server\ServerMainNetworking.cs:line 138
7.10.2023 01:10:19 [Server Warning] Server overloaded. A tick took 985ms to complete.
💬 NukoSan, Sep 17th 2023 at 4:23 PM

Bug?:

System.NullReferenceException: Object reference not set to an instance of an object.
at TieredSuperiority.src.TSBehaviorHammer.OnHeldAttackStop(Single secondsPassed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSelection, EntitySelection entitySel, EnumHandHandling& handling) in C:\Users\heatb\Desktop\game dev\_vintage story modding\mods\TieredSuperiority\TieredSuperiority\src\TSBehaviorHammer.cs:line 69
at Vintagestory.GameContent.ItemHammer.OnHeldAttackStop_Patch1(ItemHammer this, Single secondsPassed, ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel)
at Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.HandleHandInteraction(Single dt) in VintagestoryLib\Client\Systems\Player\MouseInWorldInteractions.cs:line 332
at Vintagestory.Client.NoObf.SystemMouseInWorldInteractions.OnGameTick(Single dt) in VintagestoryLib\Client\Systems\Player\MouseInWorldInteractions.cs:line 165
at Vintagestory.Common.EventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world) in VintagestoryLib\Common\EventManager.cs:line 59
at Vintagestory.Client.NoObf.ClientMain.MainRenderLoop(Single dt) in VintagestoryLib\Client\ClientMain.cs:line 796
at Vintagestory.Client.NoObf.ClientMain.MainGameLoop(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 712
at Vintagestory.Client.GuiScreenRunningGame.RenderToPrimary(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 200
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 668
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 643
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 76
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 312
at Vintagestory.Client.ClientProgram.<>c__DisplayClass9_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 129
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом