Initial Map Scan
Initial Map Scan
Recently I've been starting a lot of new games, messing around with different plans for the early game and such. Instead of running around checking starting areas to see if I want to keep them, I've been using the console to reveal a 128x128 tile grid (around double the starting area) around me, without moving. The idea is that before landing, the player character did a scan of the landing zone to see if it is a suitable area to build a factory. Having this functionality done automatically as an "Initial Scan Mod" or something similar would be somewhat interesting. I'm just not sure how to implement it.
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Initial Map Scan
register a event handler to on_init
That will then scan the map accordingly
That will then scan the map accordingly
Re: Initial Map Scan
You can write your own custom scenario, and inpu the chart_map function into the control.lua...Vin wrote:Recently I've been starting a lot of new games, messing around with different plans for the early game and such. Instead of running around checking starting areas to see if I want to keep them, I've been using the console to reveal a 128x128 tile grid (around double the starting area) around me, without moving. The idea is that before landing, the player character did a scan of the landing zone to see if it is a suitable area to build a factory. Having this functionality done automatically as an "Initial Scan Mod" or something similar would be somewhat interesting. I'm just not sure how to implement it.
In fact i just wrote up a scenario for you quickly... Just extract into your scenario folder, and when the game starts it will chart the specified area.
The code for area scanned is in the control file, and looks like this:
Code: Select all
function chart_map()
game.forces.player.chart(game.surfaces.nauvis,{{-128, -128}, {128, 128}})
end
Re: Initial Map Scan
Can this be used in coop MP games?Klonan wrote:You can write your own custom scenario, and inpu the chart_map function into the control.lua...
In fact i just wrote up a scenario for you quickly...
Re: Initial Map Scan
ratchetfreak wrote:register a event handler to on_init
That will then scan the map accordingly
Thank you both!Klonan wrote:<snip> custom scenario </snip>
Re: Initial Map Scan
Peter34 wrote:Can this be used in coop MP games?Klonan wrote:You can write your own custom scenario, and inpu the chart_map function into the control.lua...
In fact i just wrote up a scenario for you quickly...
Yep totally. I havent tested it, but there is absolutely no reason that it shouldn't work.
No problem at allVin wrote: Thank you both!
Re: Initial Map Scan
Cool, but how exactly do I set up a scenario-based MP game? I'm used to just using the "New Game" option. Is there a way to play a scenario in MP?Klonan wrote:Peter34 wrote:an this be used in coop MP games?
Yep totally. I havent tested it, but there is absolutely no reason that it shouldn't work.
-
- Filter Inserter
- Posts: 310
- Joined: Fri Nov 07, 2014 3:46 am
- Contact:
Re: Initial Map Scan
You can launch the scenario, then save, then load the save in a multiplayer game
Re: Initial Map Scan
Okay.LordFedora wrote:You can launch the scenario, then save, then load the save in a multiplayer game
Would be nicer to have a mod for it, though.
Re: Initial Map Scan
What exactly is the console command?Vin wrote:Recently I've been starting a lot of new games, messing around with different plans for the early game and such. Instead of running around checking starting areas to see if I want to keep them, I've been using the console to reveal a 128x128 tile grid (around double the starting area) around me, without moving. The idea is that before landing, the player character did a scan of the landing zone to see if it is a suitable area to build a factory. Having this functionality done automatically as an "Initial Scan Mod" or something similar would be somewhat interesting. I'm just not sure how to implement it.
Re: Initial Map Scan
Okay, it's what Klonan wrote, just with a /c in front of it.Peter34 wrote:What exactly is the console command?
- Phillip_Lynx
- Filter Inserter
- Posts: 541
- Joined: Mon Jul 21, 2014 6:00 pm
- Contact:
Re: Initial Map Scan
I think (slightly modifyed the quote below)Peter34 wrote:...
What exactly is the console command?
[edit]Klonan wrote:......Code: Select all
/c game.forces.player.chart(game.surfaces.nauvis,{{-128, -128}, {128, 128}})
Ninjaed by the questioner
[/edit]
Re: Initial Map Scan
Ok i posted it up as a mod:Peter34 wrote:Okay.LordFedora wrote:You can launch the scenario, then save, then load the save in a multiplayer game
Would be nicer to have a mod for it, though.
https://forums.factorio.com/forum/vie ... 92&t=15434