• 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.

Antalia

Second Lieutenant
23 Badges
Jul 25, 2012
137
0
  • Crusader Kings II
  • Majesty 2 Collection
  • A Game of Dwarves
  • Warlock: Master of the Arcane
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Prison Architect
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Green Cities
  • Tyranny: Archon Edition
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • 500k Club
  • Victoria 2
  • Magicka
  • Europa Universalis IV
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Cities in Motion 2
  • Cities in Motion
Edit #3: As an alternative to editing the file yourself, you can install Arumba's 'Keyboard Shortcuts and Interface Adjust' mod. This adds the shortcuts I describe below, and some other very useful ones, and I believe it does not change the checksum of the game! (So, it's usable in multiplayer.)

Edit #2: In post #34 I explain how to add the "transfer unit" shortcut.

The first few times I played it didn't bother me, but then it began to. Clickity clickity clickity click...every time I use my military, I have to embark about 50 units--and the number just keeps increasing and getting more fatiguing as my empire grows! I spent a lot of time searching the internet trying to find out how to add a shortcut key to take some fatigue out of all the clicking required to embark, and I came up with nothing helpful. But Arko helped me figure out what I needed to do in the Quick Questions thread! This is very helpful to me - so I am posting my working result here. I'm pretty sure it will help someone else!

To create a shortcut key for embarking a unit:

1. Make a backup copy of 'unitpanel.gui'. My game was installed by Steam, so for me this file is in 'Steam\steamapps\common\crusader kings ii\interface".

2. Open 'unitpanel.gui' in a plain text editor (Notepad is great). It is a plain text file.

3. Do a search in the file for "loadtoshipbutton". We are looking for a "guiButtonType" block. The area around what we need looks like this, without the underlined part:
Code:
		guiButtonType = {
				name = "loadtoshipbutton"
				position = { x = 150 y = 39 }
				[u]shortcut = "v"[/u]
				quadTextureSprite ="GFX_unitpanel_button_loadtoship"
				clicksound = generic_click_01
		}
4. Add a new line specifying the desired shortcut key anywhere between the curly braces (shown underlined in the code block above). I just put it after the "position" entry, to follow the standard in the other .gui files. As you can see, I set my shortcut for Embark to lowercase letter V.

If using a letter, make sure to use a lowercase one if you don't want to press Shift every time you use it!

I also added shortcut = "x" for "disbandbutton", and shortcut = "n" for "newunitbutton" (both are frequently used actions for me). These entries are right above the "loadtoshipbutton" section in the file.

5. Now, search further down the file for the multiple-unit "loadtoshipbutton" entry, and repeat the same edit.

Please note that this will not allow a single-key embark for multiple stacked units. The embark buttons in the interface are only for single units. (Try embarking a stack of non-merged units with the mouse, to see what I mean. They have to be embarked one at a time.)

6. Save the file.

(7. Profit!)

Shortcut keys can apparently be added to anything specified by the "guiButtonType" block in the interface .gui files. Happy keyboarding!
 
Last edited:
I'll give this a try later. Alone for the embarking this is a god send
 
The only thing better would be an "embark all" button to load all armies onto ships at once.
 
That is nice to know how to mod some shortcuts. Great.

You could also simply collect all armies at one point, combine them and have one click. Not much of a clicketyclick it seems.
 
The embark all has been my #1 feature request for patches since I started playing, and while this doesn't embark all my troops it significantly speeds it up.


You could also simply collect all armies at one point, combine them and have one click. Not much of a clicketyclick it seems.
But moving the armies together by sea is much faster, and in my experience speed of getting your armies combined often decides CK2 wars.
 
SPEEEEEEDDD!!!!
Sure.

Shortcuts are always nice to have.
 
I tried to add a shortcut key for the multi-unit embark. There is a promising-looking "loadtoshipbutton" further down in the file under a section labeled "# Always used for multiple selected units". I added a shortcut key to it as well (will add this to original post) and it does work--but it only embarks the top selected unit instead of all of them.

Of course, there's no way to multi-embark with one click of the mouse either - you have to merge the units (default key to do this is "g", by the way) and then you can do a single-unit embark. Alternatively, you can click-v-click-v-click-v-click-v (replace "v" with your chosen shortcut, of course) and embark the units one by one.

I think it is probably not possible to add a trivial shortcut key to embark multiple stacked units, simply because there isn't an interface button to do this with the mouse either (strange as that seems).
 
