Page 1 of 1

Astonia 3 (PC)

Posted: Sun Oct 08, 2006 12:01 am
by hollinar
Hello. Can anyone work on the following?

Astonia 3
http://www.astonia.com/
Free 30-day trial, no CC info needed
File with info attached as astonia.zip

Posted: Sun Oct 08, 2006 1:48 am
by Savage
at 1rst looks zlib packed file :|

Zlib, eh?

Posted: Tue Oct 10, 2006 8:54 am
by hollinar
Zlib... Does that mean that there is already a way to extract/inject data from the files?

Posted: Tue Oct 10, 2006 7:22 pm
by Savage
i unpacked the exmaple but the files are empty :?:

Posted: Tue Oct 10, 2006 8:41 pm
by Mr.Mouse
Nope, they are not. The files are indeed Zlib compressed and you can decompress them.

Use this MexScript :

Code: Select all

# Astonia *.PAK file MexScript 
# By Mr.Mouse 
# Files are ZLib compressed
# But no UCSize is saved in here!
# So, I set the max UCSize to 100000
ComType ZLib1 ;
Get Date Long 0 ;
Get FileNum Long 0 ;
For T = 1 To FileNum ;
Get Offset Long 0 ;
Get CSize Long 0 ;
Get UCSize Long 0 ;
Get CType Long 0;
Math Offset += 8 ;
Set FN String ".dec" ;
Set FP String "file" ;
String FP += UCSize ;
String FP += FN ;
Set UCSize Long 1000000 ;
CLog FP Offset CSize 0 0 UCSize 0 ;
Next T ;

The problem is that there is no "uncompressed size" variable saved in the pak file. There is some kind of counter that starts at 10000, this may also refer to the 0010000.pak . Anyway, I gave a max decompression size of 1000000. There are no file names in there, but the files will be extracted as fileXXXXX.dec.

You can copy the script to a text file and then run that as MexScript on a PAK file of your choice. Or, get the attached txt file.

Re: Astonia 3 (PC)

Posted: Mon Nov 03, 2008 10:37 pm
by WaynesWorld
Okay - I'm trying to get to the graphics in Astonia 3 - I've got the MexScript below detecting and extacting individual files from the original .pak files, however, the resulting files are worthless. The files themselves when you look at them in a hex editor are not anything useful that I can determine.

So - my questions are:

1) What am I doing wrong that is creating files that are not .bmp files (this game shows everything as a .bmp file in version 2 so I'm assuming that true on version 3 as it appears to be built the same way by the same solo programmer...) The files don't open in any graphical editor (photoshop, paint, gimp, etc).

2) Did the script file have it wrong?

Waynesworld

Re: Astonia 3 (PC)

Posted: Mon Nov 03, 2008 11:49 pm
by Mr.Mouse
I'd have to have example archives to check.

Re: Astonia 3 (PC)

Posted: Tue Nov 04, 2008 12:01 am
by WaynesWorld
You can download the source and the MexScript from here:

Source File: http://66.28.242.115/00216000.pak

MexScript: http://66.28.242.115/pak.txt

BTW: Hexediting revealed on the main game executable that the graphics are .png - not .bmp after all.

Thx!

Re: Astonia 3 (PC)

Posted: Tue Nov 04, 2008 10:49 am
by Mr.Mouse
Ok, thanks. Will take a look.

Re: Astonia 3 (PC)

Posted: Tue Nov 04, 2008 9:54 pm
by asmxtx
Mr.Mouse wrote:The problem is that there is no "uncompressed size" variable saved in the pak file.
That's not correct. There are gaps between the compressed ZLIB-blocks. The decompressed size is located there.

Re: Astonia 3 (PC)

Posted: Wed Nov 05, 2008 12:32 am
by Mr.Mouse
Hmm, indeed huh? I'll take a look. Might be different versions?? Hmmmmm

Re: Astonia 3 (PC)

Posted: Thu Nov 06, 2008 8:29 pm
by Mr.Mouse

Code: Select all

# Astonia *.PAK file MexScript 
# By Mr.Mouse 
# Files are ZLib compressed
ComType ZLib1 ;
Get Date Long 0 ;
Get FileNum Long 0 ;
For T = 1 To FileNum ;
Get Offset Long 0 ;
Get CSize Long 0 ;
Get UCSize Long 0 ;
Get CType Long 0;
SavePos CP 0 ;
GoTo Offset 0 ;
Get CSize Long 0 ;
Get UCSize Long 0 ;
SavePos Offset 0 ;
Set FN String ".dec" ;
Set FP String "file" ;
String FP += UCSize ;
String FP += T ;
String FP += FN ;
CLog FP Offset CSize 0 0 UCSize 0 ;
GoTo CP 0 ;
Next T ;
There, updated. However, the original script did extract the files in the .PAK file correctly. They are raw bitmaps, with no palette or compression.

See below for examples.
file1040.jpg
file2544.jpg
File 216000.jpg

Re: Astonia 3 (PC)

Posted: Thu Nov 06, 2008 9:01 pm
by WaynesWorld
Thank you! That's perfect!