View Full Version : Encumbrance not Calculating
LordEntrails
September 23rd, 2025, 05:14
Not sure if this ever worked in my ruleset (CoreRPG child) but it's not now (a few months at least). I think I'm doing things the exact same ways as CoreRPG, but what am I missing?
From my charsheet_inventory
<windowlist name="inventorylist">
<bounds>30,40,-49,-220</bounds>
<class>char_invitem</class>
<datasource>.inventorylist</datasource>
<script file="campaign/scripts/char_invlist.lua" />
</windowlist>
...
<number_static name="encumbranceload" source="encumbrance.load">
<bounds>188,349,40,40</bounds>
</number_static>
I'm using char_invitem from Core, I'm not overwriting encumbrance.load...
I don't know what else to look at.
RosenMcStern
September 23rd, 2025, 08:50
Have you overwritten char_invlist.lua ? I don't have the source code available atm, but there is a specific function in the EncumbranceManager module that does the calculation, and you can define your own algorithm. The default calculation is supposed to be working if you do not set a custom one, but then there is the subject of what event triggers a recalc. In short, there are many places where you might have involuntarily overwritten the default behaviour. You should locate and check all of them.
LordEntrails
September 23rd, 2025, 16:07
Have you overwritten char_invlist.lua ? I don't have the source code available atm, but there is a specific function in the EncumbranceManager module that does the calculation, and you can define your own algorithm. The default calculation is supposed to be working if you do not set a custom one, but then there is the subject of what event triggers a recalc. In short, there are many places where you might have involuntarily overwritten the default behaviour. You should locate and check all of them.
Nope, I have not overwritten char_invlist.lua. It should be loading from CoreRPG.
I see no scripting triggers in the CoreRPG record_char_inventory.xml so I don't think I' missing that.
I'll try adding debugging statements to my char inventory window, but not sure what values I should be looking for.
p.s. Thanks the help!
RosenMcStern
September 24th, 2025, 10:42
Finally got my eyes on the code. The relevant functions are in manager_char_encumbrance.lua of CoreRPG. However, the key point is that you have to explicitly activate the encumbrance calculation. This means that your manager_gamesystem.lua must either be non-existent (it will call the default GameSystem in CoreRPG) or must contain the following code
CharEncumbranceManager.addStandardCalc();
or a call to the customization of the calculation
CharEncumbranceManager.addCustomCalc(yourCustomFun ction);
Does your ruleset have one of these two snippets of code?
LordEntrails
September 24th, 2025, 14:59
Thank you so much!
No, my game system does not include either of those. Will test later today. Appreciate you looking into this and helping out!
edit: working!
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.