Room Message Expander [CLF78]
#1
This code will let you add more room messages than the game normally allows (and also replace existing ones). Please check the Notes below before using this code.

NTSC-U
0262C906 0000XXXX
0262B956 0000XXXX
0262B95A 0000XXXX
0262B2F6 0000XXXX
C262B2FC 00000004
5400083C 3C60YYYY
6063YYYY 7C63022E
382101A0 4E800020
60000000 00000000
C262D06C 00000003
7C741B78 2C030000
40A20008 3A80FFFF
60000000 00000000

PAL
025DC3EA 0000XXXX
025DB3E2 0000XXXX
025DB3E6 0000XXXX
025DAD82 0000XXXX
C25DAD88 00000004
5400083C 3C60YYYY
6063YYYY 7C63022E
382101A0 4E800020
60000000 00000000
C25DCB50 00000003
7C741B78 2C030000
40A20008 3A80FFFF
60000000 00000000

NTSC-J
025DBCC6 0000XXXX
025DACBE 0000XXXX
025DACC2 0000XXXX
025DA65E 0000XXXX
C25DA664 00000004
5400083C 3C60YYYY
6063YYYY 7C63022E
382101A0 4E800020
60000000 00000000
C25DC42C 00000003
7C741B78 2C030000
40A20008 3A80FFFF
60000000 00000000

NTSC-K
025CA586 0000XXXX
025C957E 0000XXXX
025C9582 0000XXXX
025C8F1E 0000XXXX
C25C8F24 00000004
5400083C 3C60YYYY
6063YYYY 7C63022E
382101A0 4E800020
60000000 00000000
C25CACEC 00000003
7C741B78 2C030000
40A20008 3A80FFFF
60000000 00000000

Notes:
  • XXXX = Total amount of messages
  • YYYYYYYY = Address of the array of the BMG IDs (use a 06 code to store the BMG IDs as halfwords)
  • This does not allow adding more "room start" buttons (i haven't figured out how to make them work properly yet, besides removing existing ones).
  • All users must be running the code for it to take effect. Users without it will receive the original messages (or none at all if the message ID is bigger than the amount of original messages).
ASM Sources:

Load BMGs from custom array:
Code:
# Set array location here
.set BMGArray, 0xXXXXXXXX

# Modified original instruction
slwi r0, r0, 1

# Load the BMG ID
lis r3, BMGArray@h
ori r3, r3, BMGArray@l
lhzx r3, r3, r0

# Copy of the game's original instructions to return directly from here
addi r1, r1, 0x1A0
blr

Hide button if message doesn't exist:
Code:
# Original instruction
mr r20, r3

# Check if BMG is 0
cmpwi r3, 0
bne+ end

# Replace r20 with -1 to hide message button
li r20, -1

# Return
end:

Code created by: CLF78
Reply


Messages In This Thread
Room Message Expander [CLF78] - by CLF78 - 05-03-2021, 01:14 PM
RE: Room Message Expander [CLF78] - by Wiimm - 05-04-2021, 10:23 PM
RE: Room Message Expander [CLF78] - by JoshuaMK - 05-05-2021, 12:57 AM
RE: Room Message Expander [CLF78] - by Wiimm - 05-05-2021, 01:33 PM
RE: Room Message Expander [CLF78] - by JoshuaMK - 05-05-2021, 03:21 PM
RE: Room Message Expander [CLF78] - by CLF78 - 05-06-2021, 01:26 PM
RE: Room Message Expander [CLF78] - by Wiimm - 05-06-2021, 03:01 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)