Jump to content

Enemy Within: Items slots modding.


jkjkhardcore

Recommended Posts

This is some amazing stuff that you guys are working with. I never would have guessed that the game actually has an inventory system similar to that of the original game, just hidden out of the player's view. Makes me wonder if someday, it might be possible to allow the player direct access and control, regarding the backpack, and other slots. Probably a pipe-dream, at best, and a recipe for disaster, at worst, but I've seen stranger things, and our resident genius, Amineri, has uncovered some amazing secrets already.

Link to comment
Share on other sites

  • Replies 43
  • Created
  • Last Reply

Top Posters In This Topic

  • 5 weeks later...

I used the code for toolbooks from the nexus wikia and changed it to the new toolbooks version.

But it wont work for EW. What code did u use anbar?

 

mine was

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*/

There is an array error. I got array errors with different mods too. Maybe i did something wrong.

Link to comment
Share on other sites

Unfortunately this little mod will be completely different for EW.

 

All of the actionscript code for the strategy game has been moved out of Command1.upk and into UICollection_Strategy_SF.upk. It's likely that there is still a padding value lurking somewhere there, but it will be in a different upk and a totally different position.

 

Using the slightly larger search string :

96 09 00 04 01 08 02 07 05 00 00 00
Push register1 "padding" 5

and change it to :

96 09 00 04 01 08 02 07 FB FF FF FF
Push register1 "padding" -5

I found this in UICollection_Strategy_SF.upk at file position 0x76B3E8.

 

If building a UPKPatch-compatible mod the Object name is gfxSoldierLoadout.SoldierLoadout

Link to comment
Share on other sites

  • 2 months later...

Would it be possible to get the Item Grid working for EW Patch 3?

 

I've tried to do this myself, but there's no real tutorials for modding XCOM. The wiki article about hex editing UPK files assumes you already know how to find the function to change.

Link to comment
Share on other sites

Would it be possible to get the Item Grid working for EW Patch 3?

I've tried to do this myself, but there's no real tutorials for modding XCOM. The wiki article about hex editing UPK files assumes you already know how to find the function to change.

If you want to modify the actual loadout screen menu you'll need to edit the corresponding embedded Scaleform UI Flash files inside UICollection_Strategy_SF.upk which is a pretty involved process.

 

However, as the game logic for the soldier inventory has changed in EW you won't actually make use of additional items as detailed in this post. You can make a third small item slot show up by editing the general number of small item slots in the DefaultGameCore.ini file, but again, you'll probably need to modify the game logic to make that extra slot have an effect. I'd focus on fixing that first before bothering with adding even more slots.

 

If you're determined to do this I suppose the XGLoadoutMgr class inside XComGame.upk would be a starting point.

 

X.

Link to comment
Share on other sites

I've tried to do this myself, but there's no real tutorials for modding XCOM. The wiki article about hex editing UPK files assumes you already know how to find the function to change.

 

Finding what to modify is the "art" part of XCOM modding.

 

First you have to figure out if you are dealing with a Strategy component, or a Tactical one. Then you have to decide which UPK files seems most likely to be related to the aspect you are after. Then you have to look through the various classes in those UPK files to see which seems to have code related to that aspect. Then you have to trace out various function calls to see which actually do the work. If it's done in a "native function", then you can only guess ... as we can't view them. (And that is just an "outsider's view". I don't do code-diving myself.)

 

Everything in the wiki is the result of someone diving into the code and reporting what they found. It's all the result of "trial and error" discovery. There is nothing from Firaxis about how it is organized. Perhaps once one of the code divers has gotten a breather from the demands of their own mods, they might try putting together their sense of how it is organized. We can only hope they have found some organization.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...