Page 1 of 1

Forcing initial map generation to scan large area

Posted: Mon Nov 06, 2017 11:45 am
by evildogbot100
Is there a way to force the game generate and scan large area of the map on the generation process? AFAIK Klonan's initial scan mod now is just requesting scan at the first tick, not from start.

Re: Forcing initial map generation to scan large area

Posted: Mon Nov 06, 2017 11:55 am
by Bilka
What's the difference between the first tick and the start?

Re: Forcing initial map generation to scan large area

Posted: Mon Nov 06, 2017 1:00 pm
by evildogbot100
The game only generate 1 chunk per tick if you request chart on the first tick. In contrast, if it is done before the game started like in the current initial map generation, it will generate all chunk as fast as possible. I don't want to wait at least 2 minutes to see 100x100 chunk area around me.

Re: Forcing initial map generation to scan large area

Posted: Mon Nov 06, 2017 7:38 pm
by darkfrei
https://wiki.factorio.com/Console#Revea ... the_player
/c local radius=150
game.player.force.chart(game.player.surface, {{game.player.position.x-radius, game.player.position.y-radius}, {game.player.position.x+radius, game.player.position.y+radius}})
and just

Code: Select all

/c game.forces.player.chart(game.player.surface, {{x = -4000, y = -4000}, {x = 4000, y = 4000}})

Re: Forcing initial map generation to scan large area

Posted: Wed Nov 08, 2017 5:18 am
by evildogbot100
Not what I want darkfrei, I want to have 100x100 area scanned the from the very first tick I pop up in the factorio world

Re: Forcing initial map generation to scan large area

Posted: Wed Nov 08, 2017 8:20 am
by darkfrei
evildogbot100 wrote:Not what I want darkfrei, I want to have 100x100 area scanned the from the very first tick I pop up in the factorio world
On first tick place custom radar, which open this area and don't makes scanning.

Re: Forcing initial map generation to scan large area

Posted: Thu Nov 09, 2017 9:56 am
by bobingabout
Didn't 0.15 add a new option to start the game with a larger area of the map revealed?

I'd look into that if I were you (can't myself, don't have access to the game here)

Re: Forcing initial map generation to scan large area

Posted: Thu Nov 09, 2017 11:36 am
by Klonan
In 0.16 you can do

Code: Select all

game.surfaces[1].force_generate_chunk_requests()
which will force generation of all requested chunks in that tick

Re: Forcing initial map generation to scan large area

Posted: Thu Nov 09, 2017 5:31 pm
by eradicator
Klonan wrote:In 0.16 you can do

Code: Select all

game.surfaces[1].force_generate_chunk_requests()
which will force generation of all requested chunks in that tick
Will this have some sort or progress bar? Or more correctly: If i call this in on_init after requesting a (large) bunch of chunks, will the player stare at a black screen (good?) while the game "freezes" to generate the chunks, or will they already be able to see the first screen of the starting area while the game is frozen (bad)?

Re: Forcing initial map generation to scan large area

Posted: Thu Nov 09, 2017 7:23 pm
by darkfrei
So, first (Tick #0) tick opens always 13x13 =169 chunks, then one chunk on tick #32:
log of chunks creating

Re: Forcing initial map generation to scan large area

Posted: Thu Nov 09, 2017 8:32 pm
by Klonan
eradicator wrote:
Klonan wrote:In 0.16 you can do

Code: Select all

game.surfaces[1].force_generate_chunk_requests()
which will force generation of all requested chunks in that tick
Will this have some sort or progress bar? Or more correctly: If i call this in on_init after requesting a (large) bunch of chunks, will the player stare at a black screen (good?) while the game "freezes" to generate the chunks, or will they already be able to see the first screen of the starting area while the game is frozen (bad)?
You won't see anything, it will be frozen on the generate map GUI, as if nothing has changed, so essentially it works perfectly as the OP would desire

Re: Forcing initial map generation to scan large area

Posted: Sat Nov 11, 2017 10:48 am
by evildogbot100
Is there any equivalent method in 0.15?

Re: Forcing initial map generation to scan large area

Posted: Sat Nov 11, 2017 11:16 am
by Klonan
evildogbot100 wrote:Is there any equivalent method in 0.15?
No