Author Topic: How to make enemies die like bosses ?  (Read 7797 times)

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
How to make enemies die like bosses ?
« on: 2010-07-16 18:07:14 »
Yeah... ...Because the bosses of my mod sometimes die like normal enemies (since some of them originally were normal enemies) and it's quite anticlimactic.

I tried to look for the answer by myself, even with my poor notions of AI-related things. I noticed that the Hundred Gunner enemy has a Death-counter script, so I tried to paste it into the new boss'. No results. The funny thing is : Jenova BIRTH, for example, doesn't have a Death-Counter script. Heck, it doesn't have any counter scripts, only a Pre-Battle and a Main one.

With this in mind, I thought "hey, maybe I'll find something in the Formation tab instead", so I went there. But no, I found no difference with a random battle : the flags are often identical, and the Formation AI is empty.

Besides, in Terence Fergusson's Enemy Mechanics FAQ, in a boss's script, it never says something like :

Code: [Select]
AI: Counter - Death
   Die like a boss
{
   Remove Self
}

Only :

Code: [Select]
AI: Counter - Death
{
   Remove Self
}

Maybe I'm still thinking too much with FFVI's AI code in mind, I don't know. Anyway, I'm lost. Really lost. I hope this is doable. Did Gjoerulv manage to make his new bosses die like bosses ? I played it (and loved it), but I don't remember how they disappear.
« Last Edit: 2010-07-16 18:59:48 by Armorvil »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: How to make enemies die like bosses ?
« Reply #1 on: 2010-07-16 20:33:51 »
How exactly do you mean, 'die like a boss'?

Quite a few bosses have counter-death scripts, but that's usually to do with when the entity somehow transforms (two monsters, one of which becomes invisible on death) and *all* entities have to be destroyed, or when the monster dies in a non-standard way (presumably to safeguard against bugs where an invisible, untargetable enemy remains in battle). If you mean the way certain monsters take ages to 'fade out' (see the way Ruby dies), then I really couldn't help you. I'd guess it was somehow tied to the model's animations, rather than data in the scene.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: How to make enemies die like bosses ?
« Reply #2 on: 2010-07-16 20:42:08 »
Death isn't an animation in this game. It's just a fade-out of the idle state for enemies with a few exceptions.

AFAIK the "die as a boss" flag hasn't been found. It might actually be somewhere in those darn **AB files that no one has dissected yet. They do look like pointers of some sort though. Maybe they contain flags too.

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Re: How to make enemies die like bosses ?
« Reply #3 on: 2010-07-16 20:47:13 »
Yeah, you got it Bosola. I was talking about the fact that they turn red a long time, with white flashes and a special sound.

And if both of you are right (something I have no doubts about ;) ) and it's tied to the enemy's 3D model, then that sucks. Oh well. It's not that important anyway. It would have made things prettier, but I can live without it for now (don't really have a choice). Thank you for your insight, both of you.

Akari

  • *
  • Posts: 766
    • View Profile
Re: How to make enemies die like bosses ?
« Reply #4 on: 2010-07-25 16:59:26 »
Death isn't an animation in this game. It's just a fade-out of the idle state for enemies with a few exceptions.

AFAIK the "die as a boss" flag hasn't been found. It might actually be somewhere in those darn **AB files that no one has dissected yet. They do look like pointers of some sort though. Maybe they contain flags too.

I found this flags long ago. It's in the same file as animation scripts. This is in model settings. There are 7 die effects with indexes from 0x00 to 0x12 (some indexes doesn't work)

0x00 - simple disapear in red alpha (flesh)
0x01, 0x0a - break down to polygons and disapear in red alpha (mechanical)
0x02 - pressed to floor and disapear in red alpha
0x03 - screwed and disapear in red alpha
0x07 - like a list of paper and disapear to alpha
0x08 - fly up and disapear to alpha
0x11, 0x12 - slow disapear with flashes like bosses

Code: [Select]
animation scripts
// 208
+00 [][]     0000                             - if this is not 0 we add 0x40 bit to 8015190b
+02 []       80                               - 0x3f - death type. 0x80 - play secondary animation
+03 []       00
+04 [][]     5E01                             - collision radius. Set to 801518e4+6

Death type is what you looking for.

http://q-gears.svn.sourceforge.net/viewvc/q-gears/trunk/utilites/ffvii_battle_model_exporter/

This exporter has dumper for this info.

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Re: How to make enemies die like bosses ?
« Reply #5 on: 2010-07-25 22:22:13 »
Thank you very much for this new info, Akari. I wish I knew what to do with all this, though. Since this data can't be edited in any utility yet (right ?), I have to use a hex editor (...right ?). And I have to hex-edit a file in Battle.lgp related to the enemy I want to die like a boss (...right !?). Given what you wrote, I'd have to replace 0x00 by 0x11 or 0x12 ; but at which address ?...  ...Sorry, I'm sure I sound like a complete noob here  :P

Akari

  • *
  • Posts: 766
    • View Profile
Re: How to make enemies die like bosses ?
« Reply #6 on: 2010-07-26 12:31:25 »
Thank you very much for this new info, Akari. I wish I knew what to do with all this, though. Since this data can't be edited in any utility yet (right ?), I have to use a hex editor (...right ?). And I have to hex-edit a file in Battle.lgp related to the enemy I want to die like a boss (...right !?). Given what you wrote, I'd have to replace 0x00 by 0x11 or 0x12 ; but at which address ?...  ...Sorry, I'm sure I sound like a complete noob here  :P

Ask NFITC1 to write editor for those values =)

I'm not work with PC version, only PS One, so I don't know where this values in PC data.

ps: You wiil need to replace 0x00 to 0x11 and 0x80 to 0x91 and so on.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: How to make enemies die like bosses ?
« Reply #7 on: 2010-07-26 13:49:17 »
Ask NFITC1 to write editor for those values =)

I'm not work with PC version, only PS One, so I don't know where this values in PC data.

ps: You wiil need to replace 0x00 to 0x11 and 0x80 to 0x91 and so on.

O_o How do I keep getting drafted to do these things? :(

Based on that source you linked to, it looks like those **AB files are animation scripts (that is a significant discovery!). So I was right. ;)

Looks like you want to modify byte 0x02 of the **AB file to achieve a specific dying effect that Akari listed.

ff7rules

  • *
  • Posts: 423
    • View Profile
Re: How to make enemies die like bosses ?
« Reply #8 on: 2010-07-26 15:36:35 »
Something quite funny I have actually achieved this without meaning too. 
http://www.youtube.com/watch?v=wASMd1DsHpM&feature=related

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: How to make enemies die like bosses ?
« Reply #9 on: 2010-07-26 20:01:25 »
Fine. I'll do it instead.

At the weekend, though.

Armorvil

  • *
  • Posts: 621
  • Working on : FFVII Total Grudge
    • View Profile
Re: How to make enemies die like bosses ?
« Reply #10 on: 2010-07-27 18:31:45 »
Awesome guys, thanks !
And Bosola, I would really be grateful and indebted to you, if you could create such a tool  ;D