MV Stacking States for Scaling Skills: More states, more power.

Hi folks,
For the lifetime of my game's development, I have heavily relied on Synrec's State Stacker plugin for one of the core mechanics of my game's combat.
To cut a long story short, I was hoping to have a skill scale in effectiveness based on the number of state stacks applied. How that is accomplished doesn't really matter to me, though I will explain my first idea of how this could be accomplished below:

If the plugin were able to "unlock" skills depending on the number of stacks applied through notetags or similar functionality, then I could effectively create a "weak" version of the skill and a "strong" version of the same skill, and lock/unlock the skills as the states are applied.
For example:
At stack number 1, the player can cast "fire skill v1". At stack number 2, "fire skill v1"is no longer available, but the player can now cast" fire skill v2", etc. v3, v4, so on)

<StackCount1 unlockSkill ####>

<StackCount2 unlockSkill ####>

In my use case, this is dependent on the number of stacks applied to the player.

I'm open to ideas on how this might be accomplished if any one else has a better method to do this. I would prefer not to change to a different plugin that has similar effects (such as another plugin that allows state stacking) simply because this would likely involve a lot of work needing to be redone (as I said, a lot of my game's combat mechanics have been built around this). If another plugin that will play nice with Synrec's plugin will help accomplish this, that's okay.
Or, depending on the cost, I might be willing to commission someone to add this feature to Synrec's plugin (I've already gotten permission from Synrec to modify this plugin)

As always, your help is greatly appreciated.
Geeh, that is one super barebones plugin in terms of accessibility.

Personally, I would really recommend switching to Yanfly's Buffs and States. I think the additional functionality would be worth whatever work you need to do reconfiguring the setup of your skills (and I don't see why any actual mechanics would have to be touched).

However, I recognize you said you'd rather not do that, so.

I also don't see a need for you to commission anyone to write additional code, if you don't care how you do this.

You can easily get the number of stacks of a given state with actor._states.filter(stateId => stateId==X).length where X is the ID of the state. Then use that value however you like.

For example, in your fire damage formula you could do (a very simplistic example):
Code:
a.mat * a._states.filter(stateId => stateId==X).length

where X is the state ID of your Fire Mastery state. That will make the damage be equal to your magic attack times the number of stacks your state has (you probably would want to add a sanity check to not have it go down to 0, but hopefully you get the idea).

If you specifically want different skills that get swapped on the character as the states go on and off...well, the solution to that would be Yanfly's Buffs and States Core, which kind of makes the whole point moot.
Geeh, that is one super barebones plugin in terms of accessibility.
Isn't that better, though? It does one thing and is quite focused. I'll admit the documentation could use a little more detail though.

Just from glancing at the documentation for that plugin, it seems to me as though the <overflowState> tag already in the plugin could be used to produce the effect you're describing… or did you already try that…?

That said, I could be misunderstanding what you want… and I could also be misinterpreting what <overflowState> does.
For example, in your fire damage formula you could do (a very simplistic example)
Thank you for the quick response!
The damage formula is totally fine by me. The switching skills method was just one idea for scaling skills, but damage formula seems way cleaner of a method of accomplishing the same thing. However, I do have one question; is there a way to make this *ahem* "state agnostic". By that, I mean;
There are multiple different states that could be applied to the player, to keep this simple, let's just call these states a burned state, paralyzed state, and a confusion state. The skill itself is intended to scale off any of these states. So if the player has 2 stacks of burn, then there is a x2 multiplier. In a totally different fight, now the player has 2 stacks of paralyze, even though paralyze has a different state ID, the skill still has a x2 multiplier. (And similarly for the confused state)
So basically...in short, I guess I am asking, can I use an "OR" or an "&&" in the formula with the state ID?
Isn't that better, though? It does one thing and is quite focused.
In my opinion? No. It's quite focused, but it doesn't do that thing well. There is no tracking of the state stacks, you have to calculate them every time you want them referenced; and there's no reference provided for the user, you have to read the code and figure it out like I did. I wouldn't call that better than anything 😉
That said, I could be misunderstanding what you want… and I could also be misinterpreting what <overflowState> does.
By my reading, overflowState doesn't have anything to do with the issue at hand. It is a different state that gets applied if the current state application would exceed the max states allowed.

So, for example, you could say that you're allowed to have 5 stacks of Fire Mastery, and if you would get a sixth your power explodes out and you are instead inflicted with Burning.

It's something additional you define on the state, it doesn't give you any way to know how many stacks you currently have.
So basically...in short, I guess I am asking, can I use an "OR" or an "&&" in the formula with the state ID?
Of course. OR is ||
it seems to me as though the <overflowState> tag already in the plugin could be used to produce the effect you're describing

It is a different state that gets applied if the current state application would exceed the max states allowed.
Right, I downloaded the example project just to sanity check myself (To be honest, I wasn't fully sure I understood what the overflowState was originally because the information about it is a little sparse) and it just seems to apply another state. So I don't think it's quite what I am looking for.

That said, I think ATT_Turan's formula will accomplish what I am looking for, and it's clean and easy. No plugins, no rifling around the database. I will report back if I have any troubles or it doesn't do what I expect. Otherwise, if it does work, I'll have the thread marked to be closed.

Thank you so much for your help!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/stacking-states-for-scaling-skills-more-states-more-power.148193/