MiLo-Katergaris

Veteran
Veteran
Joined
Apr 17, 2019
Messages
34
Reaction score
3
First Language
English
Primarily Uses
RMMV
So I'm probably missing something obvious here but I can't find a way to set an event so that it changes based on the lead actors state.

For example: an event has a blank page until the lead actor has the state 'Detect Magic'. At which point a flashy animation will play and the party can pick up the Longsword of Smiting.

Whats the best way to go about this?

I know I can make a skill that flips a switch for a while instead but I'd like to avoid that if possible as I have passive states and I'd like to have some work passively.

I am using Yanflys plugins if there's an answer there.
 
Last edited:

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
408
Reaction score
180
First Language
PT-BR
Primarily Uses
RM2k3
It is in tab 2 of the "Conditional Branch":
RpgMV-IF-State_rez.png

Good luck
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,506
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
you can't tie the states directly to events.

and no, the solution mentioned above has a lot of problems, especially if you want to use it for multiple events as it would need a parallel process constantly checking for the state, and he missed the difference between actor ID and leader and a few other things.

I would suggest a slightly different approach: activate a switch "detect magic" when the state should be active, and have the events conditioned on that switch.
depending on how your detection should work, this will either require a common event on the skill (might cause problems to detect when the state goes away) or a single parallel process common event checking for multiple states on multiple actors and changing switches based on the results.
 

MiLo-Katergaris

Veteran
Veteran
Joined
Apr 17, 2019
Messages
34
Reaction score
3
First Language
English
Primarily Uses
RMMV
It is in tab 2 of the "Conditional Branch":
View attachment 187042

Good luck
Thanks, but this doesn't do what I want though as it is inside the event and can't change the event image. I edited my example from poison to detect magic to better show what I mean.

you can't tie the states directly to events.

and no, the solution mentioned above has a lot of problems, especially if you want to use it for multiple events as it would need a parallel process constantly checking for the state, and he missed the difference between actor ID and leader and a few other things.

I would suggest a slightly different approach: activate a switch "detect magic" when the state should be active, and have the events conditioned on that switch.
depending on how your detection should work, this will either require a common event on the skill (might cause problems to detect when the state goes away) or a single parallel process common event checking for multiple states on multiple actors and changing switches based on the results.
Yeah, having a usable skill call a common event instead of a passive state would work and while it won't fit how I imagined it working, it would be a 'good enough' solution.

As this will work like a 'treasure hunt' ability where the player can find hidden items throughout the world I'm not sure I want to create that many parallel process events to be running in the background.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,506
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
I'm not sure I want to create that many parallel process events to be running in the background.
you only need one parallel process if you go by my second suggestion. this one event would have to have all the checks for everything and would be a bit complex however.
 

MiLo-Katergaris

Veteran
Veteran
Joined
Apr 17, 2019
Messages
34
Reaction score
3
First Language
English
Primarily Uses
RMMV
you only need one parallel process if you go by my second suggestion. this one event would have to have all the checks for everything and would be a bit complex however.
I've been wary of Parallel Processes because of the potential for lag so I'm not as familiar with them. There will be hidden items on most maps so it doesn't make much sense to have a conditional switch, but other than that I would just use

$gameParty.leader().actorId() == 2

to make sure which actor is the leader and then set conditional branches to see if they have any of the states and if they do flip the switch, right?

Does this look about right? Thanks so much for your help!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
911
Reaction score
480
First Language
English
Primarily Uses
RMMV
You can do this without a parallel common event by using a free plugin. Yanfly Buffs & States allows you to execute code as a Custom Apply Effect and Custom Remove Effect.

So you'd give your Detect Magic state notetags to turn your switch on and off when the state is applied and removed.

And there's only a potential for lag with parallel processes if you have a lot running on a map at once. It's a little silly to ignore their existence and usefulness entirely :wink:
 

MiLo-Katergaris

Veteran
Veteran
Joined
Apr 17, 2019
Messages
34
Reaction score
3
First Language
English
Primarily Uses
RMMV
You can do this without a parallel common event by using a free plugin. Yanfly Buffs & States allows you to execute code as a Custom Apply Effect and Custom Remove Effect.

So you'd give your Detect Magic state notetags to turn your switch on and off when the state is applied and removed.

And there's only a potential for lag with parallel processes if you have a lot running on a map at once. It's a little silly to ignore their existence and usefulness entirely :wink:
I am using Yanflys Plugins (which are sadly no longer free) so this solution would be great! I'm not sure how to create the effect I'm looking for this way though. Applying the state can call the switch, but then the switch is simply active no matter who is the party leader.

I'm sure there's a way with the Lunatic code to get it working but without some pointers I'm afraid I'm lost.

And yeah, Parallel Processes are a useful tool and while I've been avoiding them I don't intend to do so forever. I'm working on my game a bit at a time so I've been pushing off using them until I run into a situation where I need it. I'm only one guy, I don't think it's silly to put off working with the more complicated/tricky aspects of the Maker until I'm more comfortable and have a better understanding of the system. ‍♀️
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,140
Reaction score
14,647
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.



How does the leader / actor gain the state? If it is via an item or an event, can't you just turn on a switch at the same time, then make the event page conditional on that switch? (sorry, I didn't read through all of the posts, so I don't know if that has already been mentioned)
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
911
Reaction score
480
First Language
English
Primarily Uses
RMMV
I am using Yanflys Plugins (which are sadly no longer free)
Some of them are.
Applying the state can call the switch, but then the switch is simply active no matter who is the party leader.
If it only does something when the party leader uses it...why don't you simply restrict the Detect Magic skill to the party leader? I'll show you how to check it, but it makes more sense to say "if this skill doesn't do anything for other characters, I won't give it to them."
Or can any character be the party leader, and Detect Magic only works if the player happens to put the right person in front? That doesn't seem fun for the player, to have to shuffle the party around...it's not like the characters can't see anymore if they're not standing in front.
I'm sure there's a way with the Lunatic code to get it working but without some pointers I'm afraid I'm lost.
This should work when your party leader casts Detect Magic which applies the state to themself. It will not make it stop working if you allow the player to change the party order and take that character out of the party leader position - you would have to write a plugin that modifies the formation function, as best as I can think.

I continue to recommend that you not care about the party leader part. If you agree, just remove the line starting with "if"
Code:
<Custom Apply Effect>
if ($gameParty.leader()==user)
   $gameSwitches.setValue(ID, true);
</Custom Apply Effect>
I didn't bother putting the party leader check here, it just turns the switch off. If non-leader characters can use Detect Magic for something else, just put the exact same if check from above.
Code:
<Custom Remove Effect>
$gameSwitches.setValue(ID, false);
</Custom Remove Effect>
In both cases, replace "ID" with the id of your Detect Magic switch.
I don't think it's silly to put off working with the more complicated/tricky aspects of the Maker
No, but there's nothing intrinsically complicated about parallel processes. They do the same thing that every other event in the game does, they just do it all the time.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

I wish I can work faster on my game. But I don't want to get burned out. :(
I've been working on something on and off for a few years now, and I've been reluctant to share any details on the project before I had anything playable because I did not want to generate hype only for the project to go back on hiatus. That being said I believe what I'm working on is very unique and pushes the boundaries of what RPG Maker projects can be. Bold claims, I know but just wait.
Happy Mother's Day to all the moms :)
Create Anime Art w/ AI, Tall Sprites with Aurora, Customize Variable Display | RPG Maker News #34

[My favorite slow moving track I've made so far]

Forum statistics

Threads
111,204
Messages
1,059,241
Members
144,455
Latest member
epokshiem
Top