FF7: Imprisoned problems

  • Thread starter Thread starter Karifean
  • Start date Start date
Status
Not open for further replies.
K

Karifean

Guest
So I'm making a mod with direct battle transitions, Hojo-style. One major problem that arises is the Imprisoned status. Some enemies in the gauntlet - in this case Reno - are capable of inflicting this status effect on party members. Problem is, if it is not remedied until the enemy is defeated, it will never go away. The character will remain inactive forever.

Obviously, I have the un-imprison routine (sets Flag:Enabled to 1 and Status:Imprisoned to 0) in Reno's Death Counter script and even in the following enemy's (Sample:H0512's) Pre-Battle script. Doesn't matter, the characters remain Imprisoned. I have no idea why the status refuses to be remedied. Making the Pyramids use their Vanish skill also doesn't work.

I even tried making Reno's (Report) ability target all party members and remove the Imprisoned status. It ended in a Game Over, don't ask me why.
 
Isn't Imprisoned in the Reno fight (and the Bottomswell one, maybe) linked to the additional enemy that they 'summon'? How about putting an extra enemy in those formations (there should be space for a third enemy), an invisible one that doesn't do anything except run a script to kill Pyramids/Waterpolos when Reno/Bottomswell are dead. That way the fight doesn't end when Reno/Bottomswell are killed and the invisible enemy can 'clean up' the imprisoned characters before killing itself. That would end the battle with everyone 'free' and hopefully without any issues in continuing the boss-rush.

Couple of issues might be with Reno's Report move locking up the fight but if that happens then you could maybe look at Gongaga Reno's AI (he doesn't end or lock the fight there) or try giving him a different animation for his Report move (maybe Idle, which is nearly always 00). Another might be some kind of AI in their death counters that end the fight (they'd need to be removed if possible). Might be other obstacles, but those are what I can think of off the top of my head.
 
Obviously, I have the un-imprison routine (sets Flag:Enabled to 1 and Status:Imprisoned to 0) in Reno's Death Counter script and even in the following enemy's (Sample:H0512's) Pre-Battle script. Doesn't matter, the characters remain Imprisoned. I have no idea why the status refuses to be remedied. Making the Pyramids use their Vanish skill also doesn't work.
Vanish is basically a placeholder action that forces them to use their disappearing animation. It doesn't do anything for the imprisoned character. From what I can tell, it will take an action to actually remove Imprisoned from an actor. There's some kind of handler specifically for the Imprisoned status. There is a "Pyramid Release" action that Reno has access to, but never does. If you set those to remove the inflicted Imprisoned status at the end of that battle it might cure them of it.

I even tried making Reno's (Report) ability target all party members and remove the Imprisoned status. It ended in a Game Over, don't ask me why.
That's awesome. :D

Don't forget the formation's AI:

Code: [Select]
Code:
Unknown(2180) <- 0While ( (Unknown(2180) < 3) ){ TargetMask <- FlagBit(Unknown(2180)) TargetMask <-  (TargetMask.Status:Imprisoned == 1)  If (TargetMask) {  TargetMask.Flag:Enabled? <- 0 } Unknown(2180) <- Unknown(2180) + 1} LOOPSCRIPT END
That's in the General Counter. If a character has the Imprisoned status before ANY action is taken they will be Disabled, but this won't enable them either. So the order should be this:


[list type=decimal]
[*]Enable
[*]Remove Imprisoned
[*]Perform ANY Action
[/list]

If you've set Reno to just die without performing his report then it will likely not work. The AI does appear to be flushed at the end of every chained battle so it shouldn't carry over to the next one.
 
Unfortunately, that was not it. I did indeed still have Reno use (Report) because the Turks' fleeing animation is one of the few unique death animations that don't cause infinite Wait Mode and will thus work fine. I even moved the Pyramids' use of Vanish just after the Remove Imprisoned line, so it should be EXACTLY as if you'd kill a Pyramid (except for the flags on the Pyramids themselves).

No dice, it does not work. Since the Pyramids do vanish in an IF query that checks for Imprisoned characters, the game obviously still recognizes them as Imprisoned characters, but removing it simply seems to not work.

A bit on the subject, how do you use AI scripting to force an enemy's death exactly as if they'd died regularly?

This is Reno's Death Counter, btw:

Code: [Select]
Code:
Death Counter:0x000 11 00000x003 60 000x005 900x006 12 20700x009 02 00200x00C 02 40600x00F 800x010 01 00000x013 400x014 900x015 12 20700x018 10 40230x01B 800x01C 60 000x01E 900x01F 12 20700x022 10 40240x025 800x026 60 000x028 900x029 01 00000x02C 870x02D 00 401F0x030 800x031 60 010x033 400x034 70 00680x037 11 00000x03A 870x03B 10 40230x03E 800x03F 60 010x041 900x042 11 00000x045 870x046 10 401F0x049 800x04A 60 000x04C 900x04D 12 00400x050 02 20600x053 900x054 12 20600x057 02 20700x05A 900x05B 60 200x05D 61 014E0x060 920x061 12 20600x064 02 00400x067 900x068 11 00000x06B 01 00000x06E 60 010x070 300x071 900x072 01 00000x075 60 030x077 420x078 70 00060x07B 12 20600x07E 10 40080x081 800x082 60 000x084 900x085 12 20600x088 10 400F0x08B 800x08C 60 000x08E 900x08F 93 Reno “Hmph. I'll be back.”0x0AA FF0x0AB 12 20600x0AE 10 402C0x0B1 800x0B2 60 010x0B4 900x0B5 12 20700x0B8 02 20A00x0BB 900x0BC 60 200x0BE 61 01640x0C1 920x0C2 73
And the "Disassembled" version:

Code: [Select]
Code:
0x000LocalVar:0000 <- 00x006TargetMask <-  (LocalVar:0020.FormationNumber == LocalVar:0000) 0x015TargetMask.Flag:Enabled? <- 00x01FTargetMask.Flag:MainScriptActive <- 00x029 If ( (FlagBit(LocalVar:0000).Status:Imprisoned == 1) )0x029 {0x037 FlagBit(LocalVar:0000).Flag:Enabled? <- 10x042 FlagBit(LocalVar:0000).Status:Imprisoned <- 00x04D LocalVar:0040 <- Self0x054 Self <- TargetMask0x05B Perform("Vanish"[014E], EnemyAttack)0x061 Self <- LocalVar:00400x068LocalVar:0000 <- LocalVar:0000 + 10x072 If ( (LocalVar:0000 >= 3) ) //Note: The else goes back to the second line, 0x006.0x072 {0x07B Self.Status:Haste <- 00x085 Self.Status:Regen <- 00x08F Display String: "Reno “Hmph. I'll be back.”"0x0AB Self.Flag:Unknown(00001000) <- 10x0B5 TargetMask <- Self0x0BC Perform("(Report)"[0164], EnemyAttack)0x0C2 SCRIPT END
LocalVar:0020 refers to all Pyramids.
 
Have you tried setting their HP to 0 in Reno's death script? That should cause the pyramids to activate their death counter scripts.
 
Alright, I got the fight working. When Reno dies he does his Report, the Pyramids are cleared up, the fight transitions properly, and all characters that were disabled by a pyramid become active again. I put an 'invisible' new move at the top of Reno's Death Counter to hit all pyramids on the field with a no damage attack that has an element that the Pyramids had death weakness to (but I think NF1TC's suggestion of simply making their HP = 0 would be a much neater way to do it). However, after that I found that I had to delete the three instances of 'LocalVar:00##.Flag:MainScriptActive <- 0' from Reno's Death Script.

When those lines were gone from Reno's death script, characters caught in a pyramid were able to resume action when the next fight started. I think they maybe disabled the character somehow instead of the Pyramid. Just speculation, I don't know what any of this stuff does just that this seems to work for some reason.

Edit: Also, I'd initially deleted the chunk of script that handles the Pyramids in Reno's Death Counter and added these lines in again later (they appeared in the middle of Reno's status ailment clean-up so they weren't at the top of the Death Script anymore). Just mentioning this in case it affects the way the AI functions but it shouldn't make a difference.

I recorded the fight too. If you replaced the 'clean-up' move with NF1TC's suggestion for HP = 0 scripts then it should be fairly seamless:
 
Last edited:
I recorded the fight too. If you replaced the 'clean-up' move with NF1TC's suggestion for HP = 0 scripts then it should be fairly seamless:

This video is private.
 
I changed it to unlisted; I always get those two options mixed up.
 
For some reason, I'm unable to reproduce it. I don't know why, it just won't work.

The Death Counter script now looks like this:

Code: [Select]
Code:
0x000Self.Status:Haste <- 00x00ASelf.Status:Regen <- 00x014LocalVar:0000 <- 00x01A If ( (FlagBit(LocalVar:0000).Status:Imprisoned == 1) )0x01A {0x028 Display String: "imprisoned enemy"0x03A TargetMask <-  (LocalVar:0020.FormationNumber == LocalVar:0000) 0x049 Perform("Delete Pyramids"[0197], EnemyAttack)0x04F TargetMask.Flag:Enabled? <- 00x059LocalVar:0000 <- LocalVar:0000 + 10x063 If ( (LocalVar:0000 >= 3) ) // Else goes to 0x01A0x063 {0x06C TargetMask <- Self0x073 Perform("(Report)"[0164], EnemyAttack)0x079 SCRIPT END
What's strange is that the test message "imprisoned enemy" is displayed correctly, but Reno shows no signs of using his ability at all. The If query also works as the message is not displayed if no character is trapped when Reno dies. The ability also seems to work since I had him use it on himself in the Pre-Battle script and he did show his hurt animation - which he doesn't do in the Death Counter. It's as if for some odd reason he just doesn't use the ability at all. And as a result of that the battle doesn't end. (It does if there's no imprisoned enemy). Actually, since the Pyramid becomes untargetable, he might even be using the ability, but he neither visibly does his hurt animation, nor does the battle end. Then again, that is probably just because of the Enabled=0 line. I don't get it.

The ability itself has Attack Damage Type 40h (also tried 42h, doesn't seem to matter) and is Shout-elemental but besides also being targetable is a clone of the (Report) move. I also tested giving Reno a Shout Death Weakness and he DID die when using it on himself so yeah, no problem there.

And simply setting HP to 0 didn't work either. In fact, the Pyramid stayed targetable and would refuse to die (Sephi's Yummy Mummy A comes to mind), so I quickly abandoned the idea.

And before someone assumes it's because of the LocalVar0020:FormationNumber == LocalVar0000 targeting, I have the same targeting system in my Use Pyramid routine and it works fine there (I use a different variable because 0000 is my turn counter):

Code: [Select]
Code:
0x01A  LocalVar:0040 <- Random MOD 30x022  LocalVar:0040 <- LocalVar:0040 + 1 MOD 30x02F  TargetMask <- FlagBit(LocalVar:0040)0x037   If ( ( (TargetMask.Status:Death == 0)  And  (TargetMask.Status:Imprisoned == 0) ) )0x037   {0x04F   LocalVar:0060 <-  (LocalVar:0020.FormationNumber == LocalVar:0040) 0x05E   LocalVar:0060.Flag:Enabled? <- 10x068   LocalVar:0060.Flag:MainScriptActive <- 10x072   LocalVar:0060.Status:Death <- 00x07C   LocalVar:0060.HP <- LocalVar:0060.MHP0x08B   Perform(349 + LocalVar:0040, EnemyAttack)
I'm kind of stumped.
 
I'll write down the AI code and post it here tomorrow when I get home. It's largely unaltered from the original death script, it was just that clean up move added to the start with those flags deleted. It might be the move's targeting that's done the trick. I set it to Enable Selection, Multiple, and All Rows (with 0X 100% Physical - No Damage set).

Edit: Here's the code for the Death Counter Script and other info. Note that 61 0170 is the clean-up move I added. The data for the clean-up move is:

Reno's Animation: 01 (hurt)

Attack%: 255
Impact Anim: FF
Target Anim: FF00
Anim ID: FF
Impact Sound: FFFF
Attack Str: 255
Attack Damage: 0X Physical, 100% hit chara - 0X No damage

Attack Target (following are ticked)
Enable Selection
Start as Multiple
All Rows

Attack Element: Gravity (or whatever the Pyramids have a death weakness to).

And the code itself for the death counter is:

Code: [Select]
Code:
12 2070 02 20E09060 2061 01709212 206010 40028060 009012 206010 40038060 009012 206010 40078060 009012 206010 40088060 009012 206010 40098060 009012 206010 400F8060 009012 002010 40248060 009012 004010 40248060 009012 006010 40248060 009012 206010 40158060 009012 206010 40178060 009012 206010 40168060 009093 Reno "It's time."12 206010 402C8060 019012 207002 20609060 2061 01649273
I tested it again today with more than one character in a Pyramid and it worked okay. Remember that any other changes you've made to the Pyramid Death Counter AI or Reno's Pyramid move might affect how this works.
 
Last edited:
Just noticed what may have been the problem. In your code, you set the address 4024 of all the Pyramids to 0. That adress is the "MainScriptActive" flag. I on the other hand have been setting address 4023, the "Enabled" flag, to 0.

I'll try it and see if it's the crucial point.

Edit: Indeed it was. This is the final Death Counter script I used:

Code: [Select]
Code:
0x000Self.Status:Haste <- 00x00ASelf.Status:Regen <- 00x014TargetMask <-  (LocalVar:0020.FormationNumber == 0) 0x022TargetMask.Flag:MainScriptActive <- 00x02CTargetMask <-  (LocalVar:0020.FormationNumber == 1) 0x03ATargetMask.Flag:MainScriptActive <- 00x044TargetMask <-  (LocalVar:0020.FormationNumber == 2) 0x052TargetMask.Flag:MainScriptActive <- 00x05CTargetMask <- LocalVar:00200x063Perform("Delete Pyramids"[0197], EnemyAttack)0x069SCRIPT END
Delete Pyramids is now simply (Report), but with the target selection Sega posted and the Shout element. That way, the only way the player can put the Death weakness to use is with Blade Beam. Could've also done it with a Death weakness to a status effect, but it's fine.
 
Last edited:
Status
Not open for further replies.
Back
Top