MV [SOLVED]Searching for a way to edit Sprite_Weapon in rpg_sprites.js

Hello all! Recently I have been digging through the core js files of my project to see what makes everything tick and to try and learn something about javascript in the process, basically I'm using bigger character sprites so I wanted to edit the Sprite_Weapon bit found here:
[ISPOILER]Sprite_Weapon.prototype.updateFrame = function() {
if (this._weaponImageId > 0) {
var index = (this._weaponImageId - 1) % 12;
var w = 96;
var h = 64;

var sx = (Math.floor(index / 6) * 3 + this._pattern) * w;
var sy = Math.floor(index % 6) * h;
this.setFrame(sx, sy, w, h);
} else {
this.setFrame(0, 0, 0, 0);
}
};[/ISPOILER]

along with this:

[ISPOILER]Sprite_Weapon.prototype.initMembers = function() {
this._weaponImageId = 0;
this._animationCount = 0;
this._pattern = 0;
this.anchor.x = 0.5;
this.anchor.y = 1;
this.x = -16;
};[/ISPOILER]

Now this looks great when I bring all those numbers up to match my actors, thing is, for certain fights I want the actors to be default size, which I can do by simply using the change actor image command before the battle, but then I have huge weapons!

So I guess what I'm looking for, either plugin or scriptwise, is a way to change those parts of the script in bold. Any help would be appreciated, I've learned so much here over the past few weeks its crazy!
You can replace those lines with a shorthand if statement
var something = (condition ? *this value when true* : *this values when false*)

the question is what will the condition be? A game switch perhaps? Maybe we can intuit something from the Actor it belongs to. Like the file name, or size.
var w = ($gameSwitches.value(1) ? 96 : 144)

Edit: Oh, and you'll probably have to tell it to use a different sheet too. You know, when this Switch is on, use *these settings* and "weapons_alt.png".
Edit2: But depending on how the sheet is formatted, maybe all you need is to change the weapon file name in the first place.
You can replace those lines with a shorthand if statement
var something = (condition ? *this value when true* : *this values when false*)

the question is what will the condition be? A game switch perhaps? Maybe we can intuit something from the Actor it belongs to. Like the file name, or size.
var w = ($gameSwitches.value(1) ? 96 : 144)

Edit: Oh, and you'll probably have to tell it to use a different sheet too. You know, when this Switch is on, use *these settings* and "weapons_alt.png".
Edit2: But depending on how the sheet is formatted, maybe all you need is to change the weapon file name in the first place.
I was thinking I would mostly use the default "small" sprites for large monsters, ex. boss and stuff, so i should be able to run all of my events for switching actor sprites before the battle starts. I didn't think of using a game switch in there, for some reason I wasnt thinking that script used the ingame switches. I'll look at it again in the morning with a fresh head, just deleted an hour of mapping cause forgot to save and crashed when loading a paralax x_X fml lol

EDIT: I decided to rack my brain for yet an hour further and got it to work using the switch method you mentioned! Ended up being a lot easier to understand with the information givin.

SOLVED!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-searching-for-a-way-to-edit-sprite_weapon-in-rpg_sprites-js.147493/