Author Topic: [FF7] Custom Boss Battle Scripting Questions  (Read 347 times)

Jef

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
[FF7] Custom Boss Battle Scripting Questions
« on: 2018-02-03 22:35:19 »
Hi, I've started making my own FF7 spinoff game (hopefully one day I can share it with you all), but I've run into a few issues when scripting one of the bosses. I'm pretty new to this, so perhaps I'm missing some obvious stuff. Basically what I want to do is create a boss fight that is along similar lines to the Beatrix battles in FF9. In that, when the "Battle end" condition is met, the boss does one last big attack to wipe out your party, then there's a few lines of dialogue from the boss, then the battle ends.

I've actually made a fair amount of progress here, but there's a couple of hurdles I can't seem to overcome. I'll include a snippet of the script below, but first I'll quickly summarise what I've done so far. So I have the boss call the final attack (to which I've assigned the attack ID 02DD), this is set to reduce each party member's HP to 1. I chose this over death because I couldn't work out how to override the game over sequence (if you even can). Anyway, then I have a few lines of dialogue, and then set the end battle flag (the one that's also used for the Weapon and Sephiroth battles). This is how it looks.

Code: [Select]
12 2070
02 00A0
90
60 20
61 02DD
92
93 “Placeholder text 1
60 24
60 00
92
93 Placeholder text 2”
60 24
60 00
92
12 2110
02 2110
60 08
36
90

The problem is that, using this configuration, the battle ends before the text displays. I tried moving the last part to another script in order to delay it, but none of the things I tried were successful. If I set it on the next turn of the Main script, then the players can attack when they're not supposed to. If I add it to Pre-Action Setup, then the battle ends before the text displays. And I couldn't get Custom Event 8 to work at all (I guess it's hard coded to specific enemies or something). Is there any way that I can delay the battle end until after the dialogue has ended?

Also, another issue is that the reducing everyone to 1HP tends to fill up the limit meter almost immediately. This is bad for two reasons: First, the "limit alert" text box gets in the way of the boss's dialogue text boxes. And second, active limit meters don't exactly mesh with the "party being wiped out" thing I'm going for. Is there a way to either prevent an attack from filling the limit meter, or to clear the limit meter, or anything that basically stops this from happening?

Finally, I'd like to say thanks to everyone here for all of the resources that have gotten me this far!

Sega Chief

  • No life
  • *
  • Posts: 2730
  • Karma: 161
  • These guys is sick
    • View Profile
Re: [FF7] Custom Boss Battle Scripting Questions
« Reply #1 on: 2018-02-08 10:05:22 »
There's two things you could try:

1) Look at the Turks pre-battle and death scripts for their 'turn death handling off' scripts and use those to get the desired effect. Some of the opcodes are listed as unknown in the editor but they do things like turn main AI script off, etc.

2) Set an invisible enemy on the field that deactivates itself when it detects the 'main' enemy has died; this check should be in Post-Action AI to beat the priority of player commands like Limits. This method will involve setting up enemy ID into vars so it can check their status (Turks in Gongaga could be a good code example for that as well as they're scripted to leave if the other has 'died').

NFITC1

  • No life
  • *
  • Posts: 2828
  • Karma: 70
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FF7] Custom Boss Battle Scripting Questions
« Reply #2 on: 2018-02-08 21:48:44 »
In regards to how to reduce the players' HP, you want to alter them directly, rather than do an action that damages HP. You can do this in the AI as well, but with some caveats.

1. You will need some animation place-holder action that you assign to your boss to do when performing this party-wiping attack. There are lots of enemies that have these actions where they do nothing but move or taunt,etc.
1a. You might have to learn how to alter animation files to get this to work. There's a list of codes on the wiki archive that briefly describes them.
2. The change in HP will not happen in sync with the boss's attack. Beatrix/Kuja use some unique "magic" to pull this off.
3. Take a look at Mystery Ninja's (Yuffie's) Death script. It queues one of the custom events that you can then use to reduce player's HP. I can't think of the exact code right now, but I do know that the final Sephiroth enemy (Dream Sephiroth?, Mental Sephiroth?) uses code to force Cloud to perform actions. You can use this to reduce the allies' current HP (Memory address 4160 I think) to 1 or some other single digit number without raising limit bars.

Welcome to qhimm's forums, btw. :)
« Last Edit: 2018-02-08 21:50:31 by NFITC1 »