Mods / Simple Weight Mod

Category: #Other #Utility
Author: KenigVovan
Side: Both
Created: Jan 15th 2022 at 9:10 AM
Last modified: Nov 6th 2023 at 6:53 AM
Downloads: 4510
Follow Unfollow 33

Latest file for v1.18.15:
weightmod_0.2.1.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.2.1 373 Nov 6th 2023 at 6:53 AM Show weightmod_0.2.1.zip Install now
v0.2.0 606 Apr 19th 2023 at 7:21 PM Show weightmod_v0.2.0.zip Install now
v0.1.12 130 Mar 16th 2023 at 4:03 PM Show weightmod_v0.1.12.zip Install now
v0.1.11 100 Mar 14th 2023 at 8:23 PM Show weightmod_v0.1.11.zip Install now
v0.1.10 323 Jan 27th 2023 at 4:07 PM Show weightmod_v0.1.10.zip Install now
v0.1.9 147 Jan 17th 2023 at 8:09 PM Show weightmod_v0.1.9.zip Install now
v0.1.7 224 Dec 3rd 2022 at 10:39 AM Show weightmod_petai_v0.1.7.zip Install now
v0.1.6 137 Nov 27th 2022 at 6:20 PM Show weightmod_petai_v0.1.6.zip Install now
v0.1.5 169 Nov 14th 2022 at 8:33 PM Show weightmod_v0.1.5.zip Install now
v0.1.4 156 Nov 13th 2022 at 10:07 AM Show weightmod_v0.1.4.zip Install now
v0.1.3 161 Oct 23rd 2022 at 12:31 PM Show weightmod_v0.1.3.zip Install now
v0.1.2 161 Sep 22nd 2022 at 2:44 PM Show weightmod_v0.1.2.zip Install now
v0.1.1 198 Sep 10th 2022 at 8:27 AM Show weightmod_v0.1.1.zip Install now
v0.1.0 198 Jul 9th 2022 at 10:04 AM Show weightmod_v0.1.0.zip Install now
v0.0.7 206 Jun 28th 2022 at 10:40 AM Show weightmod_v0.0.7.zip Install now
v0.0.6 194 Jun 26th 2022 at 7:09 AM Show weightmod_v0.0.6.zip Install now
v0.0.5 167 Jun 16th 2022 at 5:31 PM Show weightmod_v0.0.5.zip Install now
v0.0.4 189 Jun 4th 2022 at 12:35 PM Show weightmod_v0.0.4.zip Install now
v0.0.3 183 May 31st 2022 at 9:25 AM Show weightmod_v0.0.3.zip Install now
v0.0.2 157 Apr 18th 2022 at 12:26 PM Show weightmod_v0.0.2.zip Install now

10 Comments (oldest first | newest first)

💬 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)