Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 6th, 2019, 07:41 AM
Happy new year to everyone! So I'm trying out this 'custom expression' thingy that all the kids are raving about.

I've got an ability that allows the user to select a knowledge skill that is not currently a class skill, and make it a class skill. I need to find some filters, and so I found "Helper.SkCatKnow" as a tag that will select only skills that have been assigned the Knowledge category, and the field 'fieldval:skClsSkBon = 0' that will only choose skills where the class skill bonus is 0 (i.e., it's not a class skill).

So my custom expression looked like this: "Helper.SkCatKnow" & fieldval:skClsSkBon = 0

I then told the editor to select from Skills, and to restrict the first list to All Things. The resulting dropdown menu in the class tab looks like it's selecting all skills, and not filtering the way I want. Did I not create the custom expression correctly, or is my error in what I restricted the list to?
Bob G is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old January 6th, 2019, 12:04 PM
Quote:
Originally Posted by Bob G View Post
I then told the editor to select from Skills
This is why it lists all skills because it overwrote your custom expression with "component.BaseSkills" as the whole expression. When you select from the editor dropdown you are "setting" the WHOLE expression. It does not append to the expression field. So first step is to set this back to "none".

Next its best to start an expression with a component "Type". In this case it would be component.BaseSkill. Then instead of a field class skills are known by the Helper.ClassSkill tag. Combine all this together and you get:

Code:
component.BaseSkill & Helper.SkCatKnow & Helper.ClassSkill

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   #2 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 8th, 2019, 12:58 PM
Quote:
Originally Posted by ShadowChemosh View Post
This is why it lists all skills because it overwrote your custom expression with "component.BaseSkills" as the whole expression. When you select from the editor dropdown you are "setting" the WHOLE expression. It does not append to the expression field. So first step is to set this back to "none".

Next its best to start an expression with a component "Type". In this case it would be component.BaseSkill. Then instead of a field class skills are known by the Helper.ClassSkill tag. Combine all this together and you get:

Code:
component.BaseSkill & Helper.SkCatKnow & Helper.ClassSkill
Thanks for the assist SC. A few follow-up questions:
1. By adding the 'Helper.ClassSkill' tag to the expression, would that not choose skills that ARE class skills? I want the expression to select knowledge skills that are NOT class skills.
2. The dropdown window in the class tab now says "Nothing to select." Do I need to restrict the 1st list in any way?
Bob G is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old January 8th, 2019, 01:32 PM
Quote:
Originally Posted by Bob G View Post
Thanks for the assist SC. A few follow-up questions:
1. By adding the 'Helper.ClassSkill' tag to the expression, would that not choose skills that ARE class skills? I want the expression to select knowledge skills that are NOT class skills.
Missed you wanted not-class skills. To get "NOT" you use a ! in front of the tag to say NOT having this tag.

Code:
component.BaseSkill & Helper.SkCatKnow & !Helper.ClassSkill

Quote:
Originally Posted by Bob G View Post
2. The dropdown window in the class tab now says "Nothing to select." Do I need to restrict the 1st list in any way?
Well yeah you do always need to correctly set the restrict list or it defaults to Things I think. Anyways you want to select skills that are live on the hero or the "All Picks on Hero".

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   #4 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 8th, 2019, 03:21 PM
Quote:
Originally Posted by ShadowChemosh View Post
Missed you wanted not-class skills. To get "NOT" you use a ! in front of the tag to say NOT having this tag.

Code:
component.BaseSkill & Helper.SkCatKnow & !Helper.ClassSkill
That's really cool! Nice little piece of knowledge to have. Thanks!

Well yeah you do always need to correctly set the restrict list or it defaults to Things I think. Anyways you want to select skills that are live on the hero or the "All Picks on Hero".
Set it to All Picks on Hero, but still getting 'Nothing to Select' in the dropdown box. Any other thoughts on what might be wrong?
Bob G is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old January 8th, 2019, 03:33 PM
Quote:
Originally Posted by Bob G View Post
Set it to All Picks on Hero, but still getting 'Nothing to Select' in the dropdown box. Any other thoughts on what might be wrong?
Its time share the .user file then so I can take a look at it as that does not make sense... You can attach it to a post here in this thread... Of if you want you can email it to me at my forum user id at yahoo dot com.

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   #6 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 8th, 2019, 03:39 PM
Thanks man, I'll send you an email.
Bob G is offline   #7 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 8th, 2019, 08:17 PM
The solution to this issue was simply adding one of the non-class knowledge skills to the hero. This changes its status from a Thing to a Pick, and since we've told the editor to Restrict 1st List to "All Picks on Hero", the non-class skills added to the hero now become selectable. Thanks to ShadowChemosh for all of his help!
Bob G is offline   #8 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 8th, 2019, 08:22 PM
The last piece of this ability is how to make the user's choice a class skill. I think that my transitioning isn't correct in the script below:
Code:
~Take the user's picks and make them class skills
     if (field[usrChosen1].ischosen <> 0) then
     field[usrChosen1].chosen.perform assign[Helper.ClassSkill]
     endif
This produces a syntax error. I also tried
Code:
~Take the user's picks and make them class skills
     if (field[usrChosen1].ischosen <> 0) then
     perform assign[Helper.ClassSkill].field[usrChosen1].chosen
     endif
Also a syntax error. How do I properly code this?
Bob G is offline   #9 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old January 9th, 2019, 12:43 AM
Your really close!

Code:
     ~Take the user's picks and make them class skills
     if (field[usrChosen1].ischosen <> 0) then
        perform field[usrChosen1].chosen.assign[Helper.ClassSkill]
     endif
To break this up think of this way. You PERFORM against the PICK a specific ACTION (assign).

The pick in this case is field[usrChosen1].chosen and then your action is "assign[]" a tag. Perform is usually used when dealing with tag actions like (delete, assign, pulltags, pushtags). Normally its not used with fields when doing normal arithmetic like addition, subtraction etc.

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.

Last edited by ShadowChemosh; January 9th, 2019 at 01:05 AM.
ShadowChemosh 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 09:56 AM.


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