• 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

Some Scripting help

Segallion

Member
I'm looking to create a script for the adjustments tab that will take the current Dex Bonus to AC and set that bonus to 0. I've tried looking at the various things already in place but not having much luck.

Thanks in advance for any help you all can offer.
 
Here is a working script that you can use
Code:
~Post-attributes 100
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      ~ Set Dex bonus to zero
      hero.child[aDEX].field[aBonus].value = 0
      hero.child[aDEX].field[aModBonus].value = 0
 
I appreciate the help Shadow.

I tried the script provided but I'm not seeing any change in the once I click that condition.

I created a new character and gave it a Dex modifier of +1. Click on the condition and nothing changes.
 
Well you asked for an Adjustment not a condition so I wrote it for an Adjustment. :)

The IF statement will need to be changed to work for a check mark on a condition not an adjustment. I am pretty sure they are different fields. I am not near HL now so can't check that.

The other thing is the first line of the script is a comment telling you the timing you have to fill in. That is above where you pasted in the script. Did you set that to be exactly what I had as the timing for this is VERY touchy as I found out when I wrote the script. Setting the correct timing of a script is about as import as writing the script correctly. So just asking as I have seen that to be a pretty common mistake.

The timing you want is Post-attributes 100.

Hope that helps....
 
Just curious, what's the difference between the AC without the DEX bonus and the flat-footed AC? The flat-footed AC is already calculated for you.

ShadowChemosh, won't zero-ing out the bonus on the Dexterity alter the Ref save, the CMD, the ranged attack, and any abilities that depend on dexterity, along with the AC?
 
ShadowChemosh, won't zero-ing out the bonus on the Dexterity alter the Ref save, the CMD, the ranged attack, and any abilities that depend on dexterity, along with the AC?
Yep sure will. In matter of fact the timing I took made sure that was all true. Could be I read what he wanted 'exactly' and not what he intended for?

I assumed that he wanted the Dex bonus to zero so that all those other fields would also be altered. Its a good question Mathias to ask what exactly is the end result he is looking for? :)
 
Sorry about the confusion...I used "adjustment" because it was in the adjustments tab....it is a condition I'm trying to set up.

Essentially it is Running...when running you lose your Dex bonus to AC, except for someone that has taken the running feat.
 
Sorry about the confusion...I used "adjustment" because it was in the adjustments tab....it is a condition I'm trying to set up.
No problem at all I was being very exact is all. :p

Essentially it is Running...when running you lose your Dex bonus to AC, except for someone that has taken the running feat.
In this case Mathais is right your Flat Footed AC is your AC without your Dex bonus and that is already calculated by HL. The script I wrote above will zero out the Dex Bonus for Everything on the character sheet which is not actually what you want.

If I was going to write this script I think I would just move the FF AC value into the normal AC value if check marked. I would use something like Final 20,500 for timing to make sure it was the last thing done. Of course then you would also want to do a #hasfeat[fRun] to see if you should NOT do that adjustment if they have the run feat.

Not near HL so I can't actually write the script, but the above is how I think I would do it.. :cool:
 
If you still need/want it here is the working script for a new condition that will set your AC to the same as flat-footed value(ie AC with dex).

Code:
~Final Phase 20,500
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      ~ Set armor class equal to flat-footed value
      hero.child[ArmorClass].field[tAC].value = hero.child[ArmorClass].field[tACFlat].value

Hope that helps.
 
Rather than using that script, may I recommend copying the Flat-Footed condition? That way, any other scripts that test for Flat-footed before doing something or not doing something will find the condition properly?
 
Last edited:
I realized I wasn't quite correct in how to set flat-footed from another condition. Instead, take a look at the Pinned condition - it's Eval Script #3 includes turning on the effects of the flat-footed condition.
 
Back
Top