======================= -- Civ5 Hotkey Mod -- =============================
v1.1 For Civilization 5 (Complete)

======================= - About - ========================
The Civ5 Hotkey Mod collects the hotkeys for Sid Meier's Civilization V to make 
 customizing them easier. It includes several pre-configured layouts that can be swapped 
 around or used as templates for your own custom layout.

The mod updates existing game files - organizing those updates in one place and labeling 
 them to make the hotkeys easier to find and customize. 'Mod' may be a strong term for 
 this, no new content or systems are added. Some commands that do not normally have 
 hotkeys (ex. Great Person abilities, Promotions) can be given hotkeys in the mod.

You can edit the hotkey changes as you like (see 'Customizing Hotkeys' section). The mod 
 includes the following layouts:
 -Default Hotkeys: Doesn't change any hotkeys from the base game.
 -Hotkeys Simplified: The mod author's attempt at better hotkeys. Installed by default.
 -Steam Controller: Allows all hotkeys to be bound on the Steam Controller.
  
There are two versions of the Hotkey mod:
 -Local Version: For single-player use through the mod menu.
 -DLC Version:   For single- and multi-player use as a DLC-type mod without using the mod 
                 menu.
  
============ - Compatibility & Required DLC - ============
Requires both expansions (Gods & Kings + Brave New World). Use without them should cause 
 errors since some hotkeys reference expansion content. The mod's files could be edited 
 and renamed to work without the expansions if you wish to do so.

The DLC version is usable in multiplayer games with players who don't use this mod. There 
 shouldn't be conflicts with other players since it doesn't change any gameplay elements 
 or alter game .dll files (similar to the EUI-Enhanced User Interface mod).

The Civ5 Hotkey Mod should work as-is with any mod that doesn't alter the same game 
 files. It can be adapted for conflicting mods with a few extra steps during installation.

====================== - Layouts - =======================
Note: These layouts are a first attempt. With further testing and feedback they may be 
 altered and improved.

== Hotkeys Simplified: ==============================
The Hotkeys Simplified layout combines many hotkeys where they don't conflict. For 
 example, most worker improvement have their own hotkeys, unmodded, but most can't be 
 used at the same time as the others. A quarry and a pasture can't be built on the same 
 tile - so they can share the same hotkey. A settler will never attack and a military 
 unit will never found a city so the same hotkey can be used without conflicts.
    
Instead of assigning hotkeys by name (ie. 'M' for move, 'A' for alert), this layout is 
 based around 'WASD' for quick access. Many highly used hotkeys are grouped together -  
 'Primary' (Found City,  Attack, Airstrike...),  'Secondary' (Pillage, Air Sweep, 
 Repair...), etc. Some actions use the Shift-key modifier, Ctrl & Alt are mostly not used.

Some commands without hotkeys in the base game have the hotkey attribute in the file 
 data. It was left blank by the developers, but hotkeys can be added. Actions such as 
 founding a religion or promoting a unit have hotkeys assigned in this layout.

See 'Layout_Hotkeys Bindings.txt' for a diagram of the hotkey placements.

== Steam Controller: ================================
The Steam Controller layout also combines hotkeys so that every action could be bound on 
 the Steam Controller. 

The community binding 'Civilization V | Civ5 Hotkeys Mod - Complete Bindings' is 
 designed for use with this mod. It doesn't use any touch menus - every hotkey is 
 assigned to a different button. Navigation and unit controls are bound in the Default 
 action set, with a separate action set for the information overviews, map UI 
 toggles, and other shortcuts. The Right Pad controls the mouse and scroll wheel, the 
 mouse clicks are assigned to the Triggers. The Left Pad emulates the D-pad for 4 touch 
 buttons, with a 5th 'center' button assigned to some worker improvements.

See 'Layout_Steam Controller Hotkeys.txt' for a diagram of the controller bindings.

Mac users: There is currently a bug with the Steam Controller on Mac - the modifier keys 
 are not emulated correctly. Controls using Shift will not work for now.
   
