The Rakaly CLI provides a convenient way of accessing Rakaly functionality locally.
Rakaly CLI can convert binary encoded saves to their plaintext equivalent in a process called melting.
rakaly melt aq.eu4
The above example will create a plaintext aq_melted.eu4
file that one can open up and inspect in a text editor. Moreover, this melted save may be continued in EU4 as if it was a normal game (the other games remain untested in this aspect).
The melt command determines how to interpret the save file by looking at the extension (.eu4
, .rome
, .hoi4
, or .ck3
).
If outputting to stdout is more your style:
rakaly melt --to-stdout aq.eu4
Whenever there is a content patch for the supported games, the rakaly-cli will be out of date until the next update. The default behavior of the melt command is to fail when unexpected tokens from the new content is encountered. To make the melt command perserve through the tokens and encode them as hexadecimals in the output:
rakaly melt --unknown-key stringify aq.eu4
When unknown tokens are encountered with the stringify strategy then the unknown tokens are printed to stderr and the exit code is 1.
The melter knows how to melt a given file based on its file extension. In the event this heuristic is incorrect, one can explicitly provide the desired format:
rakaly melt --format eu4 --to-stdout gamestate
The json
subcommand will convert game and save files (including binary ones) into JSON output on stdout.
rakaly json aq.eu4
The output can be pretty printed:
rakaly json --pretty aq.eu4
By default, duplicate keys are preserved in the JSON, but this can be configured:
rakaly json --duplicate-keys preserve aq.eu4
rakaly json --duplicate-keys group aq.eu4
rakaly json --duplicate-keys key-value-pairs aq.eu4
When converting game files, pass the character encoding so that non-ascii characters are represented correctly:
rakaly json --format windows-1252 achievements.txt