• 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 adding a new adept power and eval scripts

Jareth Valar

Active member
Ok, I have no problems with most of this, but I am adding a power we have used in our games for some time now and having a slight problem with figuring out the eval script.

The power is:
Fleet
Cost: 1, 2.5

Each level works similar to Satyr's legs/celerity. Like Satyr's legs and celerity, they stack together. It also adds it's level to the bonus per hit Sprinting allows. (Though I think this will just be in the description. Though it would be nice to see it reflected in the pop up description that shows when you hold the mouse over Land Movement. But that's probably not possible)

I cannot figure out what the eval script should be. I copied the script for Celerity for starters (which works perfect for level 1), but how do I add the additional movement for a second level?

The end result, if both levels are chosen would be a move of 20/50 (or 22.5/56.25 the way HL does the math) and +4m per hit for Sprinting.

Thanks for any who help.

Jareth
 
Why don't you write out what you have so far - the script that works at level 1, and I'll guide you through modifying that.
 
Why don't you write out what you have so far - the script that works at level 1, and I'll guide you through modifying that.

Really a direct copy/paste of your for celerity. I know the ~ sign is for programming notes and ignored by HL (used to call it a remark or REM line when I programmed in BASIC..... o_O I think I just showed my age a little :P )



~if we're disabled, just get out now
doneif (activated = 0)

perform hero.child[movLand].field[movWalk].modify[*,1.5,""]
perform hero.child[movLand].field[movRun].modify[*,1.5,""]
 
Last edited:
You don't say exactly what multipliers you want at the higher levels. I'm guessing 1.5x for level 1, 2x for level 2 and 2.5x for level 3.

Okay, see in here where the multiplier is? So, instead of making that a fixed number, let's use a variable. We want that variable's value to be 1/2 our rating + 1, right? 1 * 1/2 + 1 = 1.5 for level 1, 2 * 1/2 + 1 = 2 for level 2, etc.

The rating of almost anything other than gear (attributes, skills, adept powers, etc.) in the Shadowrun files is stored as field[trtFinal].value, so here's how to use that:
Code:
var speedmult as number
speedmult = field[trtFinal].value / 2
speedmult = speedmult + 1

And integrating that with the rest (and condensing things slightly):
Code:
~if we're disabled, just get out now
doneif (activated = 0)
 
var speedmult as number
speedmult = field[trtFinal].value / 2 + 1
 
perform hero.child[movLand].field[movWalk].modify[*,speedmult,""]
perform hero.child[movLand].field[movRun].modify[*,speedmult,""]

You also mention +4m/hit for sprinting, but you don't say what value that should be at each rating.

The m/hit for sprinting is stored in field[movSprMult] - it defaults to 2 for normal characters. So, if you wanted to multiply that by the same multiplier:

Code:
perform hero.child[movLand].field[movSprMult].modify[*,speedmult,""]

If you don't want to multiply the sprinting value by the same multiplier, hopefuly you can use this to figure out how to calculate a different variable and use that, and if not, please ask.
 
First off, thank you for the help.

I am, however, running into a problem with the script now. I am getting an error. I decided to run what you posted as-is first and modify from there. This is how it is entered:

~if we're disabled, just get out now
doneif (activated = 0)

var speedmult as number
speedmult = field[trtFinal].value / 2 + 1

perform hero.child[movLand].field[movWalk].modify[*,speedmult,""]
perform hero.child[movLand].field[movRun].modify[*,speedmult,""]
perform hero.child[movLand].field[movSprMult].modify[*,speedmult,""]

Now the error I get is:
Hero lab was forced to stop compilation after the following errors were detected:

Syntax error in ‘eval’ script for Thing ‘ad_Fleet’ (Eval Script ‘#1’) on line 9
-> Only fields configured for history tracking can be affected via the ‘modify’ target reference

I am assuming that field[movSprMult] isn't configured to be changed. Is this something that I can do, or is it a 'you guys' thing?
 
Oops, I didn't think about that. This:

Code:
hero.child[movLand].field[movSprMult].value *= speedmult

will perform the same action, but it won't leave a record of why the change was made to be displayed in the mouse-over (since I haven't configured that field to store those records yet or re-written the display code on the movement to display those records).
 
For those that are interested.

Fleet
Cost: .75/2.25
Maximum of 2 levels

An adept with this power power can move with increased speed. Increase the character's Walking and Running rates (see Movement, p. 138, SR4) by one-half (round down) its current value with each level. Also, Fleet increases the additional movement granted by a running check. Add the level of Fleet to the default 2m per hit when taking Running tests.


And here is the final script:

~if we're disabled, just get out now
doneif (activated = 0)

var speedmult as number
speedmult = field[trtFinal].value / 2 + 1

perform hero.child[movLand].field[movWalk].modify[*,speedmult,""]
perform hero.child[movLand].field[movRun].modify[*,speedmult,""]
hero.child[movLand].field[movSprMult].value += field[trtFinal].value
 
Back
Top