Mods / Simple Weight Mod

Tags: #Other #Utility
Author: KenigVovan
Side: Both
Created: Jan 15th 2022 at 9:10 AM
Last modified: Sep 14th at 6:24 PM
Downloads: 11968
Follow Unfollow 96

Latest release (for Vintage Story 1.21.1, potentially outdated):
weightmod_0.3.6.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.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
0.3.6 weightmod 124 Sep 14th at 6:24 PM weightmod_0.3.6.zip 1-click install
  • patch for feverstonehorses
0.3.5 weightmod 45 Aug 27th at 6:03 AM weightmod_0.3.5.zip 1-click install
  • .21 version
  • fix inventoryy exception on the first join on newly created world
0.3.4 weightmod 39 Aug 20th at 6:15 PM weightmod_0.3.4.zip 1-click install
  • now works for elks
  • compatibility with Cartwright´s Caravan
0.3.3 weightmod 395 Dec 15th 2024 at 1:00 PM weightmod_0.3.3.zip 1-click install
  • fix PostInit() crash
0.3.2 weightmod 213 Nov 27th 2024 at 5:22 PM weightmod_0.3.2.zip 1-click install
  • missing client config
0.3.1 weightmod 159 Nov 27th 2024 at 4:42 PM Empty weightmod_0.3.1.zip 1-click install
0.3.0 weightmod 265 Oct 9th 2024 at 3:53 PM weightmod_0.3.0.zip 1-click install
  • .20 rebuild
0.2.8 weightmod 160 Feb 15th at 5:37 PM Empty weightmod_0.2.8.zip 1-click install
0.2.7 weightmod 223 Dec 25th 2024 at 7:44 PM weightmod_0.2.7.zip 1-click install
  • bugfix
0.2.6 weightmod 171 Dec 19th 2024 at 9:21 PM Empty weightmod_0.2.6.zip 1-click install
0.2.5 weightmod 329 Sep 17th 2024 at 5:53 AM weightmod_0.2.5.zip 1-click install
  • crash fix
0.2.4 weightmod 321 Aug 1st 2024 at 6:23 AM weightmod_0.2.4.zip 1-click install
  • configload api change
0.2.3 weightmod 278 Jul 13th 2024 at 2:27 PM weightmod_0.2.3.zip 1-click install
  • x, y offset for statbar
0.2.2 weightmod 273 Jul 7th 2024 at 12:54 PM weightmod_0.2.2.zip 1-click install
  • move statbar by config value - above "saturationstatbar" or "healthstatbar"
0.2.1 weightmod 675 Nov 6th 2023 at 6:53 AM weightmod_0.2.1.zip 1-click install
  • calculate weight for craftinggrid inventory
0.2.0 weightmod 819 Apr 19th 2023 at 7:21 PM Empty weightmod_v0.2.0.zip 1-click install
0.1.12 weightmod 353 Mar 16th 2023 at 4:03 PM Empty weightmod_v0.1.12.zip 1-click install
0.1.11 weightmod 323 Mar 14th 2023 at 8:23 PM weightmod_v0.1.11.zip 1-click install

- petai dependecy moved to different mod for petai mounts

0.1.10 weightmod 524 Jan 27th 2023 at 4:07 PM Empty weightmod_v0.1.10.zip 1-click install
0.1.9 weightmod 389 Jan 17th 2023 at 8:09 PM weightmod_v0.1.9.zip 1-click install

- fix client/server desync

0.1.7 weightmod 452 Dec 3rd 2022 at 10:39 AM weightmod_petai_v0.1.7.zip 1-click install

- crash on game re-join fix

0.1.6 weightmod 356 Nov 27th 2022 at 6:20 PM weightmod_petai_v0.1.6.zip 1-click install

- DO NOT USE IF YOU DON'T USE PETAI

- PetAI horses with overloaded backpack will slow down, player with overloaded backpacks will not be able to mount

0.1.5 weightmod 384 Nov 14th 2022 at 8:33 PM weightmod_v0.1.5.zip 1-click install

- fix crash on server reconnection

0.1.4 weightmod 383 Nov 13th 2022 at 10:07 AM weightmod_v0.1.4.zip 1-click install

static madness

0.1.3 weightmod 386 Oct 23rd 2022 at 12:31 PM Empty weightmod_v0.1.3.zip 1-click install
0.1.2 weightmod 382 Sep 22nd 2022 at 2:44 PM weightmod_v0.1.2.zip 1-click install

removed log exception spam

0.1.1 weightmod 445 Sep 10th 2022 at 8:27 AM Empty weightmod_v0.1.1.zip 1-click install
0.1.0 weightmod 412 Jul 9th 2022 at 10:04 AM weightmod_v0.1.0.zip 1-click install

- new game version

0.0.7 weightmod 407 Jun 28th 2022 at 10:40 AM weightmod_v0.0.7.zip 1-click install

- de.json

0.0.6 weightmod 399 Jun 26th 2022 at 7:09 AM weightmod_v0.0.6.zip 1-click install

- fixed crush when there was not config file from previous versions

0.0.5 weightmod 383 Jun 16th 2022 at 5:31 PM Empty weightmod_v0.0.5.zip 1-click install
0.0.4 weightmod 405 Jun 4th 2022 at 12:35 PM weightmod_v0.0.4.zip 1-click install

 - works with Oxygen Not Included now

0.0.3 weightmod 386 May 31st 2022 at 9:25 AM weightmod_v0.0.3.zip 1-click install
  • normal config in ModConfig for items, blocks, bonusItems
  • client/server sync for weight
0.0.2 weightmod 379 Apr 18th 2022 at 12:26 PM Empty weightmod_v0.0.2.zip 1-click install

19 Comments (oldest first | newest first)

💬 fluffz, Nov 25th at 10:54 PM

First of all, this mod is exactly what I am looking for. But would you be so kind to give a description on how to add weight to blocks? In the config file there is no text under the WEIGHTS_FOR_BLOCKS line of text to use as an example. It would be really helpful :)

💬 559233, Sep 26th at 12:03 PM

Hello KenigVovan ! 

Using translation software: If there are some overly strong expressions, please ignore them.

 

I have no malicious intent. In version 1.20, the backpack has now been divided into two types: backpack-normal and backpack-sturdy. It cannot be directly added to the config, and the mod will automatically revert to the original version.

 

Also, is it possible to make some compatibility for profession mods (similar to allclass)?

💬 Venusgate, Nov 10th 2024 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 2024 at 10:28 PM

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

💬 Tisma, Sep 13th 2024 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

💬 KenigVovan , Aug 1st 2024 at 6:23 AM

Dirt_Cheap

0.2.4 should fix it

💬 Dirt_Cheap, Aug 1st 2024 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

💬 KenigVovan , Jul 10th 2024 at 4:13 PM

Maamessu

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

💬 Maamessu, Jul 9th 2024 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.

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

KenigVovan

Polish Version

pl.json

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

💬 Mogadis, 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: https://news.kalataka.ru/hammerspace

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

@YourCreator , 9572

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

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

💬 KenigVovan , 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)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом