PDA

View Full Version : Help with encumbrance



Felderin
September 24th, 2010, 05:18
All right, I've been banging my head against this all evening, so it's probably time to ask for help. I'm working on my B/X D&D ruleset, for which I have used the Labyrinth Lord ruleset as a base. The LL character sheet's Inventory page is set up to automatically update your total encumbrance by tallying the weight of all of your items, and then it automatically generates a Movement Speed based on your total carried weight.

The problem is, I have no idea HOW it does that. But I need to figure it out, because I have to change the specifics of how much weight = how much movement speed, because B/X D&D uses coins instead of lbs. Fair warning: I am not a scripting wizard.

So in the campaign's db.xml, I found this data:


<encumbrance>
<holder name="Ben" owner="true" />
<load type="number">81</load>
<speed type="number">30</speed>
</encumbrance>

That's basically saying that my test character has 81 lbs. of stuff in his inventory, and that my current move speed is 30. So somewhere, in some file or script, the ruleset knows that 81 encumbrance = 30 move speed. If I increase my encumbrance to 160, the speed figure drops to zero. If I drop it down to 80, speed becomes 60.

So I need to change that scale, because when you are using coins as your encumbrance measure, you can carry a heck of a lot more than 160. But where exactly do I do that? I've poured over all the charsheet_ xml files, and also the two inventory-related lua files (charsheet_inventorylist.lua and charsheet_inventorylocation.lua) and I haven't seen anything that looks like it has anything to do with establishing that scale (0-40 encumbrace = 120 speed, 41-60 encumbrance = 90 speed, 61-80 encumbrance = 60 speed, 81 to 160 encumbrance = 30 speed, 161+ encumbrance = 0 speed).

Does anyone know where this control would be located?

StuartW
September 24th, 2010, 06:37
Movement bands for each encumbrance level are exposed by the OptionManager, allowing them (and quite a few other characteristics of the ruleset) to be changed without needing to change the ruleset itself.

The brute force way to do this is by editing optionmanager.lua (see line 85, if you are using the same version as me) to override the default values.

The other way, which is what the Beckham extension does, is to create a standalone add-in for the ruleset (called an extension) and then register the different movement bands using the OptionManager.

Hope that helps

Stuart

Felderin
September 24th, 2010, 13:39
It does! Thanks! I'm actually already using a modified version of the Beckham extension (called "Moldvay") to alter the ruleset's saving throw categories and Thief skills to match the B/X rules. I guess I missed the moveBands section when I was tinkering with it, but I see it now.

Again--thank you!

StuartW
September 24th, 2010, 19:11
In case anyone else is reading this thread who doesn't know, Beckham is really BECM (Basic, Expert, Companion, Master) and changes LL to be much closer to the original (red box) D&D.

Stuart