Type: Mod
Name: Factorio Maps
Description: This mod creates a Google Map of your Factorio game. It will create a local html file, nothing has to be uploaded for it to work.
License: Free for all
Version: 0.5.9
Release: 2016-01-16
Tested-With-Factorio-Version: 0.12.24 (minimum required: 0.12.11, for older versions check here)
Category: Helper
Tags: Maps, Google
License
License
Everyone can use, change and release as they see fit, just don't forget to put my name somewhere
Pictures
Pictures
Version history
Version history
16 jan 2016: v0.5.9
- Disabled on_load to fix Unknown key:"Error while running the on_load: __FactorioMaps__/Files/control.lue:363: attempt to index global 'game' (a nil value)"
17 oct 2015: v0.5.8
- Updated to Factorio 0.12.11 where game.on_init was changed to script.on_init
17 sep 2015: v0.5.7
- Added HeilTecs updated browser coordinates code
13 sep 2015: v0.5.6
- Added YPetremanns code to make the mod compatible with multi player
9 sep 2015: v0.5.5
- Added Narcs code: location in the browsers url bar, so you can link to a specific position on the map.
15 aug 2015: v0.5.4
- Fixed MP maps not working.
6 aug 2015: v0.5.2
- Fixed typoo with "Show Alt info"
6 aug 2015: v0.5.1
- Updated to 0.12.x
- use "Midday" so your images are nice and light.
- Click "Generate Images". This will start taking the screenshots, and generate an index.html in the script-output folder. Script-output is in the same folder as Saves.
- Open index.html in your browser (Double click it/Open With/Drag in browserwindow)
- For info on the advanced options, click Help.
[Warning: on bigger maps it might take a while, and take up quite a bit of discspace.
Works in singleplayer, should work in multi player (use at own risk!), though people might disconnect. Does not work with headless server. You can always load multiplayer maps in singleplayer and make maps that way.]
ToDo:
- Local maps don't seem to work in Edge Browser for me, need to look into that further
- Add markers to the map/ set center of map (need to figure out Google Maps pixel to Latitude)
- Make advanced stuff disappear with the click of a button ; )
This is exactly how Maps "should" look like when pressing [ M } in game.
Really nice work (jeroon)
Re: [MOD 0.12.x] Factorio Maps
Posted: Fri Aug 14, 2015 10:49 pm
by billw
This doesn't work on MP maps even when loaded in SP
/edit I looked, the code half uses game.players[1]. the other half uses game.player. Search replaced game.player. with game.players[1]. and it works now on my MP map.
Re: [MOD 0.12.x] Factorio Maps
Posted: Sat Aug 15, 2015 5:22 pm
by cengbrecht
billw wrote:This doesn't work on MP maps even when loaded in SP
/edit I looked, the code half uses game.players[1]. the other half uses game.player. Search replaced game.player. with game.players[1]. and it works now on my MP map.
This should be a feature!
Re: [MOD 0.12.x] Factorio Maps
Posted: Sat Aug 15, 2015 7:37 pm
by jeroon
billw wrote:This doesn't work on MP maps even when loaded in SP
/edit I looked, the code half uses game.players[1]. the other half uses game.player. Search replaced game.player. with game.players[1]. and it works now on my MP map.
Thanks for that, I've updated the mod
It's only usable in singleplayer. You can however now load a multiplayer map in singleplayer and make a map that way.
Re: [MOD 0.12.x] Factorio Maps
Posted: Wed Aug 19, 2015 6:48 pm
by FISHMANPET
So this is probably a bug in the mod and not a bug in Factorio, but the game crashed building the map. Not sure if it generated all the images or not (my guess would be it did) but the index.html was gone from the script-output directory. Not sure if the log file (attached) is enough information but not sure if it's possible to get anything more detailed.
This is running 12.4 on Win7 x64, using the zip package, not the installer.
Re: [MOD 0.12.x] Factorio Maps
Posted: Thu Aug 20, 2015 10:27 am
by jeroon
I'm no expert on crash logs, but the only thing I see is :
luaremove_path error: Scripts can only use file space inside of C (requested path was C:/Users\FISHMANPET\Dropbox\Factorio_0.12.0\script-output\FactorioMaps/Map(96,55)1024)
Now i don't see anything weird there, except that you're using a dropbox folder. Can you try copying your entire factorio folder outside dropbox, and try again?
Re: [MOD 0.12.x] Factorio Maps
Posted: Tue Sep 08, 2015 10:11 am
by jeroon
Updated to 0.5.5.
Changelog:
Narc changed the javascript output, so now when you zoom in/out/move in your browser, the location in the browsers url bar updates, so you now can link to a specific position on the map. Very handy for pointing people to a point on your map. Thanks Narc!
Everyone, be aware that I am not Jeroon and therefore this is not an official update.
Also please note that if you're using a headless server you cannot use FactorioMaps, as it will happily crash the headless peer when it tries to take screenshots. Notably, the confusing warning we saw earlier shows up again:
107.508 Warning LuaGameScript.cpp:1078: luaremove_path error: Scripts can only use file space inside of /home/narc/srv/factorio/script-output (requested path was /home/narc/srv/factorio/script-output/FactorioMaps/bob-world-3)
But this is not actually directly related to the crash that happens immediately thereafter:
#0 0x7fbc88f2cd40 in ?? at ??:0
#1 0x5e1f8a in getWidth at /tmp/factorio-yavVX5/src/Graphics/Display.cpp:197
#2 0x4455ff in luaTakeScreenshot at /tmp/factorio-yavVX5/src/Script/LuaGameScript.cpp:990
#3 0xa8169e in callWrapper at /tmp/factorio-yavVX5/src/Script/LuaBinder.hpp:307
[...remainder ellided...]
That said, if you're doing multiplayer the classic way (with all peers playing), this will let any player trigger the map generation instead of requiring player 1 to do it. Do remember that all players will perform the same operations, and also that since the map generating process is usually quite long, it will likely result in everyone disconnecting from everyone else.
Re: [MOD 0.12.x] Factorio Maps
Posted: Sun Sep 13, 2015 7:50 pm
by jeroon
Thanks for the changes YPetremann, I've updated the first post.
Note that I haven't tested it myself in a Multi Player game, it crashed my game when I tried to use it with 2 local clients, so use at own risk, backup your backups bladibla.
As stated in the first post, you can always open your MP game in Single Player and use Factorio Maps that way.
Re: [MOD 0.12.x] Factorio Maps
Posted: Thu Sep 17, 2015 1:08 am
by HeilTec
Great work on creating this useful helper.
The ability to create and share map and coordinates has been a fantastic help in multiplayer games.
A slight issue with the browser history made me look for a fix.
Every move or zoom that changed the URL added a new history entry.
fix
By using location.replace() the cluttered history is avoided: