Just to make things a little easier I wanted to use a script to check if a certain weapon type is equipped. I've tried a few things but cant seem to find the right function for detecting a weapon type.
Is this possible to do in MV?
You can use conditional branches to check for individual equipment pieces, for each actor, & have it run as a parallel process. However, that can become rather cumbersome.
You could use Yanfly Passive Autostates plugin, create a state for each weapon type, then tag each weapon of particular type with that auto state. Which would yield a much smaller & less cumbersome event.
All the following script calls return true or false.
To check if anyone in the party has weapon type n equipped (weapon types are numbered as in the database Types tab):
$gameParty.members().some(function(member){return member.isWtypeEquipped(n)});
To check if anyone in the battle party has weapon type n equipped:
$gameParty.battleMembers().some(function(member){return member.isWtypeEquipped(n)});
To check if a specific actor x has weapon type n equipped (actors are numbered as in the database Actors tab):
$gameActors.actor(x).isWtypeEquipped(n);
To check if party member x has weapon type n equipped (party members are numbered starting from 0 according to the current party order):
$gameParty.members()[x].isWtypeEquipped(n);