Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Helper.SpcDisable not being delivered (http://forums.wolflair.com/showthread.php?t=49037)

Anpumes April 18th, 2014 10:46 AM

Helper.SpcDisable not being delivered
 
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.

Aaron April 18th, 2014 11:59 AM

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.

Anpumes April 18th, 2014 01:10 PM

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.


All times are GMT -8. The time now is 03:14 AM.

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