Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Dualtechs for RPG Maker MV and MZ

Let your actors combine their skills in RPG Maker MV and MZ · By HeroicJay

How to update plugin manually to include additional conditions?

A topic by Puppet Knight created Jul 20, 2023 Views: 157 Replies: 3
Viewing posts 1 to 3

Hey hey, long time.

I am currently using Moogle Xs Equip Skill plugin to drive battle skills and wanted to set the skill needed to be equipped by the dual tech actors as an additional requirement for dual techs showing in battle. 


I am pretty sure I've identified the function `Game_Actor.prototype.eqsSkillEquipped = function(skill)` in their plugin that I would need to hook to, but I am uncertain how to add that to your plugin to make it a part of meetsSkillConditions. 



Any help?

Developer (1 edit)

I'm surprised they didn't update meetsSkillConditions themselves. Would have been a godsend for compatibility.

I honestly don't know if anything simple I write would be compatible with that plugin due to that, but try adding this in a patch after their plugin:

var skillConditionPatch = skillConditionPatch || {};
skillConditionPatch.meetsSkillConditions = Game_BattlerBase.prototype.meetsSkillConditions;
Game_BattlerBase.prototype.meetsSkillConditions = function(skill) {
   if (this.isActor() && !this.eqsSkillEquipped(skill)) {
      return false;
   }
   return skillConditionPatch.meetsSkillConditions.call(this, skill);
};

And I make no promises; this is untested. If that doesn't work... well, all due respect? I'm not rewriting my plugin just to deal with a plugin that wasn't really made with general compatibility in mind that may have been abandoned over seven years ago.

EDIT: Another possibility would be to patch eqsSkillEquipped.

So apparently there was a simpler solution that just works without extra work involved. (Sorry) 

removing the Permanent Skill Prefixes made the skills fall to the rules of being equipped via the other plugin without the patch needed. 


Sorry for the extra work mate!

Developer

Aha. I wouldn't have guessed that was it. Well, whatever. The Permanent Skill Prefix wasn't a particularly difficult change (I actually accidentally enforced it in the very first version of the plugin ever, so I already knew what to look for when I made that update), and what I wrote above was pretty much written off-the-cuff and wasn't tested.