MZ Visustella State Core, Add passive state via Javascript

Can't seem to find this. The notetag <Passive State: x> can add a passive state on an actor, skill, etc.

As passive states can be stackable, how can I add a state as a passive state in Javascript? For example, I need to add two of the same passive state on an actor.

Edit: Seems like when using a notetag to add a passive state, state IDs of the passive state will be added to $gameActors.actor(actorID)._cache.passiveStates array.

Should I just create a function to add state IDs to this array? Will this create problems?
Yes. The metadata (stuff in the notes field) is read into the game's database each time it runs. That data is not normally editable during the course of the game, as it doesn't save. So you should look at adding states from multiple sources and use switches or variables to activate them.

I need to add two of the same passive state on an actor.
This makes the above information a bit moot, because that doesn't even work. There's no such thing as having the same state twice, the states are stored by ID on the actors. An actor either has a state or doesn't.

You would have to rewrite the code with your own implementation of passive states to try to do something like this.
ATT_Turan Sorry. What I meant by two passive states is states being stacked.

But it seemed like I wouldn't need passive states anymore because of this plugin I found.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/visustella-state-core-add-passive-state-via-javascript.150694/