Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Savage Worlds


Thread Tools Display Modes
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 169

Old December 28th, 2015, 01:32 PM
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?
Gumbytie is offline   #1 Reply With Quote
Senior Member
Join Date: Nov 2009
Posts: 891

Old December 29th, 2015, 09:52 PM
Okay, I have had a chance to test this code to make sure that it works before sharing it.

Phase: Pre-Traits
Priority: 5000

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

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

~ 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.

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.
SeeleyOne is offline   #2 Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 04:50 AM.

Powered by vBulletin® - Copyright ©2000 - 2019, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.