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 January 8th, 2019, 02:21 PM
Hello everyone, me again...
I have an ability that the user may select more than once. Each time it is added, it grants a +1 bonus. I only want the class tab to show the ability once, reflecting the bonus based on how many times the user has selected it. I thought that using the FirstCopy tag would help:
Code:
 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)

~ Only add the first copy
      doneif (tagis[Helper.FirstCopy] = 0)

~Add a +1 bonus to Will saving throws against fear and mind-affecting effects.
     field[abValue].value += field[xIndex].value     

     #situational[hero.childfound[svWill],signed(field[abValue].value) & " to saves against fear and mind-affecting effects.",field[thingname].text]
But that's not working; it still adds a new entry to the class tab each time it's picked, and the bonus isn't adding properly.

Is FirstCopy the right tag to be using here? If not, what would work?
Bob G is offline   #1 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 19th, 2019, 02:47 PM
Bumpedy bump bump.

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   #2 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 20th, 2019, 11:24 AM
If I understand what you mean, then what you ask for as far as showing only one pick on the class tab is impossible. You CAN have only a single copy show on the specials tab, and you CAN have later copies of abilities add to the first, but any table to which Users add picks MUST show all picks. Otherwise, there would be no way to delete the added picks.

Also, the type of pick which are user added to class tabs are Custom Specials. They have a different setup, so you can't count on the xIndex field (as you would with Class Specials), and they do not automatically get FirstCopy assigned.

For an example of a custom special which can be taken multiple times to stacking effect, check out the Deadly Range Ninja/Slayer talent (cNinDeadRa).

Here is the relevant code for that.

PostLevel 10000
Code:
      ~ This procedure declares one copy the first (assigning Helper.FirstCopy)
      ~ and sets the quickadd to the same copy. All others redirect to this first
      ~ copy and add some value to it (defined by the incrval variable). The
      ~ final combined value will be in the abValue field of the first copy (if
      ~ setval1 = 1) or in the trkMax field of the same (if setval1 = 0).
      var incrval as number
      var setval1 as number
      incrval = 10
      setval1 = 1

      call combocopy

      if (tagis[Helper.FirstCopy] <> 0) then
        ~ Nothing
      else
        perform assign[Helper.SpecUp]
        endif
You'd want to put the situational in the first branch, so only the first copy ran it. The "else" branch is what prevents later copies from being shown on the specials tab.
Aaron is offline   #3 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 06:59 AM.


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