How to get the map size?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

How to get the map size?

Post by aubergine18 »

I'm trying to determine the bounds of the map, or at least the size that's been generated to some extent, cumulatively for all forces, so as to randomly place an entity somewhere within the existing rendered part of the map. Looking through the API, there seems to be no simple way to do this, other than checking multiple chunks on the main surface to see which exist. Any ideas?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

Post Reply

Return to “Modding help”