[MOD 0.12.11+] Initial Map Scan
[MOD 0.12.11+] Initial Map Scan
Updated to 0.13: https://mods.factorio.com/mods/Klonan/InitialScan
This mod is simple dimple, people requested it.
This scans the map when you start a game.
set Chunks_To_Scan to any value you'd like, i have it set to 6, which is just bigger than a medium starting area i think... anyway let me know what you all think, suggestions, comments feedback etc.
Update: I have changed it so scan sized is based on starting area size, you can set a custom size if you'd like.
Mod spotlight by Xterminator
This mod is simple dimple, people requested it.
This scans the map when you start a game.
set Chunks_To_Scan to any value you'd like, i have it set to 6, which is just bigger than a medium starting area i think... anyway let me know what you all think, suggestions, comments feedback etc.
Update: I have changed it so scan sized is based on starting area size, you can set a custom size if you'd like.
Mod spotlight by Xterminator
- Attachments
-
- InitialScan_0.1.3.zip
- --Updated for 0.12.11
--Added forces and surfaces support - (1.01 KiB) Downloaded 4404 times
-
- InitialScan_0.1.2.zip
- Fixed crash if starting area size was 'none'
- (1008 Bytes) Downloaded 680 times
-
- InitialScan_0.1.1.zip
- -- Matched scan size to starting area size
- (1007 Bytes) Downloaded 278 times
-
- InitialScan_0.1.0.zip
- (910 Bytes) Downloaded 277 times
Last edited by Klonan on Thu Oct 22, 2015 5:56 am, edited 4 times in total.
Re: [MOD 0.12.x] Initial Map Scan
First, thanks for the mod!
Second - would it be possible to read mapgen settings and set the default initial reveal to equal the starting area? It doesn't sound like something that would be that simple, but I figured I'd ask. Then if people want to reveal more or less they can change the code themselves.
Second - would it be possible to read mapgen settings and set the default initial reveal to equal the starting area? It doesn't sound like something that would be that simple, but I figured I'd ask. Then if people want to reveal more or less they can change the code themselves.
Last edited by Vin on Tue Sep 01, 2015 2:50 pm, edited 1 time in total.
Re: [MOD 0.12.x] Initial Map Scan
I'm curious about exactly how big the various starting area size types are. Any way one of you guys can find out, by diving into the game's data files?
And thanks to Klonan for making this mod so quickly! He's a really cool guy!
And thanks to Klonan for making this mod so quickly! He's a really cool guy!
Re: [MOD 0.12.x] Initial Map Scan
Vin wrote:First, thanks for the mod!
Second - would it be possible to read mapgen settings and set the default initial reveal to equal the starting area? It doesn't sound like something that would be that simple, but I figured I'd ask. Then if people want to reveal more or less they can change the code themselves.
No problem! it was easy enough to write up and i learnt some stuff about remote.interfaces
Second, i've been reading up on the lua documentation and other stuff, but i cant find any easy simple way to read the value in the game, so im afraid for now you will have to manually set the size :[
I read the starting sizes from This post on reddit and used that to determine the scan areaPeter34 wrote:I'm curious about exactly how big the various starting area size types are. Any way one of you guys can find out, by diving into the game's data files?
And thanks to Klonan for making this mod so quickly! He's a really cool guy!
And thanks
Re: [MOD 0.12.x] Initial Map Scan
The only idea I have regarding reading mapgen settings is if you could somehow read the map exchange key from inside the game or on the initial game load. That contains the map gen settings which would give you the very small, small, medium, etc. and then you could change the scan reveal based on that information.
If you can't read the exchange key from inside the game, maybe someone could make a post in modding interface requests about it?
If you can't read the exchange key from inside the game, maybe someone could make a post in modding interface requests about it?
Re: [MOD 0.12.x] Initial Map Scan
FYI, you can read the map settings in LUA.
Check it out. For the starting area value, you can use
It will return "none", "very-small", "small", "medium", "big", or "very-big" and you can use that to dynamically choose the scan distance.
(I dont actually know what sizes those match to, but its a start)
Code: Select all
game.surfaces["nauvis"].map_gen_settings
Code: Select all
game.surfaces["nauvis"].map_gen_settings.starting_area
(I dont actually know what sizes those match to, but its a start)
Re: [MOD 0.12.x] Initial Map Scan
Error while running the event handler: __InitialScan__/control.lua:12: The specified surface doesn't have chart.
I get this error when loading the map
I get this error when loading the map
Re: [MOD 0.12.x] Initial Map Scan
When loading a save game? But the mod is supposed to trigger only once per game, when you first start the game.lilstrip wrote:Error while running the event handler: __InitialScan__/control.lua:12: The specified surface doesn't have chart.
I get this error when loading the map
Re: [MOD 0.12.x] Initial Map Scan
Hi, you will need to update to at least 12.5 if you want to use the mod, sorry i thought the bug wouldn't occur, but it was fixed in 12.5+lilstrip wrote:Error while running the event handler: __InitialScan__/control.lua:12: The specified surface doesn't have chart.
I get this error when loading the map
THANKS this is exactly what i needed! The mod has been updatedDaCyclops wrote:FYI, you can read the map settings in LUA.Check it out. For the starting area value, you can useCode: Select all
game.surfaces["nauvis"].map_gen_settings
It will return "none", "very-small", "small", "medium", "big", or "very-big" and you can use that to dynamically choose the scan distance.Code: Select all
game.surfaces["nauvis"].map_gen_settings.starting_area
(I dont actually know what sizes those match to, but its a start)
Re: [MOD 0.12.5+] Initial Map Scan
So you now know the size of VS, Small, Normal, Large and VL starting areas, in tiles? If you do, please share them.
Re: [MOD 0.12.5+] Initial Map Scan
I don't... i just guessedPeter34 wrote:So you now know the size of VS, Small, Normal, Large and VL starting areas, in tiles? If you do, please share them.
-
- Filter Inserter
- Posts: 310
- Joined: Fri Nov 07, 2014 3:46 am
- Contact:
Re: [MOD 0.12.5+] Initial Map Scan
Peter34 wrote:So you now know the size of VS, Small, Normal, Large and VL starting areas, in tiles? If you do, please share them.
Klonan wrote:
I read the starting sizes from This post on reddit and used that to determine the scan area
LIESKlonan wrote: I don't... i just guessed
Re: [MOD 0.12.5+] Initial Map Scan
If it's the same ReEddit post that I read some weeks ago, then the figures in that are just guesswork.
Nevertheless, Klonan's mod is very nice. It's tiny and does just one thing, but it does it very well, which is exactly how I like my Factorio mods to (usually) be.
Nevertheless, Klonan's mod is very nice. It's tiny and does just one thing, but it does it very well, which is exactly how I like my Factorio mods to (usually) be.
Re: [MOD 0.12.5+] Initial Map Scan
Mod broken in 0.12.11
Re: [MOD 0.12.5+] Initial Map Scan
In line 4 of control.lua, changewaduk wrote:Mod broken in 0.12.11
Code: Select all
game.on_event
Code: Select all
script.on_event
Re: [MOD 0.12.11+] Initial Map Scan
mod has been updated
-
- Fast Inserter
- Posts: 136
- Joined: Wed Dec 23, 2015 1:17 pm
- Contact:
Re: [MOD 0.12.11+] Initial Map Scan
You can do so after removing the fog from the map he was returning? Why?
So I don't have to run around the starting area. To ensure that the necessary resources nearby.
---
Removing the fog from the map can only be top-down? In all four directions from the center?
So I don't have to run around the starting area. To ensure that the necessary resources nearby.
---
Removing the fog from the map can only be top-down? In all four directions from the center?
English is not my native language. Translator.
Re: [MOD 0.12.11+] Initial Map Scan
Factorio2016 wrote:You can do so after removing the fog from the map he was returning? Why?
So I don't have to run around the starting area. To ensure that the necessary resources nearby.
---
Removing the fog from the map can only be top-down? In all four directions from the center?
Re: [MOD 0.12.11+] Initial Map Scan
If I understand correctly, you want to be able to use the mod to see if you start in a good position, then put back fog of war to "discover" the map as you play. Right ?Factorio2016 wrote:You can do so after removing the fog from the map he was returning? Why?
So I don't have to run around the starting area. To ensure that the necessary resources nearby.
---
Removing the fog from the map can only be top-down? In all four directions from the center?
Koub - Please consider English is not my native language.
-
- Fast Inserter
- Posts: 136
- Joined: Wed Dec 23, 2015 1:17 pm
- Contact:
Re: [MOD 0.12.11+] Initial Map Scan
Yes right, sorry I don't speak English. [the imperfection of machine translation systems]
I want the fog back on the map. No need to run around the starting area.
The ability to see available resources and enemy bases around.
English is not my native language. Translator.