Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
I don't know if this is a commonly misunderstood topic, or if I am uncommonly dense, but I'm still having trouble with bootstrapping conditions. I have a non-unique class ability which grants a +2 bonus to saves against poisons. The fourth time it is picked, it grants immunity to poisons. Since I want to count how many times the ability has been added, I figured that the xIndex field is what I want to use as a criterion for my conditional bootstrap. So, when bootstrapping xImmPois, I added the bootstrap condition 'fieldval:xIndex >= 4', with a timing of <First/500>.
xImmPois isn't adding to the hero, and I'm pretty sure it's the bootstrap timing that is the cause. Where did I go wrong? 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/ |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Look in the debug tools - one of the option is to debug field histories - what timings does xIndex change at?
Does this have to be implemented as one ability? Or can it be two of them - the second one of which requires three copies of the first? |
#2 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
I could try to make the final effect a separate ability. I could use a tagcount, but I'm not sure which tag I would be counting. Can you point me in the general direction?
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/ |
#3 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Humble bump in hopes of further assistance.
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/ |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Your reply asked about tagcount, but I don't know the context - a tagcount of what?
Also, doesn't the alchemist have something very similar to this? Have you studied how that's implemented? |
#5 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
I had a look at the alchemist's poison resistances, and tried to implement it for my ability, but since this ability is a custom ability, xIndex and xCount aren't valid fields. Instead, I tried using abValue as the argument to swap resistance for immunity:
<Pre-levels 1000> Code:
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 2 field[abValue].value += 2 ~ 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 +2 to the focus's value focus.field[abValue].value += 2 endif Code:
doneif (tagis[Helper.SpcDisable] <> 0) doneif (tagis[Helper.FirstCopy] = 0) if (field[abValue].value <= 6) then #situational[hero.child[svAll],signed(field[abValue].value) & " bonus on all saving throws against poison.",field[thingname].text] else ~ If 4 copies are active, that's immunity if (field[abValue].value >= 8) then ~ We also want to change our special type from resistance to immunity perform delete[SpecType.Resist] perform assign[SpecType.Immune] ~ Since we're adding the immune to poison special, this ability ~ doesn't need to be shown once we're an immunity perform assign[Helper.SpecUp] endif endif Code:
if (field[abValue].value <= 6) then field[livename].text = field[thingname].text & " +" & field[abValue].value else field[livename].text = field[thingname].text & " Immunity to poison" endif 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/ |
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Please be clear when you begin asking your question whether you're using user-added abilities, or class specials that are bootstrapped - all you said was "class ability", so I thought you meant class specials. The solutions in each case are very different. If this is a custom ability, then you don't need to to worry about bootstrap conditions - you just create two abilities - one of which can be taken 3 times, and another that has a prereq of 3 copies of the first, that can just bootstrap immunity without having to worry about bootstrap conditions.
hero.tagcount[HasAbility.XXXXX] >= 3 should work as the exprreq to let you verify that 3 copies have been added. A Rogue Talent called Hold Breath is an example of something that can be taken multiple times and increases its value by 2 for each time taken. |
#7 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Thanks Mathias, I will try to be more specific in the future.
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/ |
#8 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
I'm sad to report that the following prereq produced an unspecified syntax error
hero.tagcount[HasAbility.cLRgAvPoiRes] >= 3 It appears the syntax is correct, so what else could be the problem? 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/ |
#9 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Duplicate post
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/ |
#10 |
|
|