War3map.w3s sound structure
Closed this issue · 4 comments
By creating a custom war3map.w3s file and observing how the world editor handles it, I have discovered that the last six members are used for the sound's cone. The corresponding native calls that are generated for these are SetSoundConeAngles and SetSoundConeOrientation.
- unk3 -> coneInside
- unk4 -> coneOutside
- unk5 -> coneOutsideVolume
- unk6 -> coneOrientationX
- unk7 -> coneOrientationY
- unk8 -> coneOrientationZ
I was unable to discover the meaning of unk1 and unk2 using this method.
EDIT: Based on the .slk files, I think it's most likely that unk1 is PitchVariance, and unk2 is Priority. I also found several more sound flags, though I'm not sure which bit corresponds to which flag:
WANT3D, IGNOREUSERNAME, CHANNELFULLPREEMPT, NODUPLICATES, SCALEPRIORITY, LOOPING, RANDOMPITCH, CHANNELFULLPREEMPTOLDEST, DYNAMICOCCLUSION, LISTFULLPREEMPT.
Afaik, these fields and flags are only usable through SetSoundParamsFromLabel.
Nice work. I have changed the codebase to reflect your discoveries and will push it somewhere today. Do you happen to know anything about the new format version?
For version 2 of the format I don't know what any of the new values mean, but here they are:
string: sound name (same string as in the v1 part of the sound)
(edited) string: sound label? (from .slk file)
string: sound path (again, same as in v1)
18 bytes: unk
I ended up just skipping the bytes at the end. I'll update the spec once I know what they are. Thank you for your help!
It seems there's a new format version of this file type (v3), which appends another four bytes to every sound.