Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 16:57

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
 Post subject: just a little help for a fan of yours
PostPosted: 05 Aug 2009 10:25 

Joined: 05 Aug 2009 10:09
Posts: 5
Location: Calgary
Hi to all the guys on this board and especially to Mr Luigi.
I have to thank you for your powerful tool for Ys Games.
It rocks!!!
I surfed over your website and I found tons of useful tool.
I wish to code well as you are able to do but unfortunatley my codin' skill are totally absent.
Well.. I saw that recently you did a cool extractor tool compatible with many game by using a common scriptin' language.
Very cool idea.
Unfortunatley I wasn't able to use it for my own pourposes.
I and a fridn of mine are trying to hack and translated to english a very cool game.
So I think you know well the matter.
WElll the main archieves are composed of two different files a .dir file containin' the index and a .arc files contain' the raw datas.
I succed in understandin' the format and it's really simple.
The data files are not compressed but they are put one after another in the same order specified in the . dir file.
Now why I'm wirtin' to you?
Will you be pleased to make a simple, relaly simple extractor and rebuilder tool for theese archieves?
I can paste down here the format of the .dir file if you will help me.
The format is the following:

Code:
1?? block = 108 bytes

file_name = 100 bytes
file_size = 8 bytes

2??block = 108 bytes

file_name = 100 bytes
file_size = 8 bytes

and so on..



The number of files contained in the archieves is psecified in the last four bytes and the end of the dir file.

So..just an example:

in the .dir file we find:

1??block
filename=tree.dat
filesize=346534bytes
2??block
filename=cat.dat
filesize= 45663223 bytes

In the associated .arc file we will find that tree.dat is follwed byt cat.dat without any interrutpion, they are stored one after another..and so for the others.

I have to say that many times in the file_name subblock there also slashes (\) that means they are folders.
for example: folder1\folder2\cat.dat, it mean the cat.dat folder is stired this way

folder1
folder2
cat.dat
tree.dat

etc.

I hope I was clear enough.
Thank you in adavance for all the help you want to give me.
Congratulations for your cool tools.
Bye Bye

Kaurikon


Last edited by kaurikon on 08 Aug 2009 07:01, edited 1 time in total.

Top
 Profile  
 
 
 Post subject: Re: just a little help for a fan of yours
PostPosted: 05 Aug 2009 13:54 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
for some strange reason I have found area10.arc/dir in my collection of archives so I guess that someone already asked me support with them, anyway the following is the BMS script for extracting the files:
Code:
# Xanadu Next
# script for QuickBMS http://aluigi.org/papers.htm#quickbms

get EXTENSION extension
if EXTENSION != DIR
    open FDDE DIR 0
endif
open FDDE ARC 1

set OFFSET long 0
get FILES asize
math FILES /= 108
for i = 0 < FILES
    getdstring NAME 100
    get SIZE long
    get DUMMY long

    log NAME OFFSET SIZE 1

    math OFFSET += SIZE
next i
about the rebuilding, unfortunately I don't make rebuilders for various technical and personal reasons (even if they are incredibly simples like in this case) so I suggest to ask if someone else on Xentax is interested... or maybe just check first if the extracted files are correct and when needed I could write a rebuilder on the fly.


Top
 Profile  
 
 Post subject: Re: just a little help for a fan of yours
PostPosted: 05 Aug 2009 15:46 

Joined: 05 Aug 2009 10:09
Posts: 5
Location: Calgary
Thank you for your great help.
i just woke up and I found you answer..good way to wake up.
Thank you from the deep pf my heart.
I tested your bms script by using it with you QuickBMS tool and it seems perfect.
I tested on the several archievesand it seems it extract all the files inside them.
Only two things: some file names have japanese name and I can't visualize them correctly but I think it's since I don't have the japanese language set as default; while opening them I can clearly read the dialogues.
Second thing is that in order to test if my translations are correctly displayed and how to make them I need to reimport them and without a proper rebuilder I can't do it.
So..I know I'm askin' too much to you.. But if it's not too boring can you make a simple rebuilder since you said it's a really simple case?
I really appreciate your help in this case.
Thank you in advance and more for what you did 'till now.
Thanks thanks thanks :)


Top
 Profile  
 
 Post subject: Re: just a little help for a fan of yours