Thank you! This will save much time. Also it and many other shortcuts should really be added in a patch. It's basically the main reason I abandon my games when my empire gets too big.
 
Put Together a Basic Mod

Hey Antalia,

Thanks very much for this info, it's super-useful :D! I put together a quick mod, attached below, based on the info you provided. If anyone wants to use it, just extract the contents to your CK mod folder and check it in the launcher. Of particular note, it seems like modifying the GUI files doesn't mess with your checksum since it's purely a display matter, so you can probably use this even in multiplayer without having to get the other players to use it. I have no particular interest in improving or maintaining this, so if you or anyone else wants to pick this up and run with it, feel free :).

What the mod does:
-Adds the "v" key as a shortcut to embark troops onto ships as described by OP.
-Adds "n" for new unit and "x" for disband, also as per OP.
-When you have a province selected, adds "l" (lowercase L) as a shortcut key to raise or lower the province's troops, and "k" as a shortcut to raise/lower the province's ships. Should speed up rapidly raising a bunch of stuff :D.
-(Only for personally-owned holdings) When you have a holding's building screen open, "L" should raise/lower levies for just that holding, and "K" raise/lower ships.
-(Only for personally-owned minor holdings, i.e. not a county seat) When you have a holding's building screen open, "v" will create a new vassal. Should slightly speed up post-invasion/holy war cleanup.

Also relevant: a post listing the default game hotkeys, such as "g" for joining units.
http://forum.paradoxplaza.com/forum/showthread.php?590216-Keyboard-Shortcuts


I tried looking into making shortcut keys for some of the right-click pop-up menus, i.e. create vassal when right-clicking on a holding, but it looks like those are generated by the game exe rather than exported to text.

