chunks coordinates /32 ?

Place to post guides, observations, things related to modding that are not mods themselves.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

chunks coordinates /32 ?

Post by binbinhfr »

Hi,

http://lua-api.factorio.com/0.13.5/LuaS ... get_chunks

chunks coordinates are not "real-world" coordinates, but on a larger x32 scale.
That's what you are using when you are calling get_chunks() and is_chunk_generated(position)

I wonder if the request_to_generate_chunks(position, radius) function works in the same x32 coordinate reference, or in the real-world coordinates ?

I cannot really manage to check/test it...

So is any dev can confirmed ?
My mods on the Factorio Mod Portal :geek:
User avatar
Afforess
Filter Inserter
Filter Inserter
Posts: 422
Joined: Tue May 05, 2015 6:07 pm
Contact:

Re: chunks coordinates /32 ?

Post by Afforess »

request_to_generate_chunks uses the real world coordinates. The radius is in chunks though. is_chunk_generated is in chunks.
orzelek
Smart Inserter
Smart Inserter
Posts: 3928
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: chunks coordinates /32 ?

Post by orzelek »

It's a bit confusing to be honest.
Would be nice if there would be some consistent way of talking to chunk-based functions and automatic x/y to chunk coord conversion.
Post Reply

Return to “Modding discussion”