• 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

Need help with Morale bonuses

djc664

Well-known member
So I'm converting the Rise of the Runelords The Skinsaw Man (which I plan to post when I'm done the entire book as I go), and I've run into the Ugothols. Man that was a test.

I chewed through most of it today and so far so good, but I have a bit of a problem with the Racial Ability "Change Shape". I made it a Racial Special with two check boxes for in-play; "Specific Individual" and "True Form"

First issue:
True form should only be applied for one round, and I'd like it to turn off after a round when using the tactical console if I can make it happen. Is there any way to link the number of rounds to auto-count either expended rounds or turn off in-play abilities that I'm missing?

Since it doesn't seem to do that with Rage in my testing, I am assuming that the system cannot handle it. I figured I would ask just in case I'm wrong.

Second Issue:
I'm at a loss as to how I might add a Morale Bonus to all attacks and all damage.

I'm currently using this code for the ability:
Code:
~ First, 0, 1

      ~ Only one of our checkboxes can be active at once
      if (field[abilActive].value <> 0) then
        perform assign[Helper.ChgDisab2]
        perform hero.assign[Custom.UgChanged]
      elseif (field[abilAct2].value <> 0) then
        perform assign[Helper.ChgDisab1]
        perform hero.assign[Custom.UgTrueForm]
        endif

--------------------------------------
~ Post-Levels, 10000, 2

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

      ~ When imitating a specific individual, Ugothols get +10 disguise (circumstance bonus)
      if (field[abilActive].value <> 0) then
      #applybonus[ModCirc, hero.child[skDisguise], 10]
      endif

--------------------------------------
~ Post-attributes, 10000, 3

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

      ~ and abValue2 as the bonus
      field[abValue2].value += 2

      ~ For one round after they shift to their true form, Ugothols gain a +2 morale bonus to attacks, damage, skill checks and saving throws
      if (field[abilAct2].value <> 0) then

      ~+2 to all Attack
      #applybonus[BonMorale, hero.child[Attack], field[abValue2].value]
 
      ~+2 to all Damage
      #applybonus[BonMorale, hero.child[Damage], field[abValue2].value]

      ~+2 to all Skills
      #applybonus[BonMorale, hero.child[AllSkills], field[abValue2].value]

      ~+2 to all Saves
      #applybonus[BonMorale, hero.child[svFort], field[abValue2].value]
      #applybonus[BonMorale, hero.child[svRef], field[abValue2].value]
      #applybonus[BonMorale, hero.child[svWill], field[abValue2].value]

      endif

It compiles fine, but when I check to activate it in Hero Lab, I get:
"Attempt to access field 'BonMorale" that does not exist for thing 'Damage'
and there is no change to either the damage or attack bonus

I've tried changing Attack to this:
Code:
      #applybonus[BonMorale, hero.child[pAtkBonus], field[abValue2].value]

and it compiles but then activating it in HL gets:
"Attempt to access non-existant child pick 'Attack" from script"

Same problems with:
Code:
      hero.child[Attack].field[BonMorale].value = maximum(hero.child[Attack].field[BonMorale].value, 2)

      hero.child[Damage].field[BonMorale].value = maximum(hero.child[Damage].field[BonMorale].value, field[abValue2].value)

I've been able to get it to work as a generic bonus, but I'd prefer to get it to apply as a Morale Bonus (which should not stack but be greatest bonus wins). Also, this is certainly Frankenstein code as I've been trying to piece together the whole from a series of partial examples, so please feel free to point out anything that could be either more elegant or is useless.

For instance... what does this really do?
Code:
      ~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] = 0)
it was at the top of the Rage scripts, and it seemed like something that helped clear states between check boxes, so I left it just in case.

Thanks in advance!
 
Last edited:
BonMorale doesn't exist for Damage, yet. You'll have to use tDamBonus.

There is not currently an automatic countdown by rounds.

The doneif() is used to start most class specials - that way, if a class special hasn't reached its proper level, the script stops running at that point. Otherwise, you'd have your 20th level abilities adding their bonuses to a 1st level character. (Also, if you were to add the Zombie template, that's another reason to prevent the ability from running). (That doneif isn't used on many racial specials, but it should be, so leave it in at the top of your special, in case someone adds the Zombie or Skeleton template to your race).
 
Awesome. I'm glad to hear my code isn't complete crap. ;)

BonMorale doesn't exist for Damage, yet. You'll have to use tDamBonus.

Does this apply to Attack Bonus as well? It doesn't give me an error, but it also doesn't apply a morale bonus to attack for some reason. It just kind of ignores it, as far as I can tell. Perhaps it's timing?
 
The Attack does have BonMorale and all the other modifiers.

The problem is when Attack and Damage get merged onto a weapon - the BonMorale field on a weapon currently represents a morale bonus to attack, not to damage. So, what needs to happen is that I need to duplicate the existing Modifers component, renaming each of the fields slightly, and make that the damage modifiers component. Then I can add that component into the Damage component set and the weapon component set.

Once that's done, users can apply DBonMorale bonuses.

I'm afraid I just haven't had the time to get to this.
 
I'm afraid I just haven't had the time to get to this.

No worries. My primary concern was to discern whether I was just doing it incorrectly to get the desired result or if it wasn't available, which you clarified quite nicely.

I think the best course of action now is to make it "just work" to add +2 where I need it and not fret whether morale bonuses are being added correctly for now. The chance of it mattering in practice for me over the next six months is almost nil, anyway.

I'm going to comment the current code I have out with some notes so once the Morale bonuses do get changed, it should be easier to update (or at least get someone in the right direction).

Thanks!
 
Back
Top