Hi,
I'm considerably new to modding Maplestory, but I think that HaRepacker might be having some difficulties rebuilding IMGs containing voices (SkillVoice).
I was trying to port the Japanese Angelic Buster voices over from JMS to SEA. Unfortunately, changing any one voice with HaRepacker (even if the voice was merely extracted and re-inserted) just caused
all voices in that image to be played at a really high sample rate.
Please feel to correct me if I am wrong here though! Maybe there's already a known explanation for that, but I just haven't found it.
As for what I did on my end to get voice replacement working, I got the halfword/short at 0x36 set to 0x01 instead of 0x02 and the 32-bit word at 0x3C set to 0x0bb8 instead of 0x2710.
Here are all the differences in the structures that I've noticed when comparing the headers of the SkillVoice files against the reference soundHeaderMask structure:
Code:
Differences (header vs soundHeaderMask):
0x36 (short) - 0x01 0x02 (01 = voice, 02 = BGM, seems to be a sound channel selector).
0x38 (word) - (Sample rate)
0x3C (word) - 0x0bb8 0x2710 (Seems to be some round number like 1000, 3000 or 6000. Sample buffer length?)
0x4C - 0x4E 0x00
0x4D - 0x00 0x0A
0x4E - 0x01 0x02
0x4F - 0x00 0x01
0x50 - 0x71 0x00
0x51 - 0x05 0x00
Note:
header refers to the header that precedes the MP3 file itself, which is the same for all voices under SkillVoice.
Halfword/short 0x36 seems to be a channel selector. Perhaps 0x02 causes it to be played under the BGM channel, causing it to be played back with the parameters of the BGM (Which presumably has a higher sample rate).
I'm not sure about the word at 0x3C. While just changing byte 0x36 to 0x01 allows voices to be played at their right sample rates... I noticed that the voices were cut off. Setting it to 0xBB0 solved that, although I'm not sure what that actually does.
On a side note, it seems like not all sounds are MP3 files. It appears that normal skill sounds are headerless wave files and the headers that precede these files are no different from their SkillVoice counterparts... on at least SEA.
I don't know about how well this works on other Maplestory versions like JMS, although I could possibly test on JMS if required. (JMS seems to have more variations in its voice MP3 header fields too, BTW)
Thank you for reading!