XCOM Third Small Item Mod
Contents
Overview
This article will provide all of the information used to develop the mod to allow the use of a third small item in the Soldier Inventory Loadout Screen
Background
By default, if armor and / or perks are selected that cause the number of small item slots to increase to 3, the third small item "box" would be clipped off the bottom of the soldier inventory screen. This mod "squeezes together" the inventory items, allowing the third small item to be fully displayed.
This mod changes the Actionscript code that is embedded within the Command1.upk. The code is not viewable with UE Explorer. The Actionscript was extracted manually from Command1.upk and manually broken into separate files, allowing decompilation with a SWF decompiler.
Details about what the Mod does
The mod simply alters the padding value between items from 5 to -5.
File Changes
Only one small file change is required to implement this. This hex change is applied to Command1.upk.
REMINDER -- Command1.upk has to be decompressed before the hex change can be applied.
Hex Change
original: | 96 09 00 04 01 08 02 07 05 00 00 00 |
new: | 96 09 00 04 01 08 02 07 FB FF FF FF |
Decompiled Code
Original Code
function InventoryList() { super(); this.padding=5; }
New Code
function InventoryList() { super(); this.padding=-5; }
ToolBoks Custom Mod
The following text can be used to create a Custom Mod file to install the change with ToolBoks. Version 1.21 or greater is required.
MOD_NAME=Third Small Item AUTHOR=amineri DESCRIPTION=Squeezes together the equipped items in the Soldier Loadout UI so that three small items can be fully displayed. This mod requires ToolBoks v1.21 or greater to install. Version: 1.0 Compatible with XCOM Enemy Unknown versions: - Patch 4 ( Changelist: 356266 ) UPK_FILE=Command1.upk OFFSET=47785539 [MODDED_HEX] { hex offset 2D92643 } { __Packages.InventoryList.InventoryList } { Change value for this.padding } { before: } { UNINSTALL } { 05 00 00 00 }{ padding = 5 } { after: } { INSTALL } FB FF FF FF {padding = -5}
References
Nexus forum post relating to this mod. Feedback and comments are welcome! [[1]]