Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
I seem to always run into the difficult problems.
I need to add a class skill to a single class in a script and at the same time remove a class skill from the same class. I can't use the D20 Variant Class structure. I have "field[pChosen].chosen" as the Class in question. But when I try: result = hero.assign[ClassSkill.kTumble] It adds the skill as a class skill to all classes. I have also tried both these: result = hero.assign[NotClassSk.kRide] result = hero.delete[ClassSkill.kRide] Neither seem to remove the skill as a class skill. Some other things use: shareidentity[ClassSkill,field[pChosen].chosen] In this line field[pChosen].chosen is the Class, but I need to operate on the skill. I tried thingid[kTumble].shareidentity[ClassSkill,field[pChosen].chosen] and various other things. I've read the docs, but I guess I just can't seem to grasp how to use things. Because I can't figure out (or even understand) when I use perform, hero, assign, etc. I can't think of an example of this in any other thing, and the ones I can think of seem to be doing it wrong. For example, Weather Domain seems to add the skill like above (hero.assign[ClassSkill.kTumble]) which seems to work for all classes and I think it shouldn't. I think it should only do so for the Cleric class? |
#1 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
If you look at the skeleton template there is a script that removes all skills once applied, plus another script that adds Improved Initiative as a bonus feat.
Maybe these could point you in the right direction of syntax and applied method with a quick modificaction to the script. Also checking for the class name to be valid before assigning the skill too would make sure it only gets added to that class! Last edited by bodrin; November 29th, 2010 at 10:05 PM. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
In d20, whether or not something is a class skill is determined class-by-class, so simply adding or removing it from the hero isn't going to do anything. (Unless, as you've seen, you use the "This is a Class Skill for all classes" mechanism).
The Animal and Knowledge domains add class skills to only the cleric class (yes, it looks like weather may be incorrectly applying it's effects to all classes). Basically, you want to assign or delete ClassSkill.XXXXX from the class in question. What is this on? A feat? A Class ability? Have you already figured out how you're selecting the class to target (or does this target a specific class)? |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
I'm now building it as a set of adjustments, one for each swapped skill, and the adjustment has a selector of the class in question. Skilled City-Dweller Class: Any class that has one or more of the "skills replaced," as listed below, on its list of class skills. Level: 1st. Replaces: If you select this class feature, you do not gain the "skills replaced" as listed below. Benefit: The skilled city-dweller gains one or more skills as class skills, at the expense of other skills. If she does not have the proper skill to lose, she cannot gain the skill it grants as an urban benefit. Note that she need not swap out all these skills. A skilled city-dweller may pick and choose, but she cannot later change her mind. Skilled City-Dweller Skill Gained Skill Replaced Gather Information Handle Animal Knowledge (local) Knowledge (nature) Sense Motive Survival Tumble Ride So I'm making 4 of these adjustments. Currently, it is just setting the "Show Menu" to Classes and I've got a script I'm trying to set. I just looked at Animal Domain: result = linkage[table].assign[ClassSkill.kKnowNat] I don't know how it knows Cleric is the class in question? Bodrin: Looked at skeleton and it does "perform hero.assign[Hero.NoSkills]" which is way too broad for me. Code I have now: perform field[pChosen].chosen.setfocus ~ Add our chosen skill as a class skill for this classe. var result as number result = linkage[table].assign[ClassSkill.kTumble] result = linkage[table].assign[NotClassSk.kRide] ~ result = hero.delete[ClassSkill.kRide] ~ shareidentity[ClassSkill,field[pChosen].chosen] I get "Linkage pick table not located for current context" when I try this. I added the perform setfocus to try to set to the class chosen. Last edited by risner; December 1st, 2010 at 04:59 AM. |
|
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
result = field[pChosen].chosen.assign[ClassSkill.kTumble]
This seems to work to make it a class skill. result = field[pChosen].chosen.assign[NotClassSk.kRide] But this isn't removing it as a class skill. Timing issue? I'm at First 1000. I tried a bunch of timings. I need First for making it a class skill, since it seems once levels are done I can no longer "make" it a class skill. But nothing seems to prevent it from being a class skill. Last edited by risner; December 1st, 2010 at 05:44 AM. |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
Why don't you try a delete command?
perform field[pChosen].chosen.delete[ClassSkill.kRide] |
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
What does perform do? I used: result = field[pChosen].chosen.delete[ClassSkill.kRide] Hmm, I made two changes just now and one of the two fixed me. I changed from results = (which didn't remove it as a class skill but would add it) to perform. I removed the adjustment (instead of just doing Ctrl-R to reload the character). So it appears to be working now as expected at First/1000 timing. Last edited by risner; December 1st, 2010 at 07:35 AM. |
|
#7 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Lawful_g's right about how to remove the class skill, I just wanted to discuss why.
What's happening is that if a variant class sees the NotClassSk tag, it finds the class it's linked to, and deletes that class skill. There's no code looking for NotClassSk outside of a variant class. linkage[table] links to cleric for a cleric domain because it's being added to a table that's specifically on the Cleric tab - everything on a class tab is specific to that class. (linkage[table] actually exists for everything that a user adds in HL, but in most cases, it'll get you to the same place as the hero transition, so it'd just be extra typing). |
#8 |
|
|