PostPosted: 05 Aug 2009 18:16 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
I have given a better look at the format and the field after the filesize is a boolean which says if the file is compressed or not.
so the previous bms script is incomplete because the compressed files are extracted as is and also because I have not read the last field which says how many files are inside the archive (but don't worry it's useless so you can continue to use the script).

now, instead of giving up (because I don't know what compression algorithm it is) I have decided to adopt a lame work-around so that you can rebuild the archive using the original DIR one as reference to let the tool to know what files are compressed and what aren't (otherwise it's impossible to set the compression field to 1 or 0).

the rebuilder is attached and an example usage is:
xanreb.exe c:\folder c:\area10 c:\xanadu\area10.dir

where the:
- first argument is the folder with the files you want to import
- second argument is the name of the file to create (with or without extension is the same, the tool will add the dir and arc extension automatically)
- third argument is optional (but necessary as said before) is the original DIR file used as reference

so remember to modify only the non-compressed files... but this is obvious :)


Attachments:
xanreb.zip [5.88 KiB]
Downloaded 74 times
Top
 Profile  
 
 Post subject: Re: just a little help for a fan of yours
PostPosted: 05 Aug 2009 19:22 

Joined: 05 Aug 2009 10:09
Posts: 5
Location: Calgary
Thank you very much for your precious and great help.
I'm really happy.
Just one question from a new-bie like I am:

- I checked the dir files where the list is stored and I didn't see any other field after the filesize one.

I'm really curious since I really want to understand and to learn in order to do the things by myself ( possibly) in the future.

So how could you determine that there was another field and that it's a boolean?

Which files are compressed?
I'm askin' it since I'm lookin' for the graphic images and I didn't find them yet.
So maybe they are inside one of theese compressed files or maybe they are compressed.
For now I really wish to thank you with all my strenghts... you're really cool :)
Thank you Luigi, really thank you


Top
 Profile  
 
 Post subject: Re: just a little help for a fan of yours
PostPosted: 05 Aug 2009 19:40 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
practically you have a structure like:
- 100 bytes: filename
- 4 bytes: filesize
- 4 bytes: compressed or non

one of the compressed files is mp_1000.map


Top
 Profile  
 
 Post subject: Re: just a little help for a fan of yours
PostPosted: 05 Aug 2009 19:54 

Joined: 05 Aug 2009 10:09
Posts: 5
Location: Calgary
Ah oky...thank you.
Well the .map files are the map themselves so I think it's not necessary to uncompress them.
Well..I hope.
I'm testin' your tool and It works very fine, really relly fast.
I experiencin' a trouble.
It seems that the text is inside this script files and it has this format:

MSG_EX("#S3#C0???????????????????????????????????????????????????????????????",-1,2)

But if i replace the japanese text with and english strings only the first word is displayed.
The game stops at the first word, I thought beacuse there is a space between each word.
So I tried to put all the words without space, just for make a test.
Well the other words are displayed, not only the first one.
How can be? If the string dispayed is iside the double-ashes I thought it wasn't a trouble which was inside.
Do you have any idea?


Top
 Profile  
 
 Post subject: Re: just a little help for a fan of yours
PostPosted: 05 Aug 2009 19:58 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
uhmmm I guess that a string like the following should work, or not?
MSG_EX("#S3#C0test",-1,2)
anyway doesn't depend by the tool, I can't help with the internal stuff of the game


Top
 Profile  
 
 Post subject: Re: just a little help for a fan of yours
PostPosted: 05 Aug 2009 20:05 

Joined: 05 Aug 2009 10:09
Posts: 5
Location: Calgary
Yees it works since it's a single word... trying with a string with many words only the first one is displayed and the result is that the game lopps in that scene.
It seems that the space is used to change the lines, I mean to put the thing in new line...this is very strange and very bad since I don't really know how to fix it.
Mumble.... Well I'll look deeply inside of it.
thank you for your help
Bye


Top
 Profile  
 
 Post subject: Re: just a little help for a fan of yours
PostPosted: 14 Aug 2009 00:30 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
an update for this thread.

the rebuilding is NOT needed and NOT suggested.
indeed it's just enough to place the modified file in its folder.
for example if you modify the file MP_00a0.scp (located in area00.arc) then you must place it in the location X_NEXT\DATA\Map\area00\MP_00a0.scp and it will be read automatically by the game

definitely more simple to modify and handle.
for the problem of the space I have written a fix for that and the allowed chars (you can talk with doppiapunta who is doing other tests).


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 

All times are UTC [ DST ]


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: