Author Topic: [FFVIII-PCSteam] Question about the AI (targetadv and more) <Solved>  (Read 211 times)

Hazedge

  • Cool newbie
  • *
  • Posts: 86
  • Karma: 1
    • View Profile
I have found some codes that I didnt understand what they mean exactly, hoped someone could explain to me:

When an enemy was programmed to cast Thundaga, it had: targetadv(0, 200, 0, 231)
When an enemy was going to cast Remedy+: targetadv(0, 201, 0, 4)
When an enemy was about to physical attack: targetadv(0, 200, 0, 214)

I wanted to understand how the line targetadv works

EDIT:
I'm already posting this, so I'll take advantage and ask about some other commands.
The target(20x) has alot of values, from 200 (I take it targets self), 201 (any of the party members) and 204 (all party members). But then I saw 203 and 207 and don't know what it does, which makes me ask if there is a list showing the entire commands to use so I could learn.

EDIT2:
Someone sent me a PM showing me these
200 self
201 one target random
203 last opponent who attacked
204 all oponents
205 all allies
207 one ally
208 multiple hits

I've found a code list and there was this: 0x26 - targetadv(arg1, arg2, arg3, arg4), I really wanted to know what are each of these arguments, I guess the arg2 means the target? I don't know.
« Last Edit: 2018-09-29 20:36:41 by Hazedge »

Hazedge

  • Cool newbie
  • *
  • Posts: 86
  • Karma: 1
    • View Profile
So uh... Been more than 30 days and no one could answer this for me   :'(
Dont know if it was worth making another post asking the same question or just reply here, I just hope someone could explain this.

Leythalknight

  • Fast newbie
  • *
  • Posts: 16
  • Karma: 2
    • View Profile
A while back, someone posted a link to a JP website that had the AI scripts for each enemy in the game. Can't find the link, so I re-upped the archive here: https://mega.nz/#!FGwCzA7I!oE5sYXmEqdPUDXhDHhT7Y8fqlqFJ5bf8kZIOipSH72o

It has data on each targetadv as well as the unknowns in Ifrit's AI editor, so it may help you figure it out. For example, the targetadv in the second Seifer battle selects for the character with the lowest Fire resistance.

edit: Comparing Ifrit to the txt files and it seems that arg2 is indeed the target.

200 - enemy (a player character)
201 - ally (another enemy)
It seems they can also choose to target a specific type of enemy; for instance, Elite Soldiers can specifically target G-Soldiers (enemy 87).

On the subject of enemies targeting specific enemies, I looked through enemy AI and came up with this list:

0 = Squall*
1 = Zell*
2 = Irvine*
3 = Quistis*
4 = Rinoa*
5 = Selphie*
6 = Seifer*
7 = Edea*
8 = Laguna*
9 = Kiros
10 = Ward
17 = GIM52A
23 = SAM08G
55 = Lefty
56 = Righty
87 = G-Soldier
88 = Elite Soldier
111 = Granaldo
112 = Raldo
124 = Paratrooper
143 = Ultimecia (Draw Point)

*Not actually referred to as such in Ifrit's AI editor, but Kiros and Ward follow the character order used elsewhere, so I assume these numbers are right.

Starting from 17 (or 16, counting Dummy?), the enemy order follows the order of the com files. So 18 is Blobra, 19 is Thrustaevis, etc. I don't know what 11-15 are used for.

A 3 in arg3 seems to be checking to see if a condition doesn't apply, such as not having a status effect.

arg4:
0 = KO
1 = Poison
3 = Blind
4 = Silence
5 = Berserk
6 = Zombie
9 = HP is < 1/2
16 = Sleep
19 = Stop
21 = Protect
22 = Shell
23 = Reflect
24 = Aura
26 = Doom
30 = Confusion
40 = Vit0
46 = Has Magic
47 = Summoning
200 = Male
201 = Female
204 = lowest HP
209 = Highest Speed
214 = Unsure (txt file says 体力 - Vit or Spr?)
229 = Fire resistance
230 = Ice resistance
231 = Thunder resistance
232-235 = Earth, Poison, Wind, Water resistance*
236 = Holy resistance

*I'm guessing these are correct since the non-asterisked ones follow the order of elements as listed in Doomtrain.

I think this is about all I can figure out.
« Last Edit: 2018-10-02 18:59:16 by Leythalknight »

Hazedge

  • Cool newbie
  • *
  • Posts: 86
  • Karma: 1
    • View Profile
A while back, someone posted a link to a JP website that had the AI scripts for each enemy in the game. Can't find the link, so I re-upped the archive here: https://mega.nz/#!FGwCzA7I!oE5sYXmEqdPUDXhDHhT7Y8fqlqFJ5bf8kZIOipSH72o

It has data on each targetadv as well as the unknowns in Ifrit's AI editor, so it may help you figure it out. For example, the targetadv in the second Seifer battle selects for the character with the lowest Fire resistance.

edit: Comparing Ifrit to the txt files and it seems that arg2 is indeed the target.

200 - enemy (a player character)
201 - ally (another enemy)

A 3 in arg3 seems to be checking to see if a condition doesn't apply, such as not having a status effect.

arg4:
3 = Blind
4 = Silence
19 = Stop
21 = Protect
22 = Shell
23 = Reflect
30 = Confusion
204 = lowest HP

Thank you very much! This saved my day!! +1 Like

Leythalknight

  • Fast newbie
  • *
  • Posts: 16
  • Karma: 2
    • View Profile
Thank you very much! This saved my day!! +1 Like

Happy to help. I added some more info to my post.
« Last Edit: 2018-09-29 21:05:13 by Leythalknight »