Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 357

Old January 20th, 2017, 08:38 AM
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?
Illyahr is offline   #1 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old January 20th, 2017, 09:53 AM
Quote:
Originally Posted by Illyahr View Post
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.
Sendric is offline   #2 Reply With Quote
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 357

Old 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.

Last edited by Illyahr; January 20th, 2017 at 10:33 AM.
Illyahr is offline   #3 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old January 20th, 2017, 10:53 AM
Quote:
Originally Posted by Illyahr View Post
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]
Sendric is offline   #4 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old 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?

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.
ShadowChemosh is offline   #5 Reply With Quote
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 357

Old 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?
Illyahr is offline   #6 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old January 21st, 2017, 05:33 PM
Quote:
Originally Posted by Illyahr View Post
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.

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.
ShadowChemosh is offline   #7 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old 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?
ErinRigh is offline   #8 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old January 22nd, 2017, 11:59 AM
Quote:
Originally Posted by ErinRigh View Post
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.
Attached Files
File Type: email ~Board Feat.user (784 Bytes, 15 views)

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.
ShadowChemosh is offline   #9 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old January 22nd, 2017, 07:11 PM
Quote:
Originally Posted by ShadowChemosh View Post
Here is the test .user file I was playing around with.
Thanks
ErinRigh is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:58 AM.


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