• 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

Undead Lord

AhkMed

Member
Ok, have done some programming years ago, but my memory is not agreeing with HL editor. So here is what I am trying to do, create a template for an Undead Lord from Tome of Horrors. I have got most of it, but am having a brain fart on how to get these 2 working;

1-Hit Dice: An undead lord’s HD is equal to 5 or the base creature’s
HD (including class levels), whichever is greater.


2-Defensive Abilities: Undead lords retain all the defensive abilities
of the base creature, and gain the following:
Damage Reduction (Ex): Undead lords with 5 to 7 HD gain DR 5/
magic; undead lords with 8 or more HD gain damage reduction 10/
magic. If the base creature already has damage reduction /magic,
use it or the one above, whichever is better. If the base creature has
another type of damage reduction (bludgeoning, piercing, and so
on) its type modifiers stack. For example, a base creature with 5
HD and damage reduction 5/piercing that becomes an undead lord now has damage reduction 5/magic and piercing.

In 1, can't quite get minimum HD figured out, how to make sure it is 5. And in 2, not sure how to check and make sure the proper bonuses are applied for multiple reduction types. If you need/want a copy of what I have done, let me know, I can either post it here (if allowed), or email it to you (or message).
 
Ok, been working on this and I think I have the HD figured out but came across another problem/issue. Process involves - base creature -> becomes undead (any type including incorporeal) -> becomes undead lord (same type). All undead types eliminate CON score, not a problem, but some eliminate INT score as well, now I have traced it down to a tag of NoScore.aINT, but cannot figure out how to replace the stat once it has been removes since an "Undead Lord" has and gets an INT score. Any ideas?

On a side note, any idea where someone could find a good listings of the tags used and what they are attached to?
 
Ok, been working on this and I think I have the HD figured out but came across another problem/issue. Process involves - base creature -> becomes undead (any type including incorporeal) -> becomes undead lord (same type). All undead types eliminate CON score, not a problem, but some eliminate INT score as well, now I have traced it down to a tag of NoScore.aINT, but cannot figure out how to replace the stat once it has been removes since an "Undead Lord" has and gets an INT score. Any ideas?

On a side note, any idea where someone could find a good listings of the tags used and what they are attached to?

I haven't played around much with Pathfinder, but I think the code to assign a no score to an ability looks something like:

Code:
result = hero.child[aINT].assign[Helper.NoScore]

Assuming that's true, then to reverse the process, you should just have to delete the helper, as such:

Code:
result = hero.child[aINT].delete[Helper.NoScore]

The important bit would be to make sure the timing of this takes place after the NoScore was assigned previously.

I've never seen a list, but that would certainly be nice. :)
 
Sendric, an update to your code:

Code:
perform hero.child[aINT].assign[Helper.NoScore]

and

Code:
perform hero.child[aINT].delete[Helper.NoScore]

Using perform is preferred to using result =, now that perform is available (it became available about 3 years ago, but some of the oldest things in d20 were not updated to make use of it, which is probably where you picked it up).
 
Using perform is preferred to using result =, now that perform is available (it became available about 3 years ago, but some of the oldest things in d20 were not updated to make use of it, which is probably where you picked it up).

Ah. I wondered why there were some places that had result and others had perform. I just assumed there were some functions that required one vs the other. Thanks.

I actually went into the Pathfinder editor and took a quick look at two templates that remove the INT score (Zombie and Ectoplasmic Creature). Both of those use result instead of perform.
 
I actually went into the Pathfinder editor and took a quick look at two templates that remove the INT score (Zombie and Ectoplasmic Creature). Both of those use result instead of perform.

Yes, some of those "oldest things in d20" were copied over to Pathfinder, also without updating the code style.
 
Thanks Mathias and Sendric, got the INT thing working ... now if I could only figure out the DR vs. HD thing
 
For the Intelligence score, I removed your second script (no need to do that in two scripts) and changed the first script to this:

Code:
~ Check for INT score, adjust accordingly
if (hero.childfound[aINT].tagis[Helper.NoScore] <> 0) then
 perform hero.child[aINT].delete[Helper.NoScore]
 hero.child[aINT].field[aFinalVal].value = 10
else
 var intel as number
 intel = maximum(10, hero.child[aINT].field[aNormal].value+2)
 hero.child[aINT].field[aFinalVal].value = intel
endif

I also removed the +2 to INT in the Bonuses/Penalties section. What this code is doing is checking to see if the base creature is mindless. If it is, delete the Helper.NoScore and assign an Intelligence of 10. If the base creature is not mindless, then it determines what score to assign by computing the maximum between 10 and the current score +2. This allows for base creatures with an INT score below 10 to have their score bumped up to 10, but if a creature has a score of 9 or more, it assigns the higher value instead. Let me know if that doesn't make sense.

For the STR/DEX scores, I recommend using a similar tactic. The template calls for a +4 STR and a +2 DEX unless the base creature is incorporeal (+4 DEX). What you'll need is an if statement that checks to see if the creature is incorporeal (though searching for the Helper.NoScore for STR would probably also work) then adjusts the scores as necessary. You can do this in the first eval script along with the INT adjustment above.

If you don't know how to do that, there are a couple of ways you can help yourself. One is to try finding another script somewhere that does it (can't think of one off the top of my head). Also, make sure you have "Enable Data File Debugging" enabled in the main Hero Lab window. If you do, you can use the Floating Info Windows under the Develop menu to help you find tags and fields.

For figuring out the HD, in a new script, you should be able to use a similar tactic to what I did for the second half of the above script. Create a variable. Set that variable to the higher of 5 or base creatures total hit dice using maximum. Then set the hit dice to the variable.

For your third script (which will have to run after the HD one above), you'll need to check for number of HD then apply the appropriate damage reduction, like so:

Code:
#applydr[xDamRdMag, 5] or #applydr[xDamRdMag, 10]

I'm not sure if there's a way to combine damage reductions. The simplest thing to do here is to let players figure it out themselves. Whatever DR the creature had before adding this template will show up in their portfolio right along with this one. Otherwise, I suspect you might have to make new specials. If anyone knows differently, please correct me.

Hopefully this is enough to help you finish the job.
 
Last edited:
For the STR/DEX scores, I recommend using a similar tactic. The template calls for a +4 STR and a +2 DEX unless the base creature is incorporeal (+4 DEX). What you'll need is an if statement that checks to see if the creature is incorporeal (though searching for the Helper.NoScore for STR would probably also work) then adjusts the scores as necessary. You can do this in the first eval script along with the INT adjustment above.

I'd recommend making two versions of this template - one that gets applied to incorporeal creatures and the other that gets applied to corporeal ones.
 
Thank you very much for the input and I will check it out when I get home later. And for right now, I will stick to corporeal creature base, I am the Dm after all and I have no plans for anyone to become otherwise at this time. Just using this as a building block for a BBEG, drooling over the possibilities.
 
Back
Top