Weapon damage codes

so basicly i successfuly added my own weapons into the game

(and please dont use other point me at things like yanfly due to i am not using yanfly)

(if im in wrong place im sorry i didnt know where else to put this)

below is the data that it reads

{ "animationId": 6, "BDOWNS": [ null ], "CANDUAL": false, "CEXP": 0, "CLEVEL": 1, "description": "A battle axe with a long handle. Designed for two-handed use, it can easily chop off an enemy's limbs.", "etypeId": 1, "iconIndex": 419, "id": 1, "MLVL": 10, "MPOW": 0, "MUEEFF": [ null ], "name": "Battle Axe", "note": "", "params": [ 0, 0, 9, 5, 0, 0, 0, 0 ], "POACH": [ null ], "price": 1500, "SPECIALS": [ null ], "STATS": { "HP": 0, "MP": 0, "EXP": 0, "LEVEL": 0, "MOVE": 0, "SPEED": 0, "JUMP": 0, "ATK": 0, "ATM": 0, "BRAVE": 0, "FAITH": 0, "PEVADE": 0, "MEVADE": 0, "DEF": 0, "MDEF": 0, "ELEMATKS": [ null ], "ELEMDEFS": [ null ] }, "traits": [ ], "TWOHAND": true, "WATK": 9, "WDEF": 5, "wtypeId": 1 },so basicly i need to be able to take that (already reads into game)

then when the character selects the attack skill or a custom attack skill

the game needs to take the weapon type from the equiped weapon then

generate the damage IE

axe damage = [random(1 to a.atk)]* [weapon.WATK] 
ummm how do i mark this as solved, i figured it out?
Before you do so, consider posting the solution you found for others with the same request.
I did so using the following code, although it would take alot of experience with doing to modify it to your needs and remove the dependancies of the Mutation engine (I cannot release it due to the rules of the forums) [Adult Content]

Game_BattlerBase.prototype.GetWeaponDamage=function() { var wep=null; if(typeof this._equips==="undefined") { wep={ WATK: 0,wtypeId: 23 }; } else if(this._equips[0]===null) { wep={ WATK: 0,wtypeId: 23 }; } else if(this._equips[0]!==null) { wep=$mueWeapons[this._equips[0]._itemId]; } var damage=0; switch(wep.wtypeId) { case 1://axes { damage=Math.floor(((Math.random()*this.param(2))+1)*wep.WATK); break; } case 2://swords { damage=this.param(2)*wep.WATK; break; } case 3://daggers { damage=Math.floor((atk+this.agi)/2)*wep.WATK); break; } case 4: //bags { } case 23://unarmed { damage=Math.floor((this.param(2)*.25)*this.param(2)); break; } } return damage;};Object.defineProperties(Game_BattlerBase.prototype,{ watk: { get: function() { return this.GetWeaponDamage(); },configurable: true }});to get it to work you should replace the numbers with your weapon ids

and replace wep.WATK with wep.params[3]

and replace $mueWeapons with $dataWeapons

and change the {WATK: 0  

with {params: [0,0,0,0,0,0,0,0]
to get it to work you should replace the numbers with your weapon ids

and replace wep.WATK with wep.params[3]

and replace $mueWeapons with $dataWeapons

and change the {WATK: 0  

with {params: [0,0,0,0,0,0,0,0]

Original thread: https://forums.rpgmakerweb.com/threads/weapon-damage-codes.49464/