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 February 22nd, 2011, 04:56 PM
I have a piece of code in my classes, that give maximum ranks equal to that of a cross-class skill at the cost of class skills. I copied it mainly from the Guerrilla Scout class in the custom files. However, this code works for the hero, regardless of the class, while I would like it to work specifically in the class it is in. Any suggestions on how to modify this?

~ General skills from cross-class, set out number of ranks
~ equal to our number of points spent.
foreach pick in hero from BaseSkill where "thingid.kListen|thingid.kSpeakLang|thingid.kS pot"
each.field[kUserRanks].value = each.field[kUserPts].value
nexteach

Each pick in hero isn't working here, is there a way to iterate just through the class itself, such as each pick in a class?
Kendall-DM is offline   #1 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old February 23rd, 2011, 07:43 AM
bump

Still clueless on how to accomplish this in class rather than across the hero.
Kendall-DM is offline   #2 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old February 23rd, 2011, 07:55 AM
It may not be possible. Max skill ranks are based on "character level" not "class level" so presumably Hero Labs is built on that. Having said that, its possible I don't fully understand what you're trying to do.
Sendric is offline   #3 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old February 23rd, 2011, 08:45 AM
Quote:
Originally Posted by Sendric View Post
It may not be possible. Max skill ranks are based on "character level" not "class level" so presumably Hero Labs is built on that. Having said that, its possible I don't fully understand what you're trying to do.
I don't understand what he is trying to do.
So I don't know how to help.

Kendall, could you give us an example say from a 4th level PC using this benefit and how it would work with and with out the benefit?
risner is offline   #4 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old February 23rd, 2011, 09:00 AM
The example code shown above provides a Wizard with Spot, Speak Languages, and Listen as cross-class skills that can be bought at the class skill rate. In other words, a Wizard's max ranks here are at the cross-class limit, but the cost to buy those skills cost only 1 skill point for 1 rank.

As that stands, this works perfectly. So a 4th level Wizard can buy 3 ranks in Spot, Speak Languages, or Listen (his cross-class maximum) but only spend 3 skill points to get the 3 ranks. So that works. The rub is, say, I want to take a level in Fighter, now the fighter has some of his cross-class skills to do the same. However, Speak Languages should be bought by the Fighter strictly as a cross-class skill (2 skill points = 1 rank), but since the Wizard code applies across the hero, the Fighter is able to still buy the ranks in Fighter just like a Wizard does. I need to make it so that the Fighter is back to buying that strictly as a cross-class skill.

So, in other words, I need to be able to indicate to this script when I am in the specified class so that I know all skill purchases in said class that the code segment applies to are not being applied across the hero (and thus to other classes). The code "for each pick in hero..." would work much better if it was something like "for each pick in <current class> ..." where <current class> is the class using its skill points. If the <current class> applies to the code segment, otherwise it doesn't. That way, I can keep the code in one class from applying across the hero (and thusly to all other classes).

I'm not sure that is clear enough, since the concept doesn't exist outside of my own game. I my game, I have house ruled that certain skills are general skills to certain classes. Wizards have Listen, Speak Languages, and Spot as general skills (cost of class skill, maximum ranks of a cross-class skill). If this is not clear enough, I will try to submit a specific example later. Just let me know.
Kendall-DM is offline   #5 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old February 23rd, 2011, 09:31 AM
Quote:
Originally Posted by Kendall-DM View Post
indicate to this script when I am in the specified class so that I know all skill purchases in said class that the code segment
There is no record of when skill points where purchased and which class they belong, so there is no way to code this.

You can however code that loop that when it gets to a skill, it can detect how many levels in the class that grants 1 for 1 and only convert a number of skill points equal to that class's level.

The only other option is to make a tracker, and instead of buying ranks in the Skill tab you buy ranks in the tracker. Then a script in the tracker deducts that number of skill points from the points available and adds that number to the skill in question.
risner is offline   #6 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old February 23rd, 2011, 09:58 AM
Quote:
Originally Posted by risner View Post
You can however code that loop that when it gets to a skill, it can detect how many levels in the class that grants 1 for 1 and only convert a number of skill points equal to that class's level..
This is what I did originally, well something like it anyhow, but I really liked this code segment, seemed elegant, but of course, the across hero is a problem. Ah well, I'll try working on it some more, as I always believe with a little application, there is a way to do what you want (within the constraints of the program). I may just have to go back to my original way of doing it.
Kendall-DM is offline   #7 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old February 24th, 2011, 08:49 PM
Well, I was able to get around this, as long as I'm careful when creating a character. All I have to do is check that there are no remaining skill points in the class that gets the general skills in my game, and only apply the code segment while there are points to be spent. Obviously, I need to spend for each class independently before adding new classes, that's the careful part. Here is what I added to the code segment (using Wizard again).

var index as number
index = hero.child[cHelpWiz].field[cClsIndex].value

if (hero.child[Totals].field[tSkTotals].arrayvalue[index] <> 0) then

*code above*

endif

EDIT: Nevermind, still needs work, forgot it changes the ranks as soon as the skill points are empty. Ergh.

Last edited by Kendall-DM; February 24th, 2011 at 09:02 PM.
Kendall-DM is offline   #8 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old February 25th, 2011, 12:16 PM
Ok, I went back to my original code for doing this, which works. It just isn't doing validity tests like I would like. But it works, and doesn't cause me the headaches that trying to do things across the hero does. Not the ideal solution, but a solution. Oh and I have to use the eval rules panel and set all these skill types to a class skill, then restrict their ranks. Something like this for Speak Languages on a Wizard.

@valid = 1
doneif (#levelcount[Bard] >= 1)

var genRanks as number
genRanks = (#totallevelcount[] + 3) / 2
if (#skillranks[kSpeakLang] > genRanks) then
@message = "Skill " & hero.child[kSpeakLang].field[name].text & " has too many ranks for a general skill."
@valid = 0
endif

Of course, the problem here is it happens within the class, making error validation on the skill difficult at best. As of now, it does a warning. Now I just have to do the same for all the other skills across the classes.
Kendall-DM is offline   #9 Reply With Quote
Dark Lord Galen
Senior Member
 
Join Date: Jul 2012
Location: Texas
Posts: 707

Old September 20th, 2018, 06:31 PM
Thread Bump.... Still trying to figure this out..any help is appreciated

D&D> Pre 1e White Box Edition, 1e, 2e, 3.5 Currently, Set in the World of Greyhawk (The first, longest running and Best Campaign Setting)
Software>Extensive use of all forms of MS Products, Visual Studio 2012, DAZ 3d, AutoCAD, Adobe Products.
Gaming Specific>Campaign Cartographer, D20 Pro Alpha & BattleGrounds Beta Tester, World Builder, Dungeon Crafter, LWD Hero Lab, Realm Works, Inkwell Ideas Citybuilder & Dungeon Builder, Auto-Realm, Dundjinni
Contributing Writer for TSR, WOC, & Canonfire
Dark Lord Galen 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 11:55 AM.


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