• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Proficient Skill List Help

Palgar

Member
Using the Editor, I'm trying to create a feat that will allow the user to pick two skills that they are proficient in and modify them. The dropdowns to display the proficient skills always show all skills, not just the proficient ones.

My setup:
Select From... Skills
Custom Expression Helper.Proficient
Restrict List To All Picks on Hero

What am I doing wrong here?
 
There's an issue with timing here that's not evident when you use the normal custom expression field to do the dirty work.

You'll want to look at the scripts hanging off of something like the Rogue Expertise to build the custom expression.

Script #2 in the rogue expertise feature runs at Final 999999 timing and builds the candid expressions for picking two skills that you're proficient at.

Code:
      var tagexpr as string
      foreach pick in hero from BaseSkill where "Helper.Proficient"
        perform eachpick.pulltags[ProfSkill.?]
        nexteach

      if (tagis[ProfSkill.?] <> 0) then
        tagexpr = "(component.BaseSkill & (" & tagids[ProfSkill.?, " | "] & ")) | thingid.gTooThieve"
      else
        tagexpr = "thingid.gTooThieve"
        endif

      field[usrCandid1].text = tagexpr
      field[usrCandid2].text = tagexpr

Now, this includes adding Thieves' tools to the list so you can drop it out. but this would build your dropdown lists correctly. It also shows you how you're going to have to add tool proficiencies if you want to include those.

Script #1 on the same Expertise has the code that modifies the skills to be double proficiency, you can change the code all you want to just add bonuses or have it note advantage, ect. This runs at Post-Levels 10000

Code:
      doneif (tagis[Helper.ShowSpec] = 0)

      doneif (tagis[Helper.Disable] <> 0)

      var tagexpr as string

      if (field[usrChosen1].ischosen <> 0) then
        tagexpr = field[usrChosen1].chosen.tagids[ProfSkill.?," | "]
        foreach pick in hero from BaseSkill where tagexpr
          perform eachpick.assign[Helper.ProfDouble]
          nexteach

        ~If we've got proficiency with our thieves' tools, we need to display
        ~ on the characer sheet/special tab
        if (field[usrChosen1].chosen.tagis[thingid.gTooThieve] <> 0) then
          perform delete[Helper.SpecUp]
          field[livename].text = field[thingname].text & " (Thieves's tools)"
          perform hero.assign[ProfTooDbl.gTooThieve]
          endif
        endif

      if (field[usrChosen2].ischosen <> 0) then
        tagexpr = field[usrChosen2].chosen.tagids[ProfSkill.?," | "]
        foreach pick in hero from BaseSkill where tagexpr
          perform eachpick.assign[Helper.ProfDouble]
          nexteach

        ~If we've got proficiency with our thieves' tools, we need to display
        ~ on the characer sheet/special tab
        if (field[usrChosen2].chosen.tagis[thingid.gTooThieve] <> 0) then
          perform delete[Helper.SpecUp]
          field[livename].text = field[thingname].text & " (Thieves's tools)"
          perform hero.assign[ProfTooDbl.gTooThieve]
          endif
        endif
 
That's what I was looking for and it works exactly as I need. So, when is the custom expression used, or must we always override it in a script?
 
The "default" custom expression can be used for a lot of things, you can poke around the community files and see examples. Usually these have to do with simple things like energy resistance and such.

Since using those dropdown fields always require a script or a conditional statement to push tags or enable bootstraps, you'll see a lot of contributors will often build their expression in the script itself rather than rely on the basic field.

It's something that you'll get a feel for after you've done it for a while.
 
Back
Top