I found the code in
rpg_objects.js. That said, editing the base code files is generally inadvisable. Better to write edits as plugins instead...that way it's easier to keep track of edits, you can turn them on/off at will, updates are less likely to mess things up, etc.
😮💨
With that in mind, you could try saving this as a .js file (Save As > File Type: All Files, Filename: whatever.js) and import it like a plugin:
Spoiler
Code:
Game_Actor.prototype.performAttackOffhand = function() {
var weapons = this.weapons();
var wtypeId = weapons[1] ? weapons[1].wtypeId : 0;
var attackMotion = $dataSystem.attackMotions[wtypeId];
if (attackMotion) {
if (attackMotion.type === 0) {
this.requestMotion('thrust');
} else if (attackMotion.type === 1) {
this.requestMotion('swing');
} else if (attackMotion.type === 2) {
this.requestMotion('missile');
}
this.startWeaponAnimation(attackMotion.weaponImageId);
}
};
Then in an action sequence, try something like this:
Code:
eval: user.performAttackOffhand();
Note: I haven't tried any of this myself, hopefully I haven't missed anything important.
😅
Basically, the plugin thing should add a new method called
performAttackOffhand, identical to
performAttack except it checks the second equipped weapon rather than the first. (I think
performAttack is called as part of Yanfly's
perform action action.) Then the
eval action (
Action Sequence Pack 1) can be used to call that new method.
😤