• 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

Bootstrap condition

Pezmerga

Well-known member
I am trying to set a condition in a bootstrap to a class that will grant a bite attack when one of 2 abilities is activated. (Shapeshifting Druid variant from PH2). I am hoping if i can get it to work, the bite will display correctly on both forms. Things get screwy if you try and give the bite to both abilities seperately and apply 1/4 of your level as a bonus to damage and attack... What happens is one of the bites doesn't get the bonus. I tried doing it in an eval script but what happens there is the bite shows up on one and doesn't on the other.

Anyway, what syntax would I use in the condition for the bootstrap? I tried this:

Code:
Phase: First     Priority:450
(hero.child[cAbility1].field[abilActive].value <> 0) + (hero.child[cAbility2].field[abilActive].value <> 0)

It doesn't like the hero.child part though.
 
As far as I've been able to determine, conditions can only be tested on the fields of the current ability OR on the presence of tags. I've never been able to write an expression like this for outside the current thing. Also, to test fields on the current thing, you use the term fieldval:<current thing's field>. So, if the current thing has a Value, you could test it thusly:

Code:
fieldval:Value <> 0

Otherwise you are just testing for tags using tag expressions. What I've done is to make use of the Value field all the time, setting the Value to some number or less to indicate something on the hero is active (which has to be scripted in the eval scripts).

This could work differently with Pathfinder, I use d20 primarily, and I don't know if this actually works differently there.
 
Last edited:
As far as I've been able to determine, conditions can only be tested on the fields of the current ability OR on the presence of tags. I've never been able to write an expression like this for outside the current thing. Also, to test fields on the current thing, you use the term fieldval:<current thing's field>. So, if the current thing has a Value, you could test it thusly:

Code:
fieldval:Value <> 0

Otherwise you are just testing for tags using tag expressions. What I've done is to make use of the Value field all the time, setting the Value to some number or less to indicate something on the hero is active (which has to be scripted in the eval scripts).

This could work differently with Pathfinder, I use d20 primarily, and I don't know if this actually works differently there.

Yeah I know fieldval:Value <> 0 works, just hoping I can link two abilities to one so I can make a bite attack basically come from the same source, and HOPEFULLY show up with bonuses correctly. Bite attacks are screwy if gained from more than one source, with a bonus adjustment to it.

Code:
Post Levels, 10,000
var BiteBonus as number
BiteBonus = round(field[xAllLev].value/4,0,-1)

  
#applybonus[BonEnhance, hero.childfound[wBite], BiteBonus]

If this is on two abilities (in my case two shapeshift forms), which only work when the ability is activated (with a bite attack bootstrapped to both forms), the bite will not render with the bonus on both forms. It just randomly chooses one bite and only that one form will have the bonus to the bite attack.
 
I would simply assign a Custom.? tag on to hero and then have the bootstrap test for the Tag instead. That would be the simplest method to do.

Code:
~Phase: First     Priority:400
If (hero.child[cAbility1].field[abilActive].value <> 0) + (hero.child[cAbility2].field[abilActive].value <> 0) Then
    perform hero.assign[Custom.Abil12] 
Endif

Then on the bootstrap do the following test:
First/450
Code:
hero#Custom.Abil12

You can make your Custom.? tags by clicking on the "User Tags" and putting a check mark next to -New Tag-. Then change the above scripts "Abil12" tag to what ever it is you made up.
 
Looks like I got it actually, only thing is it says its granted by the class instead of the form, but thats not a huge deal.
Thanks!
 
Last edited:
I know this thread was for a while ago, but I was working on the same problem. Got it working using a Custom tag as follows:

On one of the weapons:

Code:
First/1000

var swEq as number

~ Check if Whisper and Shadow are both equipped

swEq = hero.childfound[iuCSShadow].field[gIsEquip].value + 
          hero.childfound[iuCSWhispe].field[gIsEquip].value +
          hero.childfound[iuCSShadow].field[wIs2nd].value +
          hero.childfound[iuCSWhispe].field[wIs2nd].value

~ assign tag if swEq is 2
doneif (swEq < 2)
doneif (swEq > 2)
perform hero.assign[Custom.wpWhisShad]

then the bootstrap on the two weapon fighting feat
Code:
First/1500

hero#Custom.wpWhisShad
 
Just an FYI is all and mostly because I have spent the last two days doing Code Reviews here at work. You could change the above to be a little more concise by doing the following.

The last thing is will "iuCSShadow" Things Always be on the hero? If not you will throw an error when this script runs as it won't be able to find the weapons. So assuming like normal weapons are not bootstraped to the hero or this Thing we should test for being LIVE first.

First/1000
Code:
~ If weapons not found on the hero then we are done
doneif (hero.childlives[iuCSShadow] = 0)
doneif (hero.childlives[iuCSWhispe] = 0)

~ Check if Whisper and Shadow are both equipped
If (hero.childfound[iuCSShadow].field[gIsEquip].value + hero.childfound[iuCSWhispe].field[gIsEquip].value + hero.childfound[iuCSShadow].field[wIs2nd].value + hero.childfound[iuCSWhispe].field[wIs2nd].value = 2) Then
   ~ assign tag if the above is equal to 2
   perform hero.assign[Custom.wpWhisShad]
Endif
 
Back
Top