Jump to content

Photo

Difficulty adding more items to DGC.ini


  • Please log in to reply
20 replies to this topic

#1
Amineri

Amineri

    Resident poster

  • Premium Member
  • 3,927 posts

So, I've been able to successfully add lines to the DGC.ini embedded in the XComGame.exe (this is old news)

 

However, there appears to be limits of some sort. For my current re-working of the items I attempted to add 22 lines to the Weapons= section (going from 57 to 79 entries).

 

Upon making the change the game will no longer load. It does not crash to desktop, but Steam reports "Failed to start game (app already running)".

 

I played around with it a little bit and found that if I removed about 10 kB of configuration data from the Multiplayer section I would get the same error. (without adding in new data)

 

However, removing the Multiplayer data and ALSO adding the new 22 lines of Weapons= data resulted in the game launching correctly.

 

With both changes the xcomgame.exe was 28,424,192 bytes

 

For comparison my vanilla xcomgame.exe is 28,427,928 bytes, about 3700 bytes larger.

 

It seems that there is some other check that is failing if the Resource Cache gets too large or too small compared to the original.

 

I'm using Resource Hacker to add in the new lines. Anyone have any ideas on this?


Edited by Amineri, 17 May 2013 - 08:33 PM.


#2
Amineri

Amineri

    Resident poster

  • Premium Member
  • 3,927 posts

I was able to get around this so far by:

 

1) Changing all of the XXX_none entries in the DGC.ini to 0

2) Removing all of the multiplayer templates



#3
anUser

anUser

    Fan

  • Members
  • PipPipPip
  • 261 posts

ohh that's a pity, I had so many plans for those items... upgraded weapons, explosives and gadgets... so 22 new lines replacnig those XXX_None for 0's is ok? Just for curiosity, what kind of compilation mechanism is this that the enumerated value takes more space than the literal? Aren't this things parsed at this stage?



#4
dreadylein

dreadylein

    Enthusiast

  • Members
  • PipPip
  • 226 posts

best way would be putting it into a debugger and look out why its crashing, maybe its an easy fix



#5
Amineri

Amineri

    Resident poster

  • Premium Member
  • 3,927 posts

I wish I could, but I don't have a debugger to run it through :(

 

I suspect that there is some setting somewhere in the executable that is getting out of whack when the Resource Cache gets too big. There is some Steam information in the Resource Cache, I noticed.

 

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

 

On another note, somewhere along the line when these changes are getting made I seem to be breaking the game's ability to load from the XComGame.int localization file.

 

It must be caching the localization data somewhere.

 

I did the following:

 

1) Ran Steam  "Verify Local Files" to get a clean install

2) Applied Long War 1.08

3) Ran game -- item name localization changes came up fine (in particular the "Superheavy Plasma")

4) Applied new BuildItems hex change to add new items

5) Added new Weapon=, BuildItems= lines and removed MPTemplate info from Resource Cache in XComGame.exe

6) Ran game to confirm that new items were available to build in Engineering (they are)

7) Edit XComGame.int to add/change item names display in Engineering

       --- changing XComGame.int now has no effect

       --- even changing "Superheavy Plasma" localization value that Long War changed has no effect

 

I'm kind of stumped here. I can get the items ingame, and give them graphics and stats, but if there's no name (currently most items show blank) then it won't do much good ~_~

 

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

 

EDIT : Reverting back to the original XComGame.exe does not allow the localization file changes to have any effect.


Edited by Amineri, 18 May 2013 - 07:27 PM.


#6
johnnylump

johnnylump

    Resident poster

  • Supporter
  • PipPipPipPipPip
  • 7,424 posts

I don't know how localization files work, exactly, but I do know I had to make changes to them in two places when I added the Slingshot. Are you checking localization files in both

 

\XComGame\Localization\INT

 

and

 

\My Games\XCOM - Enemy Unknown\XComGame\Localization\INT

 

?



#7
Amineri

Amineri

    Resident poster

  • Premium Member
  • 3,927 posts

Right... that would explain the sudden inability to make it work. I finally picked up the Slingshot DLC in the recent sale.

 

