• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Shn

Private
51 Badges
Dec 19, 2009
21
0
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Pre-order
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Divine Wind
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Federations
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Crusader Kings II: Horse Lords
  • Victoria 2
  • 500k Club
  • Cities: Skylines Deluxe Edition
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Mare Nostrum
I've been playing around with DLL injection to patch the hard-coded limit on duchy titles for kings since it's been really annoying me that if you're a mega-duke and you form/usurp a kingdom it significantly weakens you, and I've come up with something that seems stable, but it's only been tested by me in one game on 1.03b of the GamersGate version of the game on Windows 7.

It's a bit messy since I don't really do much Windows programming so I had to make a lot of it up as I went along. It very likely only works on the GamersGate version of the game at the moment, because I don't have the Steam version of ck2.exe to test it with. I'm going to include the source here if anyone wants to improve it or make it work with the Steam version.

Here's a pre-compiled version:

View attachment CustomDuchyLimitBin.zip

And source:

View attachment CustomDuchyLimitSrc.zip

The config file is called duchymod.txt and has two lines, the first containing the duchy limit for a king and the second containing the opinion penalty for each duchy above that limit. The highest limit possible at the moment is 127, anything above that something bad will happen. Just run the game and once it's loaded run InjectMod.exe (doesn't really matter when, can be in the middle of a game), the mod will be loaded until you restart the game.
It shouldn't matter where the files are, as long as the exe, dll and config file are in the same directory. On Windows Vista and above you will need to have admin privileges to run it (it will automatically ask to execute as admin when you run it). I'm not sure about XP.

Hopefully they'll un-hardcode the values soon so this won't be necessary, but I'll try to keep it up to date with the latest version of the GamersGate version of the game at least.

There is no guarantee this won't crash your game, so please save before trying to load it.