A slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=2024.0 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index4fa1.html slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2024.0 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index4fa1.html.z x I(g^ 1^ L OK text/html ISO-8859-1 gzip 8: L Tue, 10 Mar 2020 05:56:48 GMT 0 0 P I(g^ a L
Library of the Ancients => Final Fantasy IV Research & Development => Topic started by: Pinkpuff on March 29, 2015, 08:24:19 AM
Title: Battles - Exp gained & Victory theme played?
Post by: Pinkpuff on March 29, 2015, 08:24:19 AM
There are some battles with the "no change" music option that award exp/money and play the victory theme (e.g. Cagnazzo battle, MomBomb battle) and others that don't, even if the monsters themselves have rewards... The mystery flags in the formaitons don't seem to have any bearing on this as far as I can tell; does anyone know how this is determined?
Title: Re: Battles - Exp gained & Victory theme played?
Post by: Grimoire LD on March 29, 2015, 01:31:08 PM
There are some battles with the "no change" music option that award exp/money and play the victory theme (e.g. Cagnazzo battle, MomBomb battle) and others that don't, even if the monsters themselves have rewards... The mystery flags in the formaitons don't seem to have any bearing on this as far as I can tell; does anyone know how this is determined?
Ah, you're referring to the Fabul Battles and Golbez vs. Tellah, I believe with the music that stays constant and the Boss Battles that do play the Victory Theme, sure I'll take a look.
Let's see here... after a little digging I found the song/sound effect that is currently called is loaded at 7E1E01 and indeed at the end of conventional battles a 08 is loaded into this section to play the Victory Theme, now it looks to be a bit of a Table that is used for this sort of dealing, here are the instructions called for this..
$03/8219AD E5 38LDA $38E5 [$7E:38E5]A:0008X:0111Y:000DP:eNvMxdIzc - Load Second Set of Encounter Flags. $03/821C29 0CAND #$0CA:0000X:0111Y:000DP:envMxdIZc - Keep only 4 and 8. $03/821E4A LSR AA:0000X:0111Y:000DP:envMxdIZc - /2 $03/821F4A LSR AA:0000X:0111Y:000DP:envMxdIZc - /2 $03/8220C9 03CMP #$03A:0000X:0111Y:000DP:envMxdIZc - Is it equal to 03? $03/8222F0 09BEQ $09 [$822D]A:0000X:0111Y:000DP:eNvMxdIzc - If so, branch. (This is continue playing the default music) $03/8224AA TAXA:0000X:0111Y:000DP:eNvMxdIzc - Transfer A to X. $03/8225BF 0C FF 13LDA $13FF0C,x[$13:FF0C]A:0000X:0000Y:000DP:envMxdIZc - Load A from the Battle Music Table. $03/822922 12 FF 13JSL $13FF12[$13:FF12]A:0017X:0000Y:000DP:envMxdIzc - Jump to Placing Song Data. (This table is...) 27 - Normal Battle Music 1A - Elemental Fiends Battle Music 0B - Boss Music
Now let's see how this End of Battle is interpreted then.
Alright, once the battle is won this data is loaded to play the normal Victory Fanfare...
$03/872FAD E5 38LDA $38E5 [$7E:38E5]A:0000X:FE67Y:000EP:envMxdiZC - Load Second Set of Encounter Flags $03/873229 0CAND #$0CA:0000X:FE67Y:000EP:envMxdiZC - Get rid of all bits that are not 0C. $03/8734C9 0CCMP #$0CA:0000X:FE67Y:000EP:envMxdiZC - Is it 0C? $03/8736F0 08BEQ $08 [$8740]A:0000X:FE67Y:000EP:eNvMxdizc - If so, branch. (If the Second Set of Encounter Flags contains a 0C the game will not play the Victory Fanfare, however having a 03 (which only implies a 0C /4 for the second encounter flags in terms of bits since it is divided twice) will still be "no change"). ------------------------------------------------------------------------------------------------------ $03/8738A9 08LDA #$08A:0000X:FE67Y:000EP:eNvMxdizc - Load Victory Fanfare into A. $03/873A8D BE 38STA $38BE [$7E:38BE]A:0008X:FE67Y:000EP:envMxdizc - Store A in 7E38BE. ---------------------------------------------------------------------------------------------------------- $03/873DEE BD 38INC $38BD [$7E:38BD]A:0008X:FE67Y:000EP:envMxdizc - +1 to 38BD. $03/874020 0F 88JSR $880F [$03:880F]A:0008X:FE67Y:000EP:envMxdizc - Jump to Subroutine (??)
While it's in the code above I may as well say it plainly here as well... if the Second Set of Encounter Flags which controls the music playing contains a 0C it will play "no change" music, whereas if a 0C is used it will not only continue "no change" music, but it will also suppress the Victory Fanfare.
As I've never looked at that data in ROM, PinkPuff it doesn't make much sense to me, but since you put together a program that reads these matters correctly I imagine you would know how this second set of encounter flags are parsed in the Formation data.
:edit: I forgot the basics of hex math, so my above conclusion is incorrect. I'm still looking for the answer.
No, no. Nevermind. It was a misunderstanding on my part. My above conclusion is right, there does appear to be something special about the MomBomb battle though, since that should fall under the same auspices of of 0C and skipping the victory theme, I'll take a look though.
Let's see... some sort of check at 13FD00 is looked at in the end of battle seeing what formation was just played... looks to be the Auto-Battles, but I don't know what is being referred to here.
Hmm, can you get Exp/Gil in Auto Battles? I'm wondering if they are looking to suppress those?
:edit: Ah? Here's another table of sorts which looks a bit more varied, let's see here... 13FE69...
Battle DD - 221 (CPU)
Battle E1 - 226 (Mom Bomb)
Battle E7 - 232 (Dark Elf/Dragon)
You know what these all have in common? They are all "No change" music Boss Battles which end with the Victory Theme. And I am right on the ticket!
This is the answer, another bizarre choice of Formation tables. These are located at 13FE69 in LoROM and ROM at 9FE69.
Here is the data with that...
DD 00 - CPU E1 00 - Mom Bomb E7 00 - Dark Elf/Dragon A7 01 - Calbrena A8 01 - Golbez AF 01 - Evil Wall
And there you go! You may have Only Six specific formations have a "no change" music and have the Victory Theme. A very strange way of going about it, make no mistake. B6 01
Title: Re: Battles - Exp gained & Victory theme played?
Post by: LordGarmonde on April 14, 2015, 09:13:06 PM
There are some battles with the "no change" music option that award exp/money and play the victory theme (e.g. Cagnazzo battle, MomBomb battle) and others that don't, even if the monsters themselves have rewards... The mystery flags in the formaitons don't seem to have any bearing on this as far as I can tell; does anyone know how this is determined?
I'd be curious to see how that works too. I had another thought as to rewards. I don't know how practical this may be but I had been considering at times to test the feasibility of certain formations automatically leveling up a character. With the game as well paced as it is it would be unnecessary but it is something I was considering for optional side bosses. What brought that to mind was that I was considering using a different theme along with said battle; maybe the "Added to Party" theme. Anyway, just a thought.
Title: Re: Battles - Exp gained & Victory theme played?
Post by: Bahamut ZERO on April 15, 2015, 01:37:12 PM
Oh boy! I was worried it was the other way around, meaning I thought there were a set number of "no change" battles that ended with no victory theme. Reading this kind of just made my day. Thanks!
Title: Re: Battles - Exp gained & Victory theme played?
Post by: Grimoire LD on April 15, 2015, 10:31:12 PM
There are some battles with the "no change" music option that award exp/money and play the victory theme (e.g. Cagnazzo battle, MomBomb battle) and others that don't, even if the monsters themselves have rewards... The mystery flags in the formaitons don't seem to have any bearing on this as far as I can tell; does anyone know how this is determined?
I'd be curious to see how that works too. I had another thought as to rewards. I don't know how practical this may be but I had been considering at times to test the feasibility of certain formations automatically leveling up a character. With the game as well paced as it is it would be unnecessary but it is something I was considering for optional side bosses. What brought that to mind was that I was considering using a different theme along with said battle; maybe the "Added to Party" theme. Anyway, just a thought.
Battle music can be changed with an AI Command, unless you were referring to changing the Fanfare theme. Which... would be tricky and require custom code.
Title: Re: Battles - Exp gained & Victory theme played?
Post by: LordGarmonde on April 16, 2015, 11:29:01 AM
Battle music can be changed with an AI Command, unless you were referring to changing the Fanfare theme. Which... would be tricky and require custom code.
Changing the Fanfare was what I was thinking. Maybe I could get around it by not playing the Fanfare in the battle at all - like in Fabul etc. - and then just play whatever I'd want after the battle just to keep it simple.
Title: Re: Battles - Exp gained & Victory theme played?
Post by: Pinkpuff on April 18, 2015, 04:44:45 AM
Thanks! That solves the "playing the fanfare" part, but what about the Exp/Gil part? Chaging something from an autobattle to a normal battle does not seem to cause it to start doling out rewards...
:edit: Never mind, I figured it out. That table at 9FD00 has a list of 12 formations that suppress the giving out of rewards. Some are autobattles and some aren't. Anyway it's all good; next version of the editor will have rewards toggle and victory theme toggle in the formation editor.