• 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

Help Eval scripts Adding a "bonus to Movement Speed" not working!

bodrin

Well-known member
Here goes,

In the complete warrior the feat "Dash" adds +5feet of movement when wearing light or no armour and carrying a light load.

I've tried to cobble some eval scripts together to add this +5 movement bonus by checking for encumbrance and medium / heavy armour but I can't seem to get them to work correctly and show up on the character sheet at all.

Help

Any ideas!!

Heres my scripts! they are seperate at the moment as I couldn't figure out how to get the editor to stop throwing an "else without if statement error"

Script #1
~If we're only wearing Light or No armor and not carrying anything heavier than a light load we're 5 feet quicker.

var result as number

if (hero.tagis[Hero.HeavyArmor] > 0) then
result = hero.child[Speed].field[tSpeedMod].value+0
done
endif

Script #2
var result as number

if (hero.tagis[Hero.MedArmor] > 0) then
result = hero.child[Speed].field[tSpeedMod].value+0
done
endif

Script #3
var result as number

if (hero.tagis[Hero.LightArmor] >= 0) then
result = hero.child[Speed].field[tSpeedMod].value+5
done
endif


Script #4
var result as number

if (hero.child[Totals].field[tEncumLev].value >= 2) then
result = hero.child[Speed].field[tSpeedMod].value+0
done
endif
 
hero.child[Speed].field[tSpeedMod].value += 5

rather than
result = hero.child[Speed].field[tSpeedMod].value+0

Here's the script from the Barbarian's fast movement (which runs at Final,100):
Code:
var result as number
~ If we fail the test for being speedy, get out
if (hero.tagis[Encumbered.Light] + hero.tagis[Encumbered.Medium] = 0) then
result = assign[Helper.SpcDisable]
done
elseif (hero.tagis[Hero.HeavyArmor] <> 0) then
result = assign[Helper.SpcDisable]
done
endif
~ We passed, so add to our base speed.
hero.child[Speed].field[tSpeed].value = hero.child[Speed].field[tSpeed].value + 10

Here's the same script with some of the shortcuts they've added since the base classes were written to make data file authoring easier:

Code:
~ If we fail the test for being speedy, get out
if (hero.tagis[Encumbered.Light] + hero.tagis[Encumbered.Medium] = 0) then
  perform assign[Helper.SpcDisable]
  done
elseif (hero.tagis[Hero.HeavyArmor] <> 0) then
  perform assign[Helper.SpcDisable]
  done
endif
 
~ We passed, so add to our base speed.
hero.child[Speed].field[tSpeed].value += 10

You should be able to copy that to your feat's eval script, change the timing to use the final phase, change the += 10 at the very end to += 5, and be good to go.
 
Thank you

Thanks Mgehl, it never occured to me to analyse the barbarians fast movement scripts. Doh!

Heres the modified Speed Bonus script that works perfectly!

Code:
~If we're only wearing Light or No armor nor are we carrying above a light load we're 5 feet quicker.

if (hero.tagis[Encumbered.Medium] + hero.tagis[Encumbered.Heavy] <> 0) then
  perform assign[Helper.SpcDisable]
  done
elseif (hero.tagis[Hero.HeavyArmor] <> 0) then
  perform assign[Helper.SpcDisable]
  done
elseif (hero.tagis[Hero.MedArmor] <> 0) then
  perform assign[Helper.SpcDisable]
  done
endif
 
~ We passed, so add to our base speed.
hero.child[Speed].field[tSpeedMod].value += 5
 
Last edited:
Back
Top