Author Topic: Help with Bizarro Sephiroth's AI  (Read 3211 times)

quantumpencil

  • *
  • Posts: 72
    • View Profile
Help with Bizarro Sephiroth's AI
« on: 2014-11-17 02:42:01 »
Hello qhimmers, I've been going through the AI scripts trying to fix some AI bugs. I recently started working on Bizarro's AI and it's been a real doozy. I managed to fix the issue with the Bizarro Sephiroth AI in scene 229 so that he uses the correct attack loop by deleting a bad assignment at 0x097. Right now I'm trying to edit the AI for the encounter in 232, but I can't actually find the bug. Apparently in this scene there should be a bug where Sephiroth is casting Stigma when he's supposed to use Heartless Angel. Obviously I could switch the attacks but that'd be a cop out -- so I'm trying to find the logical error. I expected it to be pretty simple but unless I'm misunderstanding something the code looks *completely* fine to me. Starting with the masks at 0x42E all of the conditions which are being checked seem to be the correct conditions.

Can anyone find the logic error here causing the wrong attack to be triggered?

Thanks in advance.

Sega Chief

  • *
  • Posts: 4086
  • These guys is sick
    • View Profile
Re: Help with Bizarro Sephiroth's AI
« Reply #1 on: 2014-11-17 04:13:25 »
I didn't know about Bizarro having AI errors (although I'm not surprised). I'll have a gander at 232 tomorrow.

Edit: I had a look at the AI but I couldn't see it either. I thought I'd pinned it down a couple of times, but realised that they shouldn't have any bearing on the script. The only thing I can think of is 0x180 as being the source because it bears similarities to the fix you made for 229, but it's a little different in this AI.
« Last Edit: 2014-11-18 03:21:12 by Sega Chief »

quantumpencil

  • *
  • Posts: 72
    • View Profile
Re: Help with Bizarro Sephiroth's AI
« Reply #2 on: 2014-11-18 05:26:19 »
Took another look today, I don't think it's 0x180 (At least I can't figure out why it would be), but I'm going to try messing with it and see if it works.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Help with Bizarro Sephiroth's AI
« Reply #3 on: 2014-11-18 19:56:01 »
It would be more helpful to know what you think the logic should be and compare it to what it is.

When BSeph gets to attack phase 4 (decided by GlobalVar(0x48)) and both the head and right arm are alive it'll cast Stigma. If the head is alive and the right arm is NOT then it'll cast Heartless Angel. Is that not what's happening? Are you sure you're testing the correct formation?

quantumpencil

  • *
  • Posts: 72
    • View Profile
Re: Help with Bizarro Sephiroth's AI
« Reply #4 on: 2014-11-18 20:39:10 »
Scene 232/234 are Bizarro three party left and right, and they both have the same bug. Whenever you're fighting them, if the core in scene 233 is dead, they'll cast stigma. If not, they'll spam heartless angel... whereas it should really be the other way around based on the behavior of the other fights.

Here is how far I've gotten. So if you look in Bizarro's pre-battle AI script in scene 233, there are set-ups for globals which track the death of parts of Bizarro between battles (beginning at 0x190). I'm not sure which variable is tracking what body part, but one of them is tracking the main core in scene 233. I don't see any bad references to any of these variables in either 232 or 234 though, which I should find around the control flow for turn 4 in 232 at 0x42B -- either that or somewhere in the code there should be an issue where local variable 0040's death attribute used in the control flow (which tracks left and right cores death) is not being properly set, and is in fact 0 whenever the main core has been killed.

if local variable 0000.death == 0 {
    if local variable 0040.death  ==  0 (i.e it is not dead) {
        cast stigma
    }
}

else {
    if local variable 0000.death ==0{
        cast heartless angel
    }
}

which seems right, but that's not what he does
« Last Edit: 2014-11-18 21:03:18 by quantumpencil »