[REQUEST] Tool to create *.SAF files

02/23/2010 15:22 ProfNerwosol#1
Hi,

I need a tool to create SAF files. I have some information as to what needs to be done, but I don't know enough to do it myself.

Here's some info you might find useful.

[Only registered and activated users can see links. Click Here To Register...]

SAH - it seems to be a type of ... header? ... with information about contents of SAF.

There's file in Shaiya directory called zlib.dll. I suspect that this compression algorithm is in use. Below is a link to Delphi implementation of Zlib. Originally it's written in C.
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]


UPDATE:

I found something interesting. I found FLD header in *.wld files which is associated to AVS software. I couldn't test it myself so maybe one of you can check and see how it works.

[Only registered and activated users can see links. Click Here To Register...]
02/24/2010 08:44 Possum09#2
[Only registered and activated users can see links. Click Here To Register...]
02/24/2010 09:46 ProfNerwosol#3
Thank you Possum.

However, I am having difficulties running it. It says:

"Cannot run the application because its configuration is wrong ..."

Are there any files missing in ZeroSignals package?
02/24/2010 14:23 Possum09#4
Quote:
Originally Posted by ProfNerwosol View Post
Thank you Possum.

However, I am having difficulties running it. It says:

"Cannot run the application because its configuration is wrong ..."

Are there any files missing in ZeroSignals package?
Hello,

It works ok for me.

Install the [Only registered and activated users can see links. Click Here To Register...] and see if that fixes it.
02/24/2010 17:52 ProfNerwosol#5
Yup, that solved it. Thanks.


UPDATE:


INFO:

For those having C++ Runtime Error when trying to update.

You need to compress update.saf and update.saf using zip-deflate compression method. Otherwise you won't be able to update.
02/25/2010 07:58 Sylvanus1970#6
If I remember correctly , some of the wld files have DUN instead of FLD , I took this to mean dungeon and not dungeon , the map.ini file has parameters of D and F for the wld files too. I found that if I set all the D's to F in map.ini teleport stones could be used in dungeon and mounts could be ridden into dungeon but not gotten off or on in dungeon. Of course getting hit by mobs in dungeon did get me off of the mount.
02/26/2010 07:02 G0dLesZ#7
I've got my own Data Editor and the SAH/SAF Format is pretty simple..
First, we need 2 Method's, 1 for reading Files & 1 for reading Directories


ReadFiles
Code:
4 Byte - Filecount
for( i = 0; i < Filecount, i++ ) {
    N Byte - Filename (until \0)
    8 Byte - Offset (the absolute Offset for SAF, to find the File Data)
    4 Byte - Filedata Length
    4 Byte - Unknown Data (just read it & put it back on writing ;p)
}

ReadDirs
Code:
4 Byte - Filecount
for( i = 0; i < Filecount, i++ ) {
    4 Byte - Namelength (includes \0)
    N Byte - Filename (Namelength  Bytes)

    // thats all for this Dir
    // but here comes the "Tree-like" thing
    ReadFiles(); // we read all Files in this Dir
    ReadDirs(); // and we read all sub-Dirs in this Dir, which again reads all Files & sub-Dirs in it..
}

Thats for the Struct itself..
After opening the SAH File, start at Offset 56 for reading the File-"Tree"-Struct.
The first 56 Bytes are the Header, which includs some Keydata. This key will be checked by the GameGuard on startup!
So you need an GG bypass to use your own packed SAH File =|

On Offset 56, start ReadFiles() and then ReadDirs().
So you got all Files in the head-dir, call it "data", and then all sub-dirs in it... and so on.

Pseudo:
Code:
handle = OpenFile( "path/to/data.sah" );
SetOffset( handle, 56 );

ReadFiles();
ReadDirs();

CloseFile( handle );

Thats for SAH... SAF is pretty more simpe.. just read at the Offset you got on the ReadFiles() Method.
Read <Filelength> Bytes & save it to the <Filename>.. no Compression oder Encryption are used here ;p

Thats all i got in 1-2 Days of Hex analys, never checked the 4 unknow bytes or Algo for head-key.. its simple enough to bypass the GG, so noone need that shit. =)



PS: Yes, this Conent may be used for free, CENSORED.. its a shame to request money for that shit... f*ck it up..
02/26/2010 10:05 ProfNerwosol#8
If I got it right, the SAH file is the most important ... so I can 'tar' SAF and just say in SAH at which offset the file starts and its length and that's all?
02/26/2010 14:14 lilprohacker#9
Quote:
Originally Posted by G0dLesZ View Post
PS: Yes, this Conent may be used for free, no CENSORED.. its a shame to request money for that shit... f*ck it up..
First off buddy, our vip section doesn't have special info for only paying customers, it has tools and programs that we worked hard and spent alot of time on. Secondly, I've done alot more for this community than you have, which all is free. I even have a bot that took alot of time to develop which is free.