Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old September 2nd, 2011, 06:36 AM
I have an ability for Rogue's to gain access to an extra skill point, but the extra skill point only applies to Rogue levels, and only the current level and and further levels in Rogue gained. So, this has been an issue I've tried resolving a number of ways in HeroLab, without success. I decided to try a different approach today, and I feel I'm close, but I'm not sure I understand what is happening with the timing here.

The idea I have, is I make a user tag, which is called User.RogSkPt, which indicates that an extra skill point should be assigned to the Rogue. I have a custom ability that is chosen as a special ability for the Rogue called Extra Skill Point, whose script follows.

Code:
<Post-Levels 1000>

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

~ Assign skill point tag to rogue.
perform hero.assign[User.RgeSkPt]
With this additional code I placed either in Extra Skill Point, or in my variant Rogue class cvRogue.

Code:
<Post-Levels 1000>

~ For each new level, if we have extra skill points because we
~ selected it as a special ability, assign them.
var index as number
var extra as number
index = hero.child[cHelpRog].field[cClsIndex].value
extra = hero.tagcount[User.RgeSkPt]
notify extra
herofield[tSkTotals].arrayvalue[index] += extra
And this works fine on the first level I take it at. However, at each additional level, this script is not run, or is ignored, as I keep getting the old skill point total without the added extra skill point. Is this because I need to place this piece of code in cHelpRog?

Also, I can't seem to count tags until Post-Levels, which could be a timing issue. So are the skill points derived before I can count the tags and add the skill points, i.e. a timing issue?

I feel like I'm close, and I'm just missing some vital step. Thanks.

Last edited by Kendall-DM; September 2nd, 2011 at 07:45 AM.
Kendall-DM is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 2nd, 2011, 07:11 AM
The determination of whether a class special has reached the correct level isn't done until Post-Levels/100, so until then , tagis[Helper.ShowSpec] always = 0, and your first script is never assigning the tag.
Mathias is offline   #2 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old September 2nd, 2011, 07:45 AM
Sorry, I mistyped that, it should have said Post-Levels. I just mistyped it. I've also edited out the ShowSpec line (because I have the Helper.SpecUp tag, and I thought that was the problem, but nope). When I first assign the Extra Skill Point, it works correctly for that level, it just fails to work on the later levels of Rogue. That is why I'm suspecting the script needs to be in cHelpRog.
Kendall-DM is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 2nd, 2011, 08:23 AM
If you want to add to that level and all levels beyond it, you'll need some way to record what level the character was at the time they took this ability. The best option that's currently available for that is to use the activation amount, and let the user set the level. Then, you can subtract that from the class' current level, and add that many skill points.
Mathias is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 2nd, 2011, 08:24 AM
If your scripts are at the same Phase & Priority, it's out of your control which will be executed before the other.
Mathias is offline   #5 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old September 2nd, 2011, 09:28 AM
Quote:
Originally Posted by Mathias View Post
If your scripts are at the same Phase & Priority, it's out of your control which will be executed before the other.
Yeah, I know. I had them at different priorities too, they were only the same when they were in the same script. I was just hoping I could count the tags and add that into the total skills each level. Just doesn't appear to run the script on cvRogue when I put in a new Rogue level. I also tried doing this with cHelpRog, but of course, I had to make my own, and that caused more errors than I wanted to deal with at the time.

I'll keep plugging away at it. This was a good solution, if I could just get the script to run at the additional levels. Thanks for the reply.
Kendall-DM is offline   #6 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old September 2nd, 2011, 03:58 PM
Nevermind. I took your suggestion and allowed the user to pick the level from an array (can only happen at even levels, so it worked out great). Working fine now. I never looked farther down the custom ability list of functions to see the array based menu. Thanks for all the help Mathias, I learnt me sumthin'!

Last edited by Kendall-DM; September 2nd, 2011 at 04:06 PM.
Kendall-DM is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 2nd, 2011, 04:11 PM
Converting text to numbers is pretty easy in Hero Lab:

Code:
 
var bonus as number
bonus = field[something].text
I've got a set of abilities where the array text is

"1st-level spell"
"2nd-level spell"
etc.

Where I use that to turn the selected text into a number.
Mathias is offline   #8 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old September 2nd, 2011, 05:52 PM
Quote:
Originally Posted by Mathias View Post
Converting text to numbers is pretty easy in Hero Lab:

Code:
 
var bonus as number
bonus = field[something].text
I've got a set of abilities where the array text is

"1st-level spell"
"2nd-level spell"
etc.

Where I use that to turn the selected text into a number.
Ok, you've got me curious. One of the things I love about the HL scripting is that it isn't strongly typed (which I forgot when I first posted the question, then immediately remembered, doh). Anyhow, in your example above, when it turns the selected text into a number, is it only reading the first letter and converting it to a value, or is it actually see the entire text string, but extracting the one text ascii value that equates to a number? This opens new possibilities...
Kendall-DM is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old September 2nd, 2011, 05:55 PM
Here's the wiki page on the subject: http://hlkitwiki.wolflair.com/index....age_Mechanisms
Mathias is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

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 02:03 AM.


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