Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
GLBIV
Member
 
Join Date: Apr 2012
Location: Washington, D.C.
Posts: 76

Old September 4th, 2012, 07:35 AM
Hey guys,

I've added a few templates for reducing level adjustments per the Unearthed Arcana rules, and I was looking for a quick tip.

Since the coding to make HL automatically compute and deduct the proper amount of XP would be well above my programming ability, I've been doing that manually. But, I would like to add a prereq for the template so that it can only be taken if the character's level adjustment is greater than zero.

Can anyone help me on the code for that?

Thanks,
GLBIV is offline   #1 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old September 4th, 2012, 09:19 AM
Try:

Code:
herofield[tLevelAdj].value > 0
I can't speak to how well this will work if you are changing the tLevelAdj field around at all, but I did a quick test and it does appear to work without any such modifications.
Sendric is offline   #2 Reply With Quote
GLBIV
Member
 
Join Date: Apr 2012
Location: Washington, D.C.
Posts: 76

Old September 4th, 2012, 09:34 AM
Thanks, I'll give that a shot after work.
GLBIV is offline   #3 Reply With Quote
GLBIV
Member
 
Join Date: Apr 2012
Location: Washington, D.C.
Posts: 76

Old September 4th, 2012, 06:07 PM
That worked as far as selecting the template. But now, I have a validation message. By virtue of reducing the level adjustment to zero, I'm violating the above code. Any thoughts there?
GLBIV is offline   #4 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old September 5th, 2012, 06:01 AM
Well, there's another field that we could look at called "tLastAdj". I don't know exactly what this field does, but it seems to match tLevelAdj. When I modified tLevelAdj, tLastAdj didn't change with it (perhaps because of timing?). So, my first thought would be to change the above pre-req code to:

Code:
herofield[tLastAdj].value > 0
I think this should still allow you to check for the same pre-req without getting a validation message after changing it. If you do still get the message try changing the timing on your script (the one that changes the LA) to pre-levels.

I don't know for sure what goes into this field (tLastAdj), but barring any bizarre corner cases I think this will work for you. If anyone has any further insight to this, I'm all ears (or eyes, I guess, in this case).

Incidentally, not sure if you know this or not, but I found these fields by selecting from the HL menu "Develop -> Floating Info Windows -> Show Hero Fields". I've found this and the other options in this menu to be quite helpful in finding what fields and/or tags I need (even if I don't always know what they do).

Last edited by Sendric; September 5th, 2012 at 06:04 AM.
Sendric is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 5th, 2012, 08:44 AM
tLastAdj is calculated from tLevelAdj, and is used to generate the "1-3" you'd see if a 3HD race was the first thing on your character, and then keep track of the fact that the first class level you add will be level 4, not level 1. Adjust tLevelAdj, not tLastAdj - the tLastAdj changes will be properly calculated if you get the tLevelAdj changes right.

Why not just right-click the levels. Fewer clicks to get to the debugging information in most cases than going through the develop menu.
Mathias is offline   #6 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old September 5th, 2012, 09:38 AM
Quote:
Originally Posted by Mathias View Post
tLastAdj is calculated from tLevelAdj, and is used to generate the "1-3" you'd see if a 3HD race was the first thing on your character, and then keep track of the fact that the first class level you add will be level 4, not level 1. Adjust tLevelAdj, not tLastAdj - the tLastAdj changes will be properly calculated if you get the tLevelAdj changes right.
That's good info. I also see now that tLastAdj changes when you add class levels, so that won't work for this issue.

We are definitely trying to adjust tLevelAdj. The problem that's arising is that if you set a pre-req based on the tLevelAdj field then change that field, you'll get a validation error. In this case, the tLevelAdj is (presumably) 1. The pre-req is that it be greater than 0. So far, so good. However, the template reduces that field to 0, and now you have an error. I was trying to find a way around this issue. Unfortunately, that didn't work so well (shocking, I know).


Quote:
Originally Posted by Mathias View Post
Why not just right-click the levels. Fewer clicks to get to the debugging information in most cases than going through the develop menu.
I find there are some places that doesn't work. Also, doing it in this case, I am not seeing either tLevelAdj or tLastAdj show up in that window. However, there is a cLevelAdj. This doesn't change with the new template or when adding a class level. This may be the solution we are looking for:

Code:
herofield[cLastAdj].value > 0
So, I guess the moral of this story is sometimes you need to check both places.

Thanks, Mathias.
Sendric is offline   #7 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 10:06 PM.


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