Question about chunk positions

Place to get help with not working mods / modding interface.
orzelek
Smart Inserter
Smart Inserter
Posts: 3928
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Question about chunk positions

Post by orzelek »

I'm looking at docs for those two functions:
API docs wrote:is_chunk_generated(position) → boolean
Is a given chunk generated?

Parameters
position :: Position: The chunk's position.
request_to_generate_chunks(position, radius)
Request that the game's map generator generate chunks at the given position for the given radius on this surface.

Parameters
position :: Position: Where to generate the new chunks.
radius :: uint: Radius from position to generate new chunks in.
I have a question - how I should send positions to those functions?
Do they take tile coordinates and convert them to chunks or they need chunk based coordinates?
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Question about chunk positions

Post by aubergine18 »

I've only dabbled with chunks but from what I've tried so far it seems you just send a normal position and the game works out which chunk it's in.
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”