XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Aug 19, 2018 8:22 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Alter Ego - *.erp
PostPosted: Wed Mar 31, 2010 9:10 pm 
Offline
double-veteran
double-veteran

Joined: Mon Aug 24, 2009 10:55 pm
Posts: 985
Has thanked: 76 times
Have thanks: 611 times














You can make the ads go away by registering

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:
# 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.

_________________
If you like what you see, why not click the little Thank You button? ;) It will definitely motivate me! :)
And here's Mr.Mouse's Facebook link: http://www.facebook.com/permalink.php?s ... 8469022795 - thanks ;)


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Wed Mar 31, 2010 9:42 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 15, 2003 6:45 pm
Posts: 4023
Location: Dungeons of Doom
Has thanked: 416 times
Have thanks: 559 times
Nice! But why don't you put it in the wiki ;) ?


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Mon Aug 23, 2010 7:21 pm 
Offline
veteran
User avatar

Joined: Sat Oct 24, 2009 5:08 pm
Posts: 139
Location: Bulgaria
Has thanked: 2 times
Have thanks: 43 times
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.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
http://nullsecurity.org/ game tools, unpackers, and probably more...


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Sun Aug 29, 2010 7:06 pm 
Offline
beginner

Joined: Tue Mar 02, 2010 7:29 pm
Posts: 25
Has thanked: 8 times
Have thanks: 3 times
Works great XpoZed, :D . The problem is all files are encrypted (EMA, ESA, EIT and so on). :cry:

Its look like they wanted protect Alter Ego's files like a state secret. :?

Regards.


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Sun Aug 29, 2010 7:49 pm 
Offline
veteran
User avatar

Joined: Sat Oct 24, 2009 5:08 pm
Posts: 139
Location: Bulgaria
Has thanked: 2 times
Have thanks: 43 times
Sheen wrote:
Works great XpoZed, :D . The problem is all files are encrypted (EMA, ESA, EIT and so on). :cry:

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:
{
   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
   }
}

_________________
http://nullsecurity.org/ game tools, unpackers, and probably more...


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Mon Aug 30, 2010 5:19 am 
Offline
beginner

Joined: Tue Mar 02, 2010 7:29 pm
Posts: 25
Has thanked: 8 times
Have thanks: 3 times
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 :D ), and the lang files don't appear. Where i looked for I only found code...and I looked for in all compressed files.

Regards.


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Mon Aug 30, 2010 9:49 am 
Offline
veteran
User avatar

Joined: Sat Oct 24, 2009 5:08 pm
Posts: 139
Location: Bulgaria
Has thanked: 2 times
Have thanks: 43 times
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:
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] {
      ...
   }
}

_________________
http://nullsecurity.org/ game tools, unpackers, and probably more...


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Mon Aug 30, 2010 10:39 am 
Offline
beginner

Joined: Tue Mar 02, 2010 7:29 pm
Posts: 25
Has thanked: 8 times
Have thanks: 3 times
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.


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Thu Sep 02, 2010 10:05 pm 
Offline
veteran

Joined: Mon Feb 22, 2010 8:42 pm
Posts: 142
Has thanked: 2 times
Have thanks: 76 times
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.

Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Sun Sep 05, 2010 5:26 am 
Offline
veteran

Joined: Mon Feb 22, 2010 8:42 pm
Posts: 142
Has thanked: 2 times
Have thanks: 76 times
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.

Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Sun Sep 05, 2010 8:48 pm 
Offline
veteran
User avatar

Joined: Sat Oct 24, 2009 5:08 pm
Posts: 139
Location: Bulgaria
Has thanked: 2 times
Have thanks: 43 times
btw, hit Ctrl+F1 while playing Alter Ego ;)

_________________
http://nullsecurity.org/ game tools, unpackers, and probably more...


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Tue Sep 07, 2010 7:30 am 
Offline
veteran

Joined: Mon Feb 22, 2010 8:42 pm
Posts: 142
Has thanked: 2 times
Have thanks: 76 times
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.

Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Tue Sep 07, 2010 8:32 am 
Offline
beginner

Joined: Tue Mar 02, 2010 7:29 pm
Posts: 25
Has thanked: 8 times
Have thanks: 3 times
I'm gonna try your new tool bacter. Using XpoZed tool with your executables together all works perfectly.

Thanks to both. :D


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Tue Nov 23, 2010 11:56 pm 
Offline
ultra-n00b

Joined: Tue Nov 23, 2010 10:36 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
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..


Top
 Profile  
 
 Post subject: Re: Alter Ego - *.erp
PostPosted: Thu Jan 05, 2012 11:57 am 
Offline
n00b

Joined: Thu Jan 05, 2012 10:55 am
Posts: 12
Has thanked: 0 time
Have thanks: 0 time
thx for all


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group