CK3 Save is a library to ergonomically work with Crusader Kings III (CK3) saves (ironman + regular).
use ck3save::{models::Gamestate, Ck3File, Encoding};
let file = std::fs::File::open("assets/saves/Jarl_Ivar_of_the_Isles_867_01_01.ck3")?;
let mut file = Ck3File::from_file(file)?;
assert_eq!(file.encoding(), Encoding::TextZip);
let resolver = std::collections::HashMap::<u16, &str>::new();
let save = file.parse_save(&resolver)?;
assert_eq!(save.meta_data.version, String::from("1.0.2"));
Ironman saves are supported through a provided TokenResolver
. Per PDS counsel, the data to construct such a TokenResolver
is not distributed here.