Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Request] Divina (MMORPG) - Impossible to open files (like .og_, .tg_, ...)

Newbie Spellweaver
Joined
Mar 9, 2015
Messages
11
Reaction score
1
Hello Ragezone !

Currently, Divina's last server was closed. But Divina and his musics miss me, so I would open music files.
Problem : Divina files are not so easy to open. Example : "God_scn_1.og_" file, there is no doubt that's an .ogg file, but when I rename it to "God_scn_1.ogg", that didn't work at all...

I encountered this problem several month ago, but yesterday I've discovered a post in a japanese forum : It was a post about a script to open Divina musics and voices (in .ogg file).
When I discovered it, I was so happy that I immediately tried it ! (I noticed that was a Perl code and that's the first time I saw this language xD).
I executed it, and... it works !!! I was very surprised and happy to saw there was a way to open these files ! This script can convert .og_ files to working .ogg files.

But if I'm satisfied now, why I post a new thread ?

Because I'm crazy and I want to open others Divina files, like .tg_ (probably a .tga file), or .ni_ (I have no idea...), and other... However, this Perl script didn't work with others files type...
I'm very interested in .tg_ opening script, and other files to have 3D models and textures, because I'm a little Blender user ^^.

So, there is a way to open these files ?
And if possible, can you tell me how this .og_ converter script works ?

I'll give you link with files (25,3 MB). I didn't give the game because is more than 4GB, but if you are interested, I can give it in an other link.

Links :
- a .rar file which contains files (.tg_,...) and the Perl script :
- .og_ Perl script post : (post number 199)

I'm a Divina huge fan, and this game miss me a lot. Your help is welcome !

Thanks for reading. If you need precisions, files... tell me !

PS : It is very possible that my English is not very good, and I'm sorry xD
 
Newbie Spellweaver
Joined
Sep 25, 2014
Messages
40
Reaction score
5
".og_" are decompressed with a simple zlib "uncompress" function call,
".tg_" are not the same.

My .og_ (not tg_) decompression works (it's just a call to the zlib uncompress function). Then I tried with a loop going from 0 to 10000 (for the position of the data to uncompress with zlib) to uncompress the .tg_ and nothing worked (it works of course at position 137 for the God_scn_1.og_).

The two images at bottom are the same image in gimp and photoshop (ACTIVITY_CARD_001.tg_) with the header a little modified.
Yatsumi - [Request] Divina (MMORPG) - Impossible to open files (like .og_, .tg_, ...) - RaGEZONE Forums
It's not easy only with the .tg_.

Edit : .tg_ are compressed.

Also try to make a new thread here : http://forum.ragezone.com/f860/
 
Last edited:
Newbie Spellweaver
Joined
Mar 9, 2015
Messages
11
Reaction score
1
Firstly, thank you very much for your answer ^^.

I read your post, and thanks to you I've learned new things (I'm not a beginner, but I'm not good too xD).
When I've read your post, I immediately do researches to understand it because there are a lot of things that I didn't know.
This file problem is very interesting (at least for me).
So I did fast researches, and I learned meaning of compress/uncompress (Now, I understand why God_scn_1.ogg is bigger than God_snc_1.og_, because .og_ is compressed),
and the uncompress didn't allows to read .og_ for software like VLC Media Player, Windows Media Player,.. because these software can understand the compressed byte order of the .og_ (don't hesitate to correct me if I'm wrong =p).
Same thing for buffer : I understood that's a memory who have temporary data, which is useful to transfer data from memory to a program. But I think I need to study further the buffer meaning.

Concerning .tg_ files, I'm also sure that's .tga files because there are .ni_ files, and I discovered .nif files are 3D model files (so, .tg_ can be the texture of .ni_).
But, like .tg_, I can't open .ni_ files (I used Blender with .nif plugin).

I thank you for your explanations, but there are things that I didnt't understand :
-Where did the code ("int ZEXPORT uncompress OF ((Bytef *dext, uLong *destLen, const.......") come from ? Maybe, that's your code ?
-I understood that the green zone (the "source" value) is the compressed set of bytes, and that's the source buffer too. That means that the data in the source buffer come from "God_snc_1.og_" and "source" represents the number of bytes of "God_snc_1.og_" ?
-I also understood that you drawed two red zone : one for the total size of the destination buffer, and one other red zone. Destination buffer is "God_snc_1.ogg" ? Did the second red zone represents the total size of the source buffer, so the total size of the data in "God_snc_1.og_" ? But is this size already on the "source" value ?
-If destLen must be larger than sourceLen, so 5914419 > 5900431, did the 13988 bytes ( 5914419 bytes - 5900431 bytes = 13988 bytes) are useless ?
-How did you do to find the green and the red zones ? There is advices or rules to find them ?
-What is the meaning of the 2 pixelized images ? O.O I see just a color difference x).
In reality, I didn't have very good skills in hexadecimal. I read how to convert binary / decimal / hexadecimal, and I have only used this software 1 time (to edit hexadecimal values of Super Mario 64 ROM with a tutorial).

"You can look at the code in the .exe and you'll know exactly how the files are loaded.
It's not easy only with the .tg_. "
I guess I have to use an hexadecimal editor (I have HxD), but I didn't know how to use it in order to know how the files are loaded.
If that didn't disturb you, can you help me ?

I can give you mores files, feel free to download it :
(there are a lot of files, but I think the most useful files are DivinaPatch.exe and Divina.bin).
NB : I'm not sure, but I think Divina.bin loads files and not DivinaPatch.exe, because DivinaPatch.exe is used to do game updates and start the game, and when the game crashed, the program displays "Divina.bin stop working...".
NB2 : I have FR, TW, JP version. I put only JP version.

And last thing, did you have advices or tutorial,... to improve my skills (about read hexadecimal) ?
I tried to search one but I find only tutorial about convert decimal/ hexadecimal/ binary...

Thank you for reading this post, it is very long but I'm really motivated xD
 
CATMAGEDDON
Loyal Member
Joined
Aug 17, 2014
Messages
1,666
Reaction score
293
can u post the game name in chinese or japanese?maybe i can lookup for serverfiles or stuff
 
Newbie Spellweaver
Joined
Sep 25, 2014
Messages
40
Reaction score
5
It's just because I don't know (and I don't like) scripting languages like python and perl,
so i rewrote the code in C.

Compress and Uncompress are functions created by Jean-Loup Gailly and Mark Adler in 1995.

A buffer is like a string.
Like :
string MyString = "ABCD";

it's just a variable that contains some characters.

If you open God_scn_1.og_ with notepad,
you will see the characters of the file ("pizm{ \\Playcoo-file1\project\¯«¬ö\¯«¬ö§óª©­pµe\¡°¤é¤åª©\20110609_4.02.0000(1)\¡i´ú¸Õ¶×¾ã°Ï¡j\¬ü³N\Data\Media\Music\God_scn_1.ogg3?Z Z xÚÔ»e\TÁÛ7~¤i”î””’V¤D¤K¤YéT...").



And what the perl script does,
is :
read "?Z " which is in fact the number 5914419 (the size of the final uncompressed file),
and puts the rest of the file in a string ("xÚÔ»e\TÁÛ7~¤i”î””’V¤D¤...").

Open the windows calculator, choose Scientific view, write 5914419, and click on hex, you will see the 5A3F33.



Then you call the very simple Gailly and Adler function :

uncompress(StringThatWillHaveTheUncompressedData_OGG, NumberThatWillBeModifiedByTheFunctionAndThatWillBeTheSizeOfTheFinalUncompressedString_OGG, StringThatHasTheOriginalCompressedData_OG_, NumberThatIsTheSizeOfTheOriginalCompressedData_OG_);


So in fact the script only uses this "uncompress" function (with the data that is between position 137 and the end of the file).



------------------------------------------------------------------------------------



The "int ZEXPORT uncompress OF..." is the Gailly and Adler code they wrote in 1995,
it's this function that the perl engine uses
(winrar, 7zip... also use this function to unzip .zip archives, windows also, ubuntu also...)




------------------------------------------------------------------------------------



Yes the green area is the data that is in God_scn_1.og_ (open it with notepad).
The "source" string (green area) contains "xÚÔ»e\T...",
x being 0x78 in hexadecimal,
then Ú is 0xDA...

it's just that hexworkshop doesn't show the "Ú" but a ".".

------------------------------------------------------------------------------------

When you use the uncompress function,
it changes StringThatWillHaveTheUncompressedData
and it changes also NumberThatWillBeModifiedByTheFunctionAndThatWillBeTheSizeOfTheFinalUncompressedString.


StringThatWillHaveTheUncompressedData is changed to "OggS PN .o®vorbis €» ..."

NumberThatWillBeModifiedByTheFunctionAndThatWillBeTheSizeOfTheFinalUncompressedString is changed to 5914419.

------------------------------------------------------------------------------------



The compressed og_ has a size of : 5900431 bytes (octets).
The data is between position 137 and the end, so 5900294 octets of compressed data.
This data is "xÚÔ»e\T...".



With the compression, the ogg size has been reduced of 13988 bytes.
(and btw it's possible in certain cases that a compressed file is bigger)


------------------------------------------------------------------------------------


"How did you do to find the green and the red zones ?"
they were written in the perl script
(when i executed it, it was taking the data between 137 and the end)




















------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------

Thanks for the binaries.

The .tga (not .tg_) loading code is in NiMain11VC71.dll.
The whole .tga (not .tg_) file reading is in the function Ni____TGA_Reader::ReadFile.

For info, in NiMain11VC71.dll
there are also the functions :
Ni____BMP____Reader::ReadFile
Ni____DDS____Reader::ReadFile
Ni____NIF____ImageReader::ReadFile
Ni____SGI____Reader::ReadFile
Ni____TGA____Reader::ReadFile

------------------------------------------------------------------------------------

But before reading the .tga,
the game uses a decompression
(ReadPlaycooGraphicBody -> CFilePacker::ReadBody -> Decompress)

In DataManager.dll
there is also for example this function : "CFilePacker::WriteTG_".

You need to look at the functions of DataManager.dll.

(make a new thread here : http://forum.ragezone.com/f860/)

I won't connect to ragezone during at least a week.

------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------











Concerning hexadecimal,
there is nothing really to learn.
It's like if in a .txt file, you write the number 8, save the file,
and that's it.

You have now a file with the character 8 inside (which is 0x38).
The letter 8 is 0x38.
There's nothing else interesting.


After, programs give a signification to this 8.
For example for the super nintendo "operating system"
the letter 8 means "stc" (Set Carry Flag).

0x2A means "rcl a"
0x6B means "retf"
0x68 means "pop a"
...
(there are 91 opcodes in the snes processor)


The nintendo 64, ps1, windows, linux, ARM phones (also like nintendo 3DS)... have other significations.

------------------------------------------------------------------------------------

After it depends on what you want to do.
I also use blender (and lightwave, 3DS and maya).
It depends on what you like, already know, time you have...
I like C and assembly, i started with html, php, C#, java.

------------------------------------------------------------------------------------

And yes, like xlw00tlx said, it would be good to search for things related to the server.

------------------------------------------------------------------------------------

And what is "LucentHeart"? the same game? or another game made by the same company with the same engine? and are there tools for LucentHeart?
 
Last edited:
Newbie Spellweaver
Joined
Mar 9, 2015
Messages
11
Reaction score
1
http://forum.ragezone.com/members/2000129543.htmlxlw00tlx : Divina - ディビーナ(JP) - 幻月之歌 or 新幻月之歌 (新幻月之歌 was the TW private server). If you can look up for server files or other, it will be very nice ! I am available to give files, or other things related to Divina ^^

PaulXOXO : Thank you very very much for this detailed answer !! But I can read all now, I will read it entirely tomorrow (I mean today because it's 4:00am and I'm a little tired lol). I will post questions later~.
 
CATMAGEDDON
Loyal Member
Joined
Aug 17, 2014
Messages
1,666
Reaction score
293
幻月之歌 or 新幻月之歌
there are servers still running,no serverfiles so far
 
Newbie Spellweaver
Joined
Mar 9, 2015
Messages
11
Reaction score
1
PaulXOXO : Thanks for help me again !
It was not a bad idea to upload these files.
So, I'll make a new thread now ^^.

Finally, I think I've understood how this script works !! (That was not easy but I did it =D)

I open the script then the script :
1) find the file ("God_scn_1.og_")
2) use stat()[7] to find an information about the file. I saw in the documentation that [7] = total size of the file (in bytes).
3) use binmode for binary data (and musics contains binary data)
4) use read() to read the string of all bytes.
5) create variables $fl1 (unpack allows to take 2 hexa values in the 4th position, so 7B 00, and take his int16 value, so 123), $fl2 (same thing : unpack int32 at the 133th position, so 06 08 5A 00, so 5900294)
6) use the uncompress function of Jean-Loup Gailly and Mark Adler : in the entire string, this function uncompress from 137th position to the end.
7) open the futur .ogg file, and set it in binmode.
8) put the compressed data in it
9) close and then I can play the music !

