Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old March 8th, 2020, 01:31 PM
Ability says: Each time the rogue selects this avoidance, she gains a +1 dodge bonus to AC when fighting defensively. So I did this:
<First/500>
Code:
~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] <> 1)
~ if we've been disabled, get out now
      doneif (tagis[Helper.SpcDisable] <> 0)
~ if we're not fighting defensively, get out now
     if (hero.childfound[pstFtDefen].field[pIsOn].value <> 0) then
     
~ Set the bonus based on the number of active abilities
      field[abValue].value += field[xIndex].value
      field[livename].text = field[thingname].text & " " & field[abValue].value

~ The following should only happen once on the first copy
      doneif (tagis[Helper.FirstCopy] = 0)

~ Give a dodge bonus to Armor Class
      hero.childfound[ArmorClass].field[tACDodge].value += field[abValue].value
endif
But dodge bonus does not add. Why is this happening?

Projects: Legendary Rogue (Legendary Games) 97.9%, Assassin (Interjection Games) 88%, Fortunate (rebuild of Luckbringer, Rite Publishing) 87.2%, Adept Godling (Super Genius Games) 73.9%, Eldritch Godling (Super Genius Games) 72.9%, Mighty Godling (Super Genius Games) 44.3%, Clever Godling (Super Genius Games) 41.2%, Legendary Cavalier (Legendary Games) 30.9%

Message me for a list of completed projects.
Visit my blog! https://gauntletsofblogrepower.blogspot.com/
Bob G is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 8th, 2020, 01:45 PM
I am pretty sure CustomSpec Picks don't get Helper.FirstCopy unless you apply it yourself first. If you have the community pack installed this is easy as calling X1SetFirst.

You can see an example HERE.

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   #2 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old March 8th, 2020, 08:38 PM
Quote:
Originally Posted by ShadowChemosh View Post
I am pretty sure CustomSpec Picks don't get Helper.FirstCopy unless you apply it yourself first. If you have the community pack installed this is easy as calling X1SetFirst.

You can see an example HERE.
Wow, I have been pulling my hair out for two months trying to figure out why Helper.FirstCopy wasn't behaving like it should. I had no idea that it didn't automatically get assigned on custom abilities. "Call X1SetFirst" did the trick. Thanks for the code SC!

Projects: Legendary Rogue (Legendary Games) 97.9%, Assassin (Interjection Games) 88%, Fortunate (rebuild of Luckbringer, Rite Publishing) 87.2%, Adept Godling (Super Genius Games) 73.9%, Eldritch Godling (Super Genius Games) 72.9%, Mighty Godling (Super Genius Games) 44.3%, Clever Godling (Super Genius Games) 41.2%, Legendary Cavalier (Legendary Games) 30.9%

Message me for a list of completed projects.
Visit my blog! https://gauntletsofblogrepower.blogspot.com/
Bob G is offline   #3 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old March 19th, 2020, 01:18 PM
Quote:
Originally Posted by ShadowChemosh View Post
I am pretty sure CustomSpec Picks don't get Helper.FirstCopy unless you apply it yourself first. If you have the community pack installed this is easy as calling X1SetFirst.

You can see an example HERE.
I tried using the X1SetFirst procedure with the script below, but the value isn't stacking after the first copy.
Code:
~ Set Helper.FirstCopy for custom abilities
      call X1SetFirst
      
      var DamRed as number
      DamRed += 3

~Grant damage reduction 
      #applydr[xDamRd,DamRed]
I also tried removing the call X1SetFirst line, but the result was the same. What's going on here?

Projects: Legendary Rogue (Legendary Games) 97.9%, Assassin (Interjection Games) 88%, Fortunate (rebuild of Luckbringer, Rite Publishing) 87.2%, Adept Godling (Super Genius Games) 73.9%, Eldritch Godling (Super Genius Games) 72.9%, Mighty Godling (Super Genius Games) 44.3%, Clever Godling (Super Genius Games) 41.2%, Legendary Cavalier (Legendary Games) 30.9%

Message me for a list of completed projects.
Visit my blog! https://gauntletsofblogrepower.blogspot.com/
Bob G is offline   #4 Reply With Quote
Minous
Senior Member
 
Join Date: May 2015
Posts: 830

Old March 19th, 2020, 06:27 PM
Why not store DamRed as an abvalue and have the other copies reference that?
Minous is offline   #5 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old June 5th, 2020, 07:09 AM
I thought I had this figured out, but after a few months I revisited the ability, and realized it wasn't working as I hoped.

It's a custom ability that can be selected multiple times. Each time, it adds +1 dodge bonus to AC when hero is fighting defensively.

