I thought I saw in the patch notes that this had been updated to work with MP. I guess I misunderstood and it's compatible with multiplayer but you can only run the mod on your client is that correct?
I agree with Dirante, this would be amazing if it could be made to run from a headless server.
EDIT: So I was thinkin about it and the issue is that the headless server never actually generates the visual input the mod uses right? You'd have to have a separate renderer for the mod. Is that basically correct?
Re: [MOD 0.12.x] Factorio Maps
Posted: Tue Apr 05, 2016 8:09 am
by DutchJer
tried it, first time, didnt make any pictures, might have not set the size, but second time it took over an hour, when i forced quit my factorio. maybe my 180 mb save is too big.
Re: [MOD 0.12.x] Factorio Maps
Posted: Tue Apr 12, 2016 12:22 pm
by Gachl
BeowolfSchaefer wrote:So I was thinkin about it and the issue is that the headless server never actually generates the visual input the mod uses right? You'd have to have a separate renderer for the mod. Is that basically correct?
It'd be great if it just required the clients to have the mod installed too and the server would force one (or all) clients to render the map and have it sent to the server. You can basically outsource the rendering to the clients.
To me having this mod work on headless is important, I don't want to generate an "hourly" map myself for all the servers that I run.
Re: [MOD 0.12.x] Factorio Maps
Posted: Tue Apr 12, 2016 2:31 pm
by Zeblote
BeowolfSchaefer wrote:EDIT: So I was thinkin about it and the issue is that the headless server never actually generates the visual input the mod uses right? You'd have to have a separate renderer for the mod. Is that basically correct?
The issue is that factorio's mod API is way too high level and you can't make anything that runs only on one machine. Everything is forcibly synchronized.
Re: [MOD 0.12.x] Factorio Maps
Posted: Fri Apr 15, 2016 7:02 pm
by Bartimaeus
I love this mod.
though sometimes I would like to make big screenshot map of the mapmode (pressing "M") as that gives better information about ores than the usual game view.
is it possible to do that? I tried reading all the Lua Docs but I was not able to find a command that would switch the rendering mode to "mapmode". Even if I was switched into the "M" and called the screenshot command it always used the usual game view.
Re: [MOD 0.12.x] Factorio Maps
Posted: Wed Apr 20, 2016 1:05 pm
by realm174
Any chance this could be made to auto-run at configurable intervals?
Re: [MOD 0.12.x] Factorio Maps
Posted: Thu Apr 28, 2016 10:38 am
by Noobier
Hi, quick question: Wehre does the mod put the html files?
I tried searching it, but cant find them.
EDIT:
All my save folders contain only my savegames.
EDIT Solution:
Found it. It was AppData\Roaming\Factorio\script-output\FactorioMaps
Re: [MOD 0.12.x] Factorio Maps
Posted: Sat Jun 11, 2016 5:53 pm
by Noobulus
Does anyone know why that when I open a generated map in my browser, the second I try to move, zoom, or manipulate it in any way, it breaks? (by 'breaks' I mean it goes blank with a 'file moved or deleted' message.) Anyone know why this is happening?
EDIT: Problem was solved my mngrif's suggestion to rename it without spaces. Weird.
Re: [MOD 0.12.x] Factorio Maps
Posted: Tue Jun 28, 2016 5:05 am
by TonyLemur
I made something cool with your mod! (I have to post the URL in a second post since I can't put URLs in my first post...)
I pm'd jeroon the other day asking if/when FactorioMaps would get updated.
jeroon wrote:at the moment I don't have the time to update it, so if you feel like it, go ahead
(if not, I will take a look at it in a couple of weeks)
So today I took a stab at it. You can manually download the version for Factorio 0.13 here: github/credomane/FactorioMaps
Once/if jeroon gives me the ok I'll put it on the mod portal.
Is it possible to call the script from the prompt or some other way to automate it running on a headless server because 0.60 seems to work fine when added to one, it's just that when I run it from the menu it can only generate locally.
Re: [MOD 0.12.x] Factorio Maps
Posted: Wed Jul 13, 2016 5:30 am
by credomane
BeowolfSchaefer wrote:Is it possible to call the script from the prompt or some other way to automate it running on a headless server because 0.60 seems to work fine when added to one, it's just that when I run it from the menu it can only generate locally.
Afraid not. The documentation states that game.take_screenshot on a headless server does absolutely nothing.
While unfortunate, it makes sense because the headless isn't doing anything graphic wise. Doubt the devs have any plans to change that.
Re: [MOD 0.12.x] Factorio Maps
Posted: Wed Jul 13, 2016 11:53 pm
by BeowolfSchaefer
credomane wrote:
BeowolfSchaefer wrote:Is it possible to call the script from the prompt or some other way to automate it running on a headless server because 0.60 seems to work fine when added to one, it's just that when I run it from the menu it can only generate locally.
Afraid not. The documentation states that game.take_screenshot on a headless server does absolutely nothing.
While unfortunate, it makes sense because the headless isn't doing anything graphic wise. Doubt the devs have any plans to change that.
Ahh yeah, that makes sense. Thanks for the explanation.
I guess the solution might be what some of the similar mods for Minecrft do where there's a separate renderer for the map that just reads the save game and generates the image itself. That's a whole other task than this one though.
Re: [MOD 0.12.x] Factorio Maps
Posted: Mon Aug 08, 2016 8:43 pm
by Mini-Me
I've crafted myself a little method that can automatically generate the map for me. All I do is run a batch file and see it do its magic. That's still not suitable for headless servers, but if you have a server with a graphics card you can at least just for the map generation launch the normal version of Factorio.
Code
in FactorioMaps.zip\Files\control.lua I add a few lines to the on_tick event handler:
-- ON TICK
counter = 0
script.on_event(defines.events.on_tick, function(event)
-- DRAW MENU ON INIT
if(firstrun) then
drawshowmenubutton()
--The following 6 lines are what I insert: Set my output folder name, enable alt info, simulate clicks on the buttons Show Menu, Set Day, Max and Generate
game.raise_event(defines.events.on_gui_click, {element = { name = "showmenu" }, player_index = 1 })
game.raise_event(defines.events.on_gui_click, {element = { name = "setdaytime" }, player_index = 1 })
game.raise_event(defines.events.on_gui_click, {element = { name = "maxdiscovered" }, player_index = 1 })
txtFolderName.text = "Singleplayer"
showalt = true
game.raise_event(defines.events.on_gui_click, {element = { name = "generate" }, player_index = 1 })
end
@ECHO on
REM Path where Factorio is installed
SET FactorioPath="D:\Program files\Factorio-experimental"
REM Path where Factorio writes data to, i.e. the savegames
SET dataWritePath=%AppData%\Factorio
REM Find the last savegame
FOR /F "delims=|" %%I IN ('DIR "%dataWritePath%\saves\*.zip" /B /O:D') DO SET NewestFile=%%I
SET SavegameFilename=%NewestFile%
REM Folder name, as specified in the GUI/control.lua script
SET folderName=Singleplayer
REM Copy the savegame into the current working directory so we don't run into problems with a possible second instance
COPY %dataWritePath%\saves\%SavegameFilename% %CD%\_temp.zip
START "Factorio" %FactorioPath%\bin\x64\Factorio.exe --load-game "%CD%\_temp.zip"
SET dataWritePath=%FactorioPath%
:WaitUntilIndexGenerated
IF EXIST %dataWritePath%\script-output\FactorioMaps\%folderName%\index.html GOTO CloseFactorio
TIMEOUT /t 10 >nul
GOTO WaitUntilIndexGenerated
:CloseFactorio
TASKKILL /IM Factorio.exe
:WaitWhileFactorioRunning
TIMEOUT /t 10 >nul
REM Sometimes factorio.exe appears with a minor f
TASKLIST | FIND "factorio.exe" >nul
IF NOT ERRORLEVEL 1 GOTO WaitWhileFactorioRunning
REM Sometimes Factorio.exe appears with a capital F. We need to check both
TASKLIST | FIND "Factorio.exe" >nul
IF NOT ERRORLEVEL 1 GOTO WaitWhileFactorioRunning
REM Delete the savegame in the current directory again
DEL %CD%\_temp.zip
REM Here custom stuff can be done. I for my part move the files into my public Google Drive folder.
What this does is:
Start the game and automatically load a saved game
As soon as the game is loaded, it generates the map
When map generation is finished it quits the game (it detects that the map generation is finished by finding the index.html file)
It waits till the game has ended. Then custom stuff can be done (copying the map etc.)
This happens on my Windows box, of course. For Linux I didn't write a shell script, yet.
This mod is great! However, after loading the index.html, if I try to zoom, the screen goes white and says "Your file was not found. It may have been moved or deleted."
Using Chrome.
Re: [MOD 0.12.x] Factorio Maps
Posted: Fri Jan 20, 2017 4:20 pm
by Mini-Me
IIRC that's a bug when the folder path has a space in it. Try moving it somewhere without a space.