• 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

Need Help with Creating a New Adjustment

First a little background: I'm using the "Armor as DR" rules from Ultimate Combat in a low-fantasy, low-magic campaign. The character's Defense Score is:

Defense = 10 + shield bonus + Dexterity modifier + other modifiers (including armor's enhancement bonus, but not armor bonus or natural armor bonus)

As characters and enemies gain levels their attack bonuses get better, but unless they start stacking on magic enhancement bonuses or some kind of items or special abilities, it seems like their defense scores never improve. So what I want to do is create an "Active Defense Bonus" as an adjustment using the table from 3.5 Unearthed Arcana. http://www.d20srd.org/srd/variant/ad...fenseBonus.htm

I want to make an adjustment bonus under "Other Adjustments" called "Active Defense" so when you check it off, it applies whatever the value on the counter is to the character's defense score (not their DR), except when they're flat-footed or denied their dex bonus and is not applied to their CMB/CMD or Critical Defense. It stacks with other bonuses to defense and works like a dodge bonus to the Defense score but unlike Dodge, I don't think it should stack with CMD.

I'm stuck with this, and not sure I'm doing it correctly. Does that make sense? How would I do this? Any help or direction is appreciated.
 
Last edited:
I think the real issue here is timing. You need to add to the defense score after all bonuses from it have been passed on to CMD, let me look at the timing debug and get back to you.
 
According to my tests, this works.

Final 14500
Code:
doneif (field[pIsOn].value = 0)

~ Add an untyped bonnus to our defense
hero.childfound[ArmorDef].field[Bonus].value += field[pAdjust].value

~ Since untyped bonuses would also increase our flat footed defense as well, subtract an equal amount from that.
hero.childfound[ArmorDef].field[adfDefFlat].value -= field[pAdjust].value
 
Ok, here's another question:

I'm experimenting with adding half of the bonus to Critical Defense and CMD. However, I need it to not add the bonus to flat-footed CMD, and to either turn off the bonus to Critical Defense when the flat-footed condition is checked off OR display it after the Critical Defense bonus (like it does for flat-footed defense and CMD).

This is as far as I'm able to get before I start making make errors. I have no idea what the flat footed field for CMD is called:

doneif (field[pIsOn].value = 0)

~ Add an untyped bonnus to our defense
hero.childfound[ArmorDef].field[Bonus].value += field[pAdjust].value
hero.childfound[CritDef].field[Bonus].value += round(field[pAdjust].value / 2,0,-1)
hero.childfound[ManeuvDef].field[Bonus].value += round(field[pAdjust].value / 2,0,-1)

~ Since untyped bonuses would also increase our flat footed defense as well, subtract an equal amount from that.
hero.childfound[ArmorDef].field[adfDefFlat].value -= field[pAdjust].value
hero.childfound[ManeuvDef].field[???].value -= round(field[pAdjust].value / 2,0,-1)

Again, thank you for any assistance!
 
Apologies. The errors are from my attempts to remove the bonus from the flat-footed CMD value. I get an error from not having the appropriate field in this line (where the ??? is). I just put the ??? in there to show the field name that I'm missing.

hero.childfound[ManeuvDef].field[???].value -= round(field[pAdjust].value / 2,0,-1)

That's one issue.

Then, I'm able to add half of this new bonus to the Critical Defense value using this:

hero.childfound[CritDef].field[Bonus].value += round(field[pAdjust].value / 2,0,-1)

But I'm still trying to figure out how to remove this new Defense Bonus from the Critical Defense bonus in the basics tab when the character is flat-footed - either by checking off the flat-footed condition, and/or by displaying the flat-footed value after the Critical defense in the Basics tab such as "+4 Critical Defense / +2Fl" I realize this may not be possible.

I may just have to remind players to toggle the adjustment on and off when their character is flat-footed.
 
Last edited:
Are you familiar with debugging? If you enable it (in the develop menu), you can right click on the flat footed condition and look at it's fields. Check the box on and off, which field value changes and how?

Once you know that, you can modify your script adding to the critical defense based on the value of that field.
 
No luck. Even in debug mode, I'm unable to find the field for the flat-footed CMD that needs to go in this line where I need to subtract an equal amount from the flat-footed CMD.

hero.childfound[ManeuvDef].field[???].value -= round(field[pAdjust].value / 2,0,-1)

I haven't even looked at Critical Defense yet.
 
Last edited:
Looks like I got it working the way I wanted with the exception of a flat-footed Critical Defense value:

doneif (field[pIsOn].value = 0)

~ Add an untyped bonnus to our defense
hero.childfound[ArmorDef].field[Bonus].value += field[pAdjust].value
hero.childfound[CritDef].field[Bonus].value += round(field[pAdjust].value / 2,0,-1)

~ Since untyped bonuses would also increase our flat footed defense as well, subtract an equal amount from that.
hero.childfound[ArmorDef].field[adfDefFlat].value -= round(field[pAdjust].value / 2,0,1)

var calcdef as number
calcdef = round(field[pAdjust].value / 4,0,-1)
hero.childfound[Maneuver].field[tCMDFlat].value = maximum(hero.child[Maneuver].field[tCMDFlat].value, calcdef)

hero.childfound[ManeuvDef].field[tMaDodge].value += round(field[pAdjust].value / 2,0,-1)
 
Back
Top