Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //weapon type array
- const WeaponDetect = [ '0001E711',
- '0001E714',
- '0001E712',
- '0001E713',
- '0006D931',
- '0006D930',
- '0006D932'];
- //weapon speed array
- const WeaponSpeedSet = [1.100000,
- 0.900000,
- 1.000000,
- 1.350000,
- 0.850000,
- 0.600000,
- 0.666667];
- //weapon reach array
- const WeaponReachSet = [0.700000,
- 0.600000,
- 0.600000,
- 0.400000,
- 1.050000,
- 0.950000,
- 0.950000];
- registerPatcher({
- info: info,
- gameModes: [xelib.gmTES5, xelib.gmSSE],
- settings: {
- label: 'Weapon Rebalancer',
- hide: true, //hides the name in the menu since you don't have custom settings, just shows the "build" option
- //removed the other settings option since you don't have an external settings file
- defaultSettings: {
- patchFileName: 'WeaponRebalancer.esp' //sets your filename
- }
- },
- requiredFiles: [],
- getFilesToPatch: function(filenames) {
- return filenames;
- },
- execute: {
- process: [{
- load: function(plugin, helpers, settings, locals) {
- return {
- signature: 'WEAP'
- }
- },
- patch: function(record, helpers, settings, locals) {
- //Melee Weapon Attributes
- for (let x = 0; x < WeaponDetect.length; x++){ //loop, raises x by one every pass, limited by the length of the array
- if (xelib.HasKeyword(record, WeaponDetect[x])) {//calls the array at x
- xelib.SetFloatValue(record, 'DNAM\\Speed', WeaponSpeedSet[x]);
- xelib.SetFloatValue(record, 'DNAM\\Reach', WeaponReachSet[x]);
- }
- }
- }
- }]
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement