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)
-   -   Selected skill as class skill (http://forums.wolflair.com/showthread.php?t=57475)

Illyahr January 20th, 2017 08:38 AM

Selected skill as class skill
 
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

Any thoughts?

Sendric January 20th, 2017 09:53 AM

Quote:

Originally Posted by Illyahr (Post 242083)
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

Any thoughts?

"target = field[fChosen].chosen" isn't going to do anything. You need to point it to a tag or a field or something. Like this:

Code:

target = field[fChosen].chosen.tagid[thingid.?]
Incidentally, you can always test your variables with with the "debug" command.

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.

Illyahr January 20th, 2017 10:17 AM

Ok, not getting syntax errors anymore, but now it's saying that there is an invalid use of a reserved word on line 11.

Sendric January 20th, 2017 10:53 AM

Quote:

Originally Posted by Illyahr (Post 242088)
Ok, not getting syntax errors anymore, but now it's saying that there is an invalid use of a reserved word on line 11.

probably this line:

Code:

index = hero.child[cHelpKol].assign[ClassSkill.target]
you can't use a variable like this. try:

Code:

target = "ClassSkill." & target
index = hero.child[cHelpKol].assignstr[target]


ShadowChemosh January 20th, 2017 10:59 AM

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

Do you really want to hard-code the class in this feat? The feat ONLY works with this specific class?

Illyahr January 21st, 2017 10:46 AM

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?

ShadowChemosh January 21st, 2017 05:33 PM

Quote:

Originally Posted by Illyahr (Post 242177)
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?

Any timing before Pre-Levels/1000 is working for me. I changed the script to work for a fighter. I selected Bluff and the fighter gets Bluff as a class skill.

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.

ErinRigh January 22nd, 2017 06:49 AM

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?

ShadowChemosh January 22nd, 2017 11:59 AM

1 Attachment(s)
Quote:

Originally Posted by ErinRigh (Post 242234)
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?

Here is the test .user file I was playing around with.

ErinRigh January 22nd, 2017 07:11 PM

Quote:

Originally Posted by ShadowChemosh (Post 242266)
Here is the test .user file I was playing around with.

Thanks


All times are GMT -8. The time now is 08:33 AM.

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