Member
Join Date: Mar 2013
Location: LV, NV
Posts: 65
|
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. |
#1 |
Junior Member
Join Date: Jun 2015
Posts: 23
|
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 |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#3 |
Member
Join Date: Mar 2013
Location: LV, NV
Posts: 65
|
Quote:
@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. |
|
#4 |
|
|