I'm in the process of trouble shooting this issue, I'm able to fill an entire 2500 tile map in one second using my Ritter.spawnEvent script call but it takes considerably longer when using regions to spawn events. I'll update here when I solve what's going on with the delay when region spawning.
for (let w = 0; w < $dataMap.width; w++) { for (let h = 0; h < $dataMap.height; h++) { Ritter.spawnEvent(2, 1, w, h) } }
this script call worked smoothly to fill an entire map, but that just places an event on every single tile which isn't quite what you need.
I edited that script call a little to include region ids and it does exactly what it seems like you need.
for (let w = 0; w < $dataMap.width; w++) {
for (let h = 0; h < $dataMap.height; h++) {
if ($gameMap.regionId(w, h) == 1) {
Ritter.spawnEvent(2, Math.randomInt(27) + 1, w, h)
} } }
so what this does essentially is it loops through every single tile on the game map once and checks if its regionId is 1 ($gameMap.regionId(w,h) == 1)
then if the regionId is 1 it will execute the script call where 2 is the SpawnMap ID, Math.randomInt(27) + 1 will pick a random eventId on the spawn map from 1-27 and w,h is the x,y coordinates of the tile it found.
this will fill up an entire map almost instantly with events (tested on a 50x50 map). this spawner wasn't really created with the idea of filling an entire region with events but I can add in a script call to do so shortly if needed.