Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

In the menu extension:

Is it possible to detect if an actor has money grips for a display change:

1) If they do then no change

2) but if they don't: the eqiupment slot for off-hand text that normally reads "empty" (using YEP_Equipcore empty text) could be changed to a term listed  in the plugin settings like "used", "2-handed" or "locked" when player has a <Twohanded> Weapon equipped in the main hand.

It currently it allows player to click the off hand equip slot and open a window that is always blank because no weapons fit the equip requirements without monkey grip. Can we remove this potential confusion to the player by locking this screen and adding the new text?

That's a decent suggestion, but it doesn't account for shields tagged <Offhand>. These shields can be equipped even when an actor has a two-handed weapon equipped, so there is always the possibility of equipping something in that slot, even when a two-handed weapon is being used.

Of course, one could say that for a project where shields aren't a thing, or where light shields don't exist this is a good suggestion. I'd like to keep this plugin as cookie-cutter as possible, though, so I don't think I can roll this into the main plugin.

However, for your own personal use, I'd look into the below function from YEP_EquipCore. The function is used to draw the 'empty' slots on the equip scene, and you can add in whatever functionality you need from here.

Window_EquipSlot.prototype.drawEmptySlot = function(wx, wy, ww) {
    this.changePaintOpacity(false);
    var ibw = Window_Base._iconWidth + 4;
    this.resetTextColor();
    this.drawIcon(Yanfly.Icon.EmptyEquip, wx + 2, wy + 2);
    var text = Yanfly.Param.EquipEmptyText;
    this.drawText(text, wx + ibw, wy, ww - ibw);
};

Add in an if condition, and check this._actor.icanMonkeyGrip() or alternatively a (this._actor.equips()[0] && !this._actor.equips()[0]._isTwoHanded) and that should handle what you're looking for.

Might come out a little something like this:

Window_EquipSlot.prototype.drawEmptySlot = function(wx, wy, ww) {
    this.changePaintOpacity(false);
    var ibw = Window_Base._iconWidth + 4;
    this.resetTextColor();
    if (!this._actor.canMonkeyGrip()){
        this.drawIcon(Yanfly.Icon.EmptyEquip, wx + 2, wy + 2);
        var text = "Locked";
        this.drawText(text, wx + ibw, wy, ww - ibw);
    } else {
        this.drawIcon(Yanfly.Icon.EmptyEquip, wx + 2, wy + 2);
        var text = Yanfly.Param.EquipEmptyText;
        this.drawText(text, wx + ibw, wy, ww - ibw);
    }
};

Just paste that code into a blank js file and import it into your plugin manager anywhere below YEP_EquipCore and that should do it.

-Ramza

Thank you!

Should an actor be able to equip a shield and a twohanded weapon at the same time? Shouldn't twohanded "block" <offhand>

That code writes Locked for all equip slots but I think I can take it from here. 

Thanks again.

The intent was that an offhand shield is like a buckler, a tiny shield bolted to the forearm that allows basically full use of the hand for holding other things.

Oh yes this does make sense