Piranha battle
08-18-2015, 06:27 AM
Hi!
If you read (vanilla) Piranha AI script, then you should have noticed those lines in particular:
FB 0D 00 ???
Ok... what is it?!? it's undocumented, but it surely has a strict relation with making respawn other fishes, the fight also starts with a battle event(the ones called from the formation, when you start the battle)
But... is it really necessary? shouldn't be possible to obtain the same result, just with appear/disappear AI commands? that would also allow me to erase that battle event and customize it as i wish.
I wonder what Gi Nattak did in ROTDS, with his Staryu/Starmie battle...
If you read (vanilla) Piranha AI script, then you should have noticed those lines in particular:
FB 0D 00 ???
Ok... what is it?!? it's undocumented, but it surely has a strict relation with making respawn other fishes, the fight also starts with a battle event(the ones called from the formation, when you start the battle)
But... is it really necessary? shouldn't be possible to obtain the same result, just with appear/disappear AI commands? that would also allow me to erase that battle event and customize it as i wish.
I wonder what Gi Nattak did in ROTDS, with his Staryu/Starmie battle...
THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
I've also wondered what that ??? command is also when modifying the the script, I thought it might be some kind of special monster targeting or timer related, but those are all there as well. Erasing them seemed to do nothing, and according to data crystal FB 0D 00 doesn't exist...:
http://datacrystal.romhacking.net/wiki/F...cellaneous
I'd guess it is unused and or not even coded to work, but they left it in the monster script.
http://datacrystal.romhacking.net/wiki/F...cellaneous
I'd guess it is unused and or not even coded to work, but they left it in the monster script.
We are born, live, die and then do the same thing over again.
08-18-2015, 02:13 PM
Good, so it confirms to be just the usual "accuracy" of FF6 developers, huh?
THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
08-18-2015, 02:32 PM
Yeah, I know there's a bunch of unused code that was never implemented into the final game, as well as dialog and event branches, so it's not surprising that there's also something in the battle scripts that was never finished, yet left in. I blame time restraints more than the actual quality of the programmers & developers lol.
We are born, live, die and then do the same thing over again.
08-18-2015, 04:39 PM
i heard everything, except event branches... which ones, for example?
THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
08-18-2015, 05:20 PM
Not exactly branches to any unused amazing events of anything like that, but for instance there's one where if you lose the battle at Narshe it shows Kefka and the soldiers all walking up to the frozen esper. That event is good to go, NPCs included and everything, but it is never used.
Besides that one though, there's just a lot of possible branches to dummied out dialog that can be found in the event code like:
This line is never used, seems to be like he was possibly thought at first to be going to Thamasa, or something:
CB/CBC7: 4B Display dialogue message $0286, wait for button press
TERRA: …
Where's GAU…?
LOCKE: He hates ships.
Here Shadow has dialog for the WoB airship but that can normally not happen:
CB/430C: 4B Display dialogue message $067D, wait for button press
SHADOW: ……
Why am I here…?
For the money, I guess.
CB/430F: B2 Call subroutine $CAF59D
CB/4313: FE Return
Besides that one though, there's just a lot of possible branches to dummied out dialog that can be found in the event code like:
This line is never used, seems to be like he was possibly thought at first to be going to Thamasa, or something:
CB/CBC7: 4B Display dialogue message $0286, wait for button press
TERRA: …
Where's GAU…?
LOCKE: He hates ships.
Here Shadow has dialog for the WoB airship but that can normally not happen:
CB/430C: 4B Display dialogue message $067D, wait for button press
SHADOW: ……
Why am I here…?
For the money, I guess.
CB/430F: B2 Call subroutine $CAF59D
CB/4313: FE Return
We are born, live, die and then do the same thing over again.
08-18-2015, 07:15 PM
It's a waste that the one of Kefka is dummied! ;[
THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
08-23-2015, 08:12 AM
Almost forgot... last but not least, how 'bout formation's special event of Piranha battle? all what happens in the battle is handled from their AI, there aren't particular characters settings in that battle, so... what does that formatione event, is it pointless?
THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
08-23-2015, 12:49 PM
Seems pointless yeah. Looking at the special event data for it, it is basically dummied out.
We are born, live, die and then do the same thing over again.
08-23-2015, 01:26 PM
I don't really know much about the special event data. It looks like it's at $D0FD00 and they're 18 bytes each. Does anyone know how this works?
For the FB 0D 00 command, I looked up the code that gets called. All it does is set "hide" status for that monster.
There's one other unique thing about the piranha battle. There's a bit in their monster data that sets bit 7 at $3E4C ($3E54 for monsters). In FF3ME, it's called "Removable Float", but I think that's incorrect. I call it "piranha" status.
Here's what that bit really does: At the end of each turn in battle, the game checks which monsters just died. Any monsters with "hide" status become dead. Monsters with pending counterattacks don't become dead, *unless* they have "piranha" status. That way, the piranha will always die before the new piranhas spawn. There's definitely some redundancy there, but I did a test to see what would happen if I disabled this code *and* got rid of the FB 0D 00 commands in the AI script. Here's a video of what happened https://youtu.be/nVBEQ0grayc. And here's the code:
For the FB 0D 00 command, I looked up the code that gets called. All it does is set "hide" status for that monster.
Code:
C2/1F00: B9 F9 3E LDA $3EF9,Y
C2/1F03: 09 20 ORA #$20
C2/1F05: 99 F9 3E STA $3EF9,Y ; set hide status
C2/1F08: 60 RTS
There's one other unique thing about the piranha battle. There's a bit in their monster data that sets bit 7 at $3E4C ($3E54 for monsters). In FF3ME, it's called "Removable Float", but I think that's incorrect. I call it "piranha" status.
Here's what that bit really does: At the end of each turn in battle, the game checks which monsters just died. Any monsters with "hide" status become dead. Monsters with pending counterattacks don't become dead, *unless* they have "piranha" status. That way, the piranha will always die before the new piranhas spawn. There's definitely some redundancy there, but I did a test to see what would happen if I disabled this code *and* got rid of the FB 0D 00 commands in the AI script. Here's a video of what happened https://youtu.be/nVBEQ0grayc. And here's the code:
Code:
C2/1429: A2 0A LDX #$0A
C2/142B: BD 21 30 LDA $3021,X ; monster mask
C2/142E: 2C 3A 3A BIT $3A3A
C2/1431: F0 17 BEQ $144A ; skip if monster is still alive
C2/1433: EB XBA
C2/1434: BD 01 3F LDA $3F01,X ; status 4
C2/1437: 89 20 BIT #$20
C2/1439: D0 0B BNE $1446 ; mark monster as dead if it has hide status
C2/143B: BD 54 3E LDA $3E54,X
C2/143E: 30 06 BMI $1446 ; skip if piranha status
C2/1440: BD D5 32 LDA $32D5,X ; pointer to next pending counterattack
C2/1443: 1A INC
C2/1444: D0 04 BNE $144A ; branch if there is a counterattack pending
C2/1446: EB XBA
C2/1447: 1C 2F 2F TRB $2F2F ; mark monster as dead
C2/144A: CA DEX
C2/144B: CA DEX
C2/144C: 10 DD BPL $142B
C2/144E: 60 RTS
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)