================ - Customizing Hotkeys - =================
The game assigns most hotkeys in its .xml data files. The game reads these files while 
 loading to form the data tables it uses during actual gameplay. A typical action's .xml 
 data looks like this:
    
    <Row>
       <Type>BUILD_FARM</Type>
       <PrereqTech>TECH_AGRICULTURE</PrereqTech>
       <Time>700</Time>
       <ImprovementType>IMPROVEMENT_FARM</ImprovementType>
       <Description>TXT_KEY_BUILD_FARM</Description>
       <EntityEvent>ENTITY_EVENT_IRRIGATE</EntityEvent>
       <HotKey>KB_I</HotKey>
       <OrderPriority>97</OrderPriority>
       <IconIndex>21</IconIndex>
       <IconAtlas>UNIT_ACTION_ATLAS</IconAtlas>
    </Row>
        
This code creates the Build Farm worker action. It contains data like the time it takes 
 to build and a link to the action's description from another file. The line 
 '<HotKey>KB_I</HotKey>' assigns the hotkey attribute to the 'I' key. Other attributes 
 are defined as defaults earlier in the file, including modifier keys and an alternate 
 hotkey (turned off by default).

Editing these files to customize a hotkeys is fairly simple - the Build Farm hotkey could 
 be manually changed from 'I' to 'C' by editing '<HotKey>KB_I</HotKey>' to 
 '<HotKey>KB_C</HotKey>'.

The Civ5 Hotkey Mod instead makes 'updates' to those files:
                    
    <!-- Farm | Hotkey: C | Default: I -->
       <Update>
          <Set
          HotKey="KB_C"
             AltDown="false"
             ShiftDown="false"
             CtrlDown="false"
          HotKeyAlt=""
             AltDownAlt="false"
             ShiftDownAlt="false"
             CtrlDownAlt="false"/>
          <Where Type="BUILD_FARM"/>
       </Update>
        
The mod collects hotkeys into updates like this. Build Farm's hotkey is changed to 'C' 
 (HotKey="KB_C") and modifiers could be added by changing their attributes from "false" 
 to "true". Information like the action's name, its default hotkey, and the new hotkey 
 have been added (between '<!--' & '-->').
    
Customize your own hotkeys by changing the HotKey attribute. For example, write a 'D' 
 hotkey as KB_D. A-Z keys are easily changed this way, other keys such as numbers and 
 symbols need to be written in the correct manner:
                    
Do:   KB_D        Don't:   D
      KB_1                 KB_ONE
      KB_SLASH             KB_/
      KB_F2
      KB_NUMPAD5

Don't forget the 'KB_' part of the attribute! 'D' instead of 'KB_D' won't be recognized 
 and the hotkey won't work.

Customizing your hotkeys by starting with the default layout or the layout most similar 
 to what you want. Be sure to save the files after and install your customized layout in 
 the override folder.

Notes: 
Steam Version: Avoid using 'Tab+Shift' or 'F12' - Steam's overlay and screenshot hotkeys. 
 Change the hotkeys in Steam to use them in Civ5.

Mac users: The 'Delete' hotkey ("KB_DELETE") refers to the full keyboard's Delete key 
 (near the Home and Insert keys - it isn't on Magic or laptop keyboards). The Delete key 
 in the backspace position (all Mac keyboards) triggers hotkeys with "KB_BACKSPACE", use 
 the 'fn' modifier to trigger "KB_DELETE" instead on shorter keyboards.

==================== - Installation - ====================
See Installation.txt for install instructions.

The most recent version of the mod can be found at:
https://docs.google.com/document/d/1fDtkwzPFOG0U_b-nMOrRwcxPjP_0kRI0aLlXPrcQPJk/edit?usp=sharing
   
=================== - Author Contact - ===================
Thanks for checking out this mod! This started on a whim to make Steam Controller 
 configuration easier, then I realized it could make the hotkeys faster for multiplayer 
 use as well. After digging a little I saw others thinking along the same path - 
 changing the .xml data files - but I hadn't found the changes easily grouped in a mod. 
 Hopefully this result of a few weeks of tinkering helps some of you out!

Please send any suggestions or reports if things aren't working correctly to my email 
 below. I'm not a programmer so I'm sure there are things that I missed or that could 
 have been done differently. I hope you enjoy the mod!

   Email: pusillanimousgamer@gmail.com