Cities: Skylines

Cities: Skylines

View Stats:
Noc Dec 17, 2018 @ 10:56am
Load savegame into Map Editor? [SOLVED!]
I want to load a savegame into the Map Editor so that I may publish it, along with its road network, as a map for new games. I just found this year-old post on Reddit regarding a Mod Tools hack that seemed to work at the time, but I tried it now and all I get is a readout of errors ending with “Failed to compile command-line”.

Unfortunately, I know nothing of coding or modding, so I can’t troubleshoot this myself. (It’s possible I may be using Mod Tools wrong – this is my first time trying it.)

Does anyone have a fix for this, or barring that, some other method of extracting a map from a savegame? It would be really appreciated.
Last edited by Noc; Dec 18, 2018 @ 5:51pm
< >
Showing 1-15 of 20 comments
CyberVibes Dec 18, 2018 @ 4:21pm 
I'm not sure whether this will work in the map editor but may be worth a shot.

Sub to the moveit tool, then use the marquee tool to draw a box around the whole map, then click the export icon in moveit and wait for it ti export, then close out of skylines relaunch into the editor making sure moveit is enabled then try importing using moveit's import icon.

Always read a mods description and comments section before subscribing
https://steamcommunity.com/sharedfiles/filedetails/?id=766190099&searchtext=moveit
Noc Dec 18, 2018 @ 5:43pm 
2
@CyberVibes
Thanks for the suggestion. It’s a cool thought, but it wouldn’t really work for my purposes; exporting a Move It! selection would just grab you all the roads, trees and so on, but not the terrain itself, so you’d still need to recreate that in the Map Editor.

That said, the awesome boformer at SimTropolis found the answer[community.simtropolis.com], which I’ll repost here. To load the most recent savegame into the Map Editor:

1) Prepare a savegame and save it. This trick will load your save as a map, along with everything in it – roads, buildings, etc. – so prepare it accordingly.

2) With ModTools enabled, hit F7 in the game’s main menu to open the debug console.

3) Paste & run the following command:
SaveGameMetaData saveGameMetaData = SaveHelper.GetLatestSaveGame().Instantiate<SaveGameMetaData>(); LoadingManager.instance.LoadLevel(saveGameMetaData.assetRef, "MapEditor", "InMapEditor", new SimulationMetaData() { m_WorkshopPublishedFileId = ColossalFramework.PlatformServices.PublishedFileId.invalid, m_updateMode = SimulationManager.UpdateMode.LoadMap });
This should immediately launch the Map Editor with your last savegame loaded as a map, which you can then edit, save and publish just as any other map. Just tried it myself and it works perfectly.

Thanks again to boformer at ST and Samsam for the original Reddit post!
Last edited by Noc; Dec 18, 2018 @ 7:40pm
CyberVibes Dec 18, 2018 @ 5:46pm 
Ahh right i didn't realise you wanted to copy the terrain too as you didn't mention that ,and my idea was a punt as i've never tried anything similar myself, but glad you found a way :)
quasar1334 Mar 1, 2020 @ 10:03pm 
Wow. I have the same need. I'm gonna try this right now. Thanks.
fannyslam_ttv Apr 6, 2020 @ 9:54pm 
Thank you so much for the updated code! I also tried the Reddit post to no avail but this update works perfectly!
BrotherBongo May 12, 2020 @ 5:30am 
This code is a lifesaver. Thank you so much.
glynnski Oct 9, 2020 @ 3:15pm 
Just used this solution, worked like a charm, thank you so much!!
Sasquatch Oct 13, 2020 @ 6:26pm 
Couldn't you also open the bare map then import the MoveIt data on top of it?
WBKotter (Banned) Oct 13, 2020 @ 6:38pm 
Unable to paste ?
Holysword May 14, 2021 @ 7:45am 
This workes, but all my buildings become unselectable... :(
I need to delete them and place them over again... anybody has this behaviour?
Lesley Jul 7, 2021 @ 4:17am 
2
2
Originally posted by Noc:
@CyberVibes
Thanks for the suggestion. It’s a cool thought, but it wouldn’t really work for my purposes; exporting a Move It! selection would just grab you all the roads, trees and so on, but not the terrain itself, so you’d still need to recreate that in the Map Editor.

That said, the awesome boformer at SimTropolis found the answer[community.simtropolis.com], which I’ll repost here. To load the most recent savegame into the Map Editor:

1) Prepare a savegame and save it. This trick will load your save as a map, along with everything in it – roads, buildings, etc. – so prepare it accordingly.

