Description
I'm specifically referring to the trophies' .MSBIN files from RSBJ01 as that is where I encountered the issue--I've not checked if it occurs elsewhere. This occurs both in BrawlCrate's textbox and when exporting as a text file.
An easy to see issue is in ty_fig_name_list_ja.msbin
. The Japanese name for Zero Laser should be "ゼロレーザー" however it ends up being displayed as "<>��ロレーザー". The bytes for this entry in the table (found at offset 0x00001304
) is 0x0B011220E382BCE383ADE383ACE383BCE382B6E383BC
. The text itself is 0xE382B...E383BC
. The problem is with 0x0B011220
and how the game handles ruby text. 0x0B
denotes where to begin a "ruby segment", the second byte is how many bytes to read for the furigana (the characters rendered above), and the third byte is how many bytes to read for the main characters. In this example, the second byte is 0x01--the 1 byte after the ruby tag is 0x20
(a space). The third byte is 0x12 (18) which ends up being the rest of the bytes.
A better illustration of how the game reads the data is with Giga Bowser as that trophy actually uses ruby text instead of using a "dummy" (see image). The bytes are 0xE382AEE382ACE382AFE38383E38391 0B0C06 E381B E38293E38197E38293E5A489E8BAAB
(ruby segment isolated). The first 0x0C bytes are 0xE381B E38293E38197E38293
for "へんしん". The next 0x06 bytes are 0xE5A489E8BAAB
for "変身". The text itself renders properly, but there are several control characters in the output as those are the literal interpretation of 0x0B0C06
.
Another note is that in ty_fig_ext_list_ja.msbin
(which holds the trophy description) whenever there is a ruby segment there is also a color tag. However this uses 0x04
instead of 0x12
and only uses the next 4 bytes for RGBA. I can't verify if BrawlCrate handles this properly because it closes when trying to open the file, perhaps a result of the ruby bytes being converted into a control character that causes problems.
These problems also occur with RSBE01's files, though the trophy names omit the starting "dummy" ruby so it only becomes visible for ones with actual ruby text.