• 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

Help with a Script

Hullo forum members.

I'm trying to implement a custom house rule in PF for action points, but I don't want to overload the party with action points, nor do I want to use them in the same way as 4E. Basically, I need an Eval Script to throw into the Tracker tab of the editor that says in good ol' code that:

You start with 1 action point + your Dex or Con modifier, whichever is higher. Then you gain an action point every three levels thereafter (3, 6, 9 etc.).

So, it starts like this:


Code:
      ~ We get 1 + (1/3 our level, rounded down) + (DEX or CON Bonus, whichever is higher)
      ~ action points, so calculate that number.

      var ap as number
      ap = 1 + (herofield[tLevel].value / 3) + ([COLOR="Red"]I don't have this part for DEX or CON mod[/COLOR])
      ap = round(ap, 0, -1)

      ~ Add to our total charges.
      field[trkMax].value += ap

Any help would be MUCH appreciated, thank you. ^.^
 
Last edited:
Make sure the script runs in Post Attributes or later.

~ We get 1 + (1/3 our level, rounded down) + (DEX or CON Bonus, whichever is higher)
~ action points, so calculate that number.

~ Get the higher of our dex or con mod.
var bonus as number
bonus = maximum(hero.child[aCON].field[aModBonus].value, hero.child[aDEX].field[aModBonus].value)

var ap as number
ap = 1 + (herofield[tLevel].value / 3) + bonus
ap = round(ap, 0, -1)

~ Add to our total charges.
field[trkMax].value += ap
 
Thanks Lawful_G. It looks like it should work, but I can't get it to actually show up on the In-Play tab for the characters. I have the script running as "Final Phase," but now I don't know how to make the house rule selectable from the "Configure Hero" panel. I assigned a source (shows up fine in User Content), but the script just isn't running...

Sorry for being a burden. I appreciate your help.
 
I am going to assume its because it is not bootstrapped to any of the heroes? I think you can use a Mechanic maybe to have it show for everyone but not 100% sure on that.

The other idea I did for one of my custom campaigns was to simple do a Replace ID on the Action Point tracker that is part of HL already. That way my new version simply showed up when the "Use Action Point" source was checked in HL.

Then the script just calculated a different value for when a Specific Campaign Source was checked. Otherwise if that campaign was not checked then I just ran the original script.
 
Back
Top