Skip to content

DDS and Images

Joël Deffner edited this page Jul 14, 2026 · 1 revision

DDS and Images

CK3's interface uses DDS textures. That causes two everyday problems for modders: normal image editors and VS Code cannot preview a .dds, so you are editing blind, and if you get a texture's size or format wrong the game usually just shows nothing, with zero error output. This page covers the tooling that fixes both.

The extension ships a pure-TypeScript DDS decoder (DXT1/3/5, BC7, and uncompressed A8R8G8B8), so none of this needs external codecs.

Preview a texture inline (hover)

Hover any .dds path in your script and the texture renders right there in the hover card. Path resolution is mod-first: if your mod overrides a vanilla texture, you see your version, matching what the game will actually load. This is the fastest way to confirm an icon = ... or texture = "gfx/..." points where you think it does.

Open a texture in a full preview

Click any .dds file in the Explorer to open a zoomable preview panel. Mouse-wheel zooms at the cursor, middle-mouse drag pans, pixels stay crisp past 100%, and the toolbar has fit and 1:1 buttons plus format and size info and an alpha checkerboard. No more "unsupported text encoding" dead end when you open a texture.

Convert an image to DDS

Right-click a .png, .jpg or .webp in the Explorer and choose CK3: Convert Image to DDS (also on the command palette and in the CK3 Tools view). A format picker appears:

  • Auto (recommended): BC3 (DXT5) when the image has transparency, BC1 (DXT1) otherwise,
  • BC1 / DXT1: compressed, no alpha, smallest files (photos, illustrations),
  • BC3 / DXT5: compressed, with smooth alpha,
  • uncompressed A8R8G8B8: exact pixels, the right call for crisp small icons.

The result is written next to the source as <name>.dds, with no mipmaps, matching vanilla interface textures.

Know the sizes and formats vanilla uses

Run CK3: Show Image Guidelines (sizes & formats) for a reference of the dimensions and formats the game actually uses, every number measured from the vanilla files. Match them and your art drops into the UI without scaling artifacts. A few concrete examples from that reference:

  • Trait icons (gfx/interface/icons/traits): 120×120, uncompressed.
  • Event scene backgrounds (illustrations/event_scenes): 1592×848, DXT1.
  • Decision illustrations (illustrations/decisions): 1100×440 (2200×880 for hi-res), DXT1.
  • Faith icons (icons/faith): 100×100, uncompressed.
  • Coat-of-arms colored emblems (coat_of_arms/colored_emblems): 256×256, DXT5 (and authored as recolor masks).

The rule of thumb straight from the vanilla data: small icons are uncompressed, big illustrations are BC1, anything with alpha gradients is BC3.

Why the exact path matters

The game finds textures by exact path. Your mod mirrors, say, gfx/interface/icons/traits/my_trait.dds, and the trait's icon key (or the default <trait_name>.dds lookup) must match it precisely. A typo means an empty icon and no error in any log. Non-power-of-two sizes are fine for interface textures (vanilla is full of them). GUI files reference textures with forward slashes, for example texture = "gfx/interface/icons/my_icon.dds".

Clone this wiki locally