Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
AhkMed
Junior Member
 
Join Date: Mar 2012
Location: Iowa
Posts: 10

Old March 29th, 2012, 07:12 AM
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).
AhkMed is offline   #1 Reply With Quote
AhkMed
Junior Member
 
Join Date: Mar 2012
Location: Iowa
Posts: 10

Old March 29th, 2012, 09:28 AM
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?
AhkMed is offline   #2 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 29th, 2012, 09:38 AM
Quote:
Originally Posted by AhkMed View Post
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 is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 29th, 2012, 09:43 AM
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).
Mathias is offline   #4 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 29th, 2012, 09:47 AM
Quote:
Originally Posted by Mathias View Post
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.
Sendric is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 29th, 2012, 09:49 AM
Quote:
Originally Posted by Sendric View Post
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.
Mathias is offline   #6 Reply With Quote
AhkMed
Junior Member
 
Join Date: Mar 2012
Location: Iowa
Posts: 10

Old March 29th, 2012, 10:21 AM
Thanks Mathias and Sendric, got the INT thing working ... now if I could only figure out the DR vs. HD thing
AhkMed is offline   #7 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 29th, 2012, 11:03 AM
Quote:
Originally Posted by AhkMed View Post
Thanks Mathias and Sendric, got the INT thing working ... now if I could only figure out the DR vs. HD thing
Can you give me an example of what you have so far?
Sendric is offline   #8 Reply With Quote
AhkMed
Junior Member
 
Join Date: Mar 2012
Location: Iowa
Posts: 10

Old March 29th, 2012, 01:45 PM
Here is what I have done so far
Attached Files
File Type: email BATUndeadLord.user (2.4 KB, 5 views)
AhkMed is offline   #9 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 30th, 2012, 05:36 AM
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 by Sendric; March 30th, 2012 at 06:09 AM.
Sendric is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:36 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.