(v0.62) sound.wz + Skill issues
Hello,
Over the past weeks I've been trying to fix a minor issue with the v0.62 sound.wz skill sounds. Basically, the GM skills uses the wrong skill sounds over the normal player ones. This is a small oversight made by Nexon due to GM > Super GM jobs, so the ID's are wrong.
This is a matter of swapping ID's to fix, but here's the issue. As soon as I change anything skill related in sound.wz, the sound of every skill gets corrupted. They either don't work at all anymore or get very high pitched. I have tried HaRepacker 4.2.3 and WzRepacker, both have same issue.
Does anyone have any clue why this happens and how to prevent this? I've tried add new files, just swapping, nothing works.
In end this issue is super minor, but I still would like to get it fixed, like everything else.
Once again, v0.62.
Re: (v0.62) sound.wz + Skill issues
I've personally never tried this with the newest HaRepacker but try with another version of HaRepacker. Perhaps, haha01haha01 accidentally broke it? Try HaSuite 1.14. I've never had any troubles using that.
Re: (v0.62) sound.wz + Skill issues
Quote:
Originally Posted by
KryptoniteD
I've personally never tried this with the newest HaRepacker but try with another version of HaRepacker. Perhaps, haha01haha01 accidentally broke it? Try HaSuite 1.14. I've never had any troubles using that.
This didn't work out for me. The older versions give me errors after saving it, but still apply the changes. Once going in-game the same issue appears; skills no longer have sounds or are very high pitched.
Re: (v0.62) sound.wz + Skill issues
Quote:
Originally Posted by
Fluttershy2
This didn't work out for me. The older versions give me errors after saving it, but still apply the changes. Once going in-game the same issue appears; skills no longer have sounds or are very high pitched.
The pitching is an issue with the bitrates of the sound. The bitrate of the sound is different from the default bitrate that was in HaRepacker. You need to hex-edit and insert the right bitrate string for the pitch to be correct.
Re: (v0.62) sound.wz + Skill issues
Quote:
Originally Posted by
KryptoniteD
The pitching is an issue with the bitrates of the sound. The bitrate of the sound is different from the default bitrate that was in HaRepacker. You need to hex-edit and insert the right bitrate string for the pitch to be correct.
Can anyone maybe explain this a bit more?
If I understand correctly you have to hex-edit the Sound.wz. But how do I find out what the correct bitrate is? And will I have to do it for every broken sound or just once for the whole file?
Re: (v0.62) sound.wz + Skill issues
Yeah. Just want to reply here as OP that my issue is not fixed, none of the work around worked.
Re: (v0.62) sound.wz + Skill issues
Quote:
Originally Posted by
Fluttershy2
Yeah. Just want to reply here as OP that my issue is not fixed, none of the work around worked.
I will download the v.62 WZ and check around for you, and post back here for you.
Re: (v0.62) sound.wz + Skill issues
Quote:
Originally Posted by
Fluttershy2
Yeah. Just want to reply here as OP that my issue is not fixed, none of the work around worked.
Alright. Here is how it can be resolved. For a fix that is long-lasting and less work on your end in the near future, I would highly recommend editing HaRepacker's MapleLib. To be precise, it would be the WzSoundProperty file.
https://code.google.com/p/hasuite-ne...operty.cs?r=23
At the current time, it reads off that sound mask over that. There is a different sound mask for different bitrates. If you give say a 256 kbps bitrate sound a 64 kbps, it'll play the sound at 64 kbps. So you need the appropriate mask for the appropriate bitrate. I don't have all the masks, but I will pass you the ones I could find in 5 minutes:
192 kbps:
02 83 EB 36 E4 4F 52 CE 11 9F 53 00 20 AF 0B A7 70 8B EB 36 34 4F 52 CE 11 9F 53 00 20 AF 0B A7 70 00 01 81 9F 58 05 56 C3 CE 11 BF 01 00 AA 00 55 59 5A 1E 55 00 02 00 44 AC 00 00 C0 5D 00 00 01 00 00 00 0C 00 01 00 02 00 00 00 72 02 01 00 00 00
80 kbps:
02 83 EB 36 E4 4F 52 CE 11 9F 53 00 20 AF 0B A7 70 8B EB 36 E4 4F 52 CE 11 9F 53 00 20 AF 0B A7 70 00 01 81 9F 58 05 56 C3 CE 11 BF 01 00 AA 00 55 59 5A 1E 55 00 02 00 22 56 00 00 10 27 00 00 01 00 00 00 0C 00 01 00 02 00 00 00 0A 02 01 00 00 00
64 kbps:
02 83 EB 36 E4 4F 52 CE 11 9F 53 00 20 AF 0B A7 70 8B EB 36 E4 4F 52 CE 11 9F 53 00 20 AF 0B A7 70 00 01 81 9F 58 05 56 C3 CE 11 BF 01 00 AA 00 55 59 5A 1E 55 00 02 00 22 56 00 00 40 1F 00 00 01 00 00 00 0C 00 01 00 01 00 00 00 A2 01 01 00 00 00
For the higher bitrates, you'd have to check the JMS Sound.wz, they have a lot of music with higher bitrates. If I remember correctly, they had some 320 kbps music in there.
Re: (v0.62) sound.wz + Skill issues
Sorry if I'm hijacking this thread but I have the same problem only with mob sounds.
So I tried the solution by Kryptonite D, but I don't know if I'm even changing the right thing or not. I have never used C#, not really sure about how digital sound works either. So I'm sorry if my approach is probably very naive.
I tried chaning this method in MapleLib:
PHP Code:
public static byte[] CreateHeader(int frequency)
{
byte[] frequencyBytes = BitConverter.GetBytes(frequency);
byte[] headerBytes = new byte[soundHeaderMask.Length];
Array.Copy(soundHeaderMask, headerBytes, headerBytes.Length);
Array.Copy(frequencyBytes, 0, headerBytes, 56, 4);
//headerBytes[60] = bps;
return headerBytes;
}
First I added the three headers you gave where something similiar is already in the file:
PHP Code:
public static readonly byte[] soundHeaderMask192 = new byte[] { 0x02, and so on...
Then I tried adding some switch or if statement to the 'CreateHeader'. I tried switching over the variable bps (uncommented it). I'm not even sure if bps is right but I tried checking it as 'kbit per second' (192/80/64) and 'kbyte per second' (24/10/8). I also noticed that in the 'soundHeaderMask' someone commented /*FREQ56*/ so I also tried using frequency instead of bps.
Kinda like this...
PHP Code:
public static byte[] CreateHeader(int frequency, int bps)
{
byte[] frequencyBytes = BitConverter.GetBytes(frequency);
byte[] headerBytes = new byte[soundHeaderMask5659.Length];
switch (bps)
{
case 192: Array.Copy(soundHeaderMask192, headerBytes, headerBytes.Length); break;
case 80: Array.Copy(soundHeaderMask80, headerBytes, headerBytes.Length); break;
case 64: Array.Copy(soundHeaderMask64, headerBytes, headerBytes.Length); break;
default: Array.Copy(soundHeaderMask5659, headerBytes, headerBytes.Length); break;
}
headerBytes[60] = (byte) bps;
return headerBytes;
}
So as a result I compiled about 10 different maplelibs but I can't get any sound fixed. I noticed that not even the file sizes of the sound.wz are different between maplelibs...
It would be nice if someone could say If I'm completely wrong, or if I'm atleast looking at the right function etc...
Re: (v0.62) sound.wz + Skill issues
Quote:
Originally Posted by
SYJourney
Sorry if I'm hijacking this thread but I have the same problem only with mob sounds.
So I tried the solution by Kryptonite D, but I don't know if I'm even changing the right thing or not. I have never used C#, not really sure about how digital sound works either. So I'm sorry if my approach is probably very naive.
I tried chaning this method in MapleLib:
PHP Code:
public static byte[] CreateHeader(int frequency)
{
byte[] frequencyBytes = BitConverter.GetBytes(frequency);
byte[] headerBytes = new byte[soundHeaderMask.Length];
Array.Copy(soundHeaderMask, headerBytes, headerBytes.Length);
Array.Copy(frequencyBytes, 0, headerBytes, 56, 4);
//headerBytes[60] = bps;
return headerBytes;
}
First I added the three headers you gave where something similiar is already in the file:
PHP Code:
public static readonly byte[] soundHeaderMask192 = new byte[] { 0x02, and so on...
Then I tried adding some switch or if statement to the 'CreateHeader'. I tried switching over the variable bps (uncommented it). I'm not even sure if bps is right but I tried checking it as 'kbit per second' (192/80/64) and 'kbyte per second' (24/10/8). I also noticed that in the 'soundHeaderMask' someone commented /*FREQ56*/ so I also tried using frequency instead of bps.
Kinda like this...
PHP Code:
public static byte[] CreateHeader(int frequency, int bps)
{
byte[] frequencyBytes = BitConverter.GetBytes(frequency);
byte[] headerBytes = new byte[soundHeaderMask5659.Length];
switch (bps)
{
case 192: Array.Copy(soundHeaderMask192, headerBytes, headerBytes.Length); break;
case 80: Array.Copy(soundHeaderMask80, headerBytes, headerBytes.Length); break;
case 64: Array.Copy(soundHeaderMask64, headerBytes, headerBytes.Length); break;
default: Array.Copy(soundHeaderMask5659, headerBytes, headerBytes.Length); break;
}
headerBytes[60] = (byte) bps;
return headerBytes;
}
So as a result I compiled about 10 different maplelibs but I can't get any sound fixed. I noticed that not even the file sizes of the sound.wz are different between maplelibs...
It would be nice if someone could say If I'm completely wrong, or if I'm atleast looking at the right function etc...
I personally haven't looked at the entire source code, but from what I am seeing, the method you are writing in is right. Try debugging the code little. Resave that sound that you just saved in a WZ file back to another location. Open up a hex-editor and check if the bytes are written. I am suspecting it is not being written for some odd reason. Perhaps, you are not passing in the correct bps, etc.
PS: Don't use the latest HaRepacker to save sounds from the WZ file when you are interested in seeing the sound mask. It removes the sound mask from it. If you want to see the sound mask in it, use an older HaRepacker such as 2.5, and 3.5.
Re: (v0.62) sound.wz + Skill issues
Resolved thanks to @haha01haha 's latest version.
Thanks a lot for the bug fix!