Don't hesitate to correct me ^^
I have just question about binmode : the function is called binmode but isn't for binary ? I mean binary is numbers like 01010101... Why that's not called hexmode/ hexamode... ?

Concerning hexadecimal, you said that the character 8 is 38, but why you've writed 0x38 ? Maybe the "0x" represents the column ?
Else, thanks for SNES codes, but I prefer N64 XD


Why I want to open .tg_ and .ni_ files ? Because I have some ideas :
-Maybe making mods. I never did mods for games, but if I have to start moding, that will be mods about Divina, ReZero,... mainly for Garry's mod (maybe Skyrim ? xD).
-I love a lot Divina graphics, especially characters shapes and color, these 2 elements make this game the 1st kawaii game for me. And a 3D model would be good to understand how to draw Divina characters (I think they did a good work concerning character design).
-I want use 3D model to animation (I started a french YT chanel which I make Super Mario 64 parody with other games characters, like SMG4). I use a green background in Super Mario 64 to put the character in a video montage software (I did the samething for Divina but the server is closed now...)


I never played LucentHeart but no that's not the same game. It's another game by the same company I guess.
I never play it so I can't say if it's the same engine or not. But I've seen some videos, and I deduce that maybe it's the same engine.
Did you want to try it ? x)
DreamDrop is also very similar to Divina (at least graphics are very very very similar).
But obviously World/History looks very different in these games (Divina = Kawaii x japanese+chinese+celtic mythology).
There is also an other Divina game : DivinaCute (only Android and Apple), but I 'm not a big fan of the Phone version...

