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
wolfang237
Member
 
Join Date: Dec 2012
Posts: 40

Old September 27th, 2016, 12:22 AM
In the campaign I'm running, my players have opted in to the Mythic system but with a twist: they tier up when they've unlocked all of the next tier's abilities/feats/unlocks. So, in this case, I'm playing it as they are investing in a custom Mythic Path based on their play style and choices - how it developes is up to how they play. This means their whole path is customized by me.

For lots of it, no programming is really required - just text can keep them up to date. But there's some base stuff that would be useful to have it calculate itself or show up in activation lists, etc.

So my first question: I'm trying to add a mythic feat that enhances the breeze-kissed racial trait to have the wind-based bonus armor vs ranged attacks apply as a deflection bonus against all attacks and then scale it based on their mythic tier and their investment in their race like so:

Deflection AC = 2 + 1/2 Tier + 1 per racial feat taken.

Since the breeze-kissed trait's bonus vs ranged attacks isn't applied to the total armor, I can technically just ignore interacting with it and just add deflection armor normally. My player can ignore the ranged attack bonus altogether from their trait. This simplifies it so all I have to do is script it so it adds 2 deflection armor plus 2 values, one of which is half their tier whereas the other is the total number of sylph feats my player has.

This is Enduring Armor's Eval Script, which I referenced:
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ If we're disabled, just get out now
doneif (tagis[Helper.SpcDisable] <> 0)

field[abValue].value += 3 + field[xTotalLev].value
--I'm assuming what this line does is set the armor value added by adding 3 to the xTotalLev (being the level of the mythic class, i.e. the tier)

field[livename].text = field[thingname].text & " " & signed(field[abValue].value)

doneif (field[abilActive].value = 0)

#applybonus[tACArmor, hero.child[ArmorClass], field[abValue].value]

This is my script with some changes:
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ If we're disabled, just get out now
doneif (tagis[Helper.SpcDisable] <> 0)

field[abValue].value += 2 + (field[xTotalLev].value * 1/2) + field[abValue2]
--my changes are that it adds the base breeze-kissed value of 2 to half the player's mythic tier as well as an upcoming second abValue, equaling the total number of racial feats taken.

field[livename].text = field[thingname].text & " " & signed(field[abValue].value)

doneif (field[abilActive].value = 0)

#applybonus[tACDeflect, hero.child[ArmorClass], field[abValue].value]
--In this case, I just changed the armor value to a deflection value.

So the issue I'm currently having is that, as I said, it's just not working. It'll add the base 2 but apparently ignores the xTotalLev, i.e it's not taking the tier value into account. I'm assuming this means the xTotalLev isn't actually tied to the mythic tier value in any way and I need to somehow tie them together. But the Enduring Armor ability had nothing else besides this one Eval Script, so I'm not sure how it's referencing the tier. Thoughts?

