Jump to content

Finding the first step?


NephilimNexus

Recommended Posts

Aha, maybe I see what's wrong. Are you editing DefaultGameCore.ini or .mod? You must use Modpatcher to update changes into XComGame.exe. If you edit the ini and running patcher.bat, no changes are made into the game executable.

 

There are more ways how to do it.

  1. Use command "modpatcher.exe [path\]DefaultGameCore.ini" or copy your DFG.ini to a directory, where is Modpatcher, and run command "modpatcher.exe DefaultGameCore.ini".
  2. Or get *.mod by copying DFG.ini to Modpatcher's directory and renaming its extension to mod. Or extract DGC.mod from Modpatcher's downloaded archive. With *.mod you can run patcher.bat.
  3. Edit patcher.bat with commands from 1. and run it.

Link to comment
Share on other sites

  • Replies 229
  • Created
  • Last Reply

Top Posters In This Topic

Aha, maybe I see what's wrong. Are you editing DefaultGameCore.ini or .mod? You must use Modpatcher to update changes into XComGame.exe. If you edit the ini and running patcher.bat, no changes are made into the game executable.

 

There are more ways how to do it.

  1. Use command "modpatcher.exe [path\]DefaultGameCore.ini" or copy your DFG.ini to a directory, where is Modpatcher, and run command "modpatcher.exe DefaultGameCore.ini".
  2. Or get *.mod by copying DFG.ini to Modpatcher's directory and renaming its extension to mod. Or extract DGC.mod from Modpatcher's downloaded archive. With *.mod you can run patcher.bat.
  3. Edit patcher.bat with commands from 1. and run it.

 

Could I use XCOM Meddler for this?

Link to comment
Share on other sites

Could I use XCOM Meddler for this?

Nope. Meddler is just interface to edit DefaultGameCore. Then changes need to be patched into the game executable with Modpatcher.

Edited by Drakous79
Link to comment
Share on other sites

  • 2 weeks later...

Just saw something very disheartening about the UPK unpack tool.

 

 

https://sites.google.com/site/0dd14lab2/upkpacker

 

Right at the top now, there's this:

 

"Sorry.Distribution is stopped for several reasons. It forbids uploading and distributing these programs to other sites."

 

 

No download links are around, etc. I've got what I think is the last version, and have been using it to mess with the upk files, but the lack of further versions and/or support might be a pretty hard blow for future games that rely on tools like this.

Link to comment
Share on other sites

  • 4 months later...

I may be out of date.. are people still manually updating the SHA values in XComGame.exe after editing any of the .upk files?

 

There's no need - it looks like the game loads each pack file and then searches for the given name in that table, and calculates/compares the SHA if it has an entry there. If there is no entry, it doesn't care. This means you can just do a one-time edit which trashes each of the names in that table, and XCom will never compare any of them again.

 

Note - I only tested this on the entry for 'XComStrategyGame.upk' in XComGame.exe - I changed the first letter to a 'c' and now the game doesn't care about that file's hash.

 

You don't need resource hacker for this one - the strings for each pack file only seem to occur ones in the executable, so just load up your hex editor, search for the pack file you want to edit, and trash some of the characters within the string.

 

LMK if this isn't working for anyone else, the next step is to find the function that actually performs the lookup/compare, and force it to return 'true'.

 

 

Link to comment
Share on other sites

I may be out of date.. are people still manually updating the SHA values in XComGame.exe after editing any of the .upk files?

 

There's no need - it looks like the game loads each pack file and then searches for the given name in that table, and calculates/compares the SHA if it has an entry there. If there is no entry, it doesn't care. This means you can just do a one-time edit which trashes each of the names in that table, and XCom will never compare any of them again.

 

Note - I only tested this on the entry for 'XComStrategyGame.upk' in XComGame.exe - I changed the first letter to a 'c' and now the game doesn't care about that file's hash.

 

You don't need resource hacker for this one - the strings for each pack file only seem to occur ones in the executable, so just load up your hex editor, search for the pack file you want to edit, and trash some of the characters within the string.

 

LMK if this isn't working for anyone else, the next step is to find the function that actually performs the lookup/compare, and force it to return 'true'.

 

We are still having to update the executable using XSHAPE (or something similar) after editing XcomGame.upk or XcomStrategyGame.upk. I had noticed that changing Command1.upk did not require a checksum update -- in fact, XSHAPE didn't perform any of sort of update (which was a good thing).

 

I tested it out, and it works. I searched for xcomgame.upk (it was all lower case in the exe) and changed the leading 'x' to a 'c'. After modding XcomGame.upk, I was able to run the game without having to run XSHAPE.

 

Very nice find!

Link to comment
Share on other sites

The table is located in XcomGame.exe (and only in the exe). I used the based HxD hex editor I use for all of my upk edits, opened up xcomgame.exe, and did a search (using the default text search parameters) for "xcomgame.upk".

 

The characters are all lower case (but if you turn off case sensitive, there is only one such string in the exe anyhow).

I did not have the Unicode option enabled in HxD

Link to comment
Share on other sites

I may be out of date.. are people still manually updating the SHA values in XComGame.exe after editing any of the .upk files?

 

There's no need - it looks like the game loads each pack file and then searches for the given name in that table, and calculates/compares the SHA if it has an entry there. If there is no entry, it doesn't care. This means you can just do a one-time edit which trashes each of the names in that table, and XCom will never compare any of them again.

 

Note - I only tested this on the entry for 'XComStrategyGame.upk' in XComGame.exe - I changed the first letter to a 'c' and now the game doesn't care about that file's hash.

Good job finding this out, it would certainly have prevented a lot of headaches in the past!

 

I've implemented this in the next version of ToolBoks and credited you in the ReadMe :smile:

Link to comment
Share on other sites

  • 3 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...