How do I make two states that interact with each other and with nothing?

Let me start by saying sorry. I am not good at getting what's in my brain out of my brain so this title was the best I could describe it.

I have a two different states I call "flight" and "winged flight" which I want to be able to interact with each other and interact with any actor/enemy who doesn't have either of the two states. Actors/enemies who have one of the states would have extra physical evasion against actors/enemies who don't have one of the states and if both actors/enemies had one of the states neither would get any evasion bonuses against each other.

I'm pretty sure I would need to write a plugin for this, but I don't even know where to begin or what to look for. The last time I programmed anything was a Doom 2 mod two years ago but this is a totally different can of worms. I'm just lost on what to do here to get what I want.
If anything wasn't clear please let me know and I'll do my best to explain it.
the state itself wont interact..

you can use scripts that check which states are active and do things related to the result..

but before you build these scripts (or get help to do so) , you need to know the timing when this should happen or you would have to get these scripts running parrallel all the time.. (alltime parrallel is not recommended)

you might even not need scripts if you use the state check from the editor, with "if conditions"..

(i dont use mz so i cant help much with exact scripts but it should be something with "isStateAffected".. for state checks)

edit.
- i guess the timing is battlemode related with active battler and target battler as identifier..
- and to change the stats of acting and target battler you might need scripts, because the things you can add to states by default wont check any other battlers state ect..
- it should probably be executed before battle action and stat changes should be changed back after battle action
- it might even be usefull to use the battleformula or some yep plugins (if compatible) to avoid making your own plugin
From your description, you would need what sounds like a (hopefully) simple plugin to hook into the basic hit/evasion check functions and make the state-related checks that you are describing. There are also some existing plugin libraries (Yanfly, etc.) that have provided their own framework for accomplishing the same thing via note tags in the editor.

I think we have the gist of what you want to do from your first post, but before anyone can help you code it, you need to give some concrete information such as:

"if the enemy has state id 5 and attacks an actor with state id 6, the actor should get +15% evasion"

Granted, my wording isn't great, but I hope you get the idea in terms of providing information that someone can code with versus more of the general gist.
the state itself wont interact..

you can use scripts that check which states are active and do things related to the result..

but before you build these scripts (or get help to do so) , you need to know the timing when this should happen or you would have to get these scripts running parrallel all the time.. (alltime parrallel is not recommended)

you might even not need scripts if you use the state check from the editor, with "if conditions"..

(i dont use mz so i cant help much with exact scripts but it should be something with "isStateAffected".. for state checks)

edit.
- i guess the timing is battlemode related with active battler and target battler as identifier..
- and to change the stats of acting and target battler you might need scripts, because the things you can add to states by default wont check any battlers state ect..
- it should probably be executed before battle action and stat changes should be changed back after battle action
- it might even be usefull to use the battleformula or some yep plugins (if compatible) to avoid making your own plugin
I just want to make sure I'm understanding at least a little of what you're telling me.

So I need to make a script, and there will be a way I'll be able to tell within the script that I am in a battle. I don't understand anything else you're trying to tell me no matter how many times I read it. I'm sorry.
From your description, you would need what sounds like a (hopefully) simple plugin to hook into the basic hit/evasion check functions and make the state-related checks that you are describing. There are also some existing plugin libraries (Yanfly, etc.) that have provided their own framework for accomplishing the same thing via note tags in the editor.

I think we have the gist of what you want to do from your first post, but before anyone can help you code it, you need to give some concrete information such as:

"if the enemy has state id 5 and attacks an actor with state id 6, the actor should get +15% evasion"

Granted, my wording isn't great, but I hope you get the idea in terms of providing information that someone can code with versus more of the general gist.
I don't want someone to code it for me or to use a preexisting plugin to do all the heavy lifting. The reason I didn't give any numbers is because I wanted to do it myself but I just don't know where to start. I'm sorry I didn't really make that clear.

I think I might need to reword it though.. if an enemy/actor has states x/y then they gain +z% physical evasion against any enemy/actor without states x/y.

I'm sorry if I completely misunderstood what you were trying to say. I'm having trouble with comprehension.
I don't want someone to code it for me

Good! And fair enough.

In that case, your starting point might be the rmmz_objects.js file. You can try taking a look at the the Game_Action.prototype.apply and Game_Action.prototype.itemEva functions.

In the same file, Game_BattlerBase.prototype.isStateAffected provides a function to determine if an actor or an enemy is affected with a state.

The forums also have a plugin creation tutorial that might help you along your way.

Good luck! I hope you'll give this a go. Solving these mechanical challenges can be really satisfying.
Good! And fair enough.

In that case, your starting point might be the rmmz_objects.js file. You can try taking a look at the the Game_Action.prototype.apply and Game_Action.prototype.itemEva functions.

In the same file, Game_BattlerBase.prototype.isStateAffected provides a function to determine if an actor or an enemy is affected with a current state.

The forums also have a plugin creation tutorial that might help you along your way.

Good luck! I hope you'll give this a go. Solving these mechanical challenges can be really satisfying.
Thank you kindly for this advice and assistance in showing me where I can get started, a link to a guide, and some specifics that might help me. I have been working on this project for ten hours today so I will look at this after work tomorrow.
So I need to make a script, and there will be a way I'll be able to tell within the script that I am in a battle. I don't understand anything else you're trying to tell me no matter how many times I read it. I'm sorry.

I don't want someone to code it for me or to use a preexisting plugin to do all the heavy lifting.

The last time I programmed anything was a Doom 2 mod two years ago but this is a totally different can of worms.
It really sounds like you should be looking at already-made plugins. I'm absolutely not going to tell you that you can't accomplish this on your own, but the investment of time and effort would be kind of pointlessly large.

Depending on exactly what you did, a mod for Doom 2 likely involved little to no actual programming, as it's more getting a text dump of the code and swapping values around. If that presumption is correct and you have no useful coding experience, learning JavaScript to get to the point of making this plugin would take a long time...or you can simply download VisuStella Battle Core and Skills and States and have all of it already made for you.

Just type in the notetags to do what you want and you're done.

Even those of us who have the skill level to write plugins also use plugins written by other people - it's a waste of time to recreate something that's already made.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-two-states-that-interact-with-each-other-and-with-nothing.154628/