Author Topic: [FFVIII-PCSteam] Question about the AI (targetadv and more) <Solved>  (Read 407 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.

Edit 3/3/19: I had the idea to compare the arg4 list I made earlier in this thread to the list of text strings for status effects and found that they more or less match up. Did some testing with the enemy AI to make sure these were accurate. Updated list (new entries marked with *):

arg4:
0 = KO
1 = Poison
2 = Petrify*
3 = Blind
4 = Silence
5 = Berserk
6 = Zombie
9 = HP is < 1/2
16 = Sleep
17 = Haste*
18 = Slow*
19 = Stop
20 = Regen*
21 = Protect
22 = Shell
23 = Reflect
24 = Aura
25 = Curse*
26 = Doom
27 = Invincible*
28 = Petrifying*
29 = Float*
30 = Confusion
33 = Double*
34 = Triple*
35 = Defend*
36 =
37 =
38 = Charged*
39 = Back Attack*
40 = Vit0
41 = Angel Wing*
42 =
43 =
44 =
45 =
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

Interestingly, the strings for the two blank spots after Defend say "physical attack ineffective" and "magic ineffective". These match up with the two blank status effect spaces after Defend, so perhaps they planned these two statuses before scrapping them? Then again, other strings are filled with things that seem totally irrelevant, so they could be used elsewhere.
« Last Edit: 2019-03-03 17:33:05 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 »