[MOD 0.12.x] Factorio Maps

Topics and discussion about specific mods
jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

[MOD 0.12.x] Factorio Maps

Post by jeroon »

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
Pictures
Version history
Usage :

- 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 ; )
Attachments
FactorioMaps_0.5.9.zip
(9.67 KiB) Downloaded 15825 times
Last edited by jeroon on Fri Feb 26, 2016 5:13 pm, edited 13 times in total.

cengbrecht
Burner Inserter
Burner Inserter
Posts: 18
Joined: Mon May 12, 2014 7:11 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by cengbrecht »


jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by jeroon »

mngrif found out the Alt info wasn't showing, fixed now in 0.5.2 .

User avatar
mngrif
Fast Inserter
Fast Inserter
Posts: 173
Joined: Wed Feb 13, 2013 10:44 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by mngrif »

My Silly Factorian Tricks
<_aD> OBSERVE SIGNAL ASPECT BEFORE CROSSING TRACK

Cooolaid
Long Handed Inserter
Long Handed Inserter
Posts: 85
Joined: Sat Jul 18, 2015 8:48 pm
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by Cooolaid »

This is exactly how Maps "should" look like when pressing [ M } in game.

Really nice work (jeroon) :)

billw
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue May 27, 2014 10:27 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post 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.

cengbrecht
Burner Inserter
Burner Inserter
Posts: 18
Joined: Mon May 12, 2014 7:11 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post 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! :P

jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post 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.

FISHMANPET
Burner Inserter
Burner Inserter
Posts: 10
Joined: Thu Sep 04, 2014 8:15 pm
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post 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.
Attachments
factorio-current - Copy.log
Factorio log
(3.79 KiB) Downloaded 730 times

jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post 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?

jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post 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!

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by Narc »

Hey, I just got a multiplayer patch from YPetremann over on github. The diff looks like this: https://github.com/narc0tiq/FactorioMap ... b6689f?w=1

I went ahead and included a version bump and packed it up as a tentative v0.5.6 -- grab it from https://github.com/narc0tiq/FactorioMap ... _0.5.6.zip.

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:

Code: Select all

 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:

Code: Select all

#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.

jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post 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.

User avatar
HeilTec
Filter Inserter
Filter Inserter
Posts: 258
Joined: Tue Jul 08, 2014 1:14 pm
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post 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
I have made a pull request to Narc's github

(edit: Removed download - get the new version.)
Last edited by HeilTec on Thu Sep 17, 2015 1:01 pm, edited 3 times in total.
Google is my friend. Searching the forum and the wiki is always a first.

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by Narc »

HeilTec wrote:A slight issue with the browser history made me look for a fix.
[...]
I have made a pull request to Narc's github
And I've built it up into a v0.5.7: https://github.com/narc0tiq/FactorioMap ... _0.5.7.zip

Thank you very much for the fix!

User avatar
HeilTec
Filter Inserter
Filter Inserter
Posts: 258
Joined: Tue Jul 08, 2014 1:14 pm
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by HeilTec »

Narc wrote:...
Thank you very much for the fix!
I hope for a bright future for this.

I wonder if more parts of the API can be used?
Google is my friend. Searching the forum and the wiki is always a first.

jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by jeroon »

Thanks for the changes, I've updated the first post :)

User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 278
Joined: Mon Feb 11, 2013 7:25 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by Narc »

Hurrah for cooperative development!

User avatar
Ezzue
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Sep 21, 2014 7:54 pm
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by Ezzue »

Hey!
Man I love this mod!
But how do you upload it to a website? And any suggestions on which sites?
Thanks in advance.

jeroon
Filter Inserter
Filter Inserter
Posts: 351
Joined: Sun Jan 26, 2014 10:18 am
Contact:

Re: [MOD 0.12.x] Factorio Maps

Post by jeroon »

Updated to 0.5.8 due to changes in Factorio 0.12.11: game.on_init has become script.on_init and game.makefile is now game.write_file.

Because of this changes the new version won't work for versions older than 0.12.11, I've attached the previous version (0.5.8) to this post.

WARNING: The file attached to this post is the old version, new version is in the first post!
Attachments
FactorioMaps_0.5.7.zip
(9.58 KiB) Downloaded 659 times

Post Reply

Return to “Mods”