Author Topic: FF8 Info Not posted Monster AI  (Read 9251 times)

volvania

  • *
  • Posts: 48
    • View Profile
FF8 Info Not posted Monster AI
« on: 2012-01-05 01:30:18 »
hello qhimm forums and better final fantasy lovers , i will make my post about my self brief i have two main things i want to ask and then ill post the info i have got first is

1.how do you decipher hex codes in the dat file
2.second The most important and i really hope someone answer me on this one "'How do you insert new codes into the AI section without messing the dat file and corrupt it''

ok here is the thing i have send many messages to random_npc and londonRayW and the result is this it might help you into coding AI data Credit goes to them

Random npc wrote

Yeah. How do you find section 7 and 8. I should have told you about offsets.
In fact, those sections are given at the very beginning of the file. If you take bitebug :
0B __ __ __ 34 __ __ __ 54 05 __ __ F0 35 __ __
48 6F __ __ 48 6F __ __ 5C 71 __ __ E4 71 __ __
60 73 __ __ E4 74 __ __ D4 76 __ __ B4 BA __ __
E0 FC __ __

34 __ __ __ is start of first section
E0 FC __ __ is end of file.
E4 71 __ __ is section 7 with stats that Ifrit can edit, and moves
60 73 __ __ is section 8 with ai.   

to go to that section : in Translhextion, "Offset", "Jump to", than enter the given offset in reverse order. For example, for bite bug section 8, that would be : x7360.

In general there is an easier way to jump to those sections : activate the text table, then "Search" "Find using table" and then enter part of monster name : monster name is the first thing in section 7.


Now I'd give you an advice : when you need to understand a monster ai code, export it out of translhextion as plain text and analyse it in a text editor. Once you have a clear view of it, and on how you want to change it, only then you can edit the file in translhextion. Well, I personally find it easier that way..

Don't forget that if your new ai code is longer than the original one, you need to update all offsets accordingly, or the file will end up corrupted. Sometimes this can be really tedious.


About adding new enemies to a given battle... for that, you will need to edit scene.out. I haven't written much about that file in this forum, there are a few things in this topic thought : http://forums.qhimm.com/index.php?topic=10480.msg146301#msg146301 . Otherwise, I could provide you some more detailled information, or maybe open a new topic about it.

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #1 on: 2012-01-05 01:31:08 »
I will tell you my method for exporting the ai code and analysing it. Yet, I think editing scene.out will be easier to start with, but that's up to you.


First, create a new fake table.
- copy Colly's table
- rename the copy, open it with notepad or whatever simplest text editor you use (NOT Word)
- erase everything
- write this : 00=__
- save, exit

Now the exporting process!
- open the Bite Bug file with Translhextion
- select the entire section 7 plus 8
- launch and activate the fake table
- "Script", "Dump script...", save it wherever you want


Open the dumped script with a text editor. Now we'll soon begin the analysing process! ..after a few cleaning.
- remove those lame brackets. Faster way : "Replace", "}{", " ", "replace all" 
- separate the different section with enters. (see STEP1)
- replace text sections with readable text (you still have your file in translhextion, switch to Colly's table, and copy the requires stuff : monster name + in battle dialog. see STEP2 - that's French Bite bug btw.)
- remove stuff that Ifrit can handle (see STEP3)

Now we are going to analyse enemy moves.
Best way of analysing moves is to edit the monster file in Translhextion : replace all different moves by only one... And then fight that monster in FFVIII, and see what it does.
Remember, there are three sets of moves for each difficulty level, and there are three difficulty levels depending on your characters level. In general :
lvl.  1-20  stupid
lvl. 21-30  medium
lvl. 30-100 hard
So this depend of the FF8 savegame you'll be using for testing, and what level you have in it.

I haven't done that step, you'll have to do it yourself. (STEP4)

Now, ai analysing. For that use some of the posts I've written on this forum.
First thing is to separate the different codes : code when enemy is loaded, code when it's his turn, counterattack code, death code, etc. Bitebug only have loading and turn code. (STEP5)

