Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Tony.Gamemaster
Junior Member
 
Join Date: Apr 2014
Posts: 17

Old November 25th, 2016, 09:00 AM
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 by Tony.Gamemaster; November 25th, 2016 at 09:14 AM.
Tony.Gamemaster is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old November 25th, 2016, 09:23 AM
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.
Aaron is offline   #2 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old November 25th, 2016, 10:38 AM
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
Aaron is offline   #3 Reply With Quote
Tony.Gamemaster
Junior Member
 
Join Date: Apr 2014
Posts: 17

Old November 25th, 2016, 12:22 PM
It appears that did the trick. I need to learn this better - my script was way off. Now to play-test it. Thanks!
Tony.Gamemaster is offline   #4 Reply With Quote
Tony.Gamemaster
Junior Member
 
Join Date: Apr 2014
Posts: 17

Old November 25th, 2016, 02:35 PM
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!
Tony.Gamemaster is offline   #5 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old November 25th, 2016, 02:47 PM
What errors? Might it be related to the ??? in the field.
Aaron is offline   #6 Reply With Quote
Tony.Gamemaster
Junior Member
 
Join Date: Apr 2014
Posts: 17

Old November 25th, 2016, 03:08 PM
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 by Tony.Gamemaster; November 25th, 2016 at 03:31 PM.
Tony.Gamemaster is offline   #7 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old November 25th, 2016, 03:48 PM
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.
Aaron is offline   #8 Reply With Quote
Tony.Gamemaster
Junior Member
 
Join Date: Apr 2014
Posts: 17

Old November 25th, 2016, 04:20 PM
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 by Tony.Gamemaster; November 25th, 2016 at 04:28 PM.
Tony.Gamemaster is offline   #9 Reply With Quote
Tony.Gamemaster
Junior Member
 
Join Date: Apr 2014
Posts: 17

Old November 25th, 2016, 09:54 PM
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)
Tony.Gamemaster is offline   #10 Reply With Quote
Reply


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 10:56 AM.


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