2) With ModTools enabled, hit F7 in the game’s main menu to open the debug console.

3) Paste & run the following command:
SaveGameMetaData saveGameMetaData = SaveHelper.GetLatestSaveGame().Instantiate<SaveGameMetaData>(); LoadingManager.instance.LoadLevel(saveGameMetaData.assetRef, "MapEditor", "InMapEditor", new SimulationMetaData() { m_WorkshopPublishedFileId = ColossalFramework.PlatformServices.PublishedFileId.invalid, m_updateMode = SimulationManager.UpdateMode.LoadMap });
This should immediately launch the Map Editor with your last savegame loaded as a map, which you can then edit, save and publish just as any other map. Just tried it myself and it works perfectly.

Thanks again to boformer at ST and Samsam for the original Reddit post!

This command you have is incomplete - I have just done it and the actual command line you need is as follows!

ColossalFramework.Packaging.Package.Asset latestSaveGame = SaveHelper.GetLatestSaveGame();
SaveGameMetaData saveGameMetaData = latestSaveGame.Instantiate<SaveGameMetaData>();

LoadingManager.instance.LoadLevel(saveGameMetaData.assetRef, "MapEditor", "InMapEditor", new SimulationMetaData() { m_WorkshopPublishedFileId = ColossalFramework.PlatformServices.PublishedFileId.invalid, m_updateMode = SimulationManager.UpdateMode.LoadMap}, false);
Last edited by Lesley; Jul 9, 2021 @ 11:05am
RamBRO Aug 8, 2021 @ 9:23pm 
Originally posted by Noc:
@CyberVibes
Thanks for the suggestion. It’s a cool thought, but it wouldn’t really work for my purposes; exporting a Move It! selection would just grab you all the roads, trees and so on, but not the terrain itself, so you’d still need to recreate that in the Map Editor.

That said, the awesome boformer at SimTropolis found the answer[community.simtropolis.com], which I’ll repost here. To load the most recent savegame into the Map Editor:

1) Prepare a savegame and save it. This trick will load your save as a map, along with everything in it – roads, buildings, etc. – so prepare it accordingly.

2) With ModTools enabled, hit F7 in the game’s main menu to open the debug console.

3) Paste & run the following command:
SaveGameMetaData saveGameMetaData = SaveHelper.GetLatestSaveGame().Instantiate<SaveGameMetaData>(); LoadingManager.instance.LoadLevel(saveGameMetaData.assetRef, "MapEditor", "InMapEditor", new SimulationMetaData() { m_WorkshopPublishedFileId = ColossalFramework.PlatformServices.PublishedFileId.invalid, m_updateMode = SimulationManager.UpdateMode.LoadMap });
This should immediately launch the Map Editor with your last savegame loaded as a map, which you can then edit, save and publish just as any other map. Just tried it myself and it works perfectly.

Thanks again to boformer at ST and Samsam for the original Reddit post!


Thanks Mate, works perfectly!
jduffett Oct 31, 2021 @ 5:30pm 
Anyone by chance know how to get this to use Loading Screen Mod when loading the map? The usual Left Ctrl thing doesn't seem to work.
HeadKillah Nov 7, 2021 @ 6:34am 
@jduffett: No, because it´s in the code of LSM that you can´t use the mod within the Map editor ...
Djdadcore Jan 31, 2022 @ 11:27am 
Just did this today and damn is it handy! Thanks!
< >
Showing 1-15 of 20 comments
Per page: 1530 50

Date Posted: Dec 17, 2018 @ 10:56am
Posts: 20