Mods / Tiered Superiority

Category: #Tweak
Author: Landar
Side: Both
Created: Sep 13th 2023 at 4:05 PM
Last modified: Apr 19th at 12:42 AM
Downloads: 1235
Follow Unfollow 27

Latest file for v1.19.7:
tieredsuperiority_1.1.2.zip 1-click install


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

 

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.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v1.1.2 339 Apr 19th at 12:42 AM Show tieredsuperiority_1.1.2.zip Install now
v1.1.1 427 Oct 17th 2023 at 2:03 AM Show tieredsuperiority_1.1.1.zip Install now
v1.1.0 260 Sep 21st 2023 at 4:43 AM Show tieredsuperiority_1.1.0.zip Install now
v1.0.0 209 Sep 13th 2023 at 4:06 PM Show tieredsuperiority_1.0.0.zip Install now

5 Comments (oldest first | newest first)

💬 GrishkoJiggers, Apr 15th 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 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 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)