• 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

Supress part of the Skeleton template script

bodrin

Well-known member
I have a template which, amongst other things, increases the Charisma of Undead it can be added after the skeleton template as a skeleton is Undead.

However because the Skeleton template forces the Charisma score to 10 I need to add the modifier after the Skeleton template is applied.

Code:
~ Force our Wisdom to 10 and our Charisma to 10
      hero.child[aWIS].field[aNormForce].value = 10
      hero.child[aCHA].field[[B]aNormForce[/B]].value = 10

How can I override the aNormForce tag to add the bonus to the Cha ability? I don't want to revert to the Base creatures Cha but just add to the 10 set by the Skeleton template.
 
Can you think of any other templates that are added along with the Skeleton template, and set a different charisma?

Have you looked at how they make that change?

Hint: what phase & priority is the Skeleton template setting aNormForce? What phase and priority are those other templates altering aNormForce at?
 
Can you think of any other templates that are added along with the Skeleton template, and set a different charisma?

Have you looked at how they make that change?

Hint: what phase & priority is the Skeleton template setting aNormForce? What phase and priority are those other templates altering aNormForce at?

I don't know off hand, however delving deeper into the template abilities it appears that I'd have to be selective in suppressing certain abilities!
The skeleton template locks out all abilities apart from improved initiative but my template bootstraps new abilities onto the undead creature!

So if added to a Skeleton then the new abilities from the new template would have to be shown on the specials as valid and not with the Requirements not met message!

I'll have to look deeper into the phase and priority later!
 
Skeleton, Bloody and Skeleton, Burning were the templates I was referring to.

I've managed to apply the ability boost by looking at the other skeleton types and altering phase/priority however I can't seem to activate the new template bootstrapped abilities as the original skeleton assigns the Disable helper code to everything except it's bootstrapped specials.

What's the script command to use instead of Perform.Assign Helper.SpcDisable ? I presume that's what is greying out my new templates bootstrapped abilities!

I have channel resistance +4, DR good 5 and three other specials that are on the creature but greyed stating requirements not met!
Thanks in advance.
 
Take a look at the bootstraps button on the skeleton template (top right). See anything odd there (like the Tags button being highlighted)? That's because it's assigning a tag to some of the abilities it bootstraps.

Adding that tag to its bootstraps is how the skeleton protects its own abilities from its disabling script - you'll see that the part of the skeleton's script that is looking for abilities to disable:

Code:
!(SpecSource.tmSkeleton

(there are more tags that will prevent something from being disabled, but that's the portion that's relevant to what you want to do).

"!" means "NOT", so !SpecSource.tmSkeleton means "not things that have the SpecSource.tmSkeleton tag"
 
Sorry I need to clarify, I'd already copied the skeleton disable script and added my template unique ID into the code amongst the other skeleton types.

I thought it would work as I knew the "NOT" statements would preclude the new templated abilities. But it appears that once the Skeleton template is upon a creature it's script overrides the new additions, I have tagged my template ID SpecSource hoping it would activate correctly.

Apart from tagging it with the skeleton template ID, which I don't need to do as it's an acquired template that can be added to any undead, adding to other undead creatures produces the desired effects it's just the skeleton template causing the problem!
Unless I have to run the priority and phase earlier than the skeleton template then I was certain I'd cracked the problem.
 
I have a headache.

I added the tmSkeleton tag to my new template abilities just to test and all the bootsrapped things went valid but the special menu showed both template sources on the description.

This isn't good as it can be added to any undead creature not just skeletons.

Heres the code i've got so far

Code:
~ if we've been added to a skeleton ensure that we don't disable our bootstrapped abilities.

if (hero.tagis[Template.tmSkeleton] <> 0) then
      [B]perform hero.assign[Helper.SpcEnable][/B]
       endif

      var searchexpr as string
      searchexpr = "!component.BaseFeat & !(SpecSource.tmSkeleton | [I][B]SpecSource.tmABNeChCr [/B][/I]| SpecSource.tmBloodSke | SpecSource.tmBurnSkel | SpecSource.tmSkeArche | SpecSource.tmSkelCham | SpecSource.tmSkeAcid | SpecSource.tmSkeFrost | SpecSource.tmSkeElec | SpecSource.tmSkeMudra | SpecSource.tmSkeExplo | SpecSource.tmSkeMulti) & !SpecType.Movement & !thingid.typUndead"
        foreach pick in hero from Ability where searchexpr
          perform eachpick.assign[Helper.SpcDisable]
          nexteach

However the bold part throws this error

Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'tmABNeChCr' (Eval Script '#4') on line 4
-> Tag 'Helper.SpcEnable' not defined

The bold italics are my new template ID. I was hoping that the line Helper.spcEnable would reinstate all the helper objects and then the next script would disable what wasn't required if added to a skeleton.
No such joy!:(

Any ideas?
 
Last edited:
Sorry I need to clarify, I'd already copied the skeleton disable script and added my template unique ID into the code amongst the other skeleton types.

I thought it would work as I knew the "NOT" statements would preclude the new templated abilities. But it appears that once the Skeleton template is upon a creature it's script overrides the new additions, I have tagged my template ID SpecSource hoping it would activate correctly.

Apart from tagging it with the skeleton template ID, which I don't need to do as it's an acquired template that can be added to any undead, adding to other undead creatures produces the desired effects it's just the skeleton template causing the problem!
Unless I have to run the priority and phase earlier than the skeleton template then I was certain I'd cracked the problem.

This should be the way to go - modifying the skeleton's script to allow the abilities of your new template should be fine. (Helper.SpcEnable does not exist).

Can you give me the entire version of what you've replaced the skeleton's script with?
 
The other option would be to have a script on your new template, running after the skeleton's, that searches for everything WITH the SpecSource tag for that template (and ditch all the rest of that expression).

Then, instead of assign[Helper.SpcDisable], you want to delete[Helper.SpcDisable]

That way, you're undo-ing the skeleton template's disabling of the ability.
 
The other option would be to have a script on your new template, running after the skeleton's, that searches for everything WITH the SpecSource tag for that template (and ditch all the rest of that expression).

Then, instead of assign[Helper.SpcDisable], you want to delete[Helper.SpcDisable]

That way, you're undo-ing the skeleton template's disabling of the ability.

Cue sparking metallic forks, tesla cages and bubbling potion bottles, a hunched figure throws a huge metallic lever on the roughly hewn wall.

It's Aliiiiiiiiiiiiiiiiiiiiiiive!!!!!!!!!!!!!!!!

Well undead but you get the picture.

The final working script.
Phase first
Priority 101

Code:
~ if we've been added to a skeleton ensure that we don't disable our bootstrapped abilities.

      var searchexpr as string
      searchexpr = "SpecSource.tmSkeleton | SpecSource.tmABNeChCr | SpecSource.tmBloodSke | SpecSource.tmBurnSkel | SpecSource.tmSkeArche | SpecSource.tmSkelCham | SpecSource.tmSkeAcid | SpecSource.tmSkeFrost | SpecSource.tmSkeElec | SpecSource.tmSkeMudra | SpecSource.tmSkeExplo | SpecSource.tmSkeMulti"

        foreach pick in hero from Ability where searchexpr
          perform eachpick.delete[Helper.SpcDisable]
          nexteach

Sometimes you can't see the wood for the trees!
Thank you once more for the gentle nudge.
 
You should be able to use:

searchexpr = "SpecSource.tmABNeChCr"

You don't care about what all the variant skeleton templates have done - only about your own abilities.
 
Back
Top