Author Topic: AI Editing: Flag 402C  (Read 2277 times)

Karifean

  • Cool newbie
  • *
  • Posts: 60
  • Karma: 8
    • View Profile
AI Editing: Flag 402C
« on: 2013-08-30 23:58:57 »
So in the midst of all the unknown addresses in the ProudClod.dat and WallMarket.dat, there is address 402C. Has anyone ever found out what exactly it does?

I'm asking because it has become important for me right now. I am trying to make a boss rush gauntlet and certain bosses would cause trouble. Palmer is a perfect example. If you delete his whole Death Counter, the next formation in the gauntlet will be invisible and as soon as you press the triangle button, you can no longer select commands and the battle is frozen. Likewise, if you don't delete his Death Counter, his "final attack" (where he runs off and gets hit by the truck) initiates Wait Mode, but never goes back to Active Mode so the next battle in the gauntlet is screwed just as much.

HOWEVER if you set flag 402C to 1 in his Pre-Battle script, it works fine! It also works for the other troublesome enemies (basically all the ones that don't have a red-flashing death animation) such as Rufus or Dyne. This is super-convenient, but I'm kind of interested in what the flag actually DOES, so... does anyone know?

Cyberman

  • No life
  • *
  • Posts: 1575
  • Karma: 8
    • View Profile
Re: AI Editing: Flag 402C
« Reply #1 on: 2013-08-31 00:20:05 »
No I don't know what the flag does.

Jhowever why not force a new battle scene (that's identical in layout but different boss) with the next boss? Or terminate Palmer in a different way and then jump to another battle? Isn't that what happens with life sephiroth in the final battle scenes? I'm not familiar with FF7 scripting for the battles but it would seem to be logical in any case to do that (hey logic and programing sometimes do not mix I've noticed).

Cyb

NFITC1

  • No life
  • *
  • Posts: 2907
  • Karma: 73
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: AI Editing: Flag 402C
« Reply #2 on: 2013-08-31 02:39:26 »
Someone my get to it before me, but I think I might have the answer in my notes that I'm not going to look at until tomorrow. I'm just flagging this post to come back to it.

Karifean

  • Cool newbie
  • *
  • Posts: 60
  • Karma: 8
    • View Profile
Re: AI Editing: Flag 402C
« Reply #3 on: 2013-08-31 14:08:54 »
Jhowever why not force a new battle scene (that's identical in layout but different boss) with the next boss? Or terminate Palmer in a different way and then jump to another battle? Isn't that what happens with life sephiroth in the final battle scenes? I'm not familiar with FF7 scripting for the battles but it would seem to be logical in any case to do that (hey logic and programing sometimes do not mix I've noticed).

The reason I don't do that is because that would reset charges of, say, All and Final Attack and also heal all status ailments - both of which I explicitly do NOT want.

JBedford128

  • Crazy poster
  • *
  • Posts: 103
  • Karma: 5
    • View Profile
Re: AI Editing: Flag 402C
« Reply #4 on: 2013-08-31 22:38:44 »
I would assume it enables/disables death scripts. And this agrees.

NFITC1

  • No life
  • *
  • Posts: 2907
  • Karma: 73
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: AI Editing: Flag 402C
« Reply #5 on: 2013-09-03 18:11:16 »
402C grants immunity to Death (which is why the Death Counters don't activate) then performs command 25h (which is the only way this can happen unless explicitly told to in AI) on the actor when their HP reaches 0. I'm not entirely sure what this command does, but I think it is a "this character performs a custom animation and is then declared dead" kind of command.
« Last Edit: 2013-09-03 20:31:24 by NFITC1 »

Karifean

  • Cool newbie
  • *
  • Posts: 60
  • Karma: 8
    • View Profile
Re: AI Editing: Flag 402C
« Reply #6 on: 2013-09-03 18:58:23 »
Interesting bit of information. I think the Death Counters still activate, though. Schizo has his 402C flag set to 1 (and if any head dies first, it sets the 402C flag of the other head to 0) and still has a Death Counter.

NFITC1

  • No life
  • *
  • Posts: 2907
  • Karma: 73
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: AI Editing: Flag 402C
« Reply #7 on: 2013-09-03 20:31:11 »
Interesting bit of information. I think the Death Counters still activate, though. Schizo has his 402C flag set to 1 (and if any head dies first, it sets the 402C flag of the other head to 0) and still has a Death Counter.

Huh. Whad'ya know? Schizo is weird. They're nearly identical in AI (although S.Right will do Tremor more often than the S.Left, but they might still do it at the same time if you time it right) and only the right side has the full model. The left side is just the upper part of the head and looks to be flagged "invisible" at the beginning of the battle.

Anyway, Schizo IS NOT listed to have a bosses' death but certainly does die like one once both the sides are dead. They're actually both assigned normal death animations. In their animation scripts, both the final attacks' animation scripts end in:

Code: [Select]
97(11, 01) F4(40) F3 EE
That can't be a coincidence. In fact, a few other "enemies" share this pattern. It causes them to "die" in certain conditions. Magnade makes his shields "die" when he does with this command.

Before I get too off-topic about that, Death Counters DO run first regardless of the 402C flag. Ignore what I said before. It will NOT perform command 25 on a dead target with this flag on. It WILL, however, determine if function 0x437131 runs. I don't know what significance this has as this is the only case it gets run by the exe.