Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Shadowrun
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Jareth Valar
Member
 
Join Date: Aug 2009
Posts: 38

Old July 30th, 2012, 09:05 PM
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
Jareth Valar is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 31st, 2012, 12:13 AM
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.
Mathias is offline   #2 Reply With Quote
Jareth Valar
Member
 
Join Date: Aug 2009
Posts: 38

Old July 31st, 2012, 01:02 AM
Quote:
Originally Posted by Mathias View Post
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 by Jareth Valar; July 31st, 2012 at 01:06 AM.
Jareth Valar is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 31st, 2012, 09:45 AM
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.
Mathias is offline   #4 Reply With Quote
Canis
Senior Member
 
Join Date: Feb 2012
Location: Seattle
Posts: 191
Send a message via MSN to Canis

Old July 31st, 2012, 10:58 AM
Wow I actually followed that!! Thanks for dumbing it down nicely Mathias :o)
Canis is offline   #5 Reply With Quote
Jareth Valar
Member
 
Join Date: Aug 2009
Posts: 38

Old July 31st, 2012, 12:41 PM
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?
Jareth Valar is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 31st, 2012, 12:44 PM
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).
Mathias is offline   #7 Reply With Quote
Jareth Valar
Member
 
Join Date: Aug 2009
Posts: 38

Old July 31st, 2012, 11:29 PM
Works perfectly, thank you.
Jareth Valar is offline   #8 Reply With Quote
Jareth Valar
Member
 
Join Date: Aug 2009
Posts: 38

Old August 1st, 2012, 03:39 AM
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
Jareth Valar is offline   #9 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:55 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.