• 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

Weapon Accessory Scripting Question

dartnet

Well-known member
I want to create a weapon accessory that adds +2 to the base damage and improves the critical range by 1.

How do I do that?
 
I just realised that the editor isn't really set up to do weapon accessory creation right now, but here's how you can do it:

1) In the editor, go to the Equipment tab. Make a copy of an existing accessory, such as the Suppressor.

2) Change the name, unique id, cost etc appropriately.

3) Now you need to add a script that changes the base damage and critical range. Click the "Eval Scripts" button and add a script with a phase / priority of around "Traits Calculation" / "50000":

Code:
parent.field[atkDC].value += 2
parent.field[atkCrit].value -= 1

4) Reload the game system, and add a weapon with your new accessory - it should now be working.
 
Back
Top