• 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

Scripting

Manalishi66

Well-known member
Trying to script a new custom ability that gives you a bonus to all saves equal to your WIS modifier (min 1). Also, this ability lasts 1 round per 2 levels of the character. How do I get both the plus to save and the duration to show up?

What shows up is... Mantra of Determination (Save +0 (3 rounds) (Ex)

Script so far is.....

var bonus as number
bonus = (#levelcount[TMP]) / 2
field[abValue].value += round(bonus,0,-1)

var bonus as number
bonus = hero.child[aWIS].field[aModBonus].value
field[abValue2].value += bonus
bonus = round(bonus,0, 1)


field[livename].text = "Mantra of Determination (Save +" & field[abValue2].value & " (" & field[abValue].value & " rounds)"
 
My guess is that your script is running too early, before the Wisdom modifier is set. Try moving the script to the PostAttr phase and 10000 priority.
 
What is the class level this test character has in the "TMP" class?

What is the test character's Wisdom?
 
6th level with a wisdom 14. Should be +2 save bonus for 3 rounds. The save never shows up, just displays +0 3 rounds?
 
Back
Top