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

Awesomejr44

The Ultimake Le-Chonker
Veteran
Joined
Dec 24, 2015
Messages
91
Reaction score
122
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
Veteran
Joined
Jul 2, 2014
Messages
5,566
Reaction score
3,626
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.
 

Awesomejr44

The Ultimake Le-Chonker
Veteran
Joined
Dec 24, 2015
Messages
91
Reaction score
122
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!"
Veteran
Joined
Feb 7, 2013
Messages
3,132
Reaction score
2,423
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
Veteran
Joined
Jul 2, 2014
Messages
5,566
Reaction score
3,626
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!"
Veteran
Joined
Feb 7, 2013
Messages
3,132
Reaction score
2,423
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 Profile Posts

Sometimes I wonder why I still try and recruit others to help with my games. It never works.
ScreenShot_10_3_2022_4_27_17.png
welp, thanks to Luna MV, I was able to add the Balloon as a window... thus allowing me to edit the font color and outline... so now it looks like comic bubbles above characters. I have NO idea why I couldn't get this to work through more conventional means, but here we are.
CUTE CUTE CUTE.gif
I cannot cease doing cute art
War and Wonder is a 100% choice-based open-world visual novel.
1664821313732.png
1664821466359.png
1664821547746.png
Going live soon on Twitch, and will continue Fortunastreet's game "Verloren". For those who are curious, you are welcome to join ;)

-> Franz' Twitch channel

Forum statistics

Threads
125,749
Messages
1,173,222
Members
164,910
Latest member
Daarko4
Top