Users browsing this thread: 1 Guest(s)
Piranha battle

#1
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Hi! Hello

If you read (vanilla) Piranha AI script, then you should have noticed those lines in particular:

FB 0D 00 ???

Ok... what is it?!? Surprised 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!
  Find
Quote  

#2
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
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.


We are born, live, die and then do the same thing over again.
Quote  

#3
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Good, so it confirms to be just the usual "accuracy" of FF6 developers, huh? Laugh


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!
  Find
Quote  

#4
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
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.
Quote  

#5
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
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!
  Find
Quote  

#6
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
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


We are born, live, die and then do the same thing over again.
Quote  

#7
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
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!
  Find
Quote  

#8
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
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!
  Find
Quote  

#9
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
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.
Quote  

#10
Posts: 178
Threads: 2
Thanks Received: 23
Thanks Given: 4
Joined: Apr 2015
Reputation: 18
Status
None
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.

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
  Find
Quote  
[-] The following 1 user says Thank You to Everything for this post:
  • Tenkarider (08-23-2015)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite