map encounter problem

Ok, 

Here is a major exploitable glitch that I need to solve

Basically, I use erase event and turning off of a self switch to reset map encounters. I also use another event on the map to randomize the location and density of encounters

here's the gltich...

I realized a spider enemy was too weak when play testing. after i saved, shutdown the play test, and started it back up, the encounter re-spawned...

I want it to respawn when you leave and reenter the map. I could simply add more numbers to the location/density event... 

but then, that wouldn't solve the problem sense I want there to be a 1/3 chance of this enemy ambushing you when you go for a chest. help please...

FYI, this is a problem because the player could just restart a bunch of times and get easy level ups that way
Do you by chance have a screenshot of said event? That would help us help you a bit more. 🙂
In addition to what Oceaniqo requested, could you also tell us if you are using some kind of script as well? Or do you happen to be using script calls to turn off self-switches?
Erase event always resets when the map is loaded, whether via loading a save or entering the map. The only way around it that I can see (which is a tad complicated):

When fought, turn on self switch A, do *not* erase the event.

When you reenter the map, turn the self switch A for that event off via a script call. You can do that as follows:

$game_self_switches[[68, 73, 'A']] = false

Where 68 is the map of the event, 73 is the event.

This way they respawn.

However, in all honesty, if a player is determined enough to save and reload to respawn events, how is that much different from them exiting/reentering the map to respawn them?
@bgillisp:

Actually, Erase Event does not reset when you save then load a file. I have tried it several times and the event remained off the map until the player changes maps.
No, the event respawned because you made a change to your project.


By default, the map will only be "reset" when you go there from another map. However, when you're loading a saved game, it looks at an id set by the editor to determine whether you've made any changes to the game, and if you have, it will reload all the events as if you had just come there from another map.


This will not happen after you release your game to players. It is just an effect of you testing with a saved game while you're still doing development work.


Try it yourself ... fight the spider, save and close the game, then load the save file again without making any changes in the editor. The spider will not respawn.
ok, then i guess this post is pointless... lol
I imagine the logic here is that sometimes you are testing your game and see something that's not quite right, so you save, go to the editor, make the change, then resume your saved game. If you're on the same map that you've just changed, it stands to reason that you'd like to SEE the change straight away. If the above didn't happen, you'd need to leave the map and come back again to see the effect of your change.


If this is a problem for you and you would prefer that the map is not reset when you make a change, go to DataManager, find the method load_game_without_rescue, and comment out the line reload_map_if_updated.


Then of course, you will have to remember that changes you make in the editor will NOT appear on the map when you resume your game, unless you leave then come back again.


One way or the other, it's going to be confusing some of the time 🙂
Btw, it doesn't matter if you make changes or not, as long as you hit the save button or shortcut of the editor, it already counts as an "updated" version, hence the map reload will happen.
Btw, it doesn't matter if you make changes or not, as long as you hit the save button or shortcut of the editor, it already counts as an "updated" version, hence the map reload will happen.
I understand that now, and leave the map before making changes to it or anything on it

Original thread: https://forums.rpgmakerweb.com/threads/map-encounter-problem.36998/