• 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

Proficiency headaches

DeltaMasterMind

Well-known member
Ok for I am having a fit trying to get 5e to play nice with assigning Helper.ProfDouble to skills. Now I am getting it to work with a foreach script. Now the reason this is weird is everytime I try to add in a if statement the tag just won't assign. Here is my script as this script is to check for Helper.Proficient first and assign Double Proficiency and if no Helper.Proficient then to assign Helper.Proficient: Post levels 10000.
var tagexpr as string
if (field[usrChosen1].ischosen + field[usrChosen1].chosen.tagis[Helper.Proficient] >= 2) then
tagexpr = field[usrChosen1].chosen.tagids[ProfSkill.?," | "]
foreach pick in hero from BaseSkill where tagexpr
perform eachpick.assign[Helper.ProfDouble]
nexteach
elseif (field[usrChosen1].ischosen <> 0) then
tagexpr = field[usrChosen1].chosen.tagids[ProfSkill.?," | "]
foreach pick in hero from BaseSkill where tagexpr
perform eachpick.assign[Helper.Proficient]
nexteach
endif
if (field[usrChosen2].ischosen + field[usrChosen2].chosen.tagis[Helper.Proficient] >= 2) then
tagexpr = field[usrChosen2].chosen.tagids[ProfSkill.?," | "]
foreach pick in hero from BaseSkill where tagexpr
perform eachpick.assign[Helper.ProfDouble]
nexteach
elseif (field[usrChosen2].ischosen <> 0) then
tagexpr = field[usrChosen2].chosen.tagids[ProfSkill.?," | "]
foreach pick in hero from BaseSkill where tagexpr
perform eachpick.assign[Helper.Proficient]
nexteach
endif
Doing this in a racial special for bootstrap to a feat. With two options set for all things.
 
Last edited:
You might want to take a look at the Unearthed Arcana Skill feats. The scripting there handles Double Proficiencies. It's not exactly what you asked for but it should point you in the right directions.
 
Well one of them helps remove the foreach loop(s), but I still am having issues with doing if statements with obvious tags to get the double prof to work only if the skill has proficiency in the first place. It is either all or nothing with this game system's scripts.
 
Strange.

In the file COM_5ePack_UA - Feats for Skills.user, The if/then is used much to that effect.

The skill feat scripts hunt for the skill of the designated tag. Then checks to see if the user is Proficient with the skill. If not, makes the user proficient; if he is proficient then grants double proficiency.
 
The UA - Feats for Skills and other like it are highly dependent on the timing - they have to happen at a precise time. If I remember correctly, we had to pick timing that was after most other scripts applied the Helper.Proficient tag but before the SkillCalc scripts run.

I found a note from some scripting fragments I had:

~ Must run after post-levels/15000 but before post-levels/20000

which means that the UA scripts running at 15500 are basically a timing hack where we picked to run after 15000 for some reason and before 20000 at post-levels.

Make sure your timing falls in that range of if you're looking at something that might depend on the UA, run between 15500 and 20000.
 
Scripts in hero lab are rigged to run at specific times, to ensure they are properly calculated you have to work within specific timing ranges sometimes. Check how the rogue class feature Expertise works, that might help you.
 
Yep. When I set up my version of Feats for skills I had all sorts of issues.

Someone else did the ones currently in the Community Pack. My issue was timing skills and someone else solved the issues ebfore I did, so I just scapped mine. :)
 
Ok so I have changed my script, however any timing after post-level 15000 causes it not to work. This includes 15001.
doneif (tagis[Helper.Disable] <> 0)
if (field[usrChosen1].ischosen <> 0) then
if (field[usrChosen1].chosen.tagis[Hide.Statblock] = 0) then
perform field[usrChosen1].chosen.pulltags[ProfDouble.?]
perform hero.pushtags[ProfDouble.?]
else
perform field[usrChosen1].chosen.pulltags[ProfSkill.?]
perform hero.pushtags[ProfSkill.?]
endif
endif
if (field[usrChosen2].ischosen <> 0) then
if (field[usrChosen2].chosen.tagis[Hide.Statblock] = 0) then
perform field[usrChosen2].chosen.pulltags[ProfDouble.?]
perform hero.pushtags[ProfDouble.?]
else
perform field[usrChosen2].chosen.pulltags[ProfSkill.?]
perform hero.pushtags[ProfSkill.?]
endif
endif
From what I see I might be able to use
doneif (tagis[Helper.ShowSpec] = 0)
doneif (tagis[Helper.Disable] <> 0)

foreach pick in hero from BaseSkill where "thingid.skArcana"
if (eachpick.tagis[Helper.Proficient] = 0) then
perform eachpick.assign[Helper.Proficient]
elseif (eachpick.tagis[Helper.Proficient] <> 0) then
perform eachpick.assign[Helper.ProfDouble]
endif
nexteach
however I need to make the expression check only the two usrChosens for my ability.
 
SO using this script at post level 15500 worked (finally), but required some tweaking to get it going.
var tagexpr as string
if (field[usrChosen1].ischosen <> 0) then
tagexpr = field[usrChosen1].chosen.tagids[NotProfSk.?," | "]
foreach pick in hero from BaseSkill where tagexpr
if (eachpick.tagis[Helper.Proficient] <> 0) then
perform eachpick.assign[Helper.ProfDouble]
endif
nexteach
endif
if (field[usrChosen1].ischosen <> 0) then
tagexpr = field[usrChosen1].chosen.tagids[NotProfSk.?," | "]
foreach pick in hero from BaseSkill where tagexpr
if (eachpick.tagis[Helper.Proficient] = 0) then
perform eachpick.assign[Helper.Proficient]
endif
nexteach
endif
I did this as two separate eval scripts, not sure if I needed to, but I am not going to complain at this point.
 
Assuming you setup the drop down to look at Picks and Not Things this means you do NOT need a foreach loop in this logic. This is because field[usrChosen1].chosen is pointing directly to the Skill Pick chosen on the drop down. You can use field[usrChosen1].chosen to assign tags or remove tags or even modify that Picks fields directly.

A foreach loop does the same logic again as field[usrChosen1].chosen just requiring way more CPU time. By using field[usrChosen1].chosen and a foreach loop its like using the GPS in your car and the GPS on your phone at the same time to "really really" make sure you get to the correct location. :)

The above script can be changed to the following:
Code:
~ Did the gamer choose something in first dropdown?
if (field[usrChosen1].ischosen <> 0) then

  ~ If the chosen skill is already proficient then make it double
  if (field[usrChosen1].chosen.tagis[Helper.Proficient] <> 0) then
    perform field[usrChosen1].chosen.assign[Helper.ProfDouble]

  ~ Chosen skill not proficient then make it proficient
  else
    perform field[usrChosen1].chosen.assign[Helper.Proficient]
  endif

endif


~ Did the gamer choose something 2nd dropdown?
if (field[usrChosen2].ischosen <> 0) then

  ~ If the chosen skill is already proficient then make it double
  if (field[usrChosen2].chosen.tagis[Helper.Proficient] <> 0) then
    perform field[usrChosen2].chosen.assign[Helper.ProfDouble]

  ~ Chosen skill not proficient then make it proficient
  else
    perform field[usrChosen2].chosen.assign[Helper.Proficient]
  endif

endif
 
Back
Top