READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Astonia 3 (PC)

Old posts about game archives and other formats.
Post Reply
hollinar
ultra-n00b
Posts: 2
Joined: Sat Oct 07, 2006 11:33 pm

Astonia 3 (PC)

Post by hollinar » Sun Oct 08, 2006 12:01 am

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
You do not have the required permissions to view the files attached to this post.

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Sun Oct 08, 2006 1:48 am

at 1rst looks zlib packed file :|

hollinar
ultra-n00b
Posts: 2
Joined: Sat Oct 07, 2006 11:33 pm

Zlib, eh?

Post by hollinar » Tue Oct 10, 2006 8:54 am

Zlib... Does that mean that there is already a way to extract/inject data from the files?

User avatar
Savage
VIP member
VIP member
Posts: 560
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 17 times

Post by Savage » Tue Oct 10, 2006 7:22 pm

i unpacked the exmaple but the files are empty :?:

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Post by Mr.Mouse » Tue Oct 10, 2006 8:41 pm

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.
You do not have the required permissions to view the files attached to this post.

WaynesWorld
ultra-n00b
Posts: 3
Joined: Mon Nov 03, 2008 3:34 pm

Re: Astonia 3 (PC)

Post by WaynesWorld » Mon Nov 03, 2008 10:37 pm

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

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Re: Astonia 3 (PC)

Post by Mr.Mouse » Mon Nov 03, 2008 11:49 pm

I'd have to have example archives to check.

WaynesWorld
ultra-n00b
Posts: 3
Joined: Mon Nov 03, 2008 3:34 pm

Re: Astonia 3 (PC)

Post by WaynesWorld » Tue Nov 04, 2008 12:01 am

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!

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Re: Astonia 3 (PC)

Post by Mr.Mouse » Tue Nov 04, 2008 10:49 am

Ok, thanks. Will take a look.

User avatar
asmxtx
veteran
Posts: 127
Joined: Sun Jun 08, 2008 10:32 pm
Location: Developers Country
Has thanked: 1 time
Been thanked: 30 times

Re: Astonia 3 (PC)

Post by asmxtx » Tue Nov 04, 2008 9:54 pm

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.

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Re: Astonia 3 (PC)

Post by Mr.Mouse » Wed Nov 05, 2008 12:32 am

Hmm, indeed huh? I'll take a look. Might be different versions?? Hmmmmm

User avatar
Mr.Mouse
Site Admin
Posts: 4041
Joined: Wed Jan 15, 2003 6:45 pm
Location: Dungeons of Doom
Has thanked: 412 times
Been thanked: 561 times
Contact:

Re: Astonia 3 (PC)

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

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
You do not have the required permissions to view the files attached to this post.

WaynesWorld
ultra-n00b
Posts: 3
Joined: Mon Nov 03, 2008 3:34 pm

Re: Astonia 3 (PC)

Post by WaynesWorld » Thu Nov 06, 2008 9:01 pm

Thank you! That's perfect!

Post Reply