Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 258
|
Some time ago, SeeleyOne provided me with the following code to one of my questions:
Pre-Traits, 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"] 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. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,569
|
It might work better if you change the timing.
Run it after Effects/10000. That's when the Encumbrance is figured. It gets redone after you're doing that at PreTraits 5000. _ Currently In Development: Savage Pathfinder, SWADE Fantasy Companion Future Development: SWADE Super Powers Companion, SWADE Sci-Fi Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
#2 |
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 258
|
The timing was indeed the issue. All good now.
Another win for Caped. Last edited by Gumbytie; August 26th, 2024 at 10:01 AM. |
#3 |
|
|