Skip to content

Chronicle parsing library for Crusader Kings II

Notifications You must be signed in to change notification settings

scorpdx/chronicler

Repository files navigation

chronicler

Chronicle parsing library for Crusader Kings II

Builds NuGet .NET CLI
Build Status nuget stable > dotnet add package chronicler

How to use

  1. Convert a CK2 save to JSON, using a utility like ck2json
  2. Load the JSON save using JsonDocument.Parse or .ParseAsync
  3. Parse the JsonDocument with Chronicler
var chronicleCollection = Chronicler.ChronicleCollection.ParseJson(jsonDocument);
  1. View individual Chronicles, Chronicle Chapters, and Chapter Entries using the Chronicler POCOs
var chronicle = chronicleCollection.Chronicles.First();
{Chronicler.Chronicle}
		Chapters	Count = 6	System.Collections.Generic.List<Chronicler.ChronicleChapter>
		Character	6392	int
var chapter = chronicle.Chapters.First();
{Chronicler.ChronicleChapter}
		Entries	Count = 5	System.Collections.Generic.List<Chronicler.ChronicleEntry>
		Year	769	int
var entry = chapter.Entries.Last();
{Chronicler.ChronicleEntry}
		Picture	null	string
		Portrait	194170	int
		PortraitCulture	"old_frankish"	string
		PortraitGovernment	"feudal_government"	string
		PortraitTitleTier	3	int
		Text	"West Francia was attacked by the Frankish realm of West-Frisia, ruled by Duke Anselm."	string