I'm looking for a way to reset an entire map via one script call.
I know this is possible with event pages, but I'm trying to do this for 16ish maps with 40~100 events on each map..
Having a script call to do this would be enormous! Is this tough to do?
What are you trying to accomplish?
Resetting a map is as easy as simply reloading it, but that comes with a lot of consequences.
Just to reset the map to it's original state, no self switches on, people alive, etc
Best case scenario, a script call that says ->reset map 1
Event positions and such things are automatically reset on entering a map - in fact you need a script to store a change in event positions to prevent this.
So the only things that would need reset are the switches, self-switches and variables used on that map.
There probably is a way to automate that for self-switches by script, but to reset general switches and variables automatically can cause a lot of logic problems. Better you make a common event "reset for map xy" and manually control them back.
Self switches are my main concern. If I have to manually set switches and variables I have no problem with that.
Ok then let's start with something simple
class Game_Map def reload_map setup(@map_id) SceneManager.scene.instance_variable_get🙂@spriteset).refresh_characters endendScript call: $game_map.reload_mapNo different from exiting and re-entering a map.
This works perfect for resetting the map to its condition from within the map. edit: This actually pans your camera off the center of your character
Now is there a way to globally reset all switches for that map via script?
A way to do:
Event 1 in this map = self switch a/b/c/d off
is all I need. I can repeat this 100 times if need be and set it in the aforementioned script.
I can then call the script and copy pasta on each map. It would reduce the workload by many many hours