r/hoi4 • u/SirCypkowskyy • 5h ago
Mod (other) I made a mod that lets you rename basically anything in HOI4: your country, leaders, parties, factions, states, cities, your leader's picture, country flag, even your subjects!
Upfront: I built this with AI coding agents (Claude Code and Codex). It's mainly for roleplay in my campaigns, a toy I tinker with after my day job as an AI software engineer. If the AI part bothers you, fair enough, just don't download it. I'm not going to argue about it.
Links
- Rename Anything on the Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=3819937546
- CAPIE on the Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=3819929471
- Rename Anything source: https://github.com/capie-mods/rename-anything
- CAPIE source and releases: https://github.com/capie-mods/capie
You click a pencil next to a name, type a new one, and press Enter. That works for:
- your country's name and adjective, without touching its flag or colour
- your leader and your parties (all four ideology groups)
- states, cities and other characters (generals, admirals, advisors)
- factions you lead
- your subjects, through a new "Rename this country" diplomatic action
There's also a flag picker (any flag from the game, or a subset, depending on the game rules you set) and a leader portrait picker. Game rules decide who may rename what, and any feature can be switched off. The host can also turn on a news event when someone renames a country. There's a 5-day cooldown between renames. Polish letters (ą, ę, ł and the rest - my native language) work, typed straight from your keyboard.
About the injector, because people will ask: HOI4 mods can't do this on its own. There's no way for a mod to read free text the player types, and the only way to change a country's name from script is a cosmetic tag. Cosmetic tags have to be written into the mod ahead of time, and they swap the flag and colour along with the name. I wanted any name, typed in game, without touching the flag.
So the mod comes with a small native library, CAPIE (Cyprian's API Extender, after my name). A launcher loads it into the game once the main menu is up, and the game files on disk stay as they are. It makes no network connections, and it only starts on the exact game build it was written for (1.19.3.0). On any other build it stays off and the game runs normally. You switch it on and off like a mod: there's a "CAPIE" item on the Workshop, and the launcher only loads CAPIE when that item is in your playset.
Without CAPIE the mod still partly works: characters, states and cities can be renamed with an on-screen keyboard, and everything else tells you it needs CAPIE.
A few things before you try it. Multiplayer hasn't been tested with two players yet. It might work, it might desync, so I'd play single player with it for now. It's also only for HOI4 1.19.3.0 currently; a game patch turns CAPIE off until I update it.
Some antivirus engines on VirusTotal flag the DLLs (4 out of 75 at most, all machine-learning or reputation engines; Defender, Kaspersky, ESET, Bitdefender and Avast don't). That's expected for a new, unsigned file that loads itself into another process. The results are linked in the release notes, and the code is open, so you can check what it does or build it yourself.
If something breaks, tell me here or open a GitHub issue. Ideas are welcome too. I'm thinking right now about giving an ability to switch your nation's colors, and in the future it'd be nice to create something resembling a custom nation builder.
