UnPACKer
Alright since many people seem to have problems with it I decided to create an official thread for the demo unpacker.
As the name says, this tool can be used to get at the data stored in the ETW demo's *.pack files. You can then use the unpacked files instead of the packs to run the demo with, any changes you make on them (except for those files in demo3.pak) should readily show up in the demo.
What you need to do in order to use it is:
1. Go to http://python.org, download Python 3.01 and install it (http://python.org/ftp/python/3.0.1/python-3.0.1.msi).
2. Download the attached "etw_demo_unpacker.zip", extract the contents to your demo data folder (usually something like "C:\Program Files\Steam\steamapps\common\empire total war demo\data"). You should then be set up with five new files, "etw_demo.py" and four batch files.
3. Click on "unpack_demo1.bat" or "unpack_all.bat" which will unpack the contents of demo.pack or all the packs respectively to your data directory. You should then be able to simply run the demo using the freshly unpacked files. Please note than any previously existing files are overwritten without warning!
Optionally, you can create a list of all the files contained in the packs by running "list_all.bat"
There are a few additional options for tech-savvy people:
- To unpack a specific file, use -u <file> where <file> is the name printed to the list
- You can use the -ur <pattern> option to unpack files matching a regular expression pattern (see here for the syntax), for example -ur .*lua.* would extract all files containing the string "lua" somewhere in their path
- To repack, you have to edit the file repack.xml in the archive. In this file you have to specify all the files that should be included in the rebuilt pack (it's fairly self-explanatory), then you have to run the unpacker with -r repack.xml <target> where <target> is the name of the pack file to be created. Note that the unpacker will take its indexing info from the existing pack so if you changed the name or want to repack another file than demo1.pack, use (in this example to repack demo3.pack): -p demo3.pack -r repack.xml demo3.pack_new
- You can change the output folder with the -o option
------------------------------------------------------------------------
loc converter
The loc converter (or loco for short) is a tool that allows you to convert ETW's .loc files to tab-separated .txt files that can be edited in a text editor or with a spreadsheet program like Open Office Calc or Microsoft Excel (use the Text CSV option when opening the files) and vice-versa. Instructions below:
0. Go to http://python.org, download Python 3.01 and install it (Windows installer here).
1. Download the zip package in the attachment
2. Create a working directory (for example 'C:\empire_locs') and copy the .loc files you want to work on into that directory, rename the file extension of the old files to .loc_backup
3. Extract the contents of the zip into your working directory
4. Run loc_to_txt_all.bat to convert the .loc files into text dbs with the same name
5. Make your changes
6. Run txt_to_loc_all.bat to convert the text dbs back to .loc files with the same name
7. Put the converted .loc files into the folder you copied them from
Remember to make backups of your .loc files!