Forcing initial map generation to scan large area

Place to get help with not working mods / modding interface.
evildogbot100
Fast Inserter
Fast Inserter
Posts: 155
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Forcing initial map generation to scan large area

Post 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.
Bilka
Factorio Staff
Factorio Staff
Posts: 3470
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Forcing initial map generation to scan large area

Post by Bilka »

What's the difference between the first tick and the start?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
evildogbot100
Fast Inserter
Fast Inserter
Posts: 155
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: Forcing initial map generation to scan large area

Post 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.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Forcing initial map generation to scan large area

Post 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}})
evildogbot100
Fast Inserter
Fast Inserter
Posts: 155
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: Forcing initial map generation to scan large area

Post 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
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Forcing initial map generation to scan large area

Post 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.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Forcing initial map generation to scan large area

Post 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)
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5412
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Forcing initial map generation to scan large area

Post 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
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Forcing initial map generation to scan large area

Post 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)?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Forcing initial map generation to scan large area

Post by darkfrei »

So, first (Tick #0) tick opens always 13x13 =169 chunks, then one chunk on tick #32:
log of chunks creating
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5412
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Forcing initial map generation to scan large area

Post 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
evildogbot100
Fast Inserter
Fast Inserter
Posts: 155
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

Re: Forcing initial map generation to scan large area

Post by evildogbot100 »

Is there any equivalent method in 0.15?
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5412
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Forcing initial map generation to scan large area

Post by Klonan »

evildogbot100 wrote:Is there any equivalent method in 0.15?
No
Post Reply

Return to “Modding help”