Removing penalties from Medium Encumbrance
I'm trying to make the Easy Travel armor property (from Magic Item Compendium) work. The property lets the wearer carry up to a medium load as if it were a light load -- ignoring max Dex, check penalty, speed reduction, etc. (It also lets the wearer walk longer, but that's not a thing that affects the character sheet, so it doesn't need any real implementation.)
What I thought I'd do is check to see if the hero is at medium encumbrance; if so, reset the encumbrance level to light. This is what I put in the eval script: Code:
~ If hero is at medium encumbrance, make it light I'm not sure if it's a timing issue or not -- I tried several different stages and values, including PreLevel/10000 & before (which, IIRC, is when armor check penalties are applied), but then nothing works. So, I suspect that altering tEncumLev (and/or tEncumAbbr) won't work. Unless there's a specific phase & time where it will work, maybe? Anybody have any ideas on what needs to be changed? And when -- when are the encumbrance-based penalties applied? |
I suspect you should try deleting the Medium Encumberance tag and assigning the Light Encumberance tag. Try that at various phases and priorities and see if something it is corrected.
|
Here you go I dug up some code I wrote for D20 before I moved to Pathfinder.
Set it at timing user post levels 11000 Code:
~ If we're armor, change our class if necessary - we become one class |
Here is the rest of that code I don't remember what power it was for.
phase="UserPostLv" priority="2500" Code:
~ If we're a armor, reduce our penalties now - we have to wait until <eval phase="UserPreLv" priority="5000" Code:
~ Make our weight 1lb |
<cast raise thread>
So, the D&D game took an extended hiatus, and that plus the proverbial Other Stuff has kept me distracted. But, I took another run at it, with this code, at Post-Attributes 2100: Code:
var result as number I don't want to just set tArmorChk to 0 & reset the speed, because the character might be wearing armor that inflicts an armor check penalty and/or reduces speed, and Easy Travel only affects encumbrance levels. So when can I alter Encumbrance such that the medium load penalties aren't invoked? I looked at timing.xml and the Task List, but I don't couldn't figure out when the encumbrance level gets translated into armor check penalties & speed reduction. Any ideas? Thanks, -Bob |
I'm taking a crack at this now... I see what you mean, so I am trying a different tack.
|
I've got it, the main issue was that I wasn't realizing that Armor Checks on the armors are negative values. 2 Eval Scripts
Eval Script #1 Post Attributes 2050 ~ Are we equipped? if (field[gIsEquip].value <> 0) then ~ This ability only takes place if we are at medium encumberance if (hero.tagis[Encumbered.Medium] = 0) then done endif ~ First check to see our equipped armor's ACP var ArmPen as number foreach pick in hero from BaseArmor where "Helper.CurrArmor" ArmPen += each.field[mArmorChk].value nexteach ~ Then check to see our equipped shield's ACP var ShlPen as number foreach pick in hero from BaseArmor where "Helper.CurrShield" ShlPen += each.field[mArmorChk].value nexteach ~ If our total ACP from armor and shield are greater than 3, do nothing var TotPen as number TotPen = ShlPen + ArmPen if (TotPen <= -3) then done endif ~ We have passed all tests so far, so apply the changes to skills, reducing the penalty from 3 to the Total Penalty... foreach pick in hero from BaseSkill where "Helper.ArmorChk1" each.field[Penalty].value += (3 + TotPen) nexteach foreach pick in hero from BaseSkill where "Helper.ArmorChk2" each.field[Penalty].value += 6 + (TotPen * 2) nexteach endif Eval Script #2 Post Attributes 2100 if (field[gIsEquip].value <> 0) then hero.child[Totals].field[tEncumLev].value = 0 hero.child[Totals].field[tEncumAbbr].value = 0 perform hero.delete[Encumbered.Medium] perform hero.assign[Encumbered.Light] ~ Now check to see if we are wearing medium or heavy armor, if so do nothing. If not, make our speed as normal. foreach pick in hero from BaseArmor where "Helper.CurrArmor" if (each.tagis[mClass.Medium] <> 0) then done endif if (each.tagis[mClass.Heavy] <> 0) then done endif nexteach perform hero.delete[Hero.ArmorSpeed] endif |
Hope that helps Coyote6.
|
Quote:
#1: Code:
~ If we aren't equipped, get out #2: Code:
~Again, get out if not equipped or not at Medium encumbranec |
All times are GMT -8. The time now is 07:59 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.