XCOM: Enemy Unknown
0 of 0

File information

Last updated

Original upload

Created by

Drakous79

Uploaded by

Drakous79

Virus scan

Safe to use

Tags for this mod

About this mod

A hotkey for soldier's hunker down ability will work for civilian's head down ability as well. The mod also fixes an issue of double played hunker down sound.

Permissions and credits
Changelogs
A hotkey for soldier's hunker down ability will work for civilian's head down ability as well. The mod also fixes an issue of double played hunker down sound.

Compatible with
  • XCOM Enemy Unknown, changelist 398179 (EU Patch 6); vanilla
  • XCOM Enemy Within, changelist 402256 (EW Patch 3); vanilla; should work with Long War 1.0


Features
  • Enables hunker down hotkey for XCOM Enemy Unknown.
  • Hunker down hotkey will work for civilian's head down as well.
  • Adds a feature to select and confirm hunker down, head down, reload and overwatch abilities by pressing non-numeric keys, while ability's confirmation dialog is open.
  • Fixes double played hunker down sound after confirming a selection of hunker down ability with OK button.
  • Fixes doubleclick not working on reload and head down ability icon.
  • Fixes script's warnings about civilians not having active weapon.


What is hunker down and head down?
  • Both are abilities that increase unit's defense.
  • Hunker down can be performed by soldiers (XCOM, EXALT, mutons) in cover. Doubles cover bonus and provides immunity to critical hits, but reduces sight radius. Adds +40/+80 (low/high cover) defense.
  • Head down can be performed by civilians in or outside cover. Adds +10 defense.


Where to set the hotkey?
The hotkey can be set in Options -> Interface -> Edit Keyboard Bindings -> Tactical Shortcuts -> HUNKER DOWN.


Hunker down, head down, reload and overwatch hotkey behavior
  • If available, and there is no confirmation dialog or desired ability's confirmation dialog, desired ability is performed immediately after a key press.
  • If available, and there is different ability's confirmation dialog, the first key press selects desired ability and the second key press performs it.
  • If unavailable, an error sound is played.


Install/uninstall
with PatcherGUI or PatchUPK (UPKUtils by wghost81).

  • Download desired mod file.
  • Run PatcherGUI.
  • Use Browse buttons to set correct path (game's directory) and load mod file.
    * XCOM Enemy Unknown path ends with XCom-Enemy-Unknown.
    --> Example: D:\Steam\SteamApps\common\XCom-Enemy-Unknown
    * XCOM Enemy Within path ends with XEW.
    --> Example: D:\Steam\SteamApps\common\XCom-Enemy-Unknown\XEW
  • Use Apply button to patch the game.

If you patch XCOM Enemy Unknown, it is important to Disable hash check in PatcherGUI Tools menu, or the game will crash.

If patching fails, you can try Show debug log option in PatcherGUI Tools menu to see what went south.

Uninstallation options can be found under Show log button.
  • Run PatcherGUI.
  • Click Show log button.
  • Select a mod you wish to uninstall from the list of installed mods. The list is different for each game's directory.
  • Use Load uninstaller button. If available, uninstallation mod file loads and waits to be applied.
  • Use Apply button to patch the game.

In Backups directory are backups of changed *.upk files, that can be manually copied back to game's XComGame\CookedPCConsole folder, if uninstaller fails.

If everything fails, you can always verify integrity of game files with Steam.


Code changes
This section aims to help other modders. The list states what objects were modified and how, in what version of the mod.

Legend:
  • EU - XCOM Enemy Unknown
  • EW - XCOM Enemy Within
  • A - An addition. Usually at the end. Might contain jump(s). In case of patching different code than vanilla patch 6, memory offset of added jump(s) must be recalculated.
  • R - A replacement. Object's entire code is replaced. Can be patched over and over.
  • FNR - Find and replace operation(s). To increase compatibility with other mods.

XComGame.upk
  • [EU] [FnR] XComKeybindingData.TacticalBindableCommands
  • [EU] [R] XComTacticalInput.ActiveUnit_Moving.Key_F9
  • [EU] [A] XGAbility.ApplyCost
  • [EW] [R] XComTacticalInput.ActiveUnit_Moving.Key_K
  • [EU, EW] [R] UITacticalHUD_WeaponContainer.SetWeapons
  • [EU, EW] [R] UITacticalHUD_AbilityContainer.OnMouseEvent
  • [EU, EW] [R] UITacticalHUD_AbilityContainer.OnUnrealCommand
  • [EU, EW] [FnR] UITacticalHUD_AbilityContainer.OnAccept


Credits and thanks
  • Firaxis/2K Games for XCOM
  • wghost81 for UPKUtils
  • people discussing XCOM modding at the Nexus Forums (XCOM Mod Talk)