Total states ?

Is there a way to check the total number of states (different ones) an enemy/actor is affected by ?
I know that you can use isStateAffected to check for the individuals, but I'd love a total.
Hi, I can help you.
How would you like to implement this and display?
The Easiest way is to:

Step 1: Create a new Common Event, let's call it "State Count Scan".
- Add new Script(page 3).
-Paste this code:
Spoiler: Script
$gameMessage.add('Currently ' + BattleManager._target.states().length + ' States applied to target.');
This will display a message "Currently x States applied to target.".
x being the number of states.
*You can change this message to whatever suits you.

Step 2: Create a new Skill, let's name it "State Count Scan".
-Setup the skill as you like. *Take note that Occasion is Battle Screen.
-Under Effects, link the Common Event "State Count Scan".

Spoiler: State Count Skill
StateScanSkill.png

Change settings to however suits your game.
You should have a result like this.

Step 3: Apply some states and scan away!

Hope this helps!
@NaosoX That's pretty a in-depth walkthrough when we have no clue that's what the OP wants to do with the information 😀

@Drake616 as NaosoX mentioned in his post, the way to get the total number of states is actor.states().length
@NaosoX That's pretty a in-depth walkthrough when we have no clue that's what the OP wants to do with the information 😀

@Drake616 as NaosoX mentioned in his post, the way to get the total number of states is actor.states().length
That way, in case others who aren't necessarily looking for this can take something away to learn or explore on their own and in their own way. 👍🙂👍

Original thread: https://forums.rpgmakerweb.com/threads/total-states.140594/