I also tried to copy over a couple of the buttons from the military screen (i.e. raise a vassal's levies) to the character view screen. I thought that would be very handy. They showed up but didn't do anything, so I'm guessing that would require exe changes. If someone more knowledgeable wants to take another crack at it, the relevant buttons start at "ask_vassal_army" in domestic_military.gui and I was trying to copy them over into domestic_dynastic.gui.

Edit January 2013: Note that the file below was created for a much earlier patch version than is current. I don't even remember which patch was current when I made it, but I think it was pre-1.06. So it's no longer suitable to use as-is, and it would probably mess up your CK2 interface if you tried. You'll need to instead make your own version using the examples described in this thread.
 

Attachments

  • Keyboard Shortcuts.zip
    12,2 KB · Views: 310
Last edited:
Shortcut keys can apparently be added to anything specified by the "guiButtonType" block in the interface .gui files. Happy keyboarding!
This is a great find! After some digging I found entries to make shortcuts to invite backers, send offers and sort by plot power.

Does anyone know where is the definition for '<' (back) button and how to add shortcut to dismiss the letter popup dialog? I thought I've found it in eventwindow.gui (near the seal) but it doesn't seem to work :-(
 
Out of curiousity, why were these specific letters chosen? Seems like Z C B are still open, why not just put them nearby? that way the whole qwertyuiop asdf zxcvb grid would be used.. Just an idea/question.
 
This is a great find! After some digging I found entries to make shortcuts to invite backers, send offers and sort by plot power.

Does anyone know where is the definition for '<' (back) button and how to add shortcut to dismiss the letter popup dialog? I thought I've found it in eventwindow.gui (near the seal) but it doesn't seem to work :-(

I found an "icon_topbar_back" in main.gui which is probably the back button. Not sure what you mean by the letter popup dialog? Maybe a screenshot would help.

Regarding plot backers, this might be common knowledge but I only found it recently. If you right-click on a potential backer and use the diplomacy options in the right-click menu, it will open that character's diplomacy screen and let you interact with them without closing the list of potential plot backers. This makes it a ton easier to quickly go through the list :D.

Out of curiousity, why were these specific letters chosen? Seems like Z C B are still open, why not just put them nearby? that way the whole qwertyuiop asdf zxcvb grid would be used.. Just an idea/question.

Going to assume you mean the choice of L/K for raising levies and ships. I picked L for Levies and K because it was next to L. These could be changed to z/c/b fairly easily, but none of those are next to each other. Also, currently you still can't raise and board all at the same time anyway, so having the keys next to each other didn't seem important. If someone can manage to come up with a way to, with a province selected, change the selection to all controlled troops occupying that province, then that would be a super-amazing find which could result in the next level of streamlining.
 
Out of curiousity, why were these specific letters chosen? Seems like Z C B are still open, why not just put them nearby? that way the whole qwertyuiop asdf zxcvb grid would be used.. Just an idea/question.
I picked X, V, and N simply because I was reasonably sure they weren't in use by anything else, and I thought they'd be easy for me to remember and not mix up with each other (I hate hitting 'disband' when I don't mean it! Happened enough with the mouse when I was trying to go too fast). "X" as in "get rid of it", "N" for "new", and "V" for..."V" looks kind of like a ship? I don't know, hehe. I have a bad cold, and the medication was probably involved :)

If I chose the letters again, I'd use all left-handed ones. I was just horribly excited to share my knowledge once I got it working :)
 
What would be really awesome is if you could add a hotkey to embark troops to nearest ship (for territories that aren't on the sea) and even more awesomer if you could do it for multiple selected armies (on different territories)!
 
What would be really awesome is if you could add a hotkey to embark troops to nearest ship (for territories that aren't on the sea) and even more awesomer if you could do it for multiple selected armies (on different territories)!

This is definitely needed to make playing larger empires reasonable. It can't be done through hotkeys though, Paradox needs to program algorithms for this and put them in a patch.
 
I have tried out your quick mod, although i did change the keybinds to z for raise levy, x for disband, c for raise ships, v for embark.

I have to say, I LOVE PLAYING COASTAL PROVINCES NOW! I used to absolutely hate it, because it was easier as an inland empire to just raise all, box em, and rally to a target. Now though, as a coastal empire you can just click a county, z-c then click the army and press v. It takes about .25 seconds per county. And BAM! You have you're whole army raised embarked and ready to land somewhere in a matter of days versus the months it takes walking. Its great!

Here's one more thing we could try to locate, does anyone know how to change or add a keybind to the 'Okay' button after you click the disband button? Currently I can use the center enter key to accept, but not the enter key on my keypad. I'd like to mod that button if possible :)
 
I have tried out your quick mod, although i did change the keybinds to z for raise levy, x for disband, c for raise ships, v for embark.

I have to say, I LOVE PLAYING COASTAL PROVINCES NOW! I used to absolutely hate it, because it was easier as an inland empire to just raise all, box em, and rally to a target. Now though, as a coastal empire you can just click a county, z-c then click the army and press v. It takes about .25 seconds per county. And BAM! You have you're whole army raised embarked and ready to land somewhere in a matter of days versus the months it takes walking. Its great!

Here's one more thing we could try to locate, does anyone know how to change or add a keybind to the 'Okay' button after you click the disband button? Currently I can use the center enter key to accept, but not the enter key on my keypad. I'd like to mod that button if possible :)

Getting decent keybinds should definitely make coastal stuff far more fun :). Regarding the disband confirmation, it's probably one of the "AgreeButton"s in DefaultDialog.gui. The shortcut for those is listed as "ENTER". What you'd change it to in order to get the numpad enter to work I'm not sure...?
 
I put together a quick mod, attached below, based on the info you provided.
Thank you, Alphanos! I'll add a note about this to the OP.
Here's one more thing we could try to locate, does anyone know how to change or add a keybind to the 'Okay' button after you click the disband button? Currently I can use the center enter key to accept, but not the enter key on my keypad. I'd like to mod that button if possible
I'd love to use NumPad [Enter] for "Accept", too--so please post back if anyone figures this out!
 
In lieu of a 'embark all' button, it would be nice if when you direct an army to go into a body of water, when there are boats there they path the fastest way to get to that water. When there are no boats there, they act like idiots and don't know what you mean. I would love if you could just click the water and they STILL go to the closest direct path to that water, so that you can have them head towards an area where boats *will be*. :(
 
While we are dreaming :), I wish that there could be a tooltip on water zones to tell me the number of troops I have already embarked with that zone as their final destination. This would save slightly on batteries for my cell phone and its calculator app :)

(Right now I use a pretty good method to reduce the amount of calculation I have to do at all if I want to send, say, 50,000 troops to zone X, 32,000 to zone Y, and 6,000 to zone Z. It's not bad at all. But, if the game would help me out just a little bit more, opening up the arithmetic processing power of my computer a bit more, I think that would be great.)