Change Default Battle Theme (Story Flag)

General Information[edit]

Chrono Trigger[edit]

Thanks to PowerPanda

I developed some ASM that allows you to change out the random battle theme based on the chapter of the game. I have used it so that when Crono confronts Lavos for the first time, the random battle theme permanently changes to Battle 2. Note that this is not formatted so that you can just copy/paste it. I write out the ASM and then hand-translated it to Hex. I know it's inefficient, but it helps me avoid stupid mistakes.

At C0/0C58 (00x0C58), the following code is in the base rom:
A9 45      LDA #$45      ;Load song $45 - Battle 1
85 FA      STA 7E/01FA   ;Write song to the "current battle theme" RAM byte

You will want to replace those 4 bytes with the following:
22 ?? ?? ??   JSL !freespace   ;Jump to the new subroutine

!freespace      ;I have this at 45/FFEF in an expanded rom
AF 00 00 7F   LDA $7F/0000   ;Check current game chapter
C9 CA      CMP #$CA      ;Compare it to chapter $CA. IE - have you confronted Lavos in the Ocean Palace yet?)
B0 04      BCS +04      ;If it's greater than $CA, skip the next 4 bytes/2 lines
A9 45      LDA #$45      ;Load song $45 - Battle 1
80 02      BRA +02      ;Skip the next 2 bytes/1 line
A9 51      LDA #$51      ;Load song $51 - Battle 2
85 FA      STA 7E/01FA   ;Write song to the "current battle theme" RAM byte
6B         RTL         ;Return

You could, in theory, expand this to include more chapters, changing out the battle theme several times in the game. For example, maybe you want a different battle theme once your party reaches Zeal. You'd just need to add additional options.

One note is that this will only cover the random battle theme. Anywhere where the game loads the battle theme from an event, such as the conveyor belt at the Geno Dome or all of the encounters in the Northern Ruins, you'll need to use Temporal Flux to adjust which battle theme plays.

From: Tutorials (Chrono Trigger)