Crusader Kings II

Crusader Kings II

A Bigger Interface
Sinner 20 Jun, 2019 @ 10:13pm
Extending Interface even more
Hey Kamufen, I am a huge fan of your work and this mod, it's made this game playable before and even after UI scaling became available. I was wondering how hard it would be for the average non-modder to adjust some of the values in your mod scripts to extend certain interface elements even more, specifically the character finder. I love to keep my character finder up while I play in order to monitor traits and disease changes for my dynasty, and currently as far as I can tell, the max number of characters shown is 10.

I play on 2560 x 1440 resolution with the UI scale at approx 1.22, and there is enough room for aprox. 3 more characters with that set up. I'd greatly appreciate any help you can offer. I understand that any changes made would need to be re-applied each time the mod is updated.

Here is a screenshot of how it looks currently http://prntscr.com/o4ok6b

Cheers
Sinner


Last edited by Sinner; 20 Jun, 2019 @ 10:14pm
< >
Showing 1-2 of 2 comments
Kamufen  [developer] 21 Jun, 2019 @ 1:35am 
Thanks.
I only have a 1080p screen myself, which is why the mod is made to fit 1080p screens.

It's not hard at all. To be honest, I was a complete modding noob when I began making this.

Extending the interface takes two steps.
The first step is to extend the background. To do this edit the .dds files located in "...\gfx\interface\". To edit them I use GIMP and this plugin[code.google.com]. The gfx for the character finder is charbrowser_bg.dds, and the character selector (ex. apointing advisors etc.) is charselect_bg.dds. Note that you also need to edit the gfx files in the subfolders for muslim/pagan/indian interface (for the char finder indian interface uses the muslim one).

Step two is adjusting the placements of the different UI elements. This is done by editing the .gui files located in "...\interface\". I recomend using notepad++ or similar to edit. By using the console command "guibounds", you will get info on file and line for each ui element. You can edit the .gui files while running the game, and updating the changes by using the console command "reload [file name]".
The file domestic_characters.gui governs the character finder, and the file character_selection.gui governs the character selector. To add 3 more characters you need to edit the y size value inside "windowType = { name = "character_list" ".

The interface is adjusted by pixels, with scaling enabled this pixels are "stretched" (I'm no programmer, I don't know exactly how the scaling works) hwich means there is no longer a direct 1:1 ratio. This isn't a problem, just meaning you have to test by trial and error which value fits best.

When reaplying changes after an update, using winmerge is very helpful. And if you make your changes in a separate submod you changes won't be automatically overwritten when I push an update. whan making your submod add the line "dependencies= {"Bigger Interface"}" to your .mod file, this will change the mod load order, prioritising your files.

The best way to learn modding is just to experiment and test by trial and error.
Sinner 25 Jun, 2019 @ 6:57am 
Thanks for the info and the detailed response! I'll give that a shot!
< >
Showing 1-2 of 2 comments
Per page: 1530 50