Author Topic: world_us.lgp -> enc_w.bin  (Read 2727 times)

Tenko Kuugen

  • Public Enemy
  • *
  • Posts: 1416
    • View Profile
    • Twitter
world_us.lgp -> enc_w.bin
« on: 2012-09-04 00:26:02 »
Aali put out a bit of info, I'll collect that here just so it doesn't get lost

So far it looks like any given 'block' of encounters covers several battle forms, usually about 3 normal battles and a few specials like back attack, side attack and so on. It also seems like there is a new block for each walkmesh type
means an area like kalm, which has dead earth ( grey, rocky ), grassland and beach will have 3 blocks
a regular block looks, in hex, like this

01 XX YY PZ YY PZ YY PZ YY PZ followed by a lot of 00's. Then, depending on the block, it adds battles after the 00's, with a much, much lower probability chance. those are again, YY PZ YY PZ YY PZ YY PZ. Those battles are back attacks and attack's from both sides.
01 starts the new block but otherwise unknown what it does
XX is the rate of encounter. FF is maximum, 00 seems to be none at all for all practical purposes
YY is 2/3 of the encounter ID ( such 01A0 in PrC )
Z is the enncounter rate for that specific encounter
P is half X and half Y, see below

Here Aali's info
The string in question here was 01 20 6C 58 for the first encounter in a new block
(Aali) okay so the last 2048 bytes of the file holds 128 bytes per area for a total of 16 areas
(Aali) each location has a map of which walkmesh types correspond to which of those 128 bytes, this data is hardcoded in ff7.exe however
(Aali) not speaking hex at the moment
(Aali) each of the 4 possible walkmesh types for an area has 32 bytes of data (duh)

(Aali) 6C 58 is 1011 0000 0110 1100 in binary
(Aali) of those bits, 1011 00 is the encounter chance
(Aali) while 00 0110 1100 is the battle ID
(Aali) 5 and half of 8 is encounter chance, the other half of 8 and 6C are the battle ID
(Aali) and I derped up that binary so the numbers aren't really correct but the theory is still sound

(Aali) I guess the last 16 walkmesh types could be omitted if you wanted to save space
(Aali) so 8 bytes


Now if only someone who knows how to do editors ( *cough*NFITC1*cough* ) could make one for this.
« Last Edit: 2012-09-04 00:28:15 by KuugenTheFox »