Location of RegionID's XY Pos Data?

The original plan was to manually store a heap of XY data in a VariableArray, but then I thought that painting a region would probably create that data for me. So the question is does anyone know where that data is stored or if its even accessable? From either project files(hopefully unencoded...) or inengine?
The original plan was to manually store a heap of XY data in a VariableArray, but then I thought that painting a region would probably create that data for me. So the question is does anyone know where that data is stored or if its even accessable? From either project files(hopefully unencoded...) or inengine?
You need to learn the engine more. I assume you mean to do this...

Spoiler: images
1745201072183.png

1745201093542.png

1745201168002.png

1745201222847.png
Parallel process event.
You need to learn the engine more. I assume you mean to do this...

Parallel process event.
Well you'd be right that I need to learn the engine more since this took a minute or two to wrap my head around... I'm assuming that you're checking the player's XY then what region its in, then finally a conditional branch to apply code for matching regions?

A bit of backstory was needed I guess. I'm gathering XY positions for viable tiles for a randomiser that spawns events. While I could input all the viable tiles manually I was looking for a way to ease the work load eg. using region paint to hopefully find that data and copy paste it.
The randomiser would then pick a random XY from the Variable Array spawning an event at that position.
My suggestion is using dummy events (transparent ones with through on), instead of regions.
They you can just get their locations much easier.
You can get regions location yes, but not without checking every grid of the map.
I'm gathering XY positions for viable tiles for a randomiser that spawns events.
Are the tiles where you want to spawn events randomized on the map?
If not then you would know the positions and then just pick one.
If yes then you would start with doing the randomization on the map and then do a search for the events you placed down. Keep in mind that you will have to place events to get the locations later, otherwise you would have a database of available spots and would randomly pick one from your list to have as a spawner. repeat until you have how many spawners you want.
You can do the same process I did above to find the event position.
Are you doing this all in events or code?
Are the tiles where you want to spawn events randomized on the map?
No, the maps are partially randomised(paths between rooms) but the spawning locations arn't(floor space of the rooms)(one of these tiles will be chosen at random which is the original question of how can I quickly gather those XY positions to later input them into that randomiser since manually hovering over the square and recording each XY for large maps would be time consuming).
Are you doing this all in events or code?
All events. Using the script event for the arrays though.

They you can just get their locations much easier.
You can do the same process I did above to find the event position.
I don't need to know where the events are spawned(although the code I'll be using records that anyway), just wanted a quick way of copying where I can spawn them. Guess I'll do it the long way and manually record all the spawn locations for my randomiser.
I know. I mean if you set the dummy event's through on, you can spawn another event in its place?

If you still want to get the region's xy location, you can use a loop, with map size and such, which is very slow in my opinion.

pseudocode:

locations = []
for x = 0 ; x<map_width; x++
for y=0; y<map_height; y++
regionid = get_regionid(x,y)
if regionid == spawn_region_id
locations.push([x, y])
end
end
end

If you use event commands, you can replce the for part with a loop and others with variables. But the idea is the same.
I know. I mean if you set the dummy event's through on, you can spawn another event in its place?
Oh I see, I read your comment wrong. Yes if using events to gather the XY positions is easier than my random idea of using regionIDs then by all means I'd like to hear about how you'd go about doing that.
I'll give the code above a go in the mean time. Thanks.
OK, just the code is pseudo code, I don't have a vxa to test currently.
I think its against this forums rules to post AI gen scripts so I won't. But using chatgpt I got it working using your pseudo code, thanks this does exactly what I wanted.

Edit: FYI the main changes were these.
Code:
for x in 0...$game_map.width
regionid = $game_map.region_id(x, y)

Original thread: https://forums.rpgmakerweb.com/threads/location-of-regionids-xy-pos-data.177110/