Skip to content

Latest commit

 

History

History
48 lines (41 loc) · 1.69 KB

README.md

File metadata and controls

48 lines (41 loc) · 1.69 KB

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