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? |
bump
Still clueless on how to accomplish this in class rather than across the hero. |
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.
|
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? |
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. |
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. |
Quote:
|
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. |
Quote:
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. |
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. |
Quote:
Try this: 1) Look up the class number of points spent on the class you wish to "double" points spent to accomplish 1 for 1. 2) Add the required amount to ranks to make sure they reflect as you wish. |
This is not actual code, just design and actual code mixed in.
Example code: Code:
var a as number |
Did some searching:
var index as number index = hero.child[cHelpWiz].field[cClsIndex].value that tells you which one it is, so: if (index = 0) then kValue0 ... if (index = 5) then kValue5 |
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. |
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. |
Quote:
|
Quote:
Thanks for the response in advance |
Thread Bump.... Still trying to figure this out..any help is appreciated
|
Quote:
Code:
@valid = 1 |
Sendric, Thanks For Rapid Response.... there was a short between the floor and the keyboard.... :p
When adding more language types (in this case there is a series of gestures and visual markers ) unique to The World of Greyhawk's "Gnarley Rangers" that allow them to mark a trail warning of dangers or things nearby. As this is only learnable from a specific type of Ranger I wanted to set the degree of difficulty up a notch. BUTTTTT I had forgotten that when setting up other campaign specific languages to show as selections on the Personal tab, I had duplicated the list in both the languages and skills tabs in the editor user file. I was adding this particular "secret language" on the wrong tab oooopppps... Thanks Again:D |
Since I did manage to find the correct tab to play in.... heheh
This does prose a different question since I have a semi-captive" audience... In skills there is a "linked Attribute" that will add that bonus to the skill. But with this particular skill it grants +1% per point of intelligence not the modifier. So how would I approach that in an eval script? |
Quote:
Regardless, an eval script seems more than capable of handling this. You'll probably want to use hero.child[aINT].field[aFinalVal].value as your percentage score than multiply it by whatever your base is and add the result to the skill as a bonus. |
Quote:
For simplicity sake I have made a table decision in this case to "convert" that value one for one as an ability modifier to be in sync with the spirit of the 2e history yet modernizing to use a 3.5 skill /DC guideline... So in this case, the original 2e had that chance to successfully understand set at 30% +1% per point of intelligence. Making even a genius level of intelligence have just under 50/50 chance of success. So to mimic in 3.5e An 18 in intelligence would add 18 skill points yielding 9 skill points to add to the cross class skill Gnarley Secret Sign. To conclude, this would make the wizard with the same intelligence in both 2e & 3.5e with no ranks in Gnarely Secret Sign to have just slightly less than 50% if the DC was set at DC20. So that defines where I would like to end up, now to reverse engineer. Quote:
I presume post attribute (since user phases are presumably being phased out?) and maybe 10,000? Thanks again for rapid feedback |
Quote:
PS. This feels more like it being just a secret language than a skill. If a character has a percentage chance to learn it, then either they learn it or they don't....kinda like the druid language. |
Ok, Set Phase and Priority as noted above but still getting tripped up by something minor.
Getting an error when testing from "eval" script for Thing KGHGnScSgn (Skill Greyhawk Gnarley Secret Sign ID) on line 2 > Unspecified error parsing script. Below is the script, not seeing the obvious I guess ~Modifier to account for additional Intelligence~~ [Totals].hero.child[aINT].field[aFinalVal].value + round(field[kUserPts].value, 0, -1) |
Quote:
The full context description of the "Skill" is as follows: Quote:
It would be akin to calling stop signs, oneway street, safe camp ahead, or water source this way.... a language... Plus it also works with a Spot check if noticed, but meaning may not be known. |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
1 Attachment(s)
Quote:
Phase:Post-attributes Priority: 10000 Index: 3 ~Modifier to account for additional Intelligence~~ hero.child[aINT].field[aFinalVal].value += round(field[kUserPts].value, 0, -1) http://forums.wolflair.com/attachmen...1&d=1537550715 |
Quote:
PS. I think you must be trying to add these two numbers together, which you can do with a variable: Code:
var bonus as number |
I presume the KUserPts?
We should be taking the total that the Intelligence attribute (instead of just the modifier by checking the box) lets say 12, and adding the Points in the Secret Sign Skill points assigned, lets say 6, totaling that number and dividing it by 2 to account for cross class skill to get the modifier. (12+6)/2=9 ranks in the skill |
Quote:
Code:
~Modifier to account for additional Intelligence~~ |
Quote:
The script above is close, but does not cross class the intelligence points. Seems to add them down stream of the Cross Class Calculations... So I just added a / 2 behind the aFinalVal Value and that seems to work |
Quote:
Code:
~Modifier to account for additional Intelligence~~ PS. Check that. Based on your equation above ((12+6)/2=9), it should be: Code:
~Modifier to account for additional Intelligence~~ |
Quote:
adding 1 point gives the result 6 1/2 as it should adding 2 point gives the result 7 as it should adding 3 point gives the result 7 1/2 as it should adding 4 point gives the result 9 which is not as it should adding 5 point gives the result 9 1/2 which is not as it should adding 6 point gives the result 10 which is not as it should Not sure where 8 went or what is causing the skip |
Quote:
Incidentally, kUserRanks is already accounting for cross-class skill. Looking at the fields on the skill, I see the following when adding 8 points to the skill: kUserPts = 8 kUserRanks = 4 This means we probably don't want to divide that number again, so I've modified the script to this: Code:
~Modifier to account for additional Intelligence~~ User Points - User Ranks - Bonus - Total 1 - 0 - 6 - 6 2 - 1 - 7 - 8 3 - 1 - 7 - 8 4 - 2 - 8 - 10 5 - 2 - 8 - 10 6 - 3 - 9 - 12 User Points = total points applied to this skill by player User Ranks = 1/2 User Points Bonus = 1/2 INT score + User Ranks Total = Bonus + Ranks PS Sorry the table isn't cleaner. Let me know if it's confusing. |
Not really sure what you guys are doing.
I'm assuming that the Gnarley Secret Sign is actually a skill, correct? Then this line kinda bugs me. Code:
field[Bonus].value += bonus This code probably only needs to add half the INT into the bonus, and nothing more than that. There is no need to round if the kUserRanks are already cross class. Code:
~Modifier to account for additional Intelligence~~
I believe this is what you are trying to get to, or am I misunderstanding this? |
Quote:
Kendall, Yes, Spot on.... the intent is to make it a "language" that is applied as a skill. As mentioned it originated as a 2e "language" with a % roll to determine success. While I "could" choose to say its all or none like a "druid secret language" I Was trying to remain faithful to the origins that had some degree of variable that could be modified with a greater degree of intelligence on the character's part AND bring that application to a usable mechanic in a D20 3.5 Rule structure. This is the reasoning behind taking the 1/2 value of the whole of intelligence and not just the modifier (since origin applied the actual attribute number not just the bonus). This approach puts the character with an 18 in intelligence and NO additional skill points at slightly less than 50/50% chance in 3.5e just like 2e. (Base 30% +18= 40% for 2e vs Skill Ranks untrained (18/2=)9 vs DC20 (45% for 3.5e)) And then allows the player a chance to improve the skill with anything after allowing the character to improve their chance of success by adding ranks as a cross class for everyone EXCEPT a Ranger (which I will handle independent of this part of the code once it works). The reason I employ "language" as a moniker is because it is how it was viewed originally in 2e AND I add some code to have it show up in Herolab on personal tab under the languages for the player out of convenience as a reminder it's there for use. The snap shot provided below ( {text 00FF} )also adds some HTML color coding to the text descriptor that tells the player items in "Green" are not core rules but additional "homebrew or previous edition rules" not in 3.5e PHB. **Sidebar not anything to do with this piece of code but bigger picture of why I'm doing this. ** Generally, IMC we take language knowledge to a progressive level. While you can learn a language, you also develop a degree of expertise in that language. So to Speak Quenya (a form of elven in our campaign) you gain a basic conversational understanding (in this case a Language>Quenya - Ranks[1] shows in skills to go along with the language itself in the personal tab. This allows the character the ability to have some basic communication skills in the language, but not proficient in writing it or speaking without an accent. Mastery of reading and writing it is at [5] ranks in that language. For basic communication this is a non-impact other than some roleplay confusions to word choices at times. But when it comes to writings, and ancient languages this really comes into play. With bards, and scholars become far more valuable when going through old tomes and maps when ancient dialects have old forgotten languages. So mastery of base languages as a prerequisite to read them (with a reasonable DC), makes those classes invaluable to access special spells and lost info that might not be known to the less learned. Without the additional training in those language skills, the DC to read the item becomes increasingly difficult. Hope that clarifies. |
All times are GMT -8. The time now is 01:54 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.