Junior Member
Join Date: Mar 2012
Location: Iowa
Posts: 10
|
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). |
#1 |
Junior Member
Join Date: Mar 2012
Location: Iowa
Posts: 10
|
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? |
#2 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Code:
result = hero.child[aINT].assign[Helper.NoScore] Code:
result = hero.child[aINT].delete[Helper.NoScore] I've never seen a list, but that would certainly be nice. |
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Sendric, an update to your code:
Code:
perform hero.child[aINT].assign[Helper.NoScore] Code:
perform hero.child[aINT].delete[Helper.NoScore] |
#4 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
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. |
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Yes, some of those "oldest things in d20" were copied over to Pathfinder, also without updating the code style.
|
#6 |
Junior Member
Join Date: Mar 2012
Location: Iowa
Posts: 10
|
Thanks Mathias and Sendric, got the INT thing working ... now if I could only figure out the DR vs. HD thing
|
#7 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#8 |
Junior Member
Join Date: Mar 2012
Location: Iowa
Posts: 10
|
Here is what I have done so far
|
#9 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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 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] Hopefully this is enough to help you finish the job. Last edited by Sendric; March 30th, 2012 at 06:09 AM. |
#10 |
|
|