Users browsing this thread: 1 Guest(s)
Random battle theme

#51
Posts: 289
Threads: 19
Thanks Received: 15
Thanks Given: 54
Joined: Dec 2017
Reputation: 2
Status
None
(07-11-2021, 04:21 PM)madsiur Wrote:
(07-11-2021, 04:11 PM)Lightning Wrote: So you are saying that each map (which I'm guessing there are maps for each themed area) have a way to change the battle theme for that one area only?   I have two questions about this method though.  Will it affect the battle background code already in place by the ASM hack, and also, can I figure out where these events are by only hex editing? After all, my 1.1 rom is corrupted and event editors will not allow me to save (consequences of basing my hack on General Leo edition).

Sorry I misread your first post. Yeah for a battle music different from one in the ASM hack, you'll need to add the same exception but by editing the ASK code I made. You'll need to check after the LDA table,x with a BEQ if it's the Magitek song ID, if so check if you are in the WoR with the WoR event bit if so set your WoR Magitek Facility song ID.

Ok, so this would open a HUGE can of worms for me in my music choices, but is there any way there can be two tables: one for the WOR, and one for the WOB with the same backgrounds? I would need someone to help me do this since I literally know nothing about ASM, but would this actually be difficult at all?
  Find
Quote  

#52
Posts: 3,894
Threads: 275
Thanks Received: 820
Thanks Given: 456
Joined: Oct 2011
Reputation: 64
Status
Tissue-aware
(07-11-2021, 04:41 PM)Lightning Wrote: Ok, so this would open a HUGE can of worms for me in my music choices, but is there any way there can be two tables: one for the WOR, and one for the WOB with the same backgrounds?

I think this code will work for that:

Code:
hirom
header

org $C2BDB7
JSR free_space
NOP

org $C264C9          ; change to free space
free_space:
TDC
LDA $C2BF3B,X        ; load formation song
CMP #$24             ; check if battle song
BNE exit             ; branch if not
LDA $11E2            ; load battle background byte
AND #$3F             ; isolate battle background
REP #$20
TAX                  ; set BG as index
SEP #$20
LDA $7E1E94          ; Load event byte containing the WOR event bit (1E94:4))
AND #$10            
BNE wor              ; branch if WoR
LDA table_wob,X      ; load WoB BG song ID
BRA exit
wor:
LDA table_wor,X      ; load WoR BG song ID
exit:
RTS

; your $37 song IDs
; this table can be anywhere in the ROM:
org $F15550 ;(change this to move table elsewhere)
table_wob:
db $56    ; W O B Grass
db $57    ; WOR Forest
db $66    ; W O B Desert
db $5B    ; W O B Forest
db $6A    ; Building
db $6E    ; WOR Grass
db $24    ; The Veldt
db $24    ; Falling through clouds
db $24    ; Narshe Exterior
db $24    ; Narshe Cave with Mine Tracks
db $6D    ; Common Brown Cave
db $61    ; Mountain Outside
db $61    ; Mountain Cave
db $5C    ; Raft on River
db $24    ; Imperial Base
db $74    ; On top of train car
db $74    ; inside train car
db $6D    ; Blue Narshe Secret Entrance Cave and Umaro Cave
db $71    ; Icy Field
db $24    ; Bright Town
db $58    ; Vector Inside / Kefkas Tower Interior
db $62    ; Floating Continent
db $59    ; Kefka's Tower Exterior
db $24    ; Opera Stage
db $24    ; Opera House Rafters
db $5F    ; Flaming House
db $77    ; Ancient Castle interior and Figaro Castle basement
db $64    ; Magitek Research (Testing Tubes)
db $6B    ; Colosseum
db $72    ; Magitek Facility
db $24    ; Village
db $5F    ; Waterfall
db $24    ; Owzer's House
db $24    ; Running on Train Tracks
db $24    ; Bridge near Sealed Gate
db $24    ; Underwater
db $6A    ; Zozo
db $24    ; Airship, WOB, Centered
db $76    ; Tomb
db $77    ; Ancient Castle Exterior Ruins and Doma Castle
db $59    ; Kefka's Tower
db $24    ; Airship WOR Right
db $6C    ; Red Lava Cave
db $24    ; Light Building
db $24    ; Magitek Cart Ride
db $24    ; Fanatic's Tower
db $64    ; Cyan's Dream World
db $55    ; WOR Desert
db $24    ; Airship, Wob, Right
db $24    ; Unused
db $24    ; Unused
db $24    ; Statue 1 (Doom)
db $24    ; Statue 2 (Poltergeist)
db $24    ; Statue 3 (Goddess Minerva)
db $24    ; Kefka's Background
db $24    ; Tentacles

