The Original Forum. Game archives, full of resources. How to open them? Get help here.
-
AlphaTwentyThree
- double-veteran

- Posts: 985
- Joined: Mon Aug 24, 2009 10:55 pm
- Has thanked: 75 times
- Been thanked: 644 times
Post
by AlphaTwentyThree » Wed Mar 31, 2010 9:10 pm
I thought it would be nice to post the quickBMS scripts I write into the forum. Maybe someone can then make entries on the Xentax Wiki.
Here's the script to extract the files from the game "Alter Ego". A little unusual to have these short-variables in between...
Code: Select all
# game: Alter Ego
# file type: *.erp
# (c) 2010 AlphaTwentyThree
set NAMEDAT 0x3D
get FILES short
for i = 1 <= FILES
get ZEROS short
get DUMMY long
get SIZE long
get OFFSET long
get TYPE short
get NAME string
savepos CURR
strlen NAMEL NAME
set RES NAMEDAT
math RES -= NAMEL
math CURR += RES
goto CURR
log NAME OFFSET SIZE
next i
The file extensions are specific, for example *.ESA are sounds and music, *.EIT are dds files and so on. If you want you can write a little extractor into the code so you can directly work with the files. I don't have the game so I can't check all formats.
-
Mr.Mouse
- Site Admin
- Posts: 4051
- Joined: Wed Jan 15, 2003 6:45 pm
- Location: Dungeons of Doom
- Has thanked: 421 times
- Been thanked: 575 times
-
Contact:
Post
by Mr.Mouse » Wed Mar 31, 2010 9:42 pm
Nice! But why don't you put it in the wiki

?
-
XpoZed
- veteran
- Posts: 144
- Joined: Sat Oct 24, 2009 5:08 pm
- Location: Bulgaria
- Has thanked: 2 times
- Been thanked: 45 times
-
Contact:
Post
by XpoZed » Mon Aug 23, 2010 7:21 pm
Strange but, the structure you provided seems wrong to me ?!
Here's my pack/unpacker for Alter Ego's ERP files. I'll be happy for any feedback.
You do not have the required permissions to view the files attached to this post.
-
Sheen
- beginner
- Posts: 25
- Joined: Tue Mar 02, 2010 7:29 pm
- Has thanked: 8 times
- Been thanked: 3 times
Post
by Sheen » Sun Aug 29, 2010 7:06 pm
Works great XpoZed,

. The problem is all files are encrypted (EMA, ESA, EIT and so on).
Its look like they wanted protect Alter Ego's files like a state secret.
Regards.
-
XpoZed
- veteran
- Posts: 144
- Joined: Sat Oct 24, 2009 5:08 pm
- Location: Bulgaria
- Has thanked: 2 times
- Been thanked: 45 times
-
Contact:
Post
by XpoZed » Sun Aug 29, 2010 7:49 pm
Sheen wrote:Works great XpoZed,

