Jump to content

Difficulty adding more items to DGC.ini


Amineri

Recommended Posts

I know Amineri's got it working via resourcehacker, but this issue is turning into a major headache for me in trying to create an install-able mod (that doesn't include an exe file, but instead modpatches on the fly during install.)

 

I don't think I can modpatch any file but defaultgamecore.ini, so Amineri's editing the DefaultMP.ini trick won't work here.

 

I've sliced my defaultgamecore.ini by removing almost every comment and putting in zeroes in place of various "none" entries, and entering a bunch of new items -- I've got dgc.ini about 2500 bytes larger than a size I know works. When I modpatch, the exe actually gets a few hundred bytes smaller than before. And the game won't get out of Steam.

Link to comment
Share on other sites

I'm not sure if you have an aversion to using ToolBoks, but in case you're not already aware, you can update individual lines in DGI.ini with it (not replacing the whole file), as well as UPK edits by writing a simple Custom Mod file.

 

You also don't have to worry about distributing whole UPK files or overwriting any other settings users have installed :smile:

 

Just another option to maybe consider that's fairly straight forward and easy to install :smile:

Link to comment
Share on other sites

Thanks, bok! No aversion to the tool itself -- it's fantastic and has accomplished wonders for X-Com modding. I do want to avoid becoming reliant on post-patch updates to the tool to be able to update my own mod, though, so it's probably best I keep doing things manually so I'm sure I can figure out how to reproduce it down the road :)

Link to comment
Share on other sites

Thanks, bok! No aversion to the tool itself -- it's fantastic and has accomplished wonders for X-Com modding. I do want to avoid becoming reliant on post-patch updates to the tool to be able to update my own mod, though, so it's probably best I keep doing things manually so I'm sure I can figure out how to reproduce it down the road :smile:

Of course, no worries, that's completely understandable :)

Link to comment
Share on other sites

I'm not sure if you have an aversion to using ToolBoks, but in case you're not already aware, you can update individual lines in DGI.ini with it (not replacing the whole file), as well as UPK edits by writing a simple Custom Mod file.

 

You also don't have to worry about distributing whole UPK files or overwriting any other settings users have installed :smile:

 

Just another option to maybe consider that's fairly straight forward and easy to install :smile:

 

I added a large number of entries to both the Weapons= array and the ItemBalance= array to support the new items.

 

We're exploring another workaround by removing some of the Weapons= entries that can't be used because the ItemID doesn't have an XGWeapon_<type> class defined XComGame.upk. With that limitation only six new Weapons= elements would be needed.

 

However, the new ItemBalance= array is around 5.5k larger than the original. In part this is due to new items, and in part it is from adding entries for items that were in the game but were not in the ItemBalance= array. This was mostly starter items that weren't buildable like Pistol, Assault Rifle, LMG, Kevlar etc)

 

The reason these entries are added is to free up hex bytes in the XGItemTree.BuildItems function to allow more BuildItem calls (and hence more items).

 

The complete list of new ItemBalance= entries is: (5357 bytes)

ItemBalance=(eItem=eItem_Pistol,	        iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_AssaultRifle,	    iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_Shotgun,	        iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_LMG,	            iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_SniperRifle,	    iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_RocketLauncher,	iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_FragGrenade,	    iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_SmokeGrenade,		iCash=3,  iElerium=0, iAlloys=0,  iTime=0,  iEng=4)
ItemBalance=(eItem=eItem_BattleScanner,	    iCash=3,  iElerium=0, iAlloys=0,  iTime=0,  iEng=4)
ItemBalance=(eItem=eItem_Grapple,	        iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_PsiGrenade,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;Rocket item
ItemBalance=(eItem=95,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
ItemBalance=(eItem=eItem_FlashBang,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;Ceramic Plates
ItemBalance=(eItem=96,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;Basic First Aid Kit
ItemBalance=(eItem=83,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;Personal Effects
ItemBalance=(eItem=94,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;High energy ammo
ItemBalance=(eItem=130,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;Laser sight
ItemBalance=(eItem=92,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;Alloy Assault Rifle
ItemBalance=(eItem=eItem_PlaceholderWeapon0,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;Alloy Shotgun
ItemBalance=(eItem=eItem_PlaceholderWeapon1,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;Alloy LMG
ItemBalance=(eItem=eItem_PlaceholderWeapon2,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;Alloy Sniper Rifle
ItemBalance=(eItem=eItem_PlaceholderWeapon3,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
ItemBalance=(eItem=eItem_ArmorKevlar,       iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_Skyranger,         iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_SHIVDeck_I,        iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_SHIVDeck_II,       iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_SHIVDeck_III,      iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)	
ItemBalance=(eItem=eItem_IntWeap_II,		iCash=-1, iElerium=0, iAlloys=0, iTime=-1,iEng=-1)
ItemBalance=(eItem=eItem_PlaceholderIntWeapon0,         iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_SHIVSentry,		iCash=80, iElerium=0, iAlloys=5,  iTime=7, iEng=12)
;SHIV Grenade Launcher
ItemBalance=(eItem=90,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV Elerium Supercharger
ItemBalance=(eItem=89,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV Alloy Ammo Feeds
ItemBalance=(eItem=75,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV HoloTargeter
ItemBalance=(eItem=84,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV Energy Damper
ItemBalance=(eItem=91,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV Ghost Module
ItemBalance=(eItem=97,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV Core Armoring
ItemBalance=(eItem=93,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV Ablative Armor
ItemBalance=(eItem=109,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV Multi-barrel Weapon
ItemBalance=(eItem=110,       iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV HEAT Ammo
ItemBalance=(eItem=120,   iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV High Energy Rounds
ItemBalance=(eItem=121,   iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
;SHIV Reinforced Armor
ItemBalance=(eItem=112,         iCash=1, iElerium=0, iAlloys=0,  iTime=0,	iEng=1)
ItemBalance=(eItem=eItem_Base_Shard,            iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_HyperwaveBeacon,       iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_SectoidCaptive,        iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_SectoidCommanderCaptive, iCash=-1, iElerium=0, iAlloys=0, iTime=-1, iEng=-1)
ItemBalance=(eItem=eItem_FloaterCaptive,        iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_FloaterHeavyCaptive,   iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_ThinManCaptive,        iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_MutonCaptive,          iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_MutonEliteCaptive,     iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_BerserkerCaptive,      iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)
ItemBalance=(eItem=eItem_EtherealCaptive,       iCash=-1, iElerium=0, iAlloys=0,  iTime=-1,	iEng=-1)

Every new entry that has iCash=-1, iTime=-1 and iEng=-1 saves 12 bytes in the BuildItems function.

 

Each (reduced) BuildItem calls is 24 bytes, so two such new ItemBalance config lines means one additional buildable item.

 

--------------------

 

I didn't think that ToolBoks was capable of making such large-scale changes to the config file...

Link to comment
Share on other sites

I'm starting to suspect that XComGame.exe DefautGameCore.ini lengthes aren't the sole issue -- it may be that modpatcher can only handle a certain number of entries.

 

Update: It's not entries, it's definitely size. Upper bound of DefaultGameCore.ini is roughly 101659 bytes.

Edited by johnnylump
Link to comment
Share on other sites

For those that are more adept at trawling through the executable itself (e.g. finding that the checksums could be disabled, and enabling the developer console)...

 

Is it possible to revert the executable back to loading config data from the defaultgamecore.ini file instead of using the embedded resource data?

 

This would surely make modding a heck of a lot easier, and fix all of our issues above.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...