• 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

Copying spell resistance for familiar?

TCArknight

Well-known member
Hi all!

I'm trying to duplicate the Spell Resistance as Power Resistance for use by a familiar. The code below sets the resistance to 5 for the familiar, no matter what level the master. It also produces a large window referencing line 3,4,7,10,13,14,15,18,20 in the 'BaseCustSp' Component
Linkage pick 'table' not located for current context
Location: 'eval' script for Component 'BaseCustSp' (Eval Script '#1") near line X

Same also for Location: 'field calculate' script for Field 'xTotalLev' near line 4.

I also can't seem to use master.field[xTotalLev] or anything of the like.

Any thought on what I need to do to get this working right? :)
Code:
  <thing id="xPwrRes" name="Power Resistance" description="You have Power Resistance." compset="Ability" uniqueness="unique">
    <usesource source="pPURace"/>
    <tag group="Helper" tag="ShowSpec" name="ShowSpec" abbrev="ShowSpec"/>
    <tag group="SpecType" tag="SR" name="Power Resistance" abbrev="Power Resistance"/>
    <tag group="Helper" tag="BaseAbil" name="Base Ability" abbrev="Base Ability"/>
    <eval phase="Final" priority="20000"><![CDATA[
      call CalcValue

      ~ Use our value field as the quality of spell resistance
      field[livename].text = field[name].text & " (" & field[abValue].value & ")"

      ~ specify a shortname for consistency with other resistances
      field[shortname].text = "powers " & field[abValue].value]]></eval>
    </thing>

  <thing id="cPwrResist" name="Power Resistance" description="An Occultist has spell resistance equal to 5 + her Occultist level. It never interferes with her own spells, and she can voluntarily lower her spell resistance at any time." compset="CustomSpec">
    <comment>MSRD</comment>
    <usesource source="pPURace"/>
    <tag group="Helper" tag="SpecUp" name="SpecUp" abbrev="SpecUp"/>
    <tag group="AbilType" tag="Extra" name="Extraordinary Ability" abbrev=" (Ex)"/>
    <tag group="SpecType" tag="Resist"/>
    <bootstrap thing="xPwrRes"></bootstrap>
    <eval phase="PostLevel" priority="10000"><![CDATA[~if we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

field[abValue].value += field[anCompLev].value + 5

field[livename].text = field[thingname].text & " (PR " & field[abValue].value & ")"
field[abSumm].text = "Gain Pwr Resist " & field[abValue].value & "."

~#applysr[field[abValue].value]
hero.child[xPwrRes].field[abValue].value = field[abValue].value]]></eval>
    </thing>
 
So it looks like its a Custom Ability to picked by a class called the "Occultist"?

So what you need to change is the following line:
Code:
field[abValue].value += field[anCompLev].value + 5
As this is setting abValue to be the Masters level +5. So instead you want to pick up the Class level of the Occultist instead so change the above to the following:
Code:
field[abValue].value += field[xTotalLev].value + 5
 
Thanks Shadow. I think the whole Occultist part is a fragment from my New (Copy) I did. I removed all the Occultist references and made it a straight Ability. Same results :(

I know in the condition for the Familiar powers at what rank on the race, that 'fieldval::field[anCompVal].value was how the comparison was done, but that field doesn't seem to work here...

I had really hoped too that SpecType.PR was still valid like a couple of the other 3.5 Psionics features, but no such luck.
 
Ok lets sort of start over as I think I am totally confused. What is it your trying to make?

The reason I am confused is you say Familiar in the thread title but then you have the XML for a "Custom Ability" that mentions a class. The issue is that a "Custom Ability" is like a Rogue Talent or a Barbarian Rage power. They get ONLY put onto classes.

If what you want is for a Familiar you need to create a new Racial Special. In that case the field "field[anCompLev].value" only exists on a Familiar and it stores the level of the master.

So the code I told you to fix was making the "Custom Ability" for a class to work.

So which is this thing for a Class or a Race?
 
Ahhhhhhhh I see. :)

It's for the race, but the only place I found an example to copy from was in the Custom Ability. Let me change that up and see how it works. :)

Edit: Ok, it's not working. :(
Code:
  <thing id="raPwrResis" name="Power Resistance" compset="RaceSpec">
    <usesource source="pPURace"/>
    <tag group="Helper" tag="ShowSpec"/>
    <tag group="SpecType" tag="Resist"/>
    <tag group="AbilType" tag="Extra"/>
    <bootstrap thing="xPwrRes"></bootstrap>
    <eval phase="PostLevel" priority="10000"><![CDATA[~if we're not shown, just get out now
~doneif (tagis[Helper.ShowSpec] = 0)

~notify hero.field[anCompLev].value

field[abValue].value += field[anCompLev].value + 5

field[livename].text = field[thingname].text & " (PR " & field[abValue].value & ")"
field[abSumm].text = "Gain Pwr Resist " & field[abValue].value & "."

~#applysr[field[abValue].value]
hero.child[xPwrRes].field[abValue].value = field[abValue].value]]></eval>
    </thing>

I get a "Attempt to access field 'anCompLev' that does not exist for thing 'raPwrResis'. If I make the value be hero.field[anCompLev].value + 5 I get a message "Invalid use of a reserved word in script".

Edit 2: Ah, ok I need the hero.child[rmPsicrArt].field[anCompLev] in there instead.... However, that will only work in this one specific case, but I need it to work for all rmPsicrXXX races....

Thoughts?
 
Last edited:
I get a "Attempt to access field 'anCompLev' that does not exist for thing 'raPwrResis'. If I make the value be hero.field[anCompLev].value + 5 I get a message "Invalid use of a reserved word in script".

Thoughts?
Yep hero fields don't follow the same standards as every where else. So change
Code:
hero.field[anCompLev].value
to
Code:
herofield[anCompLev].value
 
I think I edited over you Shadow. :) Looks like the anCompLev is attached to the Race. I need the hero.child[rmPsicrArt].field[anCompLev] in there instead.... However, that will only work in this one specific case, but I need it to work for all rmPsicrXXX races....

Thoughts?
 
Yep hero fields don't follow the same standards as every where else.

Actually, they do;
Code:
herofield[anCompLev].value

is a shortcut for

Code:
hero.child[Totals].field[anCompLev].value

That shortcut only exists for the fields on a specific pick that's designated as the "actor pick".
 
I think I edited over you Shadow. :) Looks like the anCompLev is attached to the Race. I need the hero.child[rmPsicrArt].field[anCompLev] in there instead.... However, that will only work in this one specific case, but I need it to work for all rmPsicrXXX races....

Thoughts?
The racial special is attached to the familiar right? In that case using "herofield[anCompLev].value" will get the familiars RACE value anCompLev which holds the masters level. This can then be bootstrapped to any familiar and it will work without making changes.
 
:( Not working...

With using herofield i get the error: Attempt to access field 'anCompLev' that does not exist for thing 'Totals'.

Can the 'hero.child[rPsicrXXX]' part be pulled into a variable somehow?
 
Yep, that worked, thanks Mathias. :)

I was confused because for the condition when bootstrapping the ability to the race it uses: fieldval:anCompLev >= 9
 
Back
Top