RMMZ How to trigger common event upon "load game" (from save file) (Plugin?)

Saliacoel

Regular
Regular
Joined
Jul 28, 2021
Messages
31
Reaction score
8
First Language
English
Primarily Uses
RMMZ
How can I set up a trigger for a common event in RPG Maker MZ that activates when I load a saved game and enter the game?

Already tried asking chatgpt and searching online and everywhere.
I give up.
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,309
Reaction score
11,489
First Language
German
Primarily Uses
RMMV
Usually all savegames are self-contained, which means that they cannot detect anything outside their context and thereby not detect if they are loaded or not.

To solve that problem, you'll need a reference outside the game data, without that nothing is possible.

One way is a plugin for persistent variables, and then use a variable to coun t how often the game was saved.

Basically you'll need to compare one internal regular variable with the savecount to the external persistent variable - and if they are different then you'll know that the game was recently loaded.

Unfortunately even with that it is still a bit tricky to handle, but these hints should give you a starting point on how to handle this
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,960
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Thank you.

 

Iron_Brew

Regular
Regular
Joined
Nov 19, 2021
Messages
825
Reaction score
2,571
First Language
English
Primarily Uses
RMMV

Latest Threads

Latest Profile Posts

My game just got 35k downloads on Steam! Thank you everyone for helping me achieve this goal guys, I hope more people know more about Phil Alone!
I was wondering why Skyler's hair looked weird on their new sprite. Well I forgot adding their iconic hairband
Anyone up to give Holder, TRIDIUM, GenericFantasyDev and Black Mage the fight of their lives?
Go ahead.
"The internet made everyone way too comfortable with disrespecting each other and not getting punched in the face."
I woke up a touch early and was going to draw by the fireplace until it’s a more appropriate noise-making time, but I left my stylus AND my glasses (WHAT?!) upstairs and it’s just too cold to get out of the blanket now.

Forum statistics

Threads
134,872
Messages
1,251,441
Members
177,672
Latest member
XerxesTough
Top