How do I make a state that inflicts another state upon expiring in MV?

LeChonker

Regular
Regular
Joined
Dec 24, 2015
Messages
82
Reaction score
120
First Language
English
Primarily Uses
RMMV
I'm trying to make a skill that increases the user's magical damage for 3 turns, then greatly decreases it once the first state runs out. I've made states for both stages of the skill, but I'm not sure how to get the second state to apply. Ideally, it should go something like this:

Player uses skill -> character gets state 1 -> 3 turns go by -> character loses state 1 and gains state 2 -> state 2 expires normally a few turns later

Getting state 1 to apply and expire as well as getting state 2 to expire is something pretty easy to do, so I'm good on those aspects, I just have no idea on how I can get that second state to apply. I'm using MV and have all of the Yanfly plugins (including the state ones) if those would make it easier to accomplish.

EDIT: I think I might have posted in the wrong area. It's been a while since I've been on these forums so I'm a little lost, so forgive me if I did indeed post in the wrong area of the forums. I'm very confused at where everything is right now XD
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,732
Reaction score
11,330
First Language
English
Primarily Uses
RMMV
You would put this in Plugin Requests, as there's no way to do this natively.

However, it's simple to do using Yanfly's Buffs & States Core.

In the first state's notes, you put:
Code:
<Custom Leave Effect>
user.addState(X);
</Custom Leave Effect>
where X is the ID of your second state.
 

LeChonker

Regular
Regular
Joined
Dec 24, 2015
Messages
82
Reaction score
120
First Language
English
Primarily Uses
RMMV
Ah, tyvm! I'll be sure to head over to Plugin Requests next time.
 
Last edited:

Milennin

"With a bang and a boom!"
Regular
Joined
Feb 7, 2013
Messages
3,275
Reaction score
2,672
First Language
English
Primarily Uses
RMMV
It is possible by having an event run at the end of every turn in battle which tracks when the status is applied and if it is applied, use a variable counter to count the turns (reset the counter at the end of battle, or when the status is re-applied to the character, or when the status is no longer on the character, or when it's reaches the final count). When it reaches the final count, apply the other status on the character.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
12,732
Reaction score
11,330
First Language
English
Primarily Uses
RMMV
It is possible by having an event run at the end of every turn in battle which tracks when the status is applied and if it is applied, use a variable counter to count the turns
That method only works correctly/smoothly if your state uses Turn End Auto-Removal. If it uses Action End or if it's removed by another effect, the new state will not be applied immediately.

I'm not saying your solution is bad, it will work perfectly well under those specific circumstances. I just want to make sure the OP understands how and when it will work, compared to the earlier solution that covers all bases.
 

Milennin

"With a bang and a boom!"
Regular
Joined
Feb 7, 2013
Messages
3,275
Reaction score
2,672
First Language
English
Primarily Uses
RMMV
That method only works correctly/smoothly if your state uses Turn End Auto-Removal. If it uses Action End or if it's removed by another effect, the new state will not be applied immediately.

I'm not saying your solution is bad, it will work perfectly well under those specific circumstances. I just want to make sure the OP understands how and when it will work, compared to the earlier solution that covers all bases.

That is true, however it is still very much possible to make it work either way using just event commands. Ideally, he would use the Advanced Combat Event™ system (ACE) for which I have finally uploaded videos and written a tutorial, but it's still awaiting approval on this website. However, simply implementing the ACE set up (video), followed by Custom States (video) and applying the turn counter to his own State with manual removal, it should work just fine.
I was even going to make another guide video inspired by this thread to explain step by step how to make this specific effect work (coming out some time next week). No, it won't cover every possible scenario in which it could work, as I don't know if the next State should only be applied if the old one expires, or if still gets applied even if the old State gets removed or renewed before it can expire. Whichever way he wants it to work, it's still very much possible using ACE.

The point about ACE is it can be applied to many different effects in many different scenarios, giving you great freedom and flexibility over how you want things in your combat system to work. Learning to use it will lessen the need for different plugins to get all these skill or passive effects to work that I see so often asked about on the forums. Learning to use it also helps to become more familiar with what event commands can do, rather than relying on plugin writers to solve your problems. This isn't to say plugins shouldn't be used, but when it comes to what ACE can accomplish, in a lot of cases it's just not a lot of extra work vs. the time you'd spend searching for the plugin you need and then figuring out how to make the plugin do what you want it to do (and then also hope it's compatible with the other plugins you might be using). Hell, it might even save you time, depending on how familiar you are with eventing.
 

Latest Threads

Latest Posts

Latest Profile Posts

Finally started working on my first game, let's see where this gets me :)
Gonna repost this since it's currently tied 1-1! We've seen Strength with our adventurers and Charisma with our merchants, so which DnD stat would you like to see in the next NPC for my advent calendar: Constitution or Wisdom?

And a bonus game: if you can guess what type of character each stat will represent, I’ll make your suggested sprite for Christmas! First person to get it wins, so make your guess!
Steam is going to be forcing me to update my desktop OS for Mac. It's a good thing that my laptop is Windows otherwise some of my work and a lot of game save files for 32-bit games would become unusable for a while.
Last day in Florida and then we head home. It was a fun, relaxing trip with just the wifey poo. Still managed to make some progress on my Game Jam project though.
Never fully realized that I had this account, nice start

Forum statistics

Threads
136,846
Messages
1,270,698
Members
180,613
Latest member
mememan
Top