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

Saliacoel

Villager
Member
Joined
Jul 28, 2021
Messages
28
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

Veteran
Veteran
Joined
Mar 5, 2013
Messages
38,500
Reaction score
10,916
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,040
Reaction score
16,852
First Language
English
Primarily Uses
RMMV

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

 

Iron_Brew

Veteran
Veteran
Joined
Nov 19, 2021
Messages
756
Reaction score
2,172
First Language
English
Primarily Uses
RMMV

Latest Threads

Latest Posts

Latest Profile Posts


3d Yandere RPG maker game by labylin
With this map, I tried to emulate a Gameboy Color/Advance style.
Hacknet's a hypocritical game.
It's a game about hacking... that's been made in Net framework and the code was left unobfuscated.
So it's a game about hacking that's vulnerable to hacking.
The irony. :p
My message count stands at 999. I was going to ask if I get anything special for hitting 1,000 but then I looked at the post count of some other people who shall remain nameless. Now I don't feel special anymore. I need to either start posting a lot more or wipe my tears away and just focus on my game. Hopefully my keyboard is waterproof. ;_;

Forum statistics

Threads
131,768
Messages
1,223,177
Members
173,535
Latest member
Hoangvu0601
Top