Created
June 9, 2019 17:16
-
-
Save matortheeternal/891fd372e6711a6dab8097e49586a988 to your computer and use it in GitHub Desktop.
zEdit script for changing crossbow record sound detection level and stagger. (patches records in place)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const stagger = '0.5', | |
| soundLevel = 'Normal', | |
| crossbowExpr = /crossbow/i; | |
| let isCrossbow = function(weapon) { | |
| let name = xelib.FullName(weapon); | |
| return crossbowExpr.test(name); | |
| }; | |
| let weapons = zedit.GetSelectedRecords('WEAP'); | |
| weapons.forEach(weapon => { | |
| if (!isCrossbow(weapon)) return; | |
| xelib.SetValue(weapon, 'DNAM\\Stagger', stagger); | |
| xelib.SetValue(weapon, 'VNAM', soundLevel); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment