Custom expressions
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? |
Quote:
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 |
Quote:
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? |
Quote:
Code:
component.BaseSkill & Helper.SkCatKnow & !Helper.ClassSkill Quote:
|
Quote:
|
Quote:
|
Thanks man, I'll send you an email.
|
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!
|
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 Code:
~Take the user's picks and make them class skills |
Your really close! :)
Code:
~Take the user's picks and make them class skills 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. |
All times are GMT -8. The time now is 05:35 PM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.