Author Topic: Soldier library : a dotNET library for creating Final Fantasy 7 hacking tools  (Read 5663 times)

lasyan3

  • *
  • Posts: 76
    • View Profile
Happy new year everyone!

I finally release the project on which I am working since a while : it's a dotNET library which contains a few classes that allow to edit some datas (for example, the script) of Final Fantasy 7 (currentyl only for PlayStation support).

My goal is to give the ability, for anyone, to easily work on the game (you need to know a few about object oriented programming, knowing Visual Studio will also help). So now I need your opinion ;)

You can get it and everything you need to know here. Any feedback will greatly be welcomed!
« Last Edit: 2010-01-03 08:13:00 by lasyan3 »

Borde

  • *
  • Posts: 891
    • View Profile
You had a very good idea lasyan3. Not my field, but I'm sure someone around here will find these library useful. Thanks for your contribution.

Anyway, I think it would be a good idea to include an english version of the descriptions on your website. Some people may not bother looking at the docs thinking they are also in french.

lasyan3

  • *
  • Posts: 76
    • View Profile
Ooops, thanks Borde, I didn't see the link was in french! It's a shame, since my website is also in english! I updated my link, it's now printing the website in english.
And don't worry, the documentation given with the library is only available in english ;)

Gemini

  • *
  • Posts: 260
  • Not learner's Guru
    • View Profile
    • Devil Hackers
Basically you're doing what I'm working on, but with C# instead of C++. :-)

lasyan3

  • *
  • Posts: 76
    • View Profile
Hi Gemini, you're right, it's basically the same idea (at first I didn't thought that because I didn't see that you want to release your project as source code).

But I focus only on dialogs in DAT files, on texts in kernel and also on the field scripting language, while you focus on a lot of more things.

If you want, I would be glad to share some informations with you (by private messages or in this topic, as you wish).

Gemini

  • *
  • Posts: 260
  • Not learner's Guru
    • View Profile
    • Devil Hackers
I was wondering how you're fixing windows that cannot be resized because they have no WINDOW command attached to the dialogue ID. Currently I'm trying to add a feature that lists in a log all the map files with missing WINDOW or WSIZW commands, like MDS8_3. Later (or using a memory list to make it all automatic) they can be disassembled, you can manually add new WINDOW commands, then the new size for the windows is recalculated by the current resizing system, and it's all reinserted with no problem. I think this should also take care of the Chocobo genre string used in the Chocobo Stables.
I was also wondering if you're ignoring dialogues that are not actually used by any of the event commands, for both extraction and insertion. There's so much more room without them that it's even possible to rebuild the whole FIELD folder with no relocation at the end of the ISO or anywhere else. That should take care of additional seek time produced by field files not being one after another like in the original.

lasyan3

  • *
  • Posts: 76
    • View Profile
About the rezising of missing windows, I disassemble the field scripting of the file and add new WINDOW commands when needed. Currently it's very basic (if I don't find a WINDOW command just before a MESSAGE or ASK command, I add one) and must be updated when I finish my work on the field scripting engine. But I never managed this "Chocobo genre" thing, is it a field variable, like the name of the characters ?
About the "hidden dialogs" like I call them, yes I ignore them for now, but when the field scripting part is finished, I plan to try to put them back in the game.
When files are too big, I still relocate files in the FIELD folder if needed, but instead of moving them at the end of the iso, I first read all the iso to find every blank sector (and there is a lot of them!). This way, the iso is even smaller than the original one.

My turn ^^ : how do you extract tutorial sections ? Are they in the DAT files ? Thanks.

Gemini

  • *
  • Posts: 260
  • Not learner's Guru
    • View Profile
    • Devil Hackers
Tutorials are treated as AKAO segments, but they have no magic word so they're easy to locate while converting a DAT to a class object. Currently my code to detect them goes like this:
Code: [Select]
tutorial=0;
akao_count=head.nAkaoOffsets;
// determine the size of the script block
if(akao_count==0) script_size=size-mainptr[SCRIPT_TEXT];
else
{
u32* ptr=(u32*)past;
script_size=ptr[0]-mainptr[SCRIPT_TEXT];
akao=new u8*[akao_count];
akao_sizes=new int[akao_count];
for(int i=0; i<akao_count; i++)
{
// determine size
int asize/*=ahead->size*/;
if(i<akao_count-1) asize=ptr[i+1]-ptr[i];
else asize=size-ptr[i];
AKAO_HEADER *ahead=(AKAO_HEADER*)(data+ptr[i]);
if(memcmp(&ahead->magic,"AKAO",4)!=0) tutorial++;

akao[i]=new u8[asize];
// copy to class
memcpy(akao[i],data+ptr[i],asize);
akao_sizes[i]=asize;
}
past+=akao_count*4;
}
When any tutorial segments are detected I reprocess the whole AKAO area (after extracting dialogue) and dump whatever doesn't have the "AKAO" magic value. Tutorial contain not just text, but also menu commands, so you're gonna need to skip whatever is not necessary. This is how my code does it:
Code: [Select]
void DumpTutorial(CText &text, u8* data)
{
GString str;

text.Create(0,TYPE_LIST);
for(int seek=0, pos;; )
{
for(pos=0; data[seek+pos]!=0x10; pos++) if(data[seek+pos]==0x11) return;
seek+=pos+1;
str.Empty();
seek+=DecodeField(str,&data[seek]);
text.AddEntry(str,NULL);
}
}

Jaitsu

  • *
  • Posts: 1067
  • DON'T FWOOSH ME BRO
    • View Profile
    • Jaitsu Studios
this would be yfacusa (awesome) if i knew how to actually do this stuff, still, im sure many people will find it pretty freakin wicked