Mods / Simple Weight Mod

Category: #Other #Utility
Author: KenigVovan
Side: Both
Created: Jan 15th at 9:10 AM
Last modified: 4 days ago
Downloads: 1147
Follow Unfollow 12

Mod let you set weight for item/blocks.

Using config file in MocConfig/weightmod.json you can change weight values.

By changing "WEIGHTS_FOR_ITEMS" dictionary you set weight for items, for example if you add "game:crystalizedore-poor-" : 50 in it
every item which has "game:crystalizedore-poor-" in its code will have weight 50.

[Mod checks that item's code "Contain" string which you provide
so there can occure situation that "game:-poor-cassiterite-" and "game:crystalizedore-poor-" can has the same results in their result field. To sovle this mod won't override value for item if value was already set. If "game:crystalizedore-poor-" occures first and set value then "game:-poor-cassiterite-" won't override weight value if item will satisfies both.]

"WEIGHTS_FOR_BLOCKS" is the same but for blocks.

"WEIGHTS_BONUS_ITEMS" lets you set weight bonus for items. By default this bonus have bags/baskets.

In config file (will be created after you run the game) in VintageStroryData/ModConfig/weightmod.json you can change

  • 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 - 0 < r <=1  ratio of current weight to maximum weight when walkspeed starts to lower
  • RATIO_MIN_MAX_WEIGHT_PLAYER_HEALTH - maximum weight now depends on current health/maximum health ratio, 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 will be calculated (seconds)
  • CLASS_WEIGHT_BONUS - list of class_name:bonus_weight

You can change "weightbonus" and "percentmodifier" from TreeAttribute "weightmod" which applied on max weight and isn't changed by this mod.

0 <= percentmodifier <=1 (default value is 1)

weightbonus value just summed with calculated maxWeight

Version For Game version Downloads Release date Changelog Download
v0.1.6 17 4 days ago Show
v0.1.5 52 Nov 14th at 8:33 PM Show
v0.1.4 34 Nov 13th at 10:07 AM Show
v0.1.3 53 Oct 23rd at 12:31 PM Show
v0.1.2 46 Sep 22nd at 2:44 PM Show
v0.1.1 90 Sep 10th at 8:27 AM Show
v0.1.0 89 Jul 9th at 10:04 AM Show
v0.0.7 101 Jun 28th at 10:40 AM Show
v0.0.6 79 Jun 26th at 7:09 AM Show
v0.0.5 58 Jun 16th at 5:31 PM Show
v0.0.4 73 Jun 4th at 12:35 PM Show
v0.0.3 72 May 31st at 9:25 AM Show
v0.0.2 57 Apr 18th at 12:26 PM Show

7 Comments (oldest first | newest first)

💬 xCoiotex, Sep 10th 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 at 5:35 AM

I reccomended it in my previous comment, but you could merge with the "What Hammerspace" mod:

💬 KenigVovan, Feb 12th at 7:12 PM

@YourCreator , 9572

💬 YourCreator, Feb 7th at 3:19 PM

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

💬 KenigVovan, Jan 30th 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 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 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)