Page 1 of 2

Saves and replays

Posted: Mon Mar 17, 2014 8:44 pm
by Reygan
Does exist any way to extract map (blueprint.dat) from save? Or does exist any way to edit saves?
Does present in game replay recording/playing function?

Re: Saves and replays

Posted: Mon Mar 17, 2014 8:52 pm
by slpwnd
Save can be migrated to "scenario" by running factorio from the commandline as follows (let's presume we have save foo.zip in the saves directory):

Code: Select all

./bin/prod/factorio --map2scenario foo
Factorio will start, load the save, store it as a blueprint (foo in the scenarios folder) and then quit. This is kind of a "development feature" so it is not really user friendly.

Re: Saves and replays

Posted: Mon Mar 17, 2014 10:19 pm
by Reygan
slpwnd wrote:Save can be migrated to "scenario" by running factorio from the commandline as follows (let's presume we have save foo.zip in the saves directory):

Code: Select all

./bin/prod/factorio --map2scenario foo
Factorio will start, load the save, store it as a blueprint (foo in the scenarios folder) and then quit. This is kind of a "development feature" so it is not really user friendly.
Oh, thanks, its all that i need 8-)
And about second question?

Re: Saves and replays

Posted: Tue Mar 18, 2014 3:38 am
by syneris
Replays are disabled at the moment. I believe I read it was sync issues and that we'll likely get it fixed as a work up to multiplayer.

Re: Saves and replays

Posted: Tue Mar 18, 2014 6:39 am
by slpwnd
syneris wrote:Replays are disabled at the moment. I believe I read it was sync issues and that we'll likely get it fixed as a work up to multiplayer.
Exactly. They just don't work, I tried one recently, but soon I got a "out of sync checksum error".

Re: Saves and replays

Posted: Tue Mar 18, 2014 11:33 am
by Reygan
slpwnd wrote:
syneris wrote:Replays are disabled at the moment. I believe I read it was sync issues and that we'll likely get it fixed as a work up to multiplayer.
Exactly. They just don't work, I tried one recently, but soon I got a "out of sync checksum error".
Understood.

Does factorio have any else useful command line parameters? Or some like --h, to i look them myself?

Re: Saves and replays

Posted: Tue Mar 18, 2014 1:55 pm
by slpwnd
There is --help but the map2scenario is probably the only one really useful.

Re: Saves and replays

Posted: Wed Mar 19, 2014 5:17 am
by Reygan
slpwnd wrote:There is --help but the map2scenario is probably the only one really useful.
Understood. Thank you.

Re: Saves and replays

Posted: Wed Mar 19, 2014 10:02 am
by slpwnd

Code: Select all

tomik ~/src/factorio(0.9.x) $  ./bin/prod/factorio --help
Options::
  --help                    display help
  --version                 show version information
  -s [ --map2scenario ] arg map 2 scenario conversion
  -c [ --convert ] arg      perform binary conversion
  --wiki                    create source files for wiki
  --autoupdate-stage2 arg   internal use only
  --autoupdate-finished     internal use only
  --apply-update arg        immediately apply update package

Re: Saves and replays

Posted: Wed Mar 19, 2014 10:13 am
by ssilk
I wondered that for a while: For me it ignores all params and starts the game... (MacOS)

Code: Select all

ssilk@ssilkpro [/Applications/factorio.app/Contents/MacOS] >  ./factorio --map2scenario /Users/ssilk/Library/Application\ Support/factorio/saves/Puzzle1.zip
... or any other option inclusive help.

Re: Saves and replays

Posted: Wed Mar 19, 2014 10:21 am
by slpwnd
I see, that is probably some MacOS-package-thing. I am on MacOS as well but have a raw binary before being packaged, though it should be possible to use console params somehow even for packages ...

Re: Saves and replays

Posted: Wed Apr 23, 2014 5:33 pm
by ssilk
Any chance to get this working on Mac for v0.9.9 :?:

(I ask if I should create a windows vm for that)

Re: Saves and replays

Posted: Mon Jul 28, 2014 3:14 pm
by CreeperDaReeper
Someone mind posting how this should look exactly for Windows? My attempts at trying to get the command line run the correct command all fail. (No idea what I'm doing really.)

Re: Saves and replays

Posted: Tue Jul 29, 2014 5:55 am
by Reygan
CreeperDaReeper wrote:Someone mind posting how this should look exactly for Windows? My attempts at trying to get the command line run the correct command all fail. (No idea what I'm doing really.)
Simple like tha daylight ;)
Right click on factorio.exe -> create shortcut -> right click shortcut -> properties ->
-> in "target" field append " --map2scenario YourSaveName"
Next time, if you want to convert other save you should open shortcut properties again and just change save name. Or create another shortcut.
Dont forget about space between factorio.exe and hyphens
Or you can use bat(cmd) file.

Re: Saves and replays

Posted: Tue Jul 29, 2014 6:31 am
by CreeperDaReeper
Reygan wrote:
CreeperDaReeper wrote:Someone mind posting how this should look exactly for Windows? My attempts at trying to get the command line run the correct command all fail. (No idea what I'm doing really.)
Simple like tha daylight ;)
Right click on factorio.exe -> create shortcut -> right click shortcut -> properties ->
-> in "target" field append " --map2scenario YourSaveName"
Next time, if you want to convert other save you should open shortcut properties again and just change save name. Or create another shortcut.
Dont forget about space between factorio.exe and hyphens
Or you can use bat(cmd) file.
Thanks for the help. Though I think I found a little quirk with this command, it doesn't like modded saves, sandbox (godmode), or both.
(I started a sandbox game and selected to research all technologies. I then saved, quit, and tried to convert the map. Right after Factorio finished loading up, but before the main menu, it would crash.)
Looks like I'll have to find another way to unlock all technologies in the map editor.

Re: Saves and replays

Posted: Tue Jul 29, 2014 8:38 am
by Reygan
CreeperDaReeper wrote: Thanks for the help. Though I think I found a little quirk with this command, it doesn't like modded saves, sandbox (godmode), or both.
(I started a sandbox game and selected to research all technologies. I then saved, quit, and tried to convert the map. Right after Factorio finished loading up, but before the main menu, it would crash.)
Looks like I'll have to find another way to unlock all technologies in the map editor.
Also you can turn all technologies researched by using console(~ key)

Code: Select all

game.player.force.researchalltechnologies()
Or some special technology, for example:

Code: Select all

game.player.force.technologies["toolbelt"].researched=true
There is no way to edit technologies in map editor. In factorio nearly all things edited by scripts directly in game. In editor you just painting the landscape and placing some entities/resources. If you want to edit map technologies you should create control.lua file in map folder and insert in there codes, that i writed higher.

Re: Saves and replays

Posted: Wed Jun 10, 2015 9:44 pm
by yogsog
I am also unable to pass factorio any arguments from terminal on macos. It just runs without arguments. Anyone else managed to do map2scenario on a mac??

Re: Saves and replays

Posted: Sat Jun 13, 2015 10:54 pm
by inventor1214
How do you go to the commandline

Re: Saves and replays

Posted: Sun Jun 14, 2015 5:02 am
by fsjd
inventor1214 wrote:How do you go to the commandline
tilde key. [`]

Re: Saves and replays

Posted: Thu Jul 23, 2015 7:53 pm
by voidei
slpwnd wrote:Save can be migrated to "scenario" by running factorio from the commandline as follows (let's presume we have save foo.zip in the saves directory):

Code: Select all

./bin/prod/factorio --map2scenario foo
Factorio will start, load the save, store it as a blueprint (foo in the scenarios folder) and then quit. This is kind of a "development feature" so it is not really user friendly.
How would one do this on mac?