PDA

View Full Version : Creating an upgrade that adds inititive


Erich
August 18th, 2011, 05:21 PM
Hello,
I am trying to add the custom interface commlink modification, this mod adds 1 to the user's matrix inititive.
I tried copying the response upgrade and modifing the avalibility, cost and quality rating.
This does not seem to be working.
Am I missing something here?
Does the scripting need to be rewritten?
If so, what does it need to look like?
I'm very new to scripting in general and Hero Lab in particular so any help would be greatly appreciated.
Thanks
-Erich

Mathias
August 31st, 2011, 04:13 PM
I apologize for taking so long to get back to you - things have been very hectic for me recently.

In the Develop menu at the top of the Hero Lab window, make sure that "Enable Data File Debugging" is checked. Then, right-click on the initiative (either on the basics tab or the basics summary), and choose "Show Debug Fields for Initiative".

You'll see a list of all the fields that exist on the initiative attribute, so look for something that seems specific to the bonus you're trying to add - in this case, matInPlay - Matrix in-Play Bonus.

Now, for how to add to this value. Find some augmentation that adds to the Reaction attribute (or any other attribute), like Reaction Enhancers. On the Augmentation tab in the editor, press the "New (Copy)" button at the bottom left and make a copy of that augmentation. Press the "Eval Script" button, and note what Phase and Priority that script uses - give your augmentation the same Phase & Priority (Traits/5000, in this case).

You'll want the same:


~only proceed if we're not disabled
doneif (activated = 0)


code at the top of the script for your item, too, so that if something turns off this augmentation somehow, the initiative bonus is no longer applied.

Reaction Enhancers add their bonus using a macro, since that cuts down on typing. In this case, you need to add to a different field though, so here's how to apply a change to the matInPlay field of the initiative attribute:


perform hero.child[attrIni].modify[+,1,""]

Erich
September 3rd, 2011, 08:41 PM
Thanks for the info, I'll give the solution a try and see how it goes.