Skip to content
This repository was archived by the owner on Sep 12, 2026. It is now read-only.

Latest commit

 

History

216 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ci Version

This repo has been consolidated into the main jomini repo

CK3 Save

CK3 Save is a library to ergonomically work with Crusader Kings III (CK3) saves (ironman + regular).

use ck3save::{models::Gamestate, Ck3File, DeserializeCk3, SaveHeaderKind};
use std::collections::HashMap;

let data = std::fs::read("assets/saves/Jarl_Ivar_of_the_Isles_867_01_01.ck3").unwrap();
let file = Ck3File::from_slice(&data).unwrap();

// Check the file type
assert_eq!(file.header().kind(), SaveHeaderKind::UnifiedText);

// Deserialize the entire save into a structured format
let resolver = HashMap::<u16, &str>::new();
let game: Gamestate = (&file).deserialize(&resolver).unwrap();
assert_eq!(game.meta_data.version, String::from("1.0.2"));
# Ok::<(), Box<dyn std::error::Error>>(())

Ironman

Ironman saves are supported through a provided TokenResolver. Per PDS counsel, the data to construct such a TokenResolver is not distributed here.

About

Ergonomically work with CK3 saves (regular and ironman)

Topics

Resources

Stars

11 stars

Watchers

3 watching

Forks

Releases

Contributors

Languages