((After this, I'll be asking where to start in setting the abValue2 to equal the total sum of the sylph racial feats taken))

Last edited by wolfang237; September 27th, 2016 at 12:29 AM.
wolfang237 is offline   #1 Reply With Quote
wolfang237
Member
 
Join Date: Dec 2012
Posts: 40

Old September 27th, 2016, 02:44 AM
So I have some good news! I edited my script to try to solve both my issues:


~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ If we're disabled, just get out now
doneif (tagis[Helper.SpcDisable] <> 0)

field[abValue2].value += (#tiereffect[]) / 2

field[abValue2].value = round(field[abValue2].value,0,-1)

if (field[abValue2].value >= 1) then
field[abValue].value += 5 + field[abValue2].value
else
field[abValue].value += 5 + 1
endif

if (#hasfeat[fAiryStep] <> 0) then
field[abValue].value += 1
endif

if (#hasfeat[fCloudGaze] <> 0) then
field[abValue].value += 1
endif

if (#hasfeat[fElemJaunt] <> 0) then
field[abValue].value += 1
endif

if (#hasfeat[fInnerBrea] <> 0) then
field[abValue].value += 1
endif

if (#hasfeat[fWingAir] <> 0) then
field[abValue].value += 1
endif

field[livename].text = field[thingname].text & " " & signed(field[abValue].value)

doneif (field[abilActive].value = 0)

#applybonus[tACDeflect, hero.child[ArmorClass], field[abValue].value]

In the case of this script, I successfully tested that taking any of the 5 listed feats each adds 1 additional point to the armor class! Success! (There's probably a more efficient way of doing this, but let's be thorough first). Additionally, I offhandedly found the macro to track tiers and input it into the code. As you can see, I successfully set it up to scale at half her tier (minimum 1) and it automatically rounds down. So I'm actually done with this script!

Next? Reducing the amount of Mythic Power. Another PC acts as a mythic 'battery' for the others. He has a pool of 2+half his mythic tier instead of 3+twice his tier like everyone else, but his mythic power refreshes per encounter. All I need is to figure out how to modify the maximum mythic power he has.

Last edited by wolfang237; September 27th, 2016 at 03:28 AM.
wolfang237 is offline   #2 Reply With Quote
wolfang237
Member
 
Join Date: Dec 2012
Posts: 40

Old September 27th, 2016, 04:11 AM
Creating a smaller, encounter based mythic pool!

My current coding:
doneif (tagis[Helper.SpcDisable] <> 0)

field[abValue].value += (#tiereffect[]) / 2

field[abValue].value = round(field[abValue].value,0,-1)

if (field[abValue].value >= 1) then
hero.childfound[trkMythic].field[trkMax].value = 2 + field[abValue].value
else
hero.childfound[trkMythic].field[trkMax].value = 2 + 1
endif

~Everything above this is changing the volume of the Mythic Pool

if (hero.childfound[trkMythic].tagis[Usage.Day].value <> 0) then
tagreplace[Usage.Day,Usage.Battle]
endif
~Here, I'm attempting to access the usage period tag in the Mythic Power tracking resource and replace the day tag with the battle tag.

The error I'm having states that, on line 15 (one above the beginning of my final if statement - i.e. a blank line), "Error parsing left-side expression in relational comparison". I have no idea what that means or why it's in a blank line



I can't test the code after it until I can figure out what's causing this one, so I don't know if my tagreplace command even works (I suspect it might try to replace a non-existent tag in my feat rather than swap the tags in the tracker).

Last edited by wolfang237; September 27th, 2016 at 04:45 AM.
wolfang237 is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old September 27th, 2016, 07:08 AM
Quote:
Originally Posted by wolfang237 View Post
The error I'm having states that, on line 15 (one above the beginning of my final if statement - i.e. a blank line), "Error parsing left-side expression in relational comparison". I have no idea what that means or why it's in a blank line
Make sure when counting lines you are counting lines that don't word wrap and you count blank lines.

Quote:
Originally Posted by wolfang237 View Post
Creating a smaller, encounter based mythic pool!

My current coding:
doneif (tagis[Helper.SpcDisable] <> 0)

field[abValue].value += (#tiereffect[]) / 2

field[abValue].value = round(field[abValue].value,0,-1)

if (field[abValue].value >= 1) then
hero.childfound[trkMythic].field[trkMax].value = 2 + field[abValue].value
else
hero.childfound[trkMythic].field[trkMax].value = 2 + 1
endif

~Everything above this is changing the volume of the Mythic Pool

if (hero.childfound[trkMythic].tagis[Usage.Day].value <> 0) then
tagreplace[Usage.Day,Usage.Battle]
endif
~Here, I'm attempting to access the usage period tag in the Mythic Power tracking resource and replace the day tag with the battle tag.
15 lines get me the highlighted code above. Which is clearly wrong in a "relation comparison". That means in an "IF" statement. Tagis[] is not a "field" so it can not have a Value.

Change to:
Code:
if (hero.childfound[trkMythic].tagis[Usage.Day] <> 0) then

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #4 Reply With Quote
wolfang237
Member
 
Join Date: Dec 2012
Posts: 40

Old September 27th, 2016, 09:10 AM
Sweet! Shadow Chemosh himself! And thank you for the tip. I had been working with a lot of fields that end in .values recently and kind of assumed that the .tagis would return either a 1 or a 0 and would, then, be a .value as well. Seems I was mistaken xD

The code works on that line now but just below it, the "tagreplace[Usage.Day,Usage.Battle]" seems to have an unspecified error when trying to parse. Likely I'm just not using tagreplace correctly. Many of these formulas I've gotten online with little explanation on exactly HOW they work - kinda been fooling around with it all night.

The code is the same as my last post but with your changes.

EDIT: I added perform this.tagreplace and it worked fine with no errors. But it didn't actually seem to change the usage period for his mythic pool - still says /day? I might have just been trying to change the wrong thing. I'm not sure. Essentially I want it to be /encounter in the tracked resources tab and /encounter in the special tab as well. The special tab might require a string swap, instead?

Last edited by wolfang237; September 27th, 2016 at 09:31 AM.
wolfang237 is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old September 27th, 2016, 09:33 AM
Quote:
Originally Posted by wolfang237 View Post
"tagreplace[Usage.Day,Usage.Battle]"
The only thing I see currently wrong is that tagreplace is going to execute on the Thing that the script is running on. NOT on the Mythic Tracker (trkMythic) which I think you want it to change right?

I would change all this
Code:
if (hero.childfound[trkMythic].tagis[Usage.Day].value <> 0) then
tagreplace[Usage.Day,Usage.Battle]
endif
into
Code:
perform hero.childfound[trkMythic].tagreplace[Usage.Day,Usage.Battle]
This line says "IF" HL can find the Pick trkMythic and it has the Usage.Day tag replace it with Usage.Battle.

Make that change and see if HL is happy...

Duh you need a "PERFORM" in front of any tag changing script logic....

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #6 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old September 27th, 2016, 09:35 AM
Something to do to help. Is you can search the GitHub community repository to see how working scripts work. Look at THIS link and you see I searched for tagreplace to find working examples.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old September 27th, 2016, 09:36 AM
The tagreplace is missing a "perform" at the beginning of the line. ShadowChemosh's change is still appropriate, but a line of code that's performing an operation, and doesn't have an "=" in it, still needs to begin with "perform".
Mathias is offline   #8 Reply With Quote
wolfang237
Member
 
Join Date: Dec 2012
Posts: 40

Old September 27th, 2016, 09:49 AM
a) I can't believe I was willing to perform a .tagis after a childfound but couldn't think to, instead, just do a .tagreplace... and here I was stressing about how to make sure the tagreplace took place within the trkMythic! Note: it worked like a charm,

b) I've been looking desperately for a site I could find code examples in! You just made my day!

And, finally, c) thank you Mathias! The distinction of having to use a perform in place of a lack of "=" is helpful. You'll probably need to be patient with me cause this is my first programming language and I started last night (with only some small experience when I tried to put bending into pathfinder 3 years ago). This stuff is pretty weird, imo, which meant I didn't even think about the perform vs "=" or that fields were values and .tagis wouldn't return a value.

So yeah. Sorry about the noobishness. But thanks for the patience!
wolfang237 is offline   #9 Reply With Quote
wolfang237
Member
 
Join Date: Dec 2012
Posts: 40

Old September 27th, 2016, 09:58 AM
Alright guys. I have a brand new challenge: I didn't really want to touch this since I feel it's a lot more complicated and there's not much already in pathfinder I can use to reference. The breeze-kissed thingy that I solved early on? I need to make it incremental. The player has the ability to take from a pool and apply part of her blessing to allies - this lowers the armor she's given, which means the armor has to scale based on how many points she has. Each point would equal 1/5th of the armor granted. But the aura also absorbs some wind spells or elementals and what-not, which means she can go over the base pool of 5 (and there's a bunch of pen-and-paper mechanics to that. The only thing that needs to be programmed is that she gains more armor as it gets stronger).

In the mean time, I'm going to try to find something in hero lab that already has an incremental setting.

I'm thinking of setting up 5 charges on the new ability. The script would have if () then's that draw from the number of charges. If the charges are at 5, do nothing. If they're at 4, change the field[abValue].value in the original feat, subtracting 2 from it (as the wind speeds go from strong to moderate) and multiplying it by [.8]. And then go from there. The problem is I don't know how to reference the number of current charges. the Find Thing option didn't really find that and I don't know what it might start at.

Last edited by wolfang237; September 27th, 2016 at 11:09 AM. Reason: Ideas
wolfang237 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 05:12 PM.


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