request_to_generate_chunks

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
Finndibaenn
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Feb 21, 2014 8:53 pm
Contact:

request_to_generate_chunks

Post by Finndibaenn »

Hi

I'm trying to use this api (introduced in 0.12), but i'm not sure what parameters to provide .

According to http://lua-api.factorio.com/0.12.31/Lua ... ate_chunks it expects
Parameters
position :: Position: Where to generate the new chunks.
radius :: uint: Radius from position to generate new chunks in.
are position and radius tiles ? or chunks ? or different units ?

when listening to on_chunk_generated i don't seem to receive creation events for the chunks i requested

Finndibaenn
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Fri Feb 21, 2014 8:53 pm
Contact:

Re: request_to_generate_chunks

Post by Finndibaenn »

I seem to have finally figured it out.
If anyone is interested, position is tilebased (eg player.position()), but radius is chunk based , eg 2 will request 2 blocks (each 32 tiles wide) aroud that position

SirRichie
Fast Inserter
Fast Inserter
Posts: 244
Joined: Wed Feb 25, 2015 4:50 pm
Contact:

Re: request_to_generate_chunks

Post by SirRichie »

Thanks! This actually helped me

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: request_to_generate_chunks

Post by orzelek »

Docs might need to be amended to include this info.

Post Reply

Return to “Modding discussion”