Skip to content

Work with files from Paradox Interactive grand strategy games: CK3, EU4, HOI4, and more

License

Notifications You must be signed in to change notification settings

bencvt/Parsadox

Repository files navigation

NuGet ci

Parsadox is an open-source .NET library to work with files from Paradox Interactive grand strategy games.

Supported games:

  • Crusader Kings II
  • Crusader Kings III
  • Europa Universalis IV
  • Imperator: Rome
  • Hearts of Iron IV
  • Stellaris
  • Victoria II

Example

After installing the NuGet package:

ISaveGame saveGame = SaveGameFactory.LoadFile("my_game.ck3");

// Inspect data
string id = saveGame.State["currently_played_characters"].First().Content.Text;
INode player = saveGame.State["living"][id];
string name = player["first_name"].Value.Text;
decimal? stress = player.GetDescendantOrNull("alive_data", "stress")?.Value.AsDecimal;
Console.WriteLine($"{name} has {stress ?? 0} stress");

// Modify data
if (stress.HasValue)
    player["alive_data"]["stress"].Value.AsDecimal -= 25;
saveGame.DisableIronman().WriteFile("my_game_modified.ck3");

Legal notice

Parsadox is a community project unaffiliated with Paradox Interactive.