Thank you so much for pointing this out. The sudden inability to make localization changes was driving me crazy.

 

(( by the way, one of my goals is now going to be to build a mod to disable the Slingshot missions, or alternatively to move them to a later month ))

 

I'll post up a screen with the new items in the "Equipment Overhaul" thread



#8
johnnylump

johnnylump

    Resident poster

  • Supporter
  • PipPipPipPipPip
  • 7,424 posts

Ah, good. Note that the .INT files have quote marks around text strings in one format, but not the other.

 

Modding the timing of Slingshot is easy, and is already in LW 1.08.

 

It's all in DLC_Day060_SF.upk >> DLC_Day060HQMod >> AddFundingCouncilMissions()

 

The first mission is difficult but possible in 1st month. I delayed the onset of the second mission from 30 to 60 days, lowered Zhang's hit points to 5 and rank to sergeant, and class from heavy to assault. (I just don't see a mob enforcer knowing his way around a SAW and rocket launcher).

 

I still got beat at 60 days on the second mission, but I had a bunch of wounded guys and the lost my SHIV in the prior terror mission, so I was hurtin' to begin with.

 

DLC_Day060_SF.upk
Reduce Health of Zhang
00 28 0F 35 7C FF FF FF 4E FF FF FF 00 00 35 40 FF FF FF 4F FF FF FF 00 01 00 18 00 00 00 2C 09
to
00 28 0F 35 7C FF FF FF 4E FF FF FF 00 00 35 40 FF FF FF 4F FF FF FF 00 01 00 18 00 00 00 2C 05

Make Zhang an Assault
0f 35 eb ff ff ff 4e ff ff ff 00 00 35 40 ff ff ff 4f ff ff ff 00 01 00 18 00 00 00 24 02
to
0f 35 eb ff ff ff 4e ff ff ff 00 00 35 40 ff ff ff 4f ff ff ff 00 01 00 18 00 00 00 24 04

Make Zhang a Sergeant
0f 35 ea ff ff ff 4e ff ff ff 00 00 35 40 ff ff ff 4f ff ff ff 00 01 00 18 00 00 00 24 04 
to
0f 35 ea ff ff ff 4e ff ff ff 00 00 35 40 ff ff ff 4f ff ff ff 00 01 00 18 00 00 00 24 03

Increase Delays of Missions to 60 days
00 1a 00 00 00 2c 19
to
00 1a 00 00 00 2c 3c


#9
Amineri

Amineri

    Resident poster

  • Premium Member
  • 3,927 posts

Haha ... I discovered this the hard way :)

 

I put in the lines with quotes into the My Games copy of the .int file. Engineering displayed a blank window when I ran it. Interestingly, the My Games version of the int file is overwritten every time you run the game.

 

So far so good, though. And I guess it's good that I won't have to mess around with DLC changes :)

 

----------

 

Still would be nice if someone could figure out what is going on with the Resource Cache in the executable. It won't be me, since I don't have the right tool!

 

In the future it may impact my ability to add ranks for alien leaders, since I had planned on adding them by adding another 22 Character= lines to hold the rank-up info for each alien type, but I think that will exceed the limit.

 

So far it seems that if the executable grows by more than ~4 to 5 kB (by adding Resource Cache data) then I get the Steam error when launching.



#10
bokauk

bokauk

    Fan

  • Members
  • PipPipPip
  • 483 posts

I couldn't find anywhere that said there was a size limit for RCDATA, so I guess it must be a bug rather than a technical limitation.

 

The game crashes with "appRequestExit(1)", so if you do open it in a debugger, the string "appRequestExit" should point you in the right direction.

 

Alternatively, to squeeze as much additional information into DGI.ini, you can remove all comments, which should save you some bytes but it will still be somewhat limiting :(

 

EDIT: Just did a quick search for "appRequestExit(1)" and there were quite a few results for Unreal games, so you might find out the problem with some more investigation :)


Edited by bokauk, 19 May 2013 - 12:20 AM.





Page loaded in: 0.818 seconds