XCOM Third Small Item Mod

From Nexus Mods Wiki
Revision as of 03:18, 17 November 2018 by Dubiousintent (talk | contribs) (Added 'Category:Mod_Creation' & 'Category:Mods')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
XCOM Soldier Loadout Screen

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 (see Flash SWF Editing).

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

Command1.upk >> Packages.InventoryList::InventoryList
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

Referred to by this article:

That refer to this article: