Just to tell all of you that I haven't exactly been lazing around doing nothing lately, here's what I've come up with in the past few days.
Remember me stating about Section 7 of the Field Files?
Well, in Section 7, you get to define the Scenes in which you want.
The scenes are all predefined so it isn't much fun isn't it?
Anyway, I did some thinking and decided to go deeper in.
Guess what?
I came across the file SCENE.BIN which I never knew what was for.
Well, seems pretty obvious now doesn't it?
Anyway, let me bring to your attention that though I have made process with this file format, I'm not exactly done yet. You can either wait for me to finish or help me by doing some testing for me.
Ok, lets get down to the file format itself.
Unlike other files, scene.bin is a little special.
It isn't compressed and as you will see, it is in fact multiple files within a single file.
Scene.bin is 270,336 bytes in size and is exactly divisible by 8192 giving you 33 seperate files.
It might be easier for you to understand the rest if you do in fact break down scene.bin into 33 parts.
Okay, now lets dwelve deeper.
Each part of scene.bin is preceded by a 64 byte header. It can contain from 1 to 16 offsets since each offset is defined in 4 bytes.
Most files won't actually use all the 64 bytes. For the absent offsets, values of FF FF FF FF can be used in their place.
But that's not all as you can't just read the offsets directly and go hunting for each section since you will have to multiply the values of the offsets by 4
So the value 10 00 00 00
is actually offset $40
Now, you can check if you read the offsets right.
Each seperate section starts with these values:-
1F 8B 08 00 00 00 00 00 02 03 ED
and ends with these values:-
80 1E 00 00
As the each section has to begin with an offset that is a multiple of 4, you might need to use a few values of FF to fill in the gaps between sections.
That's pretty much what I have at the moment.
I'm not very sure whether one "section" specifies one scene or multiple scenes. All I can tell you is that it seems that the scenes seem to follow the order in the file. The first few sections should start from Scene 0 onwards.
The rest of the decoding of this file is pretty much comparing and testing values.
A tedious task, mind you. So if anyone would like to help me test one of the file parts, I would be very happy.
Oh, when I say file parts I mean the 8192 bytes seperate files and when I say sections I mean the seperate sections in each file part.
Another thing you should know is that scene.bin is read everytime before a battle. It is not preloaded into memory so you can't alter it's values from memory.
There is one advantage though; you are free to change the values and time you want and the changes will take effect in your next battle.
Confused?
I open to questions.
If you don't understand anything, feel free to ask.
I'll do my best to explain it in an easier manner.