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
Micco
Member
 
Join Date: Aug 2009
Posts: 55

Old November 25th, 2009, 09:49 AM
This is likely easy. So I'm fully prepared to feel silly. And I have looked at the documentation but can't find clarity on this topic (I even braved the wiki...and quickly was befuddled.) So...

I'm trying to add a Combat Reactions tracker to my PF game. Every creature get's this tracker (I use it to manage AoO, Aid Another and other stuff).

I believe I've got the eval script written correctly, but here it is for reference:

Quote:
~ If Combat Reflexes feat then we get DEXMOD bonus to the BAB used in this calculation.
var crfeat as number
crfeat = #hasfeat[fGRComRef]


~ We get BAB/5 rounded up combat reactions plus the bonus, if applicable.
var cr as number
cr = ((herofield[tAtkBase].value + (crfeat * hero.child[aDEX].field[aModBonus].value)) / 5)

~ If we have Combat Reflexes we get a +1 bonus as well.
cr = round(cr, 0, 1) + crfeat

~ Add to our total charges.
field[trkMax].value = cr
The Phase is Final Phase(user) with a 10000 priority.

I have two problems.

First, I can't make it show up.

- I have checked the "Show in Tracked Resources List" in the charge information.
- In the containerreq expression I have entered "source.CombReac", which is a source listed in the Sources tag as well.

It compiles fine, but I can't make is show up. In case it matters, it's Unique ID is "trkCmbReac" and it is listed as Unique.

Second, I'd like it to 'recharge' at the end of beginning of every round for every creature when using the Tactical Console if that is possible.

Any help would be appreciated! I'd also like to know where to look to find these answers...teach a man to fish, ya know.

Last edited by Micco; November 25th, 2009 at 09:52 AM.
Micco is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 25th, 2009, 12:50 PM
You created this as a tracker in the editor?

There's normally not a way to add a tracker directly to a character. They are intended as add-ons to other things in the program.

That said, there's a way to do it if you're willing to edit the XML.

Open the file where you've defined your tracker in an XML editor or notepad (not Word or other word processors - they'll add junk to the file that will make it unusable in HL) (There's a list of some XML editors near the beginning of the wiki). The tracker will start with:

Code:
<thing
and end with:

Code:
</thing>
Here's an example of what a tracker looks like when viewed in XML (the colors are added by my XML editor) (This one's probably from some staff or another):
<thing
id="hCloudkill"
name="Cloudkill"
compset="Tracker"
description="Kills 3 HD or less; 4–6 HD save or die, 6+ HD take Con damage.">
<tag group="Helper" tag="SourceEqp"/>
</thing>

What you want to do is to add a new tag to it.

Code:
<tag group="Helper" tag="Bootstrap"/>
is what you want to add. You want to make sure it's among any existing <tag elements. If you have any fields defined for this, they'll show up as <field, and the eval script you've defined will start with <eval. You need to make sure that the new tag you're adding comes after any <field elements and before the <eval, but its order among the <tag elements doesn't matter. After you've added the new tag, press ctrl-r in Hero Lab to get a quick reload.

<thing
id="hCloudkill"
name="Cloudkill"
compset="Tracker"
description="Kills 3 HD or less; 4–6 HD save or die, 6+ HD take Con damage.">
<tag group="Helper" tag="Bootstrap"/>
<tag group="Helper" tag="SourceEqp"/>
</thing>

Hero Lab knows to add a single copy of everything with Helper.Bootstrap to every character. This is not something that users need for 99% of the things they'll want to add. It's only needed for universal house rules like this one. That's why it hasn't made it into the documentation. I know how I'll go about adding better support for house rules like this in the future, but I haven't been able to implement it yet.


There's an easier way to get access to the value of the combat reflexes feat. The number of bonus AoOs is stored as field[abValue].value, so there's a macro to quickly access that:

#value[fComRef]

As an added benefit, if combat reflexes isn't present, that'll equal 0, so you don't even need to test for the feat first.

Final 11000
Code:
 
var cr as number
cr = (herofield[tAtkBase].value) / 5
field[trkMax].value += round(cr,0,1) + #value[fComRef]
That's how I'd set the tracker equal to (BAB/5) + (the combat reflexes total). Note that I used Final/11000, since combat reflexes calculates its value at Final/10000.

Since I see you're referencing combat reflexes with a different unique ID, you may have changed things.


I'm afraid there's no way for things in the program to detect if the round has changed in the tactical console.
Mathias is online now   #2 Reply With Quote
Micco
Member
 
Join Date: Aug 2009
Posts: 55

Old November 25th, 2009, 02:31 PM
Quote:
Originally Posted by Mathias View Post
You created this as a tracker in the editor?

There's normally not a way to add a tracker directly to a character. They are intended as add-ons to other things in the program.

That said, there's a way to do it if you're willing to edit the XML.
Yes. I copied the Action Points tracker assuming I could just change the calculations and have it show up. I'm willing to bash up some XML and will give it a try!

Quote:

Hero Lab knows to add a single copy of everything with Helper.Bootstrap to every character. This is not something that users need for 99% of the things they'll want to add. It's only needed for universal house rules like this one. That's why it hasn't made it into the documentation. I know how I'll go about adding better support for house rules like this in the future, but I haven't been able to implement it yet.
I really appreciate the detailed reply. As usual, stuff that I think is simple turns out to be complex and the things I assume are hard are easy

Quote:
Since I see you're referencing combat reflexes with a different unique ID, you may have changed things.
Yes..this is a new Combat Reflexes that is used to support this mechanic. Basically, the mechanic is designed to put several combat actions on the same mechanic. Things like AoO, Aid Another, and an Active Dodge can all be used as immediate actions during combat if you have unused Combat Reactions. It is a really nice system to keep everyone engaged around the table since they can act during other's turns and don't have to waste their action to help another member of the party.

Quote:
I'm afraid there's no way for things in the program to detect if the round has changed in the tactical console.
No problem then. Everyone will just have to begin the round by resetting their Combat Reactions.
Micco is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 25th, 2009, 02:59 PM
Quote:
Originally Posted by Micco View Post
Yes. I copied the Action Points tracker assuming I could just change the calculations and have it show up. I'm willing to bash up some XML and will give it a try!
The Action Points tracker is unfortunately added to all characters by some of the legacy code left over from the d20 files, so that mechanism wouldn't also add a copy of it. Good idea to think of starting there, though, and if it did use the Helper.Bootstrap mechanism, it would have worked.
Mathias is online now   #4 Reply With Quote
Micco
Member
 
Join Date: Aug 2009
Posts: 55

Old November 25th, 2009, 03:47 PM
Worked like a charm! Thanks again

For anyone interested, here is the corrected code I used. Not as elegant as Mathias's, and with way too many assignments in it, but I can debug it

Code:
~ If Combat Reflexes feat then assign 1 to crfeat, otherwise 0.
     var crfeat as number
     crfeat = 0
     crfeat += #hasfeat[fGRComRef]


~ Combat Reactions are (BAB+DEXMOD)/5 rounded up plus 1 if we have Combat Reflexes.
      var dxmod as number
      var cr as number

~ If Combat Reflexes, then get the ModBonus for DEX
      dxmod = hero.child[aDEX].field[aModBonus].value * crfeat

~ Add the ModBonus for DEX to the BaseAttackBonus and divid by 5
      cr = ((hero.child[Attack].field[tAtkBase].value + dxmod) / 5)

~ Round up and add 1 to the total if the creature has Combat Reflexes
      cr = round(cr, 0, 1) + crfeat

~ Add to our total charges.
      field[trkMax].value = cr
Micco is offline   #5 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 02:53 PM.


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