Mods / Simple Weight Mod

Category: #Other #Utility
Author: KenigVovan
Side: Both
Created: Jan 15th 2022 at 9:10 AM
Last modified: 1 day ago
Downloads: 6865
Follow Unfollow 72

Latest file for v1.20.0-rc.1:
weightmod_0.3.3.zip 1-click install


Mod adds weigh for selected items and blocks.
Using config file in MocConfig/weightmod.json you can change weight values for them.

Config values:

WEIGHTS_FOR_ITEMS and WEIGHTS_FOR_BLOCKS are dictionaries in which you can set weight for item/block
[for example if you add "game:crystalizedore-poor-" : 50 in _ITEMS, then every item which has "game:crystalizedore-poor-" in its code will have weight 50]

[If item/block's weight was already set using value from dictionary but it satisfies other name value then it won't be overwritten.

If you have the first record "game:-poor-cassiterite-": 42 and the second "game:crystalizedore-poor-": 71 in _ITEMS dictionary then for example "game:crystalizedore-poor-cassiterite-slate" will have weight 42]

WEIGHTS_BONUS_ITEMS  items which add weight bonus, at the moment it works for backpacks and for players cloths

MAX_PLAYER_WEIGHT  max weight player can carry (without bonus from bags and with full health). When overloaded player can not move, jump.

WEIGH_PLAYER_THRESHOLD  ratio of current weight to maximum weight when walkspeed starts to lower (0 < value <=1)

RATIO_MIN_MAX_WEIGHT_PLAYER_HEALTH if you set this variable to 0.4 then player maximum weight won't be lower than  (MAX_PLAYER_WEIGHT * RATIO_MIN_MAX_WEIGHT_PLAYER_HEALTH) even if player has 0.1 of his maximum health.

ACCUM_TIME_WEIGHT_CHECK - how often weight CAN be calculated (seconds), it won't be recalculated if player's health or inventories were not changed

CLASS_WEIGHT_BONUS let you set weight bonus for selected classes (class_name:bonus_weight)


If you want to set buff/debuff to player from your mod you can add a new value to entity.Stats["weightmodweightbonus"], mod get GetBlended on it during weight calculation.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v0.3.3 50 6 days ago Show weightmod_0.3.3.zip Install now
v0.3.2 68 Nov 27th at 5:22 PM Show weightmod_0.3.2.zip Install now
v0.3.1 22 Nov 27th at 4:42 PM Show weightmod_0.3.1.zip Install now
v0.3.0 152 Oct 9th at 3:53 PM Show weightmod_0.3.0.zip Install now
v0.2.6 12 1 day ago Show weightmod_0.2.6.zip Install now
v0.2.5 187 Sep 17th at 5:53 AM Show weightmod_0.2.5.zip Install now
v0.2.4 183 Aug 1st at 6:23 AM Show weightmod_0.2.4.zip Install now
v0.2.3 131 Jul 13th at 2:27 PM Show weightmod_0.2.3.zip Install now
v0.2.2 113 Jul 7th at 12:54 PM Show weightmod_0.2.2.zip Install now
v0.2.1 518 Nov 6th 2023 at 6:53 AM Show weightmod_0.2.1.zip Install now
v0.2.0 669 Apr 19th 2023 at 7:21 PM Show weightmod_v0.2.0.zip Install now
v0.1.12 198 Mar 16th 2023 at 4:03 PM Show weightmod_v0.1.12.zip Install now
v0.1.11 171 Mar 14th 2023 at 8:23 PM Show weightmod_v0.1.11.zip Install now
v0.1.10 382 Jan 27th 2023 at 4:07 PM Show weightmod_v0.1.10.zip Install now
v0.1.9 222 Jan 17th 2023 at 8:09 PM Show weightmod_v0.1.9.zip Install now
v0.1.7 297 Dec 3rd 2022 at 10:39 AM Show weightmod_petai_v0.1.7.zip Install now
v0.1.6 199 Nov 27th 2022 at 6:20 PM Show weightmod_petai_v0.1.6.zip Install now
v0.1.5 234 Nov 14th 2022 at 8:33 PM Show weightmod_v0.1.5.zip Install now
v0.1.4 221 Nov 13th 2022 at 10:07 AM Show weightmod_v0.1.4.zip Install now
v0.1.3 226 Oct 23rd 2022 at 12:31 PM Show weightmod_v0.1.3.zip Install now
v0.1.2 232 Sep 22nd 2022 at 2:44 PM Show weightmod_v0.1.2.zip Install now
v0.1.1 270 Sep 10th 2022 at 8:27 AM Show weightmod_v0.1.1.zip Install now
v0.1.0 269 Jul 9th 2022 at 10:04 AM Show weightmod_v0.1.0.zip Install now
v0.0.7 270 Jun 28th 2022 at 10:40 AM Show weightmod_v0.0.7.zip Install now
v0.0.6 258 Jun 26th 2022 at 7:09 AM Show weightmod_v0.0.6.zip Install now
v0.0.5 236 Jun 16th 2022 at 5:31 PM Show weightmod_v0.0.5.zip Install now
v0.0.4 265 Jun 4th 2022 at 12:35 PM Show weightmod_v0.0.4.zip Install now
v0.0.3 253 May 31st 2022 at 9:25 AM Show weightmod_v0.0.3.zip Install now
v0.0.2 226 Apr 18th 2022 at 12:26 PM Show weightmod_v0.0.2.zip Install now

