Skip to content

Repository files navigation

CK3 Smaller Map

CK3 Smaller Map reduces the playable Crusader Kings III map for improved performance. It is published on the Steam Workshop.

The repository includes a source-preserving update tool. When CK3 is updated, you can rebuild the Mod from the installed game data instead of editing provinces.png manually in Photoshop.

Requirements

  • Python 3.10 or newer.
  • A local Crusader Kings III installation.
  • The packages in requirements.txt.

Install the Python dependencies once:

python -m pip install -r requirements.txt

Updating the Mod

Edit the three settings at the top of update_mod.py:

  • title_delete: landed titles to remove. A selected empire, kingdom, duchy, county, or barony removes its complete descendant tree.
  • replace_title: exact text replacements for surviving landed titles whose capital would otherwise point to a deleted county.
  • rlps: replacements for removed holy sites. Keys are removed holy-site IDs; values must be holy sites that remain on the map.

The default game path is declared as GAME_PATH. It can be overridden for one run with --game-path:

python update_mod.py --game-path "E:\SteamLibrary\steamapps\common\Crusader Kings III\game"

Use a dry run first after changing the configuration or installing a new CK3 version:

python update_mod.py --dry-run

--dry-run performs the complete parse, map rewrite, and integrity audit, but does not write or delete any Mod files.

What the Generator Updates

The generator reads the installed game as input and rebuilds the affected files inside 3488444772:

  • every affected common/landed_titles/*.txt file, not only 00_landed_titles.txt;
  • holy-site definitions and religion definitions;
  • bookmarks, title history, province history, and map adjacencies;
  • map_data/provinces.png.

Deleted provinces are recolored with a neighboring impassable province color. The tool preserves valid RGB values from definition.csv; it does not create anti-aliased colors or new province colors. It also removes enclosed rivers, lakes, impassable terrain, and holding-less/road provinces that would otherwise leave colored fragments inside deleted land.

For surviving title history, liege and de_jure_liege references to deleted titles are explicitly set to 0. This prevents a restored region from losing its history because one historical entry still references a deleted liege.

Safety Checks

Generation fails before writing partial output if it finds, among other issues:

  • a configured title missing from the installed CK3 version;
  • a capital or de-jure liege that still references deleted land;
  • title history that still points to a deleted liege;
  • a changed parent or province assignment for a surviving landed title;
  • malformed Clausewitz braces or unknown map colors;
  • no reachable impassable province to receive deleted map pixels.

Generated file paths are recorded in .smaller_map_generated.json. On a normal run, obsolete files previously generated by this tool are removed from the Mod folder. Files outside the manifest are left alone.

The game directory is always read-only input. Output is locked to this repository's 3488444772 folder; the command line cannot redirect it, and the tool rejects a game directory that overlaps the Mod directory.

Project Layout

  • update_mod.py — configuration, generation workflow, CK3 text transforms, validation, and output writing.
  • ck3parser.py — source-preserving Clausewitz tokenizer and edit helpers.
  • ck3titles.py — landed-title catalog, parent hierarchy, and province index.
  • 3488444772/ — generated Mod content.

After updating map data or title history, fully restart CK3 and start a new game. Existing save files do not reinitialize province, title, or historical ownership data.

Acknowledgement

This work is inspired by Smaller World Map by Starmender, whose work taught me the basic map-modding process.

About

CK3 Smaller Map — a Crusader Kings III map rescaling mod

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages