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
Aranian
Junior Member
 
Join Date: Jan 2015
Posts: 7

Old June 21st, 2015, 08:06 AM
Hi!

I'm trying to incorporate some of my house rules into a user data file. I watched the GenCon 2014 videos and had a look at the manual in the program itself.

I'm currently trying to output a warning when a user goes above 17 with a starting attribute (including racials). For this to work I need two things: a loop over all attributes:
Code:
foreach pick in hero from <Attributes>
  do stuff
  nexteach
But I can't find the correct component name for <Attributes>.
And to check the value I thought I could use the "aUser" field, but all fields ("aUser", "aFinalVal", "aNormal") contain the same, final, calculated value. And the "Racial" field is 0, even though the stat has a racial modifier.

I'm a bit puzzled now...
Aranian is offline   #1 Reply With Quote
TheIronGolem
Senior Member
 
Join Date: Feb 2015
Posts: 676

Old June 21st, 2015, 08:47 AM
When trying to determine the correct component for things like this, here's what I do:

1. Find an example of the thing in question on an existing character portfolio (in this case, one of a character's attribute scores).
2. Right-click the thing and choose "Show Debug Tags for <whatever>".
3. In the new window that pops up, scroll down until you see tags starting with "component". They're almost always close to the very bottom.
4. One of the tags listed is the component you want, and it will usually be pretty obvious from the context.
TheIronGolem is offline   #2 Reply With Quote
Aranian
Junior Member
 
Join Date: Jan 2015
Posts: 7

Old June 21st, 2015, 08:58 AM
OK, seems like I'm just blind, not stupid. I did check those debug windows, but didn't pick up on that entry... Thanks! My code now works, except for the wrong value being checked (or the value being wrong):
Code:
var highest as number
highest = 0

foreach pick in hero from BaseAttr
  if (eachpick.field[aUser].value > highest) then
    highest = eachpick.field[aUser].value
  endif
nexteach

validif (highest <= 17)
Aranian is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old June 21st, 2015, 09:04 AM
You're looking for field[aUser].uservalue, rather than field[aUser].value.
Mathias is online now   #4 Reply With Quote
Aranian
Junior Member
 
Join Date: Jan 2015
Posts: 7

Old June 21st, 2015, 09:37 AM
Thank you, uservalue is what I'm looking for, as it seems to be never influenced by later changes (stat increases, items, adjustments), meaning the warning won't pop up at later levels. But I need to include the racial modifier for the attribute, which in the fields debug window is 0. Am I missing another field or do I need to go over the race to get the modifier? I noticed the racial modifier seems to be included in the "delta" value of the "aUser" field, but that also includes stat increases again...

EDIT: I think aStartMod is what I'm looking for.
EDIT2: Or not, as that includes later modifications again

Last edited by Aranian; June 21st, 2015 at 09:40 AM.
Aranian is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old June 21st, 2015, 09:56 AM
Why don't you quote the rule you're trying to implement? I'm not sure what it is you're trying to accomplish, so I don't know if this is the best way to accomplish it.
Mathias is online now   #6 Reply With Quote
Aranian
Junior Member
 
Join Date: Jan 2015
Posts: 7

Old June 21st, 2015, 10:03 AM
I'm implementing a house rule to encourage more balanced stats:
No character can start with an ability score above 17 (including racial modifiers).
This means I can't just adjust the Attribute Cost Mechanics, as allocating 18 points into strength as a halfling is OK, as that gets adjusted to 16. But as an elf I'm only allowed to put 15 points into dexterity, as that brings me to 17 total already.
Aranian is offline   #7 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old June 21st, 2015, 10:25 AM
what about field[aUser].uservalue += field[aStartMod].value?

That should give you a value that is the user entered number plus the start mod
AndrewD2 is offline   #8 Reply With Quote
Aranian
Junior Member
 
Join Date: Jan 2015
Posts: 7

Old June 21st, 2015, 10:33 AM
I tried that (see the edits to my previous post), but that field also contains later stat increases unfortunately (and "Ability Score (Starting)" adjustments, but one shouldn't need those, I think).
Aranian is offline   #9 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old June 21st, 2015, 10:40 AM
Well you can always use it for character creation and then have the eval rule be valid above level 1

validif (#totallevelcount[] > 1)
AndrewD2 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:27 AM.


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