• 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

Helper.SpcDisable not being delivered

Anpumes

Well-known member
Yet again, I'm banging my head against my keyboard trying to figure out why a script is not working. The script is as follows:
Post-attributes; 10000
Code:
   ~Get our encumbrance level - if we're encumbered by that, or if we're wearing armor or shield, we're disabled
   if (hero.tagis[Encumbered.Light] = 0) then
      perform assign[Helper.SpcDisable]
   done
   endif

   ~If we're not shown, disabled or the first copy, get out now
   doneif (tagis[Helper.ShowSpec] = 0)
   doneif (tagis[Helper.SpcDisable] <> 0)
   doneif (tagis[Helper.FirstCopy] = 0)

   ~assign our climb speed and climb skill bonus
   #value[xClimb] += hero.child[cMnkSpeed].field[xCount].value *10
   #skillbonus[skClimb] += 8
Timing - After Script; Encumber Final
This code is very similar to, and running at the same timing as, the Monk's AC Bonus and Fast Movement class specials but while those seem to work perfectly when adding armor or being encumbered, this one does not. It simply dos not disable as I would expect. As far as I can tell, the Helper.SpcDisable is not reaching the class special and I simply do not understand how or why this is happening.

Now I've played with timing, including learning that Encumber Final runs at Post-attributes; 2000. Nothing I've tried in Post-attributes gets it work and if I move it to Final Phase, anything after 15000 disables it completely. I'm very lost on what is going on here and now believe that there is something fundamentally wrong with my code.

Thanks again, in advance, for any help.
 
Last edited:
This is a case where debugs might help you diagnose what is going wrong.

Try putting them into the code, like this:

Code:
debug "This is " & this.idstring
~Get our encumbrance level - if we're encumbered by that, or if we're wearing armor or shield, we're disabled
   if (hero.tagis[Encumbered.Light] = 0) then
debug "We have no Encumbered.Light tags, so we should disable ourselves and end this script early"
      perform assign[Helper.SpcDisable]
   done
   endif

   ~If we're not shown, disabled or the first copy, get out now
   doneif (tagis[Helper.ShowSpec] = 0)
debug "We are high enough level to get this ability, and have Helper.ShowSpec, so we passed the first gate"
   doneif (tagis[Helper.SpcDisable] <> 0)
debug "We have no Helper.SpcDisable tags because nothing disables us, so we passed the second gate"
   doneif (tagis[Helper.FirstCopy] = 0)
debug "We have Helper.FirstCopy tags because we are the first active copy of this special, so we passed the third gate"

   ~assign our climb speed and climb skill bonus
debug "hero.child[cMnkSpeed].field[xCount].value is " & hero.child[cMnkSpeed].field[xCount].value & ", so before adding our bonus #value[xClimb] is " & #value[xClimb]
   #value[xClimb] += hero.child[cMnkSpeed].field[xCount].value *10
debug "After adding our bonus #value[xClimb] is " & #value[xClimb]

debug "before adding bonus, hero.childfound[skClimb].field[skTotal].value is " & hero.childfound[skClimb].field[skTotal].value
   #skillbonus[skClimb] += 8
debug "After adding bonus, hero.childfound[skClimb].field[skTotal].value is " & hero.childfound[skClimb].field[skTotal].value

Then go to Develop -> Show Debug output, and look at the window that pops up. Each debug has it's own line, so you can tell where the eval script gets hung up (if some are not showing) and adjust the priority + reload.
 
Thank you. I had tried to debug but quickly gave up on it because I couldn't figure out how to debug those fields without having something there. This has given me a way to use debug that I did not know existed. Thank you.

Alright, so what I learned from this is that unless the characters encumbrance exceeds light, this ability remains in play. Once it crosses into medium or heavy, then it is disabled. Which, is working as intended.

What I couldn't figure out, but now know, is why it wasn't disabling when armor was worn as both the Monks AC Bonus and Fast movement were. Turns out there is a column of buttons called Other Req in the Class Special Abilities bootstap context window. Clicking edit on these gives the option to check some additional requirements for the class special, including what sort of armor can or cannot be worn.

Thank you again Aaron, your assistance has proven invaluable.
 
Back
Top