|
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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? |
#1 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
bump
Still clueless on how to accomplish this in class rather than across the hero. |
#2 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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.
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
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? |
|
#4 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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. |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
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. |
|
#6 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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.
|
#7 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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. |
#8 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
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. |
#9 |
Senior Member
Join Date: Jul 2012
Location: Texas
Posts: 707
|
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 |
#10 |
Thread Tools | |
Display Modes | |
|
|