public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

MVWeapon & Armor Check calls

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: Weapon & Armor Check calls
  • Original author: Fugama
  • Original date: November 12, 2016
  • Source thread: https://forums.rpgmakerweb.com/threads/weapon-armor-check-calls.70887/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMV)

Summary

This is Fugama's Weapon and Armors calls plugin 1.0!  This is my first plugin and as such, it's very basic. But I think it'll get some use. I've noticed a lot of people around here lately want to be able to easily check for things such as armors and weapons. With this plugin it'll be just a bit easier to check for those things. This doesn't do too much for the average consumer since it simply adds some more javascripts calls, but it goes well with for people who are trying out...

Archived First Post

This is Fugama's Weapon and Armors calls plugin 1.0!


 This is my first plugin and as such, it's very basic. But I think it'll get some use. I've noticed a lot of people around here lately want to be able to easily check for things such as armors and weapons. With this plugin it'll be just a bit easier to check for those things. This doesn't do too much for the average consumer since it simply adds some more javascripts calls, but it goes well with for people who are trying out Yanfly's Lunatic Mode! Feel free to use this for anything you want! and please let me know if something isn't working properly


features: Four Javscript calls to check for the existence of weapons and armor (be it specific or just the existence of)


How to use: I haven't seen the location on the plugin list matter yet, so just put it into your games "Base/js/plugins" folder, and add it in rpgmaker's plugin manager! you can use the commands "hasWep()", "hasArmor()", "isEquippedWep(Weapon Id Here)", and "isEquippedArmor(Armor Id Here)". The first two check to see if the user has a weapon or armor equipped (respectively). The last two let you check for specific weapons or armors based on the Id you place in the parentheses. 


The plugin: you can download it HERE! or copy this and paste it into a .js file.


/*:
*
*@plugindesc Some new checks you can access!
*
*@author Fugama
*
*@help
*
* With these new identifiers you can customize
*Yanfly's lunatic mode just a little bit easier,
*or just have an easier time calling these checks for any other
*JS scripting you may be doing.
*
*
*The first command is "isEquippedWep()" it can be used like this
*"user.isEquippedWep(x)" where x is the weapon id You want to check!
*
*The second is "hasWep()". This checks if the Actor was any weapon at all
*(compatable with Dual Wielding) example:
*"user.hasWep()" this needs no paramaters for the parentheses.
*
*The third is "isEquippedArmor()" This checks for a specific Armor equip. example:
*"user.isEquippedArmor(x)" where x is the ID of the armor.
*
*Following the pattern, the fourth is "hasArmor()" This goes through and checks if the actor has any armor equipped!
*
*example: "user.hasArmor()"
*
*I hope you find some use from these ease-of-access addtions!
*/
(function(){


//Actor Checks
Game_Actor.prototype.isEquippedWep = function(WepID) {
var wep = $dataWeapons[WepID];
if (this.isActor() && this.equips().contains(wep)){
return true;
} else {
return false;
}
};


Game_Actor.prototype.hasWep = function() {

var equipList = this._equips;
var wepCount = 0;
for (i = 0; i < equipList.length; i++){
var itemCheck = equipList;
if (itemCheck._dataClass === "weapon"){
wepCount =+ 1;
}
}
if (wepCount != 0){
return true;
} else {
return false;
}
};

Game_Actor.prototype.isEquippedArmor = function(ArmID) {
var armor = $dataArmors[ArmID];
if (this.isActor() && this.equips().contains(armor)){
return true;
} else {
return false;
}
};


Game_Actor.prototype.hasArmor = function() {
var equipList = this._equips;
var ArmCount = 0;
for (i = 0; i < equipList.length; i++){
var itemCheck = equipList;
if (itemCheck._dataClass === "armor"){
ArmCount =+ 1;
}
}
if (ArmCount != 0){
return true;
} else {
return false;
}
};


//prevent crashes from enemy battlers using the same abilities
Game_BattlerBase.prototype.isEquippedWep = function(WepID) {
return false;
};


Game_BattlerBase.prototype.hasWep = function(WepID) {
return false;
};

Game_BattlerBase.prototype.hasArmor = function(WepID) {
return false;
};

Game_BattlerBase.prototype.isEquippedArmor = function(WepID) {
return false;
};



})();


credits: Myself for making the plugin


Yanfly for his tips and tricks videos making JS easier to understand


and SumRndmDde for his making a plugin series!

Features Mentioned

  • How to use: I haven't seen the location on the plugin list matter yet, so just put it into your games "Base/js/plugins" folder, and add it in rpgmaker's plugin manager! you can use the commands "hasWep()", "hasArmor()", "isEquippedWep(Weapon Id Here)", and "isEquippedArmor(Armor Id Here)". The first two check to see if the user has a weapon or armor equipped (respectively). The last two let you check for specific weapons or armors based on the Id you place in the parentheses. 
  • The plugin: you can download it HERE! or copy this and paste it into a .js file.
  • /*:
  • @plugindesc Some new checks you can access!
  • @author Fugama
  • @help
  • With these new identifiers you can customize
  • Yanfly's lunatic mode just a little bit easier,
  • or just have an easier time calling these checks for any other
  • JS scripting you may be doing.
  • The first command is "isEquippedWep()" it can be used like this
  • "user.isEquippedWep(x)" where x is the weapon id You want to check!
  • The second is "hasWep()". This checks if the Actor was any weapon at all
  • (compatable with Dual Wielding) example:
  • "user.hasWep()" this needs no paramaters for the parentheses.
  • The third is "isEquippedArmor()" This checks for a specific Armor equip. example:
  • "user.isEquippedArmor(x)" where x is the ID of the armor.
  • Following the pattern, the fourth is "hasArmor()" This goes through and checks if the actor has any armor equipped!

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

License / Terms Note

credits: Myself for making the plugin Yanfly for his tips and tricks videos making JS easier to understand and SumRndmDde for his making a plugin series!

Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rmmv#plugin-archive

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar