Jump to content
⚠ Known Issue: Media on User Profiles ×

XSHAPE


Daemonjax

Recommended Posts

Latest Version: 0.14beta (11/2/2012)

 

Download: http://code.google.com/p/xshape/downloads/list

 

 

 

XSHAPE patches your game executable to load modified upk files. You can update the SHA hashes by hand if you want, but this is faster.

 

The only file this program modifies is the main executable: XComGame.exe.

 

I included all the idiot sanity checks I could think of, but I suppose it's still possible to hose your exe. So, go ahead and make a backup of it first.

 

Anyways... extract the files into your main game folder, and run the batch file.

 

You'll need to have java 1.7 installed, otherwise it won't work.

 

 

Included is a sample configuration file. It's really simple, and I'm sure you'll figure it out.

 

 

There's 15 16 error codes, and if you see any it means you screwed up. ;) But, I'll enumerate them here anyways:

 

1: Not enough arguments. The program requires at least one arguement: a number for the starting byte where it begins it's search. 0 works. So does the number I have in the batch file (unless you get errorcode 16).

 

2: Can't read the configuration file. You deleted/renamed/moved it.

 

3: The configuration file is empty. The file exists, but you deleted its contents.

 

4: There was an error parsing the configuration file. Don't have any blank lines. Each line has to have a filename on it.

 

5: You have files in the configuration file that are normally compressed, but then failed to remove/rename X.uncompressed_size file. Normally, this isn't fatal, except that there were no files left to check, so the program had nothing to do.

 

6: You used an optional switch, but then screwed up the number of arguements. Currently the only optional switch is -verbose (or -v for short). You'll still need to put the starting byte number after it.

 

7: You have a second argument, but somehow failed to make it a number.

 

8: Too many unrecognized arguements.

 

9: A filename in your configuration file doesn't have a period in it. Valid filenames are <filename>.<extension>

 

10: You have a period, but your extension isn't 3 characters long. It must be 3 character long.

 

11: Your filename is valid in theory, but since it's not listed in the PCConsoleTOC.txt file, I don't allow you to arbitrarily search for it. You probably misspelled it.

 

12: You typed in a negative number for your starting byte position. It has to be 0 or larger. Just run the batch file instead of screwing around.

 

13: The exe file is missing, or otherwise unable to be read.

 

14: The exe file is readable, but cannot be written to. You probably have it opened in another program, or you're playing the game.

 

15: You're trying to use a starting byte position that's larger than the size of the file.

 

16. Your exe is very different from mine for some reason. You'll need to edit the xshape.bat file, and use a lower starting byte number. 0 is guaranteed to work, but takes the longest amount of time to run (several seconds).

 

java -jar XSHAPE.jar 0

 

OR, the upk file doesn't need to be added to xshape's config file at all because the engine doesn't check the SHA hash for it.

 

 

 

All you should really need to do is:

 

1) extract the files in the archive into the main game folder

2) add the filenames to the configuration file for the files you modified (if they're not already in there)

3) if they were compressed, you'll need to delete/rename <filename>.uncompressed_size

4) then run the batch file whenever you want to update the SHA hashes stored in the main executable for those files.

 

Note: If you delete/rename <filename>.uncompressed_size, then the game will load the uncompressed version of it without a hitch.

 

 

That's it. :D Have fun!

 

 

KNOWN ISSUES:

 

1) You'll have to run XSHAPE after each time you run modpatcher, since modpatcher undoes the changes XSHAPE makes.

 

@echo off
start /b /wait modpatcher DefaultGameCore.mod
start /b /wait java -jar XSHAPE.jar 26444500
pause

 

The above optional patcher.bat file is now included in the XSHAPE folder to replace the patcher.bat that comes with modpatcher.

Edited by Daemonjax
Link to comment
Share on other sites

  • Replies 129
  • Created
  • Last Reply

Top Posters In This Topic

Does this enable using modified scripts in-game? If so, then this is the holy grail.

 

As far as I understand, there's yet no way to actually get a modified script back into a upk to result in a new upk.

Edited by Solver
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...