17 Comments (oldest first | newest first)

💬 Venusgate, Nov 10th at 4:33 AM

Hiya! Is there a way you can all more lines to the config to include things like soil and gravel, just default setting them to 0? My main desire to use this mod is because it feels silly to carry half a hut of dirt in my pocket with no bags. Lowering player weight capacity doesn't really do much if half the items dont have a weight value.

 

Alternatively, do you know what the class names are for the other blocks?

 

Otherwise working well in 1.20

 

Thanks!

💬 NastyFlytrap, Oct 18th at 10:28 PM

Oh god, dont give the devs ideas! This was bad enough in skyrim!

💬 Aeliaz, Sep 13th at 2:10 PM

Hello KenigVovan ! Crash with version 0.2.4 ! When i join my private server. (Full new world. First Connection)

Running on 64 bit Windows 10.0.19045.0 with 16235 MB RAM
Game Version: v1.19.8 (Stable)
13-09-24 16:08:00: Critical error occurred in the following mod: weightmod@0.2.4
Loaded Mods: aculinaryartillery@1.1.5, ancientarmory@1.0.5, balancedthirst@0.0.42, Ceramos@0.5.1, chiseltools@1.12.4, compass2@3.0.0, crazyskincustomization@1.0.0, decor@1.1.5, fantasycreatures@0.7.1, globalbloc@1.0.0, HangingOilLamps@1.0.1, hideandfabric@1.3.0, hideplayername@2.0.6, immersivecorpsedrop@1.0.2, mannequinstand@1.0.3, millwright@1.1.7, civpins@1.0.5, pipeleaf@1.8.0, primitivesurvival@3.6.4, rpvoicechat@2.3.9, rustandrot@0.0.7, saltandsands@1.0.2, game@1.19.8, vtr@3.0.3, alchemy@1.6.34, ancienttools@1.5.18, animalcages@3.0.3, animationmanagerlib@0.8.8, apelanterns@1.0.0, flags@0.33.1, bedspawnv2@1.2.0, beehivekiln@1.6.1, betterruins@0.3.5, blacksmithenhancements@1.0.5, butchering@1.6.8, cancrops@0.2.3, carryon@1.7.4, chickenfeed@1.1.3, coinage@1.10.2, commonlib@2.4.0, cooperativecombat@1.1.1, danatweaks@3.2.1, displaycasewall@1.0.3, expandedfoods@1.7.0, fancyplanters@1.2.0, foodshelves@1.2.0, fromgoldencombs@1.6.3, heatretention@1.0.2, herbarium@1.3.0, hit@2.1.1, hydrateordiedrate@1.2.8, immersivewoodchopping@0.7.3, immersivewoodsawing@0.2.5, itemizer@1.0.2, kegrevivedagain@1.1.0, lavoisier@1.3.0, lichenredux@1.8.1, liquidcontainers@1.2.0, maltiezbows@1.0.4, medievalexpansion@3.13.1, moreanimals@1.3.5, pigfeed@1.0.4, postsandbeams@1.3.2, rivers@3.1.0, simplecloth@1.0.2, sleep_rework@0.3.0, SoundOfConfession@1.0.3, stillnecessaries@1.1.2, stonebakeoven@1.1.3, thecritterpack@0.9.1, vanvar@5.0.3, vinconomy@0.3.1, creative@1.19.8, vsimgui@1.1.5, vsinstruments@1.2.7, survival@1.19.8, weightmod@0.2.4, wildfarmingrevival@1.2.5, alchemistry@1.0.2, bullseye-continued@2.5.8, configlib@1.3.13, em@2.7.0, fsmlib@0.4.5, morefloors@2.1.1, playercorpse@1.10.1-rc.1, stonequarry@3.3.1, wildcraftfruit@1.2.2, wildcraftherb@0.0.1, wildcrafttree@1.2.0, maltiezcrossbows@0.3.11, maltiezfirearms@0.5.4, moreroads@1.5.7, tailorsdelight@1.7.1, dressmakers@1.4.0
System.NullReferenceException: Object reference not set to an instance of an object.
at weightmod.src.HudWeightPlayer.ComposeGuis() in C:\Users\koeni\source\repos\weightmod_7\weightmod\weightmod\weightmod\src\HudWeightPlayer.cs:line 75
at weightmod.src.HudWeightPlayer.OnOwnPlayerDataReceived() in C:\Users\koeni\source\repos\weightmod_7\weightmod\weightmod\weightmod\src\HudWeightPlayer.cs:line 56
at Vintagestory.Client.NoObf.GuiManager.OnOwnPlayerDataReceived() in VintagestoryLib\Client\Systems\Gui\GuiManager.cs:line 274
at Vintagestory.Client.NoObf.ClientMain.OnOwnPlayerDataReceived() in VintagestoryLib\Client\ClientMain.cs:line 702
at Vintagestory.Client.NoObf.GeneralPacketHandler.HandlePlayerData(Packet_Server packet) in VintagestoryLib\Client\Systems\GeneralPacketHandler.cs:line 274
at Vintagestory.Client.NoObf.ProcessPacketTask.ProcessPacket(Packet_Server packet) in VintagestoryLib\Client\Systems\NetworkProcess.cs:line 448
at Vintagestory.Client.NoObf.ProcessPacketTask.Run() in VintagestoryLib\Client\Systems\NetworkProcess.cs:line 442
at Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 776
at Vintagestory.Client.GuiScreenConnectingToServer.RenderToDefaultFramebuffer(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenConnectingToServer.cs:line 313
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 676
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 651
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 88
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 324
at Vintagestory.Client.ClientProgram.<>c__DisplayClass9_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 128
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

💬 KenigVovanAuthor, Aug 1st at 6:23 AM

Dirt_Cheap

0.2.4 should fix it

💬 Dirt_Cheap, Aug 1st at 2:53 AM

Im getting crashes on world load when using the latest version of this mod, I can roll back to the version from a few days prior and have no crashes. I pasted the crash log below. Thank you

Running on 64 bit Windows 10.0.22631.0 with 32451 MB RAM
Game Version: v1.19.8 (Stable)
7/31/2024 10:36:54 PM: Critical error occurred in the following mod: weightmod@0.2.3
Loaded Mods: aculinaryartillery@1.1.5, ancientarmory@1.0.4, balancedthirst@0.0.36, bettertraders@0.0.7, crazyskincustomization@1.0.0, eftraders@1.0.2, entitiesinteract@1.0.11, caninae@1.0.16, capreolinae@1.1.5, casuariidae@1.0.8, dinornithidae@0.7.0, manidae@1.0.2, HangingOilLamps@1.0.1, hideplayername@2.0.6, indappledgroves@0.7.3-dev.2, lessdeadlymushrooms@1.19.0, newworldgianttortoises@1.1.1, primitivesurvival@3.6.2, rope-bridges@1.1.0, spyglass@0.5.1, swordz@1.1.8, untamedwildsursidae@1.0.8, game@1.19.8, ancienttools@1.5.18, animationmanagerlib@0.8.8, autoatlas@1.0.1, barbershop@0.4.1, beartrap@1.1.1, bedspawnv2@1.2.0, betterruins@0.3.7, brutalstory@1.0.0, butchering@1.6.5, carryon@1.7.4, clipfix@2.0.2, commonlib@2.5.0-rc.2, crosscomme@1.0.10, danatweaks@2.3.0, expandedfoods@1.6.9, extrainfo@1.8.0, fendragonbcs@0.0.3, freedomunits@1.1.4, herbarium@1.2.0, hit@2.1.1, immersivetpscamera@1.0.2, lichenredux@1.8.3, liquidcontainers@1.2.0, maltiezbows@1.0.4, medievalexpansion@3.13.1, mif@1.0.1, moreanimals@1.3.5, natsachievements@1.1.0, outlawmod@1.2.3, petai@2.2.6, postsandbeams@1.3.2, rivers@3.1.0, sailboat@1.3.1, scarecrow@1.4.3, shieldsrebalance@1.0.0, simplecombos@1.0.2, simplefootstepsredux@1.0.0, starvation@1.0.5, targetDotSmall@1.1.0, th3dungeon@0.2.1, thecritterpack@0.9.1, trailmod@1.0.8, versionchecker@1.0.0, creative@1.19.8, vsimgui@1.1.5, survival@1.19.8, vsvillage@1.0.6, weightmod@0.2.3, xlib@0.8.6, bugnetcompatibility@1.0.1, bullseye-continued@2.5.8, cats@2.0.3, configlib@1.3.13, feverstonewilds@1.5.0-rc.2, fsmlib@0.4.5, gespileslib@1.2.0, playercorpse@1.10.1-rc.1, simplevillages@1.0.1, simplewinddirection@1.0.2, vsvillageaged@0.0.4, vsvillageindustrial@0.0.4, wildcraftfruit@1.2.1, wildcraftherb@0.0.1, wildcrafttree@1.1.0, wolftaming@2.1.3, gespilesgran@1.0.1, maltiezcrossbows@0.3.11, maltiezfirearms@0.5.4, statushudcont@2.1.1
System.NullReferenceException: Object reference not set to an instance of an object.
at weightmod.src.HudWeightPlayer.ComposeGuis() in C:\Users\koeni\source\repos\weightmod_7\weightmod\weightmod\weightmod\src\HudWeightPlayer.cs:line 75
at weightmod.src.HudWeightPlayer.OnOwnPlayerDataReceived() in C:\Users\koeni\source\repos\weightmod_7\weightmod\weightmod\weightmod\src\HudWeightPlayer.cs:line 56
at Vintagestory.Client.NoObf.GuiManager.OnOwnPlayerDataReceived() in VintagestoryLib\Client\Systems\Gui\GuiManager.cs:line 274
at Vintagestory.Client.NoObf.ClientMain.OnOwnPlayerDataReceived() in VintagestoryLib\Client\ClientMain.cs:line 702
at Vintagestory.Client.NoObf.GeneralPacketHandler.HandlePlayerData(Packet_Server packet) in VintagestoryLib\Client\Systems\GeneralPacketHandler.cs:line 274
at Vintagestory.Client.NoObf.ProcessPacketTask.ProcessPacket(Packet_Server packet) in VintagestoryLib\Client\Systems\NetworkProcess.cs:line 448
at Vintagestory.Client.NoObf.ProcessPacketTask.Run() in VintagestoryLib\Client\Systems\NetworkProcess.cs:line 442
at Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 776
at Vintagestory.Client.GuiScreenConnectingToServer.RenderToDefaultFramebuffer(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenConnectingToServer.cs:line 313
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 676
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 651
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 88
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 324
at Vintagestory.Client.ClientProgram.<>c__DisplayClass9_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 128
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 93

💬 KenigVovanAuthor, Jul 10th at 4:13 PM

Maamessu

yep, I'll add them into config during the week

💬 Maamessu, Jul 9th at 5:20 PM

Could we get an option to move the weight bar with an x/y offset in the config settings for specific placement? Right now both options overlap with bars added by other mods.

💬 Kaofan, Oct 8th 2023 at 6:48 PM

KenigVovan

Polish Version

pl.json

{
"item_weight": "Waga Przedmiotu: ",
"bonus_weight": "Waga Bonusowa: "
}

💬 Ryuu, Sep 7th 2023 at 9:30 PM

This still working but for 1.18.10?

💬 WeedusFetus, Jul 19th 2023 at 1:40 PM

I second the xskills mod, that would be amazing!

💬 xCoiotex, Sep 10th 2022 at 10:26 PM

Is it possible to make an integration with xskills mod? like when you level up in survivalist or something, you can spend skill points to carry more weight? thx

💬 Devilofether, Jul 31st 2022 at 5:35 AM

I reccomended it in my previous comment, but you could merge with the "What Hammerspace" mod: mods.vintagestory.at/hammerspace

💬 KenigVovanAuthor, Feb 12th 2022 at 7:12 PM

@YourCreator , 9572

💬 YourCreator, Feb 7th 2022 at 3:19 PM

сори, что не отвечал. Цифры после ника в дс какие?
Да, модов много

💬 KenigVovanAuthor, Jan 30th 2022 at 8:58 PM

@YourCreator, what did you do before the crash or have in the inventory? Do you have any mods?

(Можешь и в дске написать, тот же ник, что и здесь)

💬 YourCreator, Jan 30th 2022 at 6:33 PM

[Fatal] System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
в weightmod.src.EntityBehaviorWeightable.calculateWeightOfInventories()
в weightmod.src.EntityBehaviorWeightable.OnGameTick(Single deltaTime)
в Vintagestory.API.Common.Entities.Entity.OnGameTick(Single dt)
в Vintagestory.API.Common.EntityAgent.OnGameTick(Single dt)
в Vintagestory.Server.ServerSystemEntitySimulation.TickEntities(Single dt)
в Vintagestory.Server.ServerSystemEntitySimulation.OnServerTick(Single dt)
в Vintagestory.Server.ServerMain.Process()

probably not working with weight mod

 

💬 Devilofether, Jan 15th 2022 at 5:46 PM

Yes, it would be great if we had the option to replace the slot-based inventory with a weight based one, there are many variants of items that each take a distinct slot, so it is easy to fill up your inventory with a couple flowers and mushrooms, when you would otherwise be able to fill it with stacks of logs, rocks, and chests

(edit comment delete)