Jump to content

Photo

Finding the first step?


  • Please log in to reply
229 replies to this topic

#201
Drakous79

Drakous79

    Drak

  • Supporter
  • PipPipPip
  • 843 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.
  • 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".
  • 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.
  • Edit patcher.bat with commands from 1. and run it.


#202
Enad1

Enad1

    Enthusiast

  • Members
  • PipPip
  • 225 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.

  • 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".
  • 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.
  • Edit patcher.bat with commands from 1. and run it.


Could I use XCOM Meddler for this?

#203
Drakous79

Drakous79

    Drak

  • Supporter
  • PipPipPip
  • 843 posts

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, 29 November 2012 - 12:51 PM.


#204
FlyingHigh10000000

FlyingHigh10000000

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,018 posts
Just saw something very disheartening about the UPK unpack tool.


https://sites.google...4lab2/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.

#205
qsterino

qsterino

    Stranger

  • Supporter
  • Pip
  • 1 posts

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'.

 

 



#206
Amineri

Amineri

    Resident poster

  • Premium Member
  • 3,927 posts

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!



#207
anUser

anUser

    Fan

  • Members
  • PipPipPip
  • 261 posts

hey guys would you mind telling where's this table located? is it in some upk file or it's only in the exe? if it's the exe, how do you edit it? and what's the pattern for those strings, is it 2-bytes ASCII?

 

thx!



#208
Amineri

Amineri

    Resident poster

  • Premium Member
  • 3,927 posts

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



#209
bokauk

bokauk

    Fan

  • Members
  • PipPipPip
  • 483 posts

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:

#210
tsanford01

tsanford01

    Enthusiast

  • Members
  • PipPip
  • 108 posts

I have tried to find the 'XComStrategyGame.upk' in the .exe and it doesn't show any I have followed the instructions but not sure what I am doing wrong. Any other suggestions?






Page loaded in: 0.761 seconds