I don't receive any error messages, and the bonus adds to AC correctly, but the livename doesn't reflect the correct value after the first copy. It could be a timing issue, but I tried other phases to no avail.
<Post-Attributes 10000>
Code:
     call X1SetFirst
     field[abValue].value += 1
     
     field[livename].text &= field[thingname].text & " +" & field[abValue].value
     hero.childfound[pstFtDefen].field[abValue].value += field[abValue].value

~ if we're not the first copy, get out now
     doneif (tagis[Helper.FirstCopy] <> 1)
     
~ if we're not fighting defensively, get out now
     doneif (hero.childfound[pstFtDefen].field[pIsOn].value = 0)
     hero.childfound[ArmorClass].field[tACDodge].value += field[abValue].value
I have several custom abilities that work similarly, so if the community can assist, you will help me solve several problems. Thanks as always!

Projects: Legendary Rogue (Legendary Games) 97.9%, Assassin (Interjection Games) 88%, Fortunate (rebuild of Luckbringer, Rite Publishing) 87.2%, Adept Godling (Super Genius Games) 73.9%, Eldritch Godling (Super Genius Games) 72.9%, Mighty Godling (Super Genius Games) 44.3%, Clever Godling (Super Genius Games) 41.2%, Legendary Cavalier (Legendary Games) 30.9%

Message me for a list of completed projects.
Visit my blog! https://gauntletsofblogrepower.blogspot.com/
Bob G is offline   #6 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old June 8th, 2020, 06:13 PM
I think normally the livename field is set late in the Final phase.

Try just pulling just this line out to something like Render/5000:

field[livename].text = field[thingname].text & " +" & field[abValue].value

Working on -
  • (SWADE) WIP Savage Rifts
  • Savage Rifts (Deluxe): Update link in This post
  • Star Trek Adventures: Update link in This post
TCArknight is offline   #7 Reply With Quote
Minous
Senior Member
 
Join Date: May 2015
Posts: 830

Old June 12th, 2020, 05:16 PM
Yeah, odds are you would need to have the effect and live name changes at different timings
Minous is offline   #8 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old June 15th, 2020, 08:26 PM
Quote:
Originally Posted by TCArknight View Post
I think normally the livename field is set late in the Final phase.

Try just pulling just this line out to something like Render/5000:

field[livename].text = field[thingname].text & " +" & field[abValue].value
Thanks for the suggestions everyone (Minous too). Unfortunately, pulling the livename line out and putting on Render/5000 didn't change the abValue of the livename after the first copy. I also discovered that the bonus to AC wasn't adding after the first copy either.

It seems so simple, yet I just can't seem to get the concept right. Talk me off the ledge, someone!

Projects: Legendary Rogue (Legendary Games) 97.9%, Assassin (Interjection Games) 88%, Fortunate (rebuild of Luckbringer, Rite Publishing) 87.2%, Adept Godling (Super Genius Games) 73.9%, Eldritch Godling (Super Genius Games) 72.9%, Mighty Godling (Super Genius Games) 44.3%, Clever Godling (Super Genius Games) 41.2%, Legendary Cavalier (Legendary Games) 30.9%

Message me for a list of completed projects.
Visit my blog! https://gauntletsofblogrepower.blogspot.com/
Bob G is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old June 16th, 2020, 07:47 AM
Here's how I'd write this:

Code:
  <eval index="1" phase="PreLevel" priority="1000"><![CDATA[
     ~ If we're not active, just get out now
    doneif (tagis[Helper.SpcDisable] <> 0)

    ~ see if a quickfind has been created by another copy
    perform quickfind.setfocus

    ~ if we didn't find a redirection, we're the first copy of this ability to run this script, so we'll make ourselves the FirstCopy.
    if (state.isfocus = 0) then
      perform quickadd
      perform assign[Helper.FirstCopy]
      ~Add the base value of 1
      field[abValue].value += 1


    ~ otherwise, redirect hero.child[] to the FirstCopy, and make us an upgrade
    else
      perform focus.redirect
      perform assign[Helper.SpecUp]
      perform assign[Hide.Statblock]
      ~ add +1 to the focus's value
      focus.field[abValue].value += 1
      endif
    ]]></eval>
  <eval index="2" phase="PostLevel" priority="10000"><![CDATA[
    doneif (tagis[Helper.SpcDisable] <> 0)
    doneif (tagis[Helper.FirstCopy] = 0)

     ~ if we're not fighting defensively, get out now
    doneif (hero.childfound[pstFtDefen].field[pIsOn].value = 0)
 
    ~ Give a dodge bonus to Armor Class
    hero.childfound[ArmorClass].field[tACDodge].value += field[abValue].value 
     ]]></eval>

And then use the automated livename generation mechanisms to set abValue as an append to the livename, and set it as signed - but that all happens in tags, not in a script.
Mathias is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

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 03:36 AM.


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