• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

An edge that halves the weight of worn armour and shield

Gumbytie

Well-known member
So I am working on file for Beasts and Barbarians and stumped myself building this Edge: Hoplite Training.

In a nutshell:

When calculating encumbrance, he considers only half of the weight of the armor and shield he wears.

Any ideas if this is possible? Can we do a search and look for worn armor and shield and modify the weight value?
 
Okay, I have had a chance to test this code to make sure that it works before sharing it.

Phase: Pre-Traits
Priority: 5000

Code:
var weight as number
weight = 0

~ Get total weight from equipped armor
foreach pick in hero from Armor where "Equipped.Equipped"
    weight += eachpick.field[gearWeight].value
nexteach

~ Get total weight from equipped shields
foreach pick in hero from Shield where "Equipped.Equipped"
    weight += eachpick.field[gearWeight].value
nexteach

~ Apply the half of the total as a reduction to total encumbrance.
weight = round(weight / 2,0,-1)
perform #resspent[resEncumb,-,weight,"Reduced Weight"]

I know that the "Reduced Weight" is redundant, but I like to use it as it is a comment in itself and makes the code more readable.
 
man, it has been a long time since I looked over my B&B files. Dusted them off and working on converting them to SWADE. Not sure if Seeley active on here anymore so maybe this question will fall to Caped.

The code Seeley provided works like a charm...almost. It does total armour and shields worn and cuts their weight in half. But the code also cuts in half the Max Weight a character can carry as well. So not quite right. Any ideas anyone?

I have it on my to-do list but first priority is everything to SWADE first.

Cheers.
 
Back
Top