• 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

Order of templates

frumple

Well-known member
Looks like there is an issue when applying multiple templates where templates applied first affect those that are applied later.

For example,

I apply the zombie template to the base creature which removes all immunities, dr, etc. from base creature. Then I add a template that grands an additional immunity to the now zombie creature, but the zombie template still removes it.

As I understand stacking templates is that they apply in the order in which you place them.
 
Take a look at the existing zombie-modifying templates like fast zombie to see how to make the zombie template work properly along with other templates.
 
That is not exactly what I need.

The zombie modifying templates have their exceptions in the zombie template itself.

What I have is a template that disables immunities, dr, etc. of the base creature (call it template X), but then I add another template which adds another immunity, etc. However, the added abilities are disabled when they shouldn't be. Since any template can be added after X, I cannot have a script like the zombie does to make sure later abilities aren't disabled.

I need something that actually takes into account the order which the templates are added. I see templates have a cIndex field, which looks like it tracks the order I am looking for. What I guess I need is a statement that says perform whatever action I am scripting on a thing as long as that thing wasn't bootstrapped by a template with a greater cIndex value.
 
You need to write your scripts in a way that takes into account how templates stack with each other. Detecting the order is not currently an option.
 
Back
Top