; WoR table
table_wor:
db $56    ; W O B Grass
db $57    ; WOR Forest
db $66    ; W O B Desert
db $5B    ; W O B Forest
db $6A    ; Building
db $6E    ; WOR Grass
db $24    ; The Veldt
db $24    ; Falling through clouds
db $24    ; Narshe Exterior
db $24    ; Narshe Cave with Mine Tracks
db $6D    ; Common Brown Cave
db $61    ; Mountain Outside
db $61    ; Mountain Cave
db $5C    ; Raft on River
db $24    ; Imperial Base
db $74    ; On top of train car
db $74    ; inside train car
db $6D    ; Blue Narshe Secret Entrance Cave and Umaro Cave
db $71    ; Icy Field
db $24    ; Bright Town
db $58    ; Vector Inside / Kefkas Tower Interior
db $62    ; Floating Continent
db $59    ; Kefka's Tower Exterior
db $24    ; Opera Stage
db $24    ; Opera House Rafters
db $5F    ; Flaming House
db $77    ; Ancient Castle interior and Figaro Castle basement
db $64    ; Magitek Research (Testing Tubes)
db $6B    ; Colosseum
db $72    ; Magitek Facility
db $24    ; Village
db $5F    ; Waterfall
db $24    ; Owzer's House
db $24    ; Running on Train Tracks
db $24    ; Bridge near Sealed Gate
db $24    ; Underwater
db $6A    ; Zozo
db $24    ; Airship, WOB, Centered
db $76    ; Tomb
db $77    ; Ancient Castle Exterior Ruins and Doma Castle
db $59    ; Kefka's Tower
db $24    ; Airship WOR Right
db $6C    ; Red Lava Cave
db $24    ; Light Building
db $24    ; Magitek Cart Ride
db $24    ; Fanatic's Tower
db $64    ; Cyan's Dream World
db $55    ; WOR Desert
db $24    ; Airship, Wob, Right
db $24    ; Unused
db $24    ; Unused
db $24    ; Statue 1 (Doom)
db $24    ; Statue 2 (Poltergeist)
db $24    ; Statue 3 (Goddess Minerva)
db $24    ; Kefka's Background
db $24    ; Tentacles
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Lightning (07-11-2021)

#53
Posts: 289
Threads: 19
Thanks Received: 15
Thanks Given: 54
Joined: Dec 2017
Reputation: 2
Status
None
Wow, you got on that fast; thanks Madsiur!
  Find
Quote  

#54
Posts: 3,894
Threads: 275
Thanks Received: 820
Thanks Given: 456
Joined: Oct 2011
Reputation: 64
Status
Tissue-aware
That "BNQ wor" should be a "BNE wor".

Edit: I don't WTF happened with my previous post, did I edited your post and wrote my answer there lol?
  Find
Quote  

#55
Posts: 289
Threads: 19
Thanks Received: 15
Thanks Given: 54
Joined: Dec 2017
Reputation: 2
Status
None
(07-11-2021, 08:34 PM)madsiur Wrote: That "BNQ wor" should be a "BNE wor".

Edit: I don't WTF happened with my previous post, did I edited your post and wrote my answer there lol?

Ah, I think you did.  I wondered what happened to my post, so I just edited it again myself.  Lol
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite