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
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old March 2nd, 2023, 05:47 PM
1) My bad. That would be "herofield[tCurrSan].value"; as tCurrSan is a field on the hero, the "." which signals a transition, is not needed between hero and field.
2) svWill is not a field on the hero, it its a pick with multiple fields. The Will save would be travelled to by referring to hero.child[svWill], and the total save is stored in the field svTotal.

Thus, field[abDC].value += herofield[tCurrSan].value + hero.child[svWill].field[svTotal].value

I'm not a programmer, so I'm rather awkward at actually explaining these. I learned a lot of those things through reading the Pathfinder manual (accessible from the Classic application), parts of the Wiki, and by long experimentation and getting started from existing items... Look at the 3-4 stickied thread, they contain lots of info.
Lord Magus is offline   #11 Reply With Quote
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old March 6th, 2023, 01:17 PM
That got rid of the error message, so thank you! The only issue I'm running into now is that I can't seem to get it to display that field[abDC].value anywhere. Do you have any recommendations?

You explained it just fine, and I do understand the differences better than before - speaking as a children's museum science educator, you don't need to be an expert in the field to teach people things that you're passionate about!
Mediator9292 is offline   #12 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old March 6th, 2023, 06:51 PM
What thing is that field attached to?
Lord Magus is offline   #13 Reply With Quote
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old March 7th, 2023, 04:05 PM
I'm honestly not sure... How would I attach it to a thing without breaking the code you made?
The only Feat selections/edits I've made besides this eval script are:
Feat Category - Mythos
Show in Specials List - Checked
Sources - Strange Aeons Custom (my general file name)
I've tinkered with other options, but nothing seems to make the ability DC appear anywhere. I assume I need to edit the eval script or add a bootstrap of some sort, but I'm not even sure what I would connect together.
Mediator9292 is offline   #14 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old March 8th, 2023, 02:34 AM
To be more clear, the DC of what ability are you trying to modify with this script? Each thing corresponding to an ability with a DC has a field[abDC].

Last edited by Lord Magus; March 8th, 2023 at 02:36 AM.
Lord Magus is offline   #15 Reply With Quote
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old March 8th, 2023, 07:53 AM
I guess what I'm trying to do is display the DC of the feat itself? There is no specific spell or ability, I just need something to display somewhere on the character what that number is.
I suppose it doesn't need to specifically be a DC, but just a displayed value within the feat display that the users can reference. I did try changing field[abDC].value to field[abValue].value, but still wasn't able to get any numbers to display. Does that help?
Mediator9292 is offline   #16 Reply With Quote
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old March 8th, 2023, 09:44 AM
Alternatively, I could go the route of directly increasing the Sanity score itself just to avoid confusion between Sanity Score and Sanity Checks by combining them into one, which may honestly be the better route. The only problem is that reframing the above code doesn't seem to affect anything either.
Code:
herofield[tSanity].value += hero.child[svWill].field[svTotal].value
Do I need to specify the right side of the code as a number, doing something like
hero.child[svWill].field[svTotal].value as number
Except that only produces an error in HL parsing the script. Any advice?
Mediator9292 is offline   #17 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 8th, 2023, 10:39 AM
That's mixing up declaring a variable:


var sanity as number

sanity = hero.child[svWill].field[svTotal].value


herofield[tSanity].value += sanity



With referencing the value on an external thing. Variables only exist within the script that declares them. Referencing a field on a child pick of the hero is looking up a consistent value.
Mathias is offline   #18 Reply With Quote
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old March 8th, 2023, 11:42 AM
Ok, I think that makes sense. Variables for a script need to be described and specified in-script, but what those variables are based on from outside of the script also need to be specified and incorporated using 'x as y' and 'x = z' statements before creating the instructions that use those components. Is that generally true?

I did plug your script in as the new eval script, though, and it still doesn't seem to be working. I have nothing else checked or added anywhere in the feat editor except marking it as a Feat Category - Mythos, and the eval script itself is in the Post-Attributes Phase, Priority 10001.
Mediator9292 is offline   #19 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 8th, 2023, 12:01 PM
Huh?

z as y

and

x = y

are COMPLETELY separate things, so that's where you lost me. The only allowed options for variables are "var X as number" and var X as string".

I wasn't proposing a new script - you seemed to be confused by variables vs. normal operations, so I was demonstrating how a variable would be used. The example I created was less efficient than what you had, because it was designed for a demonstration, so I did not suggest you use it.
Mathias is offline   #20 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:05 PM.


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