Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   Class skill code... need some help (http://forums.wolflair.com/showthread.php?t=12488)

Kendall-DM February 22nd, 2011 05:56 PM

Class skill code... need some help
 
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 February 23rd, 2011 08:43 AM

bump

Still clueless on how to accomplish this in class rather than across the hero.

Sendric February 23rd, 2011 08: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.

risner February 23rd, 2011 09:45 AM

Quote:

Originally Posted by Sendric (Post 52526)
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?

Kendall-DM February 23rd, 2011 10: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.

risner February 23rd, 2011 10:31 AM

Quote:

Originally Posted by Kendall-DM (Post 52534)
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.

Kendall-DM February 23rd, 2011 10:58 AM

Quote:

Originally Posted by risner (Post 52539)
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 February 23rd, 2011 11:09 AM

I'm not at home, so I don't have any way to test this just yet. But, I wonder if this would work, since each code segment occupies a specific class. For example, would this work only for the Wizard?

foreach pick in hero from Class where "thingid.cWizard"
foreach pick in hero from BaseSkill where "thingid.kListen|thingid.kSpeakLang|thingid.kS pot"
each.field[kUserRanks].value = each.field[kUserPts].value
nexteach
nexteach

I wonder if that would keep other classes from accessing this skill code segment?

Hmmm... that might have to be cHelpWiz. I'll try it later when I get home.

risner February 23rd, 2011 11:42 AM

Quote:

Originally Posted by Kendall-DM (Post 52546)
foreach pick in hero from Class where "thingid.cWizard"

That won't work, but there is a way. I've spent so much time on Pathfinder lately I'd forgotten that HL does record class by class ranks.

Develop->Floating->Show Selection Fields->Concentration.
Add 2 ranks in Concentration on the first class you have.
Notice kValue0 increases.

Notice only 6 classes are possible (which makes me wonder if you are prohibited from adding a 7th class, but that is another thread matter.)

Look up tClass0 to tClass5 searching for your class on the hero.
Then grab kValueX on the skill
There you have how many ranks were bought from that class.

Kendall-DM February 23rd, 2011 11:50 AM

The number of ranks bought is not the problem (I'm not changing the cross-class or class skill maximum ranks structure). They difficulty is in how many skill points each class spends on cross-class skills. So, in the previous example, Speak Language is a cross-class skill for a Wizard, and it remains so, it just cost 1 skill point to gain 1 rank in it. Now when I change levels to Fighter, the Fighter also has Speak Language as a cross-class skill, but he should be purchasing the skill points to ranks at a 2 to 1 buy. But because Wizard has code that applies across the hero, the Fighter can buy it at 1 to 1, which I don't want to happen. So I'd have to limit the access to the code across the hero. What you proposed though, still has a solution within it, I just have to think through how to implement it, if its possible at all even. I'll have to look at which class is currently using its skill points (I think it is kUsed0 through kUsed6 or something like that).

Of course, I'm working from memory here, as I don't have HL in front of me.


All times are GMT -8. The time now is 12:21 PM.

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