Skip to content

Instantly share code, notes, and snippets.

How Europa Universalis IV Places Country Labels

The automatic MAPNAME_REALMS placement pipeline, reconstructed from eu4.exe:

Province graph → connected groups → pixel moments → two regressions → validated baseline → text scale and spacing → cross-sections → Catmull–Rom → glyph geometry.

RE.md provides Ghidra function addresses and disassembly locations.

1. Raster and Adjacency