Throws this errer
Code:[ERROR] Script execution error: [string "scripts/manager_gamesystem2.lua"]:2: attempt to index global 'CharEncumbranceManager' (a nil value)
manager_gamesystem2.lua would be a script that you provided; since it's not part of any included ruleset. So, look in your own ruleset files for that file, and look at that line.
Regards,
JPG
I'm following along, Damned's video (Part 018 - White Lies - Inventory Tab) and in the comments he points to this thread. I'm unsure what this handles, with respect to the update to FG in February. I had hoped this helps deal with the replacement/modifications of elements on the Inventory Tab, as mine looks like a mess, at the moment...
One of the best things you can do is use the find file function in the development program you prefer. For instance you can unpack any ruleset and look for " CharEncumbranceManager.addStandardCalc();".
You can see how other core rpg rulesets handled it.
All CharEncumbranceManager.addStandardCalc(); does is use the standard calculation for encumbrance - adding together the item weights (and coins if the option is set) and then setting it in the total weight field.
It doesn't sound like this is going to fix an inventory tab that looks like a mess.
Sorry to be so dense, but I'm just not picking up what is being laid down...
First off, to preemptively answer a question that might come up - Q: "What are you trying to accomplish?"
A: I have reproduced CoreRPG's charsheet_inventory in my ruleset, and I can populate its inventorylist with 'Items', just fine. The 'weight' fields correctly reflect the weights of the various items just added. However, the 'encumbranceload' field (on charsheet_inventory) doesn't update with a total. I want that field updated appropriately.
So, if someone could clarify the instructions from above (what to create, and then how, and from where, to invoke it), I would appreciate it!
Thanks!
- s.west
create a new file called scripts/manager_gamesystem2.lua
register it in base.xml like this:
<script name="GameSystem2" file="scripts/manager_gamesystem2.lua" />
and add this content
Code:function onInit()
CharEncumbranceManager.addStandardCalc();
end