• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Problem with a bootstrap condition

Raistlin

Member
I'm having a problem with a feat. This feat has a racial special (Change Shape-raChangeSh) bootstraped. The thing is that you can take this feat more than once, and everytime you select this feat it adds one aditional use of that racial special per day. You can also select this feat if you already have the Change Shape ability and it adds one adicional use of that ability per day.

The eval script I'm using to it is this one:
hero.childfound[raChangeSh].field[trkMax].value += 1

The thing is that every time you select this feat it adds a new ability to the special tab, instead of just adding the extra use of the ability per day.

Is there a way to make that this feat bootstraps the racial ability only when you don't have it already and, in case you already do, adds the extra use per day?

I was thinking on putting a condition on the bootstraped ability, so the bootstrap only works if you don't have already the Change Shape ability, but I don't know how to write it.

Any help will be most apreciated :)
 
The basic mechanic you would want to use is probably the same as the Trap Sense rogue ability, with some modifications to that ability's script
 
Thanks Lord Magus for your answer. Mmm I really don't follow how the Trap Sense's script would be suitable to what I'm doing.

I was looking at the Extra Channel Feat, tried to modify the script, but I'm having some problems. Here is the script:

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

~if our channel ability depends on another ability (as it does for paladins), we should be a tracker on our own
if (hero.tagis[Hero.ChanDepend] <> 0) then

~if we're the first instance of Extra Turning (this is needed because if we have multiple copies of the feat, only one should be shown in the trackers, with a maximum value of 2 * the count)
if (hero.findchild[BaseFeat,"HasFeat.fExtraChan"].uniqindex = this.uniqindex) then
perform assign[User.Tracker]
perform assign[Helper.ShowSpec]
field[trkMax].value += hero.tagcount[HasFeat.fExtraChan] * 2
endif

~otherwise add to the channel ability's uses.
else
hero.child[xChannel].field[trkMax].value += 2

~also add to the uses of our helper feats
if (hero.childlives[fComUnHelp] <> 0) then
#trkmax[fComUnHelp] += 2
endif
if (hero.childlives[fTurUnHelp] <> 0) then
#trkmax[fTurUnHelp] += 2
endif

~also add to the uses of our channel like domain abilities
if (hero.childlives[cDrdCalCol] <> 0) then
#trkmax[cDrdCalCol] += 2
endif
if (hero.childlives[cDrdSealor] <> 0) then
#trkmax[cDrdSealor] += 2
endif
if (hero.childlives[cDrdNatHea] <> 0) then
#trkmax[cDrdNatHea] += 2
endif

endif

Don't know what things should be really deleted and replaced, but I think the key lies in this section of the script:

~if we're the first instance of Extra Turning (this is needed because if we have multiple copies of the feat, only one should be shown in the trackers, with a maximum value of 2 * the count)
if (hero.findchild[BaseFeat,"HasFeat.fExtraChan"].uniqindex = this.uniqindex) then
perform assign[User.Tracker]
perform assign[Helper.ShowSpec]
field[trkMax].value += hero.tagcount[HasFeat.fExtraChan] * 2
endif

~otherwise add to the channel ability's uses.
else
hero.child[xChannel].field[trkMax].value += 2

It seems that the "HasFeat.fExtraChan" should be replaced for 'raChangeSh', to have a unique index for that ability, but I don't know how to do that.

Or maybe I just need to put a condition on the bootstraped ability, but I don't know how to express it.
 
Off the top of my head, I would have thought xCount would have been useful to solve your problem. Really not the best the top of my head has ever provided, it seems.

Indeed, any feat you can select multiple times would help, but those often don't add a new ability by themselves, they add to one that was previously available. I'll see if I can find one that would be more suitable. Till then, the 3rd code section seems to be the most promising.
 
I tried to use something like this at Post-Levels/15000:

~if we're the first instance of Alternate Form (this is needed because if we have multiple copies of the feat, only one should be shown in the trackers, with a maximum value of 1 * the count)

if (hero.findchild[RaceAbil,"thingid.raChangeSh"].uniqindex = this.uniqindex) then
perform assign[User.Tracker]
perform assign[Helper.ShowSpec]
field[trkMax].value += hero.tagcount[HasFeat.fAltFormDK] * 1


~otherwise add to the Change Shape ability's uses.
else
hero.child[raChangeSh].field[trkMax].value += 1
endif

But nothing happened, I keep geting a copie of the change shape ability per every time I select the feat :S
 
Hint: If you make a copy of Change Shape on the Racial Specials tab, what's entered as the "uniqueness" along the top? What other values are available?

Can you make a copy of Change Shape and turn it into what this feat needs?

Oh, and for a more efficient way of designating one copy of something as primary, check "Deadly Range" on the Custom Ability tab.
 
If you don't want to copy Change Shape, you can create a helper on the Simple tab - bootstrap that from the feat, then bootstrap Change Shape from the Helper.
 
I used a copy of Change Shape with the eval script found on the "Deadly Range" Custom Ability and bootstraped it to the feat. Then, I wrote an eval script on the feat to increase the number of uses per day of the Change Shape ability by one each time you select the feat and it works ok. The problem now is that when a Dragon who already has the Change Shape ability selects the feat, it gets a new change shape ability and doesn't get her natural change shape ability increased.

And I really don't know how to use that thing of creating a helper on the Simple tab. I tried creating one with the Change Shape ability bootstraped to it, then I put the eval script from "Deadly Range" on the helper and it shows me that "Attempt to access field abValue that does not exist for thing sixxxxxxxx" and now it just doesn't do anything. Then I tried puting the eval script from Deadly Range on the feat, and again, nothing.

Maybe I did it wrong, or maybe the answer is on puting a condition on the bootstraped Change Shape that prevents from bootstraping it if the hero already has the Change Shape ability, but I don't know how to write something like that.

I'm lost :S
 
Copy change chape and change the uniqueness to unique. If it's unique, no matter how many different things bootstrap it, only one copy will actually be added, and there's no need to add a script to it.

You can instead make the helper unique - then, no matter how many things bootstrap it, only one copy of it exists, so it only bootstraps 1 copy of change shape.
 
If you want to handle existing change shape abilities, you're going to need to figure out what you want to do if the character already has multiple change shape abilities - what if your race allows you one ability, with certain limits on what you can change into, and your template adds a different version of change shape, that allows you to change into different forms?
 
Tghis is the feat:

You have learned how to assume the form of an animal or humanoid, much as a bronze, gold, or silver dragon can.

{b}Prerequisite{/b}: Dragon, Adult age or older, caster level 5th.

{b}Benefit{/b}: You are able to assume a single specific alternate humanoid or animal form of Medium size or smaller once per day. This ability is otherwise identical to the alternate form ability of bronze, gold, or silver dragons. You can remain in your alternate form until you choose to return to your natural form.

{b}Special{/b}: This feat may be taken more than once and each time it adds to the number of times you may change form each day. Silver, gold, and bronze dragons that take this feat may change form an additional time each day.

So the feat must give the hero the ability, increase the uses per day of that ability if you select it more than one timei and ncrease the change shape ability uses per day that silver, gold and bronze dragons alreasdy have.
 
So the feat must give the hero the ability, increase the uses per day of that ability if you select it more than one time and increase the change shape ability uses per day that silver, gold and bronze dragons already have.
Would you simply be better off making this for now 3 different feats? I am thinking it would be allot easier to code if it was three different than trying to make one Thing do all three.
 
Back
Top