. The problem is all files are encrypted (EMA, ESA, EIT and so on).
Its look like they wanted protect Alter Ego's files like a state secret.
Regards.
Not encrypted actually... ESA are OGG, EIM are DDS and so on... they just have a small header at the beginning.
For example EIM has the following structure :
Code: Select all
{
header[DWORD] {
"EIM\x20"
}
size[DWORD] {
DDS file size
}
width[DWORD] {
DDS width dimension
}
height[DWORD] {
DDS height dimension
}
DDS[size] {
Standard DDS file data goes here...
}
t[n] {
N number of \x00 bytes to make the whole file dividable by \x0F
}
}
-
Sheen
- beginner
- Posts: 25
- Joined: Tue Mar 02, 2010 7:29 pm
- Has thanked: 8 times
- Been thanked: 3 times
Post
by Sheen » Mon Aug 30, 2010 5:19 am
Aha, ok thank for the advise. But if anybody wants to open a dds file, how he can do it? I suposse is not so easy like changing the extension of the file (I tried

), and the lang files don't appear. Where i looked for I only found code...and I looked for in all compressed files.
Regards.
-
XpoZed
- veteran
- Posts: 144
- Joined: Sat Oct 24, 2009 5:08 pm
- Location: Bulgaria
- Has thanked: 2 times
- Been thanked: 45 times
-
Contact:
Post
by XpoZed » Mon Aug 30, 2010 9:49 am
You can edit DDS easily with photoshop and a free DDS plugin ffrom nvidia (google it).
To edit EIM files as DSS, open the file with some text editor and remove the first 16 bytes until you reach the DDS header. Then change the extension to .DDS and you're ready.
The language file is located in US_D_UI_Local.erp as Alter_Ego_Texty.ete.
The ETE file has very simple structure, so you can edit it quite easy with any HEX editor.
Code: Select all
ETE {
header[4] {
"ETE\0x20"
}
unknown[9] {
\x01\x00\x01\x00\x00\x00\x00\x00\x10
}
row[0] {
id_len[WORD] {
}
id[id_len] {
}
unk[DWORD] {
}
data_len[3] {
}
data {
str1[n] {
// 0x00 terminated
}
str2[n] {
// 0x00 terminated
}
str3[n] {
// 0x00 terminated
}
str4[n] {
// 0x00 terminated
}
str5[n] {
// 0x00 terminated
}
str6[n] {
// 0x00 terminated
}
str7[n] {
// 0x00 terminated
}
str8[n] {
// 0x00 terminated
}
str9[n] {
// 0x00 terminated
}
eod[BYTE] {
"\x10"
}
}
}
...
row[n] {
...
}
}
-
Sheen
- beginner
- Posts: 25
- Joined: Tue Mar 02, 2010 7:29 pm
- Has thanked: 8 times
- Been thanked: 3 times
Post
by Sheen » Mon Aug 30, 2010 10:39 am
oh, thanks a lot XpoZed!
I have two dds programs (dds converter and image converter plus, and photoshop and fireworks of course) already cause I work a lot with graphics files, but i'll take a look for that nvidia dds plugin that you said.
Best regards.
-
bacter
- veteran
- Posts: 142
- Joined: Mon Feb 22, 2010 8:42 pm
- Has thanked: 2 times
- Been thanked: 80 times
Post
by bacter » Thu Sep 02, 2010 10:05 pm
I created two simple programs help converting files from .EIM to .DDS and vice-versa.
Now I'm working on .ETE <-> .TXT converter, to help translating the game texts.
Updated! I combined the two programs into one. If the given file extension is .EIM, then converts to .DDS; If .DDS, then converts to .EIM
Last edited by
bacter on Thu Jun 23, 2011 6:32 pm, edited 1 time in total.
-
bacter
- veteran
- Posts: 142
- Joined: Mon Feb 22, 2010 8:42 pm
- Has thanked: 2 times
- Been thanked: 80 times
Post
by bacter » Sun Sep 05, 2010 5:26 am
Here's the new proggy: the .ETE <-> .TXT converter.
Last edited by
bacter on Fri Jun 24, 2011 7:41 pm, edited 1 time in total.
-
XpoZed
- veteran
- Posts: 144
- Joined: Sat Oct 24, 2009 5:08 pm
- Location: Bulgaria
- Has thanked: 2 times
- Been thanked: 45 times
-
Contact:
Post
by XpoZed » Sun Sep 05, 2010 8:48 pm
btw, hit Ctrl+F1 while playing Alter Ego

-
bacter
- veteran
- Posts: 142
- Joined: Mon Feb 22, 2010 8:42 pm
- Has thanked: 2 times
- Been thanked: 80 times
Post
by bacter » Tue Sep 07, 2010 7:30 am
The latest version of my ETE <-> TXT and EIM <-> DDS converter.
I added new function to help the updating of .ERP files.
(To replace only one file in the existing ERP archive)
Example of the usage:
1: extract the files from the contents of the "US_D_UI_Local.erp" archive:
AE_TOOL.EXE X US_D_UI_Local.erp e:\mydir
The tool automatically generates a hash value for each file, to help the replacing:
Alter_Ego_Texty.ete => Alter_Ego_Texty.[46690988f13307b07508d45d].ete
2: convert to text file:
AE_TOOL.EXE Alter_Ego_Texty.[46690988f13307b07508d45d].ete
3: edit your Alter_Ego_Texty.[46690988f13307b07508d45d].txt file
4: reconvert it to .ete file:
AE_TOOL.EXE Alter_Ego_Texty.[46690988f13307b07508d45d].txt
5: insert it into the original archive:
AE_TOOL.EXE R US_D_UI_Local.erp Alter_Ego_Texty.[46690988f13307b07508d45d].ete
You can also convert EIM files to DDS and vice-versa
Last edited by
bacter on Thu Jun 23, 2011 6:33 pm, edited 1 time in total.
-
Sheen
- beginner
- Posts: 25
- Joined: Tue Mar 02, 2010 7:29 pm
- Has thanked: 8 times
- Been thanked: 3 times
Post
by Sheen » Tue Sep 07, 2010 8:32 am
I'm gonna try your new tool bacter. Using XpoZed tool with your executables together all works perfectly.
Thanks to both.

-
JirkaB
- ultra-n00b
- Posts: 1
- Joined: Tue Nov 23, 2010 10:36 am
Post
by JirkaB » Tue Nov 23, 2010 11:56 pm
bacter wrote:2: convert to text file:
AE_TOOL.EXE Alter_Ego_Texty.[46690988f13307b07508d45d].ete
Hello Bacter, extract was OK, but convert does not work, please help me, what am i doing wrong.
edit: it works!!! , great work!!!, thanks a lot, and sorry for spam..