Weapon count not including equipped

I'm using a variable in a conditional branch where I need to know if the party possesses a particular weapon. However, as far as I can see, the event command only counts what's in the inventory and does not include what's equipped.

How would I have both?

Thanks.
You can simply add condition if that weapon is equipped, add +1 to that variable?
@fizzly Thanks.
On the weapon and armor check, you have the option to tick the 'include equipment' checkbox.
@ISC I am doing a total possession count, inventory and equipped, and that option is not given, at least as far as I can see. Simply checking the weapon does not give me the count, again as far as I can see.

1725871539037.png
Ok, you're using a variable to check. If your goal is simply to know whether the party possesses a weapon or armor equipped, there is a dedicated conditional branch for that. Page 4 of the conditional branch. Do you need to store this information in a variable for any specific reason? Because after doing this check, you could also save the value you need (even just a boolean)
Ok, you're using a variable to check. If your goal is simply to know whether the party possesses a weapon or armor equipped, there is a dedicated conditional branch for that. Page 4 of the conditional branch. Do you need to store this information in a variable for any specific reason? Because after doing this check, you could also save the value you need (even just a boolean)
Oh, right! I forget about that, too... You're right.
@ISC No, I'm not just seeking to know if the party possesses a particular weapon but, as I've said, how many exactly they possess, including any equipped. So using the conditional branch does not do that for me. That gives either a yes/no, not a number.

@fizzly For the reasons given here and in my previous post, your solution is the one I'm going with.
There may be a neater way I've overlooked, but:
To get the total number of Armor 216 equipped by party members:

$gameParty.allMembers().reduce((t, m) => t + m.armors().reduce((a, c) => a + (c.id === 216 ? 1 : 0), 0), 0)
You could add that to the inventory count: Control Variables -> Add -> Script. 👋

(For a weapon, replace armors with weapons.)
I.e. "how many copies of weapon 19 are currently equipped by all party members?":

$gameParty.allMembers().reduce((t, m) => t + m.weapons().reduce((a, c) => a + (c.id === 19 ? 1 : 0), 0), 0)
[Edit: replaced 16 with 19, not sure how I managed to misread that... 😅]
@caethyril This is excellent for when more than one party member might have something. Thank you so much for this. It's going straight into my "useful script calls I must keep" folder.

Original thread: https://forums.rpgmakerweb.com/threads/weapon-count-not-including-equipped.171785/