• 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

Odd behaviour with custom abilities

ultodrago

Member
So I was wanting to try and duplicate the Oath Against Chaos Paladin's Smite Chaos in order to learn some things about how it works. Unfortunately, it seems like it just... doesn't work when replicated?

My current issue is the fact that, according to the Oath Against Chaos archetype, it grabs cSmiteCha multiple times at specific levels. When I replicated that, alongside a direct copy of the eval scripts for Smite Chaos, it works when one instance of Smite Chaos exists at all, but then breaks if there's more than 1. As far as I'm aware I'm duplicating the archetype as-is when it comes to Smite Chaos and how it implements it, but as soon as I put in a second instance on the chain, it breaks.

Can someone explain what's going wrong here? Below is the code, as taken from a "New (Copy)" of cPalSmiCha.
Code:
      field[listname].text = "Smite Chaos (" & field[xIndex].value & "/day)"

      ~only run the rest for the first copy
      doneif (tagis[Helper.FirstCopy] = 0)

      ~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] = 0)

      ~ Generate our damage bonus
      field[abValue].value += field[xAllLev].value

      ~ Generate our to-hit and AC bonuses
      field[abValue2].value += maximum(hero.child[aCHA].field[aModBonus].value,0)
      field[abValue3].value += maximum(hero.child[aCHA].field[aModBonus].value,0)

      field[abSumm].text = signed(field[abValue2].value) & " to hit, " & signed(field[abValue].value) & " to damage, " & signed(field[abValue3].value) & " deflection bonus to AC when used."

      if (field[abilActive].value + field[abilAct2].value <> 0) then
        hero.child[Damage].field[Bonus].value += field[abValue].value
        hero.child[Attack].field[Bonus].value += field[abValue2].value
        #applybonus[tACDeflect, hero.child[ArmorClass],  field[abValue3].value]

        ~ if the target is an evil dragon, evil outsider, or undead, add the
        ~ damage bonus again
        if (field[abilAct2].value <> 0) then
          hero.child[Damage].field[Bonus].value += field[abValue].value
          endif
        endif
 
So... I changed absolutely nothing, and now it works? I didn't change any of the timings, and I didn't change the priorities, and it now works. The literal only change was that I had restarted my computer between the attempts.

Why is the editor like this?
 
Last edited:
Sometimes you need to reload the system in order for HL to put editor changes into effect in HL.
 
What I find so odd is the fact that it didn't understand the exact replication for Smite progression until after I restarted my PC.

I really hope that's not a common thing for the HL Editor.
 
What I find so odd is the fact that it didn't understand the exact replication for Smite progression until after I restarted my PC.

I really hope that's not a common thing for the HL Editor.

Odds are its something fairly complex and you are using the test now feature of HL. When a particular thing relies on several other things the test now may not always work right. However if you close and reopen HL it should force a full reload of the game system which will show all changes made.
 
Test Now basically just does a re-add of the thing to your character, so doesn't always process interactions, and doesn't update other things. So if you made Oath Against Law for instance, and had Smite Law on it, compiled and added that, then you added OAL to your character, then added Smite Law gained at additional levels to OAL and hit Test Now on Smite Law, it wouldn't add those additional smites because OAL hasn't been updated. There's more nuance to it than that, but that's the simple. Ctrl + R trigger a reload of the program, and is generally what I use to test things, but Test Now is faster if you're just updating a single thing and don't want to have it reload everything
 
Back
Top