Senior Member
Join Date: Feb 2013
Posts: 357
|
Ran into an issue that I'm having trouble with. There are feats/abilities in the Rokugan Campaign Setting that allow you to select cross-class skills and add them as class skills and I'm having trouble getting it to script properly
This is what I have so far. Kolat Agent ability "Broadened Skill Base" has two "Broadened Skill" things bootstrapped. The feat "Versatile" will have similar coding once this one is done. Code:
~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) call fTargetFoc doneif (state.isfocus = 0) ~ Add chosen to class skills var index as number var target as string target = field[fChosen].chosen index = hero.child[cHelpKol].assign[ClassSkill.target] ~ Add 1 to our chosen skill focus.field[Bonus].value += 1 |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,151
|
Quote:
Code:
target = field[fChosen].chosen.tagid[thingid.?] For example, if you add the line "debug target" at the bottom of your script, then recompile, you can see what target is set to by going Develop -> Floating Info Windows -> Show Debug Output in your portfolio. |
|
#2 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
Ok, not getting syntax errors anymore, but now it's saying that there is an invalid use of a reserved word on line 11.
Last edited by Illyahr; January 20th, 2017 at 10:33 AM. |
#3 |
Senior Member
Join Date: Jul 2010
Posts: 3,151
|
Quote:
Code:
index = hero.child[cHelpKol].assign[ClassSkill.target] Code:
target = "ClassSkill." & target index = hero.child[cHelpKol].assignstr[target] |
|
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Let me re-write the above as what you have is mix of different scripts I have to assume.
Here: Code:
~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) call fTargetFoc doneif (state.isfocus = 0) ~ Get the class skill tag from the focus perform focus.pulltags[ClassSkill.?] ~ Assign this to our hard-coded class? perform hero.child[cHelpKol].pushtags[ClassSkill.?] ~ Add 1 to our chosen skill focus.field[Bonus].value += 1 Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#5 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
This one is class specific. Another that doesn't boost isn't.
Tried the script, doesn't add to class skills. What timing should it be? |
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
I also found the other "easier" way to do this script is to set the ClassSkill.? tag onto the hero as that makes the skill a class skill for the character. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#7 |
Senior Member
Join Date: Oct 2016
Posts: 621
|
Hey mates, your coding talk is beyond my 3rd grade level, but if I'm reading this right, you are making a feat that adds a class skill to a class and gives it a +1 bonus?
If so, I have a gazillion uses for a feat like that, would it be possible for you to post the user file here, Illyahr? |
#8 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#9 |
Senior Member
Join Date: Oct 2016
Posts: 621
|
|
#10 |
|
|