Is it possible to remove enemies from the dataMap.encounter list

I am trying to prototype an idea where you can say: Remove troop id's x,y and z from region A.

the catch is that if troop X belongs to region A and B, then update the regionSet on the troop object to only have Region B.

I have all of this working. Accept one issue: When ever you leave the battle, enter a menu or do anything, obviously Scene_Map is refreshed thus the $dataMap.encounterList is also refreshed. I sort of found a way around this, but before I implement my ideaI am wondering if there is an easy easy via script to manipulate the contents of $dataMap.encounterList such that it stays upon scene change.
If you want this to be a permanent thing - remember what happened when you save & reload a game, the first approach I'd consider is making a dataMap variable within Game_System and changing scripts to look at that rather than the real $dataMap. This means it won't be rebuilt every time you open a menu then return to the map, and changes would be saved & loaded with your save file, so not replaced when you save, exit, and return later.


I haven't really looked at the $dataMap logic much - after looking at it, I might decide a different approach is better.


Edit: Maybe it's easier/better to just change the conditions under which $dataMap is refreshed/rebuilt.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-remove-enemies-from-the-datamap-encounter-list.52990/