# Theo - Stacking States

#### TheoAllen

##### Self-proclaimed jack of all trades
About:
You want to stack the same state x times
Use <stack: n> to determine the maximum stack you can use.

Preview:

Download:
Save as a new JS file

Terms of Use:
Read here

I hope you find this useful.

#### TheoAllen

##### Self-proclaimed jack of all trades
The plugin was updated to fix a bug that makes the state stack indefinitely.
If you're using this, please update your plugin.

#### GHNeko

##### Sega Stockholm Syndrome.
If the state comes with an effect, would this let the effects stack as well?

#### TheoAllen

##### Self-proclaimed jack of all trades
If the state comes with an effect, would this let the effects stack as well?
Yes

#### GHNeko

##### Sega Stockholm Syndrome.
I'm assuming the stacks are additive then?

#### TheoAllen

##### Self-proclaimed jack of all trades
I'm assuming the stacks are additive then?
Multiplicative. I'm assuming that you were referring to stat/element modifier.

#### GHNeko

##### Sega Stockholm Syndrome.
Multiplicative. I'm assuming that you were referring to stat/element modifier.
Yeah I was. Thank you very much!

#### NegativeInspiration

##### Villager
Hopefully a quick question: Is there a way to check how many stacks a state has? Like in a damage formula?

#### TheoAllen

##### Self-proclaimed jack of all trades
Yes. use `.stateStack(stateId)`
For example: `a.stateStack(10)`

#### Fionn23

##### Eternal Noob
Thanks for this. Will removeState() remove all the stacked state at once?

#### TheoAllen

##### Self-proclaimed jack of all trades
Thanks for this. Will removeState() remove all the stacked state at once?
I left the function untouched so the answer is probably yes.

#### Sodon

##### Villager
Yes. use `.stateStack(stateId)`
For example: `a.stateStack(10)`
Should this return a number? I tried using it in code (and tested it in the console.log), but it doesn't seem to return any value?

Thank you for the plugin, by the way!

#### TheoAllen

##### Self-proclaimed jack of all trades
Should this return a number? I tried using it in code (and tested it in the console.log), but it doesn't seem to return any value?

Thank you for the plugin, by the way!
It should return the number.
If that doesn't work, try to diagnose it by using `._states`

Oh by the way, when I said `.stateStack(x)` it means it should be followed by the object such as the actor or the enemy. For example `\$gameActors.actor(1).stateStack(x)` or `a.stateStack(x)` in the damage formula.

#### Sodon

##### Villager
It should return the number.
If that doesn't work, try to diagnose it by using `._states`

Oh by the way, when I said `.stateStack(x)` it means it should be followed by the object such as the actor or the enemy. For example `\$gameActors.actor(1).stateStack(x)` or `a.stateStack(x)` in the damage formula.

Sorry, my bad, that works. There is just an incompatibility with VisuStella's Skill and States Core, as my notetag Javascript code was not running with both plugins enabled. When I ran this code through a Skill instead, it returned the expected result.

#### TheoAllen

##### Self-proclaimed jack of all trades
I see no reason why it wouldn't work in the note tag JS code.
Perhaps you can ask around in the forum to figure out why. Some people might be familiar with VS plugins.

#### Sodon

##### Villager
I see no reason why it wouldn't work in the note tag JS code.
Perhaps you can ask around in the forum to figure out why. Some people might be familiar with VS plugins.
It does work in the JS code where it executes. What I am noticing is that 'JS On Add State' code (via the VisuStella notetag) does not execute in States with this plugin enabled.

#### azurezero

##### Villager
is there anything to show the number of stacks on an enemy?
im trying to make slay the spires poison mechanic (where the number of stacks is the damage)
but that informaton is important for the player

edit - i cant use yanfly battle engine because it ruins my damage prediction plugin

Last edited:

#### TheoAllen

##### Self-proclaimed jack of all trades
This plugin is purely a mechanic. For interface editing, ask other plugin makers to edit my plugin. I don't want to deal with interface editing as it would likely clash with other menu or interface plugins

### Latest Profile Posts

imgur links are back!
now I CAN keep getting away with NOT replacing them with updated renders!
yay!
I forgot RPG Maker even existed. Such good memories. Might boot up steam and download MV one more time
10 pieces of KFC chicken for US\$12.30, delivery included. Cheap or expensive?
Ugh-I HATE this! There's construction going on in my area and because of that my Internet connection is wonky; this site in particular keeps constantly freezing up on me; I can't even barely type a single sentence without the page freezing in the middle of it! I hope this changes soon.
Yeah, it’s cool to have friends that hang out, but get you a friend that goes grocery shopping together too.

Threads
131,547
Messages
1,220,737
Members
173,220
Latest member
ZecaVn