Then, find the different test condition (I'd call them "if"). most of the time, it's 02. (STEP6)

Then, you should have the structure of your ai code. (STEP7) You can launch the most interesting part : understand how it works, what it checks, what it does. I will let you do this part!

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #2 on: 2012-01-05 01:31:41 »

49 6A 6B 67 62 63 5F
__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
04 0B __ __ 1E 05 06 82 01 32 04 01 18 05 02 64 01 06 02 01 __ 0A 04 14 __ 0A 02 1E
08 0C 02 __
08 0C 02 __
08 0C 02 __
__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
08 0C 02 __
08 0D 6E __
08 0E 6F __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
08 0C 02 __
08 0D 6E __
08 0E 6F __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

14 1E 03 02 02 02 38 __ __ __ 08 06 05 __ 0F __ 01 __ 32 __ __ __ __ __ 02 __ 32 __ __ __ __ __ 02 __ 32 __ __ __ __ __ 6D 02 6D 02 6D 02 6D 02 6E 02 6E 02 6E 02 6E 02 6F 02 6F 02 6F 02 6F 02 6D 01 6D 01 6D 02 6D 02 6D 04 6E 01 6E 02 6E 02 6F 01 6F 01 6F 02 6F 02 80 80 __ 01 A0 __ A0 __ A0 __ 8D __ 03 01 4C 01 4D 01 03 01 50 46 50 50 50 46 50 50 82 78 82 78 78 8C 82 78 64 6E 96 64 64 78 82 64 8C 64 78 64

03 __ __ __ 10 __ __ __ 20 01 __ __ 28 01 __ __
14 __ __ __ 70 __ __ __ 04 01 __ __ 08 01 __ __ 0C 01 __ __

02 54 C8 __ __ __ 4A __ 02 66 C8 __ __ __ 3F __ 02 06 C8 __ 02 __ 34 __ 02 05 C8 03 __ __ 29 __ 02 09 C8 __ __ __ 1E __ 02 09 C8 __ 03 __ 13 __ 0F 66 01 11 54 01 1A __ 1A 01 1A 02 1A 03 1C 04 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 0E DC __ __ __ __ __ __ __ __ 02 02 03 __ __ __ 04 __ __ 23 __ __ 02 04 C8 __ 1E __ 08 __ 04 CF 0C __ __ 23 0E __ 02 0E C8 05 01 __ 06 __ 12 DC 01 23 __ __ 02 DC C8 __ 03 __ 18 __ 02 02 03 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 40 __ 02 DC C8 __ 04 __ 18 __ 02 02 02 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 20 __ 02 DC C8 05 05 __ 18 __ 02 02 03 03 __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 __ __ 04 C9 0B __ __ 02 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
__ __ 1A __ 28 __ 3D __
03 33 2D 20 54 6D 73 70 20 73 6C 20 63 64 64 63 72 20 6B 5F 76 67 6B 73 6B __
5F 6E 6E 73 67 63 20 71 73 70 20 05 23 __
5F 73 20 6B 6D 6B 63 6C 72 20 62 63 20 64 70 5F 6E 6E 63 70 __
51 98 6B 63 20 61 66 6D 71 63 20 6E 6D 73 70 20 6A 63 20 56 63 6C 78 6D 69 73 69 63 6C 2E __
Report To Admin

random_npc

    * Cool newbie
    * *
    * Posts: 63
    *
          o View Profile

STEP2
« Sent to: volvania on: 2011-08-18 13:41:57 »

    * Delete
    *

Elmidea
__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
04 0B __ __ 1E 05 06 82 01 32 04 01 18 05 02 64 01 06 02 01 __ 0A 04 14 __ 0A 02 1E
08 0C 02 __
08 0C 02 __
08 0C 02 __
__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
08 0C 02 __
08 0D 6E __
08 0E 6F __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
08 0C 02 __
08 0D 6E __
08 0E 6F __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

14 1E 03 02 02 02 38 __ __ __ 08 06 05 __ 0F __ 01 __ 32 __ __ __ __ __ 02 __ 32 __ __ __ __ __ 02 __ 32 __ __ __ __ __ 6D 02 6D 02 6D 02 6D 02 6E 02 6E 02 6E 02 6E 02 6F 02 6F 02 6F 02 6F 02 6D 01 6D 01 6D 02 6D 02 6D 04 6E 01 6E 02 6E 02 6F 01 6F 01 6F 02 6F 02 80 80 __ 01 A0 __ A0 __ A0 __ 8D __ 03 01 4C 01 4D 01 03 01 50 46 50 50 50 46 50 50 82 78 82 78 78 8C 82 78 64 6E 96 64 64 78 82 64 8C 64 78 64

03 __ __ __ 10 __ __ __ 20 01 __ __ 28 01 __ __
14 __ __ __ 70 __ __ __ 04 01 __ __ 08 01 __ __ 0C 01 __ __

02 54 C8 __ __ __ 4A __ 02 66 C8 __ __ __ 3F __ 02 06 C8 __ 02 __ 34 __ 02 05 C8 03 __ __ 29 __ 02 09 C8 __ __ __ 1E __ 02 09 C8 __ 03 __ 13 __ 0F 66 01 11 54 01 1A __ 1A 01 1A 02 1A 03 1C 04 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 0E DC __ __ __ __ __ __ __ __ 02 02 03 __ __ __ 04 __ __ 23 __ __ 02 04 C8 __ 1E __ 08 __ 04 CF 0C __ __ 23 0E __ 02 0E C8 05 01 __ 06 __ 12 DC 01 23 __ __ 02 DC C8 __ 03 __ 18 __ 02 02 03 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 40 __ 02 DC C8 __ 04 __ 18 __ 02 02 02 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 20 __ 02 DC C8 05 05 __ 18 __ 02 02 03 03 __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 __ __ 04 C9 0B __ __ 02 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

Quistis: Pour un effet maximum°
appuie sur 2°
au moment de frapper°
Même chose pour le Renzokuken!

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #3 on: 2012-01-05 01:32:56 »
Elmidea

08 0C 02 __
08 0C 02 __
08 0C 02 __
__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
08 0C 02 __
08 0D 6E __
08 0E 6F __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
08 0C 02 __
08 0D 6E __
08 0E 6F __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __



03 __ __ __ 10 __ __ __ 20 01 __ __ 28 01 __ __
14 __ __ __ 70 __ __ __ 04 01 __ __ 08 01 __ __ 0C 01 __ __

02 54 C8 __ __ __ 4A __ 02 66 C8 __ __ __ 3F __ 02 06 C8 __ 02 __ 34 __ 02 05 C8 03 __ __ 29 __ 02 09 C8 __ __ __ 1E __ 02 09 C8 __ 03 __ 13 __ 0F 66 01 11 54 01 1A __ 1A 01 1A 02 1A 03 1C 04 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 0E DC __ __ __ __ __ __ __ __ 02 02 03 __ __ __ 04 __ __ 23 __ __ 02 04 C8 __ 1E __ 08 __ 04 CF 0C __ __ 23 0E __ 02 0E C8 05 01 __ 06 __ 12 DC 01 23 __ __ 02 DC C8 __ 03 __ 18 __ 02 02 03 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 40 __ 02 DC C8 __ 04 __ 18 __ 02 02 02 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 20 __ 02 DC C8 05 05 __ 18 __ 02 02 03 03 __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 __ __ 04 C9 0B __ __ 02 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

Quistis: Pour un effet maximum°
appuie sur 2°
au moment de frapper°
Même chose pour le Renzokuken!°

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #4 on: 2012-01-05 01:34:02 »
Elmidea

//low level moves
08 0C 02 __    00 attack
08 0C 02 __    01 attack
08 0C 02 __     02 attack

//medium and hard moves
08 0C 02 __     00 attack
08 0D 6E __     01
08 0E 6F __     02


03 __ __ __ 10 __ __ __ 20 01 __ __ 28 01 __ __
14 __ __ __ 70 __ __ __ 04 01 __ __ 08 01 __ __ 0C 01 __ __

02 54 C8 __ __ __ 4A __ 02 66 C8 __ __ __ 3F __ 02 06 C8 __ 02 __ 34 __ 02 05 C8 03 __ __ 29 __ 02 09 C8 __ __ __ 1E __ 02 09 C8 __ 03 __ 13 __ 0F 66 01 11 54 01 1A __ 1A 01 1A 02 1A 03 1C 04 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 0E DC __ __ __ __ __ __ __ __ 02 02 03 __ __ __ 04 __ __ 23 __ __ 02 04 C8 __ 1E __ 08 __ 04 CF 0C __ __ 23 0E __ 02 0E C8 05 01 __ 06 __ 12 DC 01 23 __ __ 02 DC C8 __ 03 __ 18 __ 02 02 03 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 40 __ 02 DC C8 __ 04 __ 18 __ 02 02 02 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 20 __ 02 DC C8 05 05 __ 18 __ 02 02 03 03 __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 __ __ 04 C9 0B __ __ 02 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

Quistis: Pour un effet maximum°
appuie sur 2°
au moment de frapper°
Même chose pour le Renzokuken!°

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #5 on: 2012-01-05 01:34:38 »
Elmidea

//low level moves
08 0C 02 __    00 attack
08 0C 02 __    01 attack
08 0C 02 __     02 attack

//medium and hard moves
08 0C 02 __     00 attack
08 0D 6E __     01
08 0E 6F __     02


offsets
03 __ __ __ 10 __ __ __ 20 01 __ __ 28 01 __ __
14 __ __ __ 70 __ __ __ 04 01 __ __ 08 01 __ __ 0C 01 __ __

loading code
02 54 C8 __ __ __ 4A __ 02 66 C8 __ __ __ 3F __ 02 06 C8 __ 02 __ 34 __ 02 05 C8 03 __ __ 29 __ 02 09 C8 __ __ __ 1E __ 02 09 C8 __ 03 __ 13 __ 0F 66 01 11 54 01 1A __ 1A 01 1A 02 1A 03 1C 04 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 0E DC __ __

__ __ __ __ __ __

turn code
02 02 03 __ __ __ 04 __ __ 23 __ __ 02 04 C8 __ 1E __ 08 __ 04 CF 0C __ __ 23 0E __ 02 0E C8 05 01 __ 06 __ 12 DC 01 23 __ __ 02 DC C8 __ 03 __ 18 __ 02 02 03 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 40 __ 02 DC C8 __ 04 __ 18 __ 02 02 02 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 20 __ 02 DC C8 05 05 __ 18 __ 02 02 03 03 __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 __ __ 04 C9 0B __ __ 02 __

__ __ __ __ __ __ __ __ __ __ __ __ __ __ __

Quistis: Pour un effet maximum°
appuie sur 2°
au moment de frapper°
Même chose pour le Renzokuken!°

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #6 on: 2012-01-05 01:35:33 »
Elmidea

//low level moves
08 0C 02 __    00 attack
08 0C 02 __    01 attack
08 0C 02 __     02 attack

//medium and hard moves
08 0C 02 __     00 attack
08 0D 6E __     01
08 0E 6F __     02


offsets
03 __ __ __ 10 __ __ __ 20 01 __ __ 28 01 __ __
14 __ __ __ 70 __ __ __ 04 01 __ __ 08 01 __ __ 0C 01 __ __

loading code
02 54 C8 00 00 __ 4A __
02 66 C8 __ __ __ 3F __
02 06 C8 __ 02 __ 34 __
02 05 C8 03 __ __ 29 __
02 09 C8 __ __ __ 1E __
02 09 C8 __ 03 __ 13 __ 0F 66 01 11 54 01 1A __ 1A 01 1A
02 1A 03 1C 04 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __ 23 __ __
0E DC __ __

__ __ __ __ __ __

turn code
02 02 03 __ __ __ 04 __ __ 23 __ __
02 04 C8 __ 1E __ 08 __ 04 CF 0C __ __ 23 0E __
02 0E C8 05 01 __ 06 __ 12 DC 01 23 __ __
02 DC C8 __ 03 __ 18 __
02 02 03 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 40 __ 02 DC C8 __ 04 __ 18 __
02 02 02 __ __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 20 __
02 DC C8 05 05 __ 18 __
02 02 03 03 __ __ 0D __ 04 C9 0B 02 01 01 0E DC __ __ 23 __ __ 23 __ __
04 C9 0B __ __ 02 __

__ __ __ __ __ __ __ __ __ __ __ __ __ __ __

Quistis: Pour un effet maximum°
appuie sur 2°
au moment de frapper°
Même chose pour le Renzokuken!°

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #7 on: 2012-01-05 01:38:48 »
Elmidea

//low level moves
08 0C 02 __    00 attack
08 0C 02 __    01 attack
08 0C 02 __     02 attack

//medium and hard moves
08 0C 02 __     00 attack
08 0D 6E __     01
08 0E 6F __     02


03 __ __ __ 10 __ __ __ 20 01 __ __ 28 01 __ __
14 __ __ __ 70 __ __ __ 04 01 __ __ 08 01 __ __ 0C 01 __ __


//loading code
02 54 C8 00 00 __ 4A __ {
02 66 C8 00 00 __ 3F __ {
02 06 C8 00 02 __ 34 __ {
02 05 C8 03 00 __ 29 __ {
02 09 C8 00 00 __ 1E __ {
02 09 C8 00 03 __ 13 __ {0F 66 01   11 54 01   1A 00 1A 01 1A 02 1A 03 1C 04  23 __ __} 23 __ __} 23 __ __} 23 __ __} 23 __ __} 23 __ __}
0E DC 00 __

__ __ __ __ __ __

//turn code
02 02 03 __ __ __ 04 __ {__ 23 __ __}
02 04 C8 00 1E __ 08 __ {04 CF 0C 00 __ 23 0E __}
02 0E C8 05 01 __ 06 __ {12 DC 01  23 __ __}
02 DC C8 00 03 __ 18 __ {
02 02 03 __ __ __ 0D __ {04 C9 0B 02 01 01   0E DC 00 __ 23 __ __} 23 40 __}
02 DC C8 00 04 __ 18 __ {
02 02 02 __ __ __ 0D __ {04 C9 0B 02 01 01   0E DC 00 __ 23 __ __} 23 20 __}
02 DC C8 05 05 __ 18 __ {
02 02 03 03 __ __ 0D __ {04 C9 0B 02 01 01   0E DC 00 __ 23 __ __} 23 __ __}
04 C9 0B 00 00 02 __

__ __ __ __ __ __ __ __ __ __ __ __ __ __ __

//text lines
00  Quistis: Pour un effet maximum°
01  appuie sur 2°
02  au moment de frapper°
03  Même chose pour le Renzokuken!°

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #8 on: 2012-01-05 01:51:56 »
Sorry about the wait.

Bare with me, this may be a bit lengthy.

Feel free to skip the next three paragraphs.

I'll start with the file types.  FF8 primarily uses three file types: fs, fl, and fi.  Fs files are where the data is stored, while fl and fi files are mainly used as a reference for the fs archives.  First open an fl file with a program like notepad, it will give you a list of all the files and their paths stored within the corresponding fs archive.  Locate the appropriate file and cross-reference it with the data in the corresponding fi file.  Fi files can be open with a hex editor.  Each fi file has 12 bytes of data for each file listed in the fl file.  The first 4 bytes are the unpacked file size.  The second 4 bytes gives the location of the packed file in the fs archive.  The last 4 bytes tells whether or not the file is compressed, 01 means it is compressed with LZS, 00 means it is uncompressed.

That might seem a bit overwhelming, but I'll give you an example.  Open your FF8 Data folder and open the battle.fl file with notepad.  Look for c:\ff8\data\eng\battle\c0m028.dat, this contains the information on the Bite Bug.  I believe it is the 262 file listed in battle.fl.  Open battle.fi in a hex editor.  Now you need to figure out the offset for the bite bug file (c0m028.dat).  Since c0m028.dat (the bite bug file) is the 262 file in battle.fl and since fi files have 12 bytes per file it isn’t difficult.  First, subtract one from 262.  You subtract one because the first file has an offset of zero.  Then, multiple 261 by 12 (the number of bytes per file in the fi files).  That gives you 3132 which is the decimal offset for the bite bug file in battle.fi.  Go there.  It should say E4 FC 00 00 6C F1 C5 01 01 00 00 00.  Those are the 12 bytes for c0m028.dat.  01 C5 F1 6C is the hexadecimal offset for the bite bug within the battle.fs archive, and the 01 in the last 4 bytes (01 00 00 00) tells you that it is compressed with LZS.

I didn’t double check anything written above so it could be slightly off.  I could probably write several more paragraphs about manually extracting and decompressing files from fs archives, but thankfully with a good compiler and decompiler you don’t need to do all that.  In fact you don’t need to do much of any direct work with fs, fl, and fi files, but it is still good to know how to.

If your goal is working on section 7 and 8 of the monster dat files you’ll need a hex editor and a compiler/decompiler.  For a compiler/decompiler, personally I use FF8AC (Final Fantasy VIII Archive Commander).  Google it and you’ll find it.  As for a hex editor I use XVI32.

Monster information is stored within Battle.fs in the c0mXXX.dat files.  By way of an example I’ll again use the Bite Bug file (c0m028.dat).  Open FF8AC, change the language to English, and select load archive.  Navigate to battle.fi and open it.  Scroll down to c0m028.dat and extract it.  Now, open c0m028.dat in your hex editor.

Keep in mind that the coding is done in 32bit, so things are generally laid out in 4 byte sets.  Now the most important thing for locating the data you want to change is the header.  Each c0mXXX.dat file has a header, and some of the sections within the c0mXXX.dat files also have headers.  Information on the headers can be found in the Qhimm Wiki.  The very first byte in c0m028.dat is 0B.  This is the number of sections in the file, 11.  Your looking for section 7 and 8.  The offset for the address of a section can be found by multiplying the section number by 4.  So for section 7 it is 28.  28 is the decimal offset.  1C is the hexadecimal offset.  Go to it and you’ll see E4 71 00 00.  That is the hexadecimal offset for section 7.  You have to read it backwards 00 00 71 E4.  Go to that hexadecimal address.  (If you’re using XVI32 hit Ctrl + G, select hexadecimal and type 71E4.)  You’ll see 46 67 72 63 20 46 73 65 00 00 00 00.  That is the start of the section 7 for the Bite Bug file.  It is the data containing the monster name.  Use this chart for translating names.

0=
21=0
22=1
23=2
24=3
25=4
26=5
27=6
28=7
29=8
2A=9
2B=%
2C=/
2D=:
2E=!
2F=?
30=...
31=+
32=-
33==
34=æ
35=&
36=jap "
37=jap"
38=(
39=)
3A=[' in middle]
3B=.
3C=,
3D=~
3E="
3F="
40='
41=ê
42=³
43=`
44=¹
45=A
46=B
47=C
48=D
49=E
4A=F
4B=G
4C=H
4D=I
4E=J
4F=K
50=L
51=M
52=N
53=O
54=P
55=Q
56=R
57=S
58=T
59=U
5A=V
5B=W
5C=X
5D=Y
5E=Z
5F=a
60=b
61=c
62=d
63=e
64=f
65=g
66=h
67=i
68=j
69=k
6A=l
6B=m
6C=n
6D=o
6E=p
6F=q
70=r
71=s
72=t
73=u
74=v
75=w
76=x
77=y
78=z
90=ss
A0=ó
A8=VIII
A9=[
AA=]
AB=[SQUARE]
AC=@
AD=[SSQUARE]
AE=Ÿ
AF=¿
C6=VI
C7=II
C9=™
CA=ñ
CB=œ

Further information on section 7 is listed in the wiki.

As for section 8, 8 multiplied by 4 is 32.  So go to the decimal address 32 or hexadecimal address 20.  You’ll see 60 73 00 00.  So 7360 is the hexadecimal offset for section 8.  29536 is the decimal address.  Go there.  You’ll see 03 00 00 00 10 00 00 00 20 01 00 00 28 01 00 00.  Remember, the coding is generally written in 4 byte sets.

Section 8 starts out with a header containing the offsets for various parts of the enemy AI script.  03 00 00 00 tells you there are 3 basic offsets.  These are 10 00 00 00, 20 01 00 00, and 28 01 00 00.  10 00 00 00, or rather 10, is the offset from the start of section 8 for the basic AI stuff (this is what you want, the other two are for in battle text—I think).  03 is the start of section 8 and the offset for the AI offsets is 10 (a bit confusing, I know).  10 is the hexadecimal offset from the start of section 8, in other word 16 bytes (I resize XVI32 to a 16 by 16 matrix to make navigating hex stuff more easily accomplished).  Anyways, section 8’s offset is 7360 and from there the ai offset is 10, so go to 7370.  You’ll see 14 00 00 00 70 00 00 00 04 01 00 00 08 01 00 00 0C 01 00 00.  All of these offsets are to be calculated from the start of this line.  In other words from the 14, or hexadecimal address 7370, or decimal address 29552.

14 00 00 00 is the offset for the loading coding, the coding that is executed when the enemy appears.  So that starts at 7384.  You’ll see 02 54 C8 00.  This is text stuff (Quistis and her little Gunblade tutorial), don’t mess with it.

70 00 00 00 is the offset for what the enemy does when it gets a turn.  That starts at 73E0.  You’ll see 02 02 03 00.  I’ll detail this section later if you want.

04 01 00 00 is the offset for what the enemy does when attacked.  This is used for counterattacks and some other things.  That starts at 7474.  You’ll see 00 00 00 00, because the Bite Bug has no counterattacks.

08 01 00 00 is the offset for what the enemy does when it dies. This is used for death counterattacks and things like that.  This starts at 7478.  You’ll see 00 00 00 00, as the Bite Bug does nothing special when you kill it.

I forget what 0C 01 00 00 is for.

Anyways, that should cover the basics of locating things in the c0mXXX.dat files for section 7 and 8.

If you have any questions feel free to ask.

If you want I’ll write you a detailed step-by-step guide to editing section 7 and 8, but it might take a few weeks.

Good luck!

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #9 on: 2012-01-05 01:52:58 »
Well. About scene.out, here is what I had decoded.

1st byte : scenery, the a0stg###.x files in Battle (000-->162 makes 00-->A2)
2nd byte : I'm not sure about this one, might be premptive attack/ enemy attack or stuff like that.
3rd & 4th : dunno
5th: enemies visible
6th: enemies loaded
7th: enemies targetable
    for 5-6-7, seems to work that way :
 - 00 = all
 - 10 = not 4
 - 20 = not 3
 - 30 = not 3 & 4
 - 40 = not 2
 - 50 = not 2 & 4
 - 60 = not 2 & 3
 - 70 = not 2, 3, & 4
 - 80 = not 1
 - 90 = not 1 & 4
 - a0 = not 1 & 3
 - b0 = not 1, 3, & 4
 - c0 = not 1 & 2
 - d0 = not 1, 2, &  4
 - e0 = not 1, 2, & 3
 - f0 = none

8th : nbr of enemies 80=1, c0=2, e0=3, f0=4 (intermediate values work too)

after that come data for eight enemies, so all that follows is repeated 8 times

8x 6 bytes : enemy coordinate (x,y,z) y vertical is always 0, thought if you change it it does rise or lower the enemy
8x 1 byte : which enemy / c0mxxx.dat file. As you found out, 10 is dummy (c0m000.dat), 57 is galbadian soldier (c0m071.dat), and so on. You need to convert hex to dec and withdraw 16 : (5*16 + 7) - 16 = 87-16 = 71
8x 2 bytes : dunno, but is related to previously : galbadian will always have 70 7f, etc.
8x 2 bytes : dunno, related to enemy type as well.
8x 2 bytes : dunno,     "       "     "       "
8x 1 byte : dunno, still related to enemy type.
8x 1byte : enemy level


Finally, if you need a list of all battles : http://aladore3viii4.free.fr/files/FF8/Battle%20Scene%20Test%20(US).html (aladore384 is the crazy guy I was mentioning in the last mail)

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #10 on: 2012-01-05 01:57:29 »
lastly i requested a dat file of seifer first battle and random_npc midified the ai so seifer is a very dynamic badass boss but the file is removed from the file sharing site but i have a discussion about that here is the post ( also if you need to midify gf abilitys its in a post i write about in the forum i am not mistaken anyways its in karnel.bin

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #11 on: 2012-01-05 01:58:22 »
Yeah, about the way I coded Seifer, he's supposed to have a limited stock of firaga (about 12 or so), so he doesn't use them immediately, he wait until you are sufficiently low in HP so that he might be able to kill you with it. That should be usefull against those who are waiting for their renzokuken...

He also uses more critical hit over normal attacks (he has a gunblade after all).

He can also mimic some of your actions : if you cast haste or double on yourself, he will immediately do the same.

He uses regen only once.

He uses confuse only if you are trying to summon a GF. (if he don't, I might have send you an outdated file...)

His elemental defenses vary from one fight to another, in order to make him less predictable. (same comment as above : those were the latest changes)


About reflect, in my opinion you shouldn't have any at that point of the game, so the check wether seifer has a reflect or not was 'just in case'. The only way to have reflect on yourself would be to summon carbunkl.
The thing I don't really like is the way I made him react to protect or shell. That could be exploited by players.

He isn't immune to zombie, but he should have a decent defense against it, no?


So, you want to switch over Edea and Seifer battle. To be honest, I don't like the idea.
Seifer is Edea's knight (=bodyguard), you have to fight it first in order to reach the sorceress, otherwise it doesn't make sens.
Seifer and Squall are kind-of rivals, they used to duel against each other all the time and they still loves to, this is one more (but more serious): this aspect is important!
Edea battle is the climax of CD1. It has special music, in your first playthrough it's lucky to be the first time you see level 3 magics, etc. If you add another fight after it, you ruin it all...
Edea first battle is the only fight in FFVIII you can loose (if you are in too pitiful shape Edea triggers the cinematic right away, and you don't get any AP)

I don't see why you add some galbadian soldier either. Edea just removed the president in front of the crowd, but she's not fully at the top of the state yet. Seifer doesn't have any right to order the military either, before that night he was just some crazy individual who attempted to capture the president during the first countrywide broadcast in 15 years or so... This night is his first mediatic reappearance, prior to be awarded anything for his courage by the new order. This night is Edea's coup d'état and subjugation of the Galbadian nation. Control over the military comes in second, in the following days. And our failed assassination attempt sure helped her to consolidate her power and popularity.     

On the other hand, I was thinking at some point a 2-against-3 fight : Seifer would aid Edea in the second fight. Oh well, never made it. The biggest problem I have, is that for me before CD2 Irvine and Rinoa should be unjunctionned, storywise.

volvania

  • *
  • Posts: 48
    • View Profile
Re: FF8 Info Not posted Monster AI
« Reply #12 on: 2012-01-05 02:00:22 »
so how did random made that much intellegent data on seifer code like stock of magics and magic def vary

lan

  • Guest
Re: FF8 Info Not posted Monster AI
« Reply #13 on: 2012-02-03 07:05:56 »
thank you for your post,My difficulty has been resolved.