This is the Gamania games list (old list because servers are closed) :
NB : gamania jp became AGEゲームズ ( )

xlw00tlx : This is the link to the website for TW server :
If there is a way to have Divina server, it will be wonderful ! I am very interested =)
I tried to log in on this website, it works but when I click on the play button (which launch Divina Patch), my browser display this : "伺服器信息不存在" (Google translate : The server information does not exist)
I didn't know if is useful or not, but this is the link to the Divina wiki (maybe useful for database ?) :

Did you need the Divina game ? I am uploading the JP version on MEGA (4~5 GB)
If you need something tell me~

PS : Your signature is hypnotizing me O.O
 
CATMAGEDDON
Loyal Member
Joined
Aug 17, 2014
Messages
1,666
Reaction score
293
ディビーナ+サーバーファイル in google japan
tw and jp files wont go together i guess
and the closest thing i can relate to this game is either lucent heart ,rose online,maginobi or any of those asian anime chibi mmorpgs
(i have a few bunch that didnt release on here)
 
Newbie Spellweaver
Joined
Mar 9, 2015
Messages
11
Reaction score
1
Divina TW and JP client are not very different, but Divina FR, America are very different because servers closed before JP and TW.
JP and TW receveid last updates.

I founded also an archive of the old JP website


If you need a japanese translation tell me ^^
 
Back
Top