Jump to content

Forcing game to load from DefaultGameCore.ini


Amineri

Recommended Posts

That's right. I found a small hex edit to xcomgame.exe that will cause the game to load from the config file DefaultGameCore.ini instead of using the embedded Resource Cache data.

 

In xcomgame.exe, at hex offset 0x157D93A, are the three unicode text strings:

 

\.X.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.D.e.f.a.u.l.t.G.a.m.e.C.o.r.e...i.n.i...........\.....\.X.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.D.e.f.a.u.l.t.M.P.G.a.m.e...i.n.i.......\.....\.X.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.D.e.f.a.u.l.t.L.o.a.d.o.u.t.s...i.n.i.

 

It appears that these three string are checked to see which files to NOT load from the Config directory.

 

I changed the first string to :

 

\.C.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.D.e.f.a.u.l.t.G.a.m.e.C.o.r.e...i.n.i.

 

And behold : the game loaded from the DefaultGameCore.ini file in the XComGame\Config\ directory.

 

Since I had all of my new build item calls, all sorts of items were now buildable (like Pistols, Assault Rifles, etc).

 

Changing the file in the config directory to define the new BalanceItem= entries affected the game by making those items non-buildable (as specified).

 

 

:dance:

 

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

 

This should render modpatcher essentially unneeded any longer.

Link to comment
Share on other sites

  • Replies 71
  • Created
  • Last Reply

Top Posters In This Topic

Excellent find.

 

As distributing a changed exe with a mod is prolly a bad idea, can anyone write a program that will make this change on the fly, as well as the one that renders xshape similarly unnecessary? That would make both modding and distributing mods quite a bit easier.

Link to comment
Share on other sites

Sounds like great news! Wonder if disabling the 'DefaultLoadouts.ini' check will also allow changes in that to apply as well? AFAIK, no one has experimented with that, but it sounds like something to check out.

 

Do you feel this is solid enough to go into the DGC.INI Wiki article? (It sort of turns all the 'only Balance Mode changes will take effect' warnings obsolete.)

 

BTW: Love the symbolism in your new avatar!

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

Sounds like great news! Wonder if disabling the 'DefaultLoadouts.ini' check will also allow changes in that to apply as well? AFAIK, no one has experimented with that, but it sounds like something to check out.

It might be possible to change the default loadouts as well, but it's not something I have expermented with.

 

 

Do you feel this is solid enough to go into the DGC.INI Wiki article? (It sort of turns all the 'only Balance Mode changes will take effect' warnings obsolete.)

 

-Dubious-

 

I personally have tested this, but would feel more comfortable if a few more people verified that it works as advertised before making any significant changes to the DGC.ini wiki page.

Link to comment
Share on other sites

Yep, verified this works as advertised.

 

@ AnUser -- A quick and dirty test suggests the defaultgamecore.ini size constraint is no longer an issue. I added enough comment characters to make the file size larger than one I know had been preventing game start when modpatched into the game, and this time it loaded up just fine.

 

(However, until we can figure out how to distribute mods that include Amineri's fix to the exe, we'll have to reply on modpatcher to make on-the-fly changes, so the size constraint is still in place, at least for me)

 

Another question: How does this play with the "phone home" issue?

Edited by johnnylump
Link to comment
Share on other sites

Smashed together a little Patcher, but as i dont have xcom installed here i cant test it, would be nice if anyone could drop me a line if he wants to test it :smile:

ps. nearly forgot :wink: grats to this awesome find, quite neat, we should have thought of this before hehe



Another edit:

 

https://www.dropbox.com/s/0q48wn3urn6kges/patchpatch.rar

 

Reeealy Messy, dont judge me :P

As explained iam not able to test it, but in theory it should patch out phone home, the config stuff and sha1 checks for xcomgame.upk, xcomstrategygame.upk and xcomshell.upk.

 

 

Needs .net 4.5

Needs to be in the same directory as the xcom binary, should produce a xcommodded.exe or smth like this :P

 

I dont have a clue if this all is working :P in theory it should but meh ^^

Edited by dreadylein
Link to comment
Share on other sites

I should point out that there is an earlier case of the config file names showing up in xcomgame.exe at hex offset range : 156BA82-156BF38

 

\.X.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.D.e.f.a.u.l.t.G.a.m.e.C.o.r.e...i.n.i.

......G.C.o.n.f.i.g.:.:.F.i.n.d. .h.a.s. .l.o.a.d.e.d. .f.i.l.e.:. . .%.s. .f.r.o.m. .r.e.s.o.u.r.c.e.............\.....


\.X.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.X.C.o.m.G.a.m.e.C.o.r.e...i.n.i.

....G.C.o.n.f.i.g.:.:.F.i.n.d. .h.a.s. .l.o.a.d.e.d. .f.i.l.e.:. . .%.s. .f.r.o.m. .r.e.s.o.u.r.c.e.....S.p.o.k.e.n.T.e.x.t.=.".........\.....


\.X.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.D.e.f.a.u.l.t.M.P.G.a.m.e...i.n.i.

..G.C.o.n.f.i.g.:.:.F.i.n.d. .h.a.s. .l.o.a.d.e.d. .f.i.l.e.:. . .%.s. .f.r.o.m. .r.e.s.o.u.r.c.e.....C.o.m.m.e.n.t.=.".......\.....


\.X.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.X.C.o.m.M.P.G.a.m.e...i.n.i.

....b.M.a.t.u.r.e.=.F.a.l.s.e...G.C.o.n.f.i.g.:.:.F.i.n.d. .h.a.s. .l.o.a.d.e.d. .f.i.l.e.:. . .%.s. .f.r.o.m. .r.e.s.o.u.r.c.e.....b.M.a.n.u.a.l.W.o.r.d.W.r.a.p.=.F.a.l.s.e.......\.....


\.X.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.D.e.f.a.u.l.t.L.o.a.d.o.u.t.s...i.n.i.

......G.C.o.n.f.i.g.:.:.F.i.n.d. .h.a.s. .l.o.a.d.e.d. .f.i.l.e.:. . .%.s. .f.r.o.m. .r.e.s.o.u.r.c.e.............\.....


\.X.C.o.m.G.a.m.e.\.C.o.n.f.i.g.\.X.C.o.m.L.o.a.d.o.u.t.s...i.n.i.

....G.C.o.n.f.i.g.:.:.F.i.n.d. .h.a.s. .l.o.a.d.e.d. .f.i.l.e.:. . .%.s. .f.r.o.m. .r.e.s.o.u.r.c.e..

This appears to be some sort of debug text used by the coders to confirm whether these config files were loading from the file or from the resource cache.

 

I haven't messed around with trying to change these -- for obscure reasons I found the second set of strings first and tried changing them first, which appears to work correctly.

Link to comment
Share on other sites

well guess this renderes the patcher kinda useless for the moment, will update it as soon as possible :smile:

 

As i had some time ;)

 

Update the Patcher above, still Blind coding .. meh sometimes i hate you guys :P Installing Xcom for testing now ^^

Edited by dreadylein
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...