Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Shadowrun

Notices

Reply
 
Thread Tools Display Modes
Seeker1728
Member
 
Join Date: Mar 2013
Location: LV, NV
Posts: 65

Old February 24th, 2016, 09:58 PM
I'm currently trying to create a adept enhancement for one of my players that I'm having trouble how to figure out how to do the scripting code. While we are doing the calculations manually, I'm a bit of a perfectionist and was wondering if HL would be capable of doing the math for us and make it all look pretty while at it

The enhancement is to Missile Mastery wherein the adept is able to substitute his magic rating for his strength in calculating damage and range for thrown and improvised thrown weapons.

What I'm trying to get HL to do for me is the damage/range calculating when a player lists Shuriken or thrown knifes/axes on their list, instead of it using the Str stat for its calculations, it uses the current magic rating.

I've tried to do some backwards engineering with this, but I either get a boatload of error messages about doing it wrong or it doesn't do the correct output. Any assistance towards my learning curve would be greatly appreciated.
Seeker1728 is offline   #1 Reply With Quote
Thrawn21
Junior Member
 
Join Date: Jun 2015
Posts: 23

Old February 25th, 2016, 12:39 AM
Hello,

it would help greatly to see how you did try to implement this into the editor.

EDIT: And of cause what parts ain't working as expected
Thrawn21 is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old February 25th, 2016, 07:47 AM
In the Develop menu, make sure enable data file debugging is turned on. Then, add a throwing knife to your test character, right-click it, and choose "show debug fields for Throwing Knife".

In that list of fields, filter for "strength", and you'll find that there's a field on the weapon named "Effective Strength" - wpStrength. You'll see its value is the same as your character's strength. If you wanted to test some more, add cyberlimbs of varying strength, and make sure the weapon and cyberlimb are set to both be main handed or both off-handed, and you can see how that field stores the strength of the arm that's holding that weapon.

So, next, to figure out when that value is calculated. Right-click the throwing knife again, and choose "Show debug tasks for Throwing Knife". Filter that list for "strength", and you'll see that at Traits/13600 is a script named [Calc wpStrength] Field calculate - field "Effective Strength" (wpStrength). So, you want to have our script be slightly after that, and you want to override the wpStrength on the weapon with your character's Magic (well, actually, you want to use a maximum(), so that the normal strength takes over if a vampire drains the character, pulling out lots of essence and therefore lots of magic, dropping that below the character's strength).

Then, remove that filter, and look at the scripts coming up after that one. The script named "[Apply Strength Minimum] Eval Script" is there for bows - it's when the wpStrength field is compared to the wpStrReq to determine if there needs to be any penalty to the dicepool for using too strong a bow.

I'm sorry I don't have the script named, but that other script at Traits/14000, currently just listed as "Eval Script 1" is the script that turns wpStrength into damage.

So, your script will run after Traits/13600 and before Traits/14000. Personally, I'd put yours very close to Traits/13600, like Traits/13650. That way, if there's some other ability that says "add +1 to the effective strength of throwing weapons", that one will be put in the middle of that gap or at the end, and will apply its change after your ability. Generally, you want replacements to happen early, and bonuses/penalties to happen late, so that the replacement doesn't overwrite the bonus.
Mathias is online now   #3 Reply With Quote
Seeker1728
Member
 
Join Date: Mar 2013
Location: LV, NV
Posts: 65

Old February 25th, 2016, 10:04 AM
Quote:
Originally Posted by Thrawn21 View Post
Hello,

it would help greatly to see how you did try to implement this into the editor.

EDIT: And of cause what parts ain't working as expected
Good idea, should've though of that. Now, if only I can get my day off back I'll be sure to include it next post.

@Mathias

First, thanks for the reply, 2nd...THANK YOU SO MUCH for that brief lesson on how to use the debugging tool and script placement guidelines, that was pure awesome and much faster than I anticipated. I'll be sure to post my findings when I can free up time today.
Seeker1728 is offline   #4 Reply With Quote
Reply

Thread Tools
Display Modes

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 09:22 AM.


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