editing a save file
editing a save file
What program will open a saved game file?
What do I look for to edit the research of the various players?
What do I look for to edit the research of the various players?
- VladimirSlavik
- Posts: 47
- Joined: Thu Aug 27, 2015 7:27 am
Re: editing a save file
It's a compressed plain text file. See for yourself...
Re: editing a save file
It is, as VladimirSlavik said, a compressed text file. Just decompress it and open it in a text editor. Some text editors, like GNU Emacs, can load and edit the compressed file.djconklin wrote:What program will open a saved game file?
Re: editing a save file
>Just decompress it and open it in a text editor.
Therein lies the problem: how do I decompress it?
Therein lies the problem: how do I decompress it?
Re: editing a save file
All I see is garbage when I try to open it with a text editor.VladimirSlavik wrote:It's a compressed plain text file. See for yourself...
Re: editing a save file
It's compressed with Unixy tools, as indicated by the file extension (.gz, .bz2, .xz).
If you're on a Linux system, you will likely find the tools you need to uncompress it (gunzip, bunzip2, unxz) already installed. If you're on Windows, you'll have to look further afield for suitable decompession tools.
If you have control of the generation of the save file, you can ask for it to be saved uncompressed ("/set compresstype plain", or equivalent from the client's "server settings" UI).
(To anticipate possible next question: we don't formally document the format of the save file, or how it changes between major releases.)
If you're on a Linux system, you will likely find the tools you need to uncompress it (gunzip, bunzip2, unxz) already installed. If you're on Windows, you'll have to look further afield for suitable decompession tools.
If you have control of the generation of the save file, you can ask for it to be saved uncompressed ("/set compresstype plain", or equivalent from the client's "server settings" UI).
(To anticipate possible next question: we don't formally document the format of the save file, or how it changes between major releases.)
Re: editing a save file
Cute! I have no idea what this says: https://msdn.microsoft.com/en-us/librar ... s.85).aspx
- VladimirSlavik
- Posts: 47
- Joined: Thu Aug 27, 2015 7:27 am
Re: editing a save file
On Windows... Somewhat confusingly, to manage compressed files, you need to install an "archive manager" tool, such as winzip, winrar, peazip, 7-zip etc. All of these support reading a lot of formats, including these that freeciv uses (gz, bz2).
Once you have one installed, right click the save file; the menu should offer something like "decompress", "extract" or so. (It might be hidden in a submenu.) Use that and you will get the plain text file. Happy reading and editing!
Note that freeciv can read the saves uncompressed just fine, so there's no need to mess with re-compressing the file once you're done.
Once you have one installed, right click the save file; the menu should offer something like "decompress", "extract" or so. (It might be hidden in a submenu.) Use that and you will get the plain text file. Happy reading and editing!
Note that freeciv can read the saves uncompressed just fine, so there's no need to mess with re-compressing the file once you're done.
Re: editing a save file
Clarification: GNU Emacs can load and edit the compressed file directly (without you having to decompress it manually first). Most other text editors require you to first decompress the savegame and then edit the decompressed file.sveinung wrote:Some text editors, like GNU Emacs, can load and edit the compressed file.
Re: editing a save file
THANK YOU!VladimirSlavik wrote:On Windows... Somewhat confusingly, to manage compressed files, you need to install an "archive manager" tool, such as winzip, winrar, peazip, 7-zip etc. All of these support reading a lot of formats, including these that freeciv uses (gz, bz2).
Once you have one installed, right click the save file; the menu should offer something like "decompress", "extract" or so. (It might be hidden in a submenu.) Use that and you will get the plain text file. Happy reading and editing!
Note that freeciv can read the saves uncompressed just fine, so there's no need to mess with re-compressing the file once you're done.