Let me put this in a clearer form.
Remember to decompress the file first.
Next you have to understand my shortform system.
Now, look at the starting section of the file I've given below.
code:
S---+ NS--------+ S1--------+ S2--------+ S3--------+ S4--------+ S5--------+ S6--------+ S7--------+ S8--------+ S9--------+ Section 1 Starts here
00 00 09 00 00 00 2A 00 00 00 A1 2E 00 00 F1 2E 00 00 17 32 00 00 27 50 00 00 E7 5B 00 00 07 94 00 00 3B 94 00 00 23 97 00 00 73 2E 00 00 02 05 .. .. .. etc
[/quote]Ok, so it looks clear now right?
But that's not all!
You have to remember that the PC reads stuff the opposite way around.
Now look at the section I labelled S1.
The value is 2A 00 00 00.
Since the PC reads stuff the opposite way around, the value should actually be read as 00 00 00 2A.
The second thing to remember that this is a hex number so when you use the "GOTO" command in your hex editor,
So, remember to select hex and not decimal.
If you goto offset 2A, you will arrive at the section I've labelled "Section 1 starts here"
Not use the same method to get to section 7, ok?
Fice has explained this before but I'm sure most of you didn't pay attention of were not around then.
Ok, back to my documentation of Section 7.
The first 4 bytes of Section 4 is the Length Indicator. So far the size of Section seems to be a constant size of 48 bytes.
In fact, I don't even have to look at the other files to tell you that there shouldn't be a different size of it since there is no indicator at all to tell where the offset for "low probabilty "(see below) is.
After that,
The first byte disables / enables random battles.
00 = Disable
01 = Enable
The 2nd byte sets the encounter rate
01 = High
FF = Low
Values in between 01 and FF also work, the values were only given as an example.
The 3rd & 4th byte determine the enemy & background for the 1st possible enemy.
If you give a non available value, a debug battle will load, so you don't have to be afraid of testing values here.
The 5th & 6th byte determine the enemy & background for the 2nd possible enemy.
After that, I the list will follow the same accordance for enemy 3, enemy4, etc till the end of the section.
FF7 randomly chooses an enemy and sort of cycles through the list of enemies listed in no particular order.
Values that appear from offset $E onwards, have a very low probablity of occuring. It seems to be less than half. So far, all values that appear here seem to be for back attacks and attack from both sides.
Enemies facing backwards are defined as different numbers.
That means meeting an MP and meeting an MP with back attack uses different values.
If you specify the enemy twice in the list, you increase the probability of that enemy appearing.
The game reads the list in order.
If you have no value for enemy1, but a value for enemy2, when you encounter enemy1, a debug battle will appear.
This means that if you wish to have 4 enemies, you will have to define it in enemy1, enemy2, enemy3 & enemy4
If you define it as blank, enemy2, enemy3, enemy4, enemy1, the game will assume you have 5 different enemies.
And should it load blank, you will get a debug battle.
So in general, you shouldn't leave spaces in-between.
However, you can leave empty spaces from the last enemy to offset $E since offset $E defines the "low probability" battles.
So, you can have:-
code:
Length----+ BE RB E1--+ E2--+ E3--+ E4--+ E5--+ E6--+ LPE1- LPE2- LPE3- LPE4-
30 00 00 00 01 80 2D 61 2E 59 2F 49 00 00 00 00 00 00 30 11 30 11 00 00 00 00
[/quote]
BE Battle Enable
RB Encounter Rate
E1 Enemy 1,etc
LPE1 Low probability enemy1,etc
Here are examples of some values.
2F 49 MP + Dog with Mako Reactor Background
2E 59 Dog with Mako Reactor Background
2D 61 2MP's with Mako Reactor Background
30 11 Dog facing your back with Mako Reactor Background
Unfortunately, it is impossible for me to list all the of the numbers for the enemies since it will involve me modifying each field file to only load one type of enemy.
Thus, it is even more impossible for me to give you an algorithm of how to calculate the enemy types and the backgrounds unless someone can provide me with a list of the values.
I know for sure that there must be an algorithm to find the make enemies appear in different backgrounds since I managed to make Shinra Soldiers that appear in the Shinra Building to appear on the background where Sephiroth fights the dragon (raining).
In fact, Ive even gotten the debug triangles to appear in the train graveyard. This however does make one thing clear, if you put values that are really small, you are very likely to get the debug triangles. If you get a single triangle, that is counted as an encount error and it means there errors in the numbers you have provided. If you manage to get more than one triangle appear with no background, that is not considered a debug error since you get a background. Maybe that's the only way to find out what values appear for which backgrounds.
So, fice is this enough to get you to put this "feature" into Cosmo?
Currently, I'm forced to compile the whole field everytime I make a single change to any field file and this is a lot of hassle since I have to decompress and recompress the field files everytime I do this.
I could continue to do it this way, but you guys will have to wait a long time to get a full listing of the values.
I'm in a rush now and I'm trying to complete my research paper which I have to hand up by Friday so I'm running low on time. So, I doubt I'll be working on the field files for a while so if any one wants to go ahead and help me finish it go ahead, ok? If you guys would rather wait for me, I'm fine with that too. Actually, the next section I was gonna look for was for the shop info. I was sort of thinking of identifying all the easier stuff first so I will be able to find out which section the scripts are held in.
I'll still answer any questions about this section though.
Sorry bout stretching the table again, but this is the only way I can think of formatting it cause HTML is off.
[This message has been edited by The SaiNt (edited July 07, 2001).]