How to make a state not applicable outside of battle?

pedrocarsamar

Veteran
Veteran
Joined
Jun 19, 2017
Messages
30
Reaction score
14
First Language
portuguese
Primarily Uses
RMVXA
Hello. One of my characters has this skill which removes negative conditions and, additionally, applies a "prevention state" to the target, so that his ally not only gets health, but prevents further negative states by a certain number of turns. (Hylics' players know precisely what it means) I want this skill to work both on battle and on menu, but differently.

* On battle, I want the skill to heal negative conditions AND apply the "prevention state";
* But on the menu, I want the same skill to heal negative conditions, but not to apply the "prevention state", since the player could do this before every battle to get advantage.

The lazy way to get around with this issue is to create two skills: one usable on battles and one usable on menus. But I particularly think this would pollute the skill repertoire.

Is there a way to do what I'm planning?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,755
Reaction score
9,890
First Language
German
Primarily Uses
RMMV
That method isn't "lazy", it's basically the only one that works in the default engine of VXA.

the only alternative would be with using scripts that add new options to the engine - yanfly's lunatic states might contain a solution or something similar.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,096
Reaction score
3,248
First Language
English
Primarily Uses
RMMV
But on the menu, I want the same skill to heal negative conditions, but not to apply the "prevention state", since the player could do this before every battle to get advantage.
The other easy thing to do is add a Turn 0 troop event to your troops that checks for any party members to have the preventative state and remove it.
 

pedrocarsamar

Veteran
Veteran
Joined
Jun 19, 2017
Messages
30
Reaction score
14
First Language
portuguese
Primarily Uses
RMVXA
Thank you for your contributions. I took a sight over the Lunatic States before making this thread, but I'm too dumb to make it work. For the time being, Turan's suggestion seems to be the best thing I could right now. So I'll just stick to it, unless I find another solution.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
4,287
Reaction score
1,168
First Language
English
Primarily Uses
RMVXA
Could you not have the skill call a common event and then have the common event check if the player is in battle, then apply the state if true.
You can do a conditional branch script check in the CE
if SceneManager.scene_is?(Scene_Battle)
add state
end branch
 
Last edited:

pedrocarsamar

Veteran
Veteran
Joined
Jun 19, 2017
Messages
30
Reaction score
14
First Language
portuguese
Primarily Uses
RMVXA
Could you not have the skill call a common event and then have the common event check if the player is in battle, then apply the state if true.
You can so a conditional branch script check in the CE
if SceneManager.scene_is?(Scene_Battle)
add state
end branch
That's actually a great idea, thx. But as I was trying to implement it, I've just got a new insight. Since I'm using Yanfly's follow up skill script, I can make the healing skill be followed by another that adds the state, but only if "SceneManager.scene_is?(Scene_Battle)" is true. And it surprisingly worked
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

ScreenShot_8_19_2022_8_51_4.png
Both Mike and Ray here are in a "HYPE!" state after Mike uses "Wild Party", which also heals everyone. they'll do more damage and counter more often, but defense is lower along with hit rate.
WHEEL3.gif
Ooker spookers and fun attack mechanics! What a Friday!
Not today... Not today...
I guess I should send my CV to Hasbro. I've made Monopoly cheaters edition more fun and challenging. I've developed custom cheats and chest/chance cards for it. And I've cleared many nightmares through my cards and rules.
I'm only missing 2 more bgms for my game but maaaaan, searching for these tracks is killing me. Can't find anything good to replace MZ's Theme 2 and Scene 5 I have as placeholders. Everything is too epic or too evil or too alarming. That 'scene 5' track in particular would fit nicely with my scene. Well, at least I finally figured what my last click-fest of a gameplay element will be like, so something positive :D

Forum statistics

Threads
124,707
Messages
1,165,412
Members
163,520
Latest member
Foxx042
Top