• 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

Can I access a parent item from within a fieldval: statement

Mathias

Moderator
Staff member
I'm working on adding a cleric domain which has powers that don't kick in until you have a few levels - that part I can do - put in a condition statement that checks for count:Classes.Cleric >=x.

Then I looked closer at the thing I'm entering - they're based on caster level, not cleric level, which means that if you have a pretige class that improves your cleric caster level, it counts toward these powers.

The thing I want is field[cMagicLev].value on the cleric helper item, but how do I access the parent thing from within a fieldval: statement?
 
mgehl wrote:
>
>
> I'm working on adding a cleric domain which has powers that don't kick
> in until you have a few levels - that part I can do - put in a condition
> statement that checks for count:Classes.Cleric >=x.
>
> Then I looked closer at the thing I'm entering - they're based on caster
> level, not cleric level, which means that if you have a pretige class
> that improves your cleric caster level, it counts toward these powers.
>
> The thing I want is field[cMagicLev].value on the cleric helper item,
> but how do I access the parent thing from within a fieldval: statement?


Count the "Hero.Caster" tags on the hero to tell how many caster levels
you have. So your condition expression would be something like
"count:Hero.Caster >= x".


--
Colen McAlister, colen@wolflair.com
 
hunter, I'm in the condition on a bootstrap, so I can't use the syntax you're talking about.

Colen, when testing it, I used a Mystic Theurge to find what the tags/fields were quickly, and a Clr 3/Wiz 3/Mystic Theurge 1 has 8 Hero.Caster tags, but only 3 Caster.Divine tags.
 
mgehl wrote:
>
>
> hunter, I'm in the condition on a bootstrap, so I can't use the syntax
> you're talking about.
>
> Colen, when testing it, I used a Mystic Theurge to find what the
> tags/fields were quickly, and a Clr 3/Wiz 3/Mystic Theurge 1 has 8
> Hero.Caster tags, but only 3 Caster.Divine tags.


count of Hero.Caster tags = caster levels the hero has.

count of Hero.Divine tags = levels of divine spells this hero can cast.
For example, a hero with 3 Hero.Divine tags can cast level 0, 1 and 2
Divine spells.


--
Colen McAlister, colen@wolflair.com
 
Colen - the issue mgehl is working thru is that he needs to determine how many Divine caster levels a hero has (actual class levels, not spell levels).

mgehl - I found an earlier post from Colen on how to determine Arcane cater levels, should be easy to modify for Divine:

You'd need to go through all the classes on the hero and count how many
of them are arcane spellcasters. For example:

~ We start with 0 arcane spellcaster levels
var total as number
total = 0

~ Go through all classes on the hero that are arcane spellcasters
foreach pick in hero where "component.BaseClHelp & CasterSrc.Arcane"

~ Add this classes number of levels to our total
total += each.field[cMagicLev].value

~ Go on to our next class
nexteach
 
hunter - your examples are from scripts.

I'm looking at the validation context.

The same language isn't used in each. In the authoring kit docs, scroll down to "Tags and Tag Expressions".
 
That's right, sorry about that. But, I think you could always bootstrap the thing, then on the thing have a script that disables it & sets any bonuses to 0 if Helper.ShowSpec is off. That should accomplish the same thing, right?
 
Thanks, hunter, I had forgotten about the disable. I'll use that is Colen doesn't have any better suggestions.
 
Back
Top