I've been trying to figure out how they did it in the campaign, on that human expansion level 5, where you have naga and human workers. If you build stuff with the human workers, the human soundset plays. If you build stuff with the naga workers, the naga soundset plays.
Turns out thats not quite true. CannotBuildThere/BuildingComplete/GoldMineLow/GoldMineDrained all fix to the human soundset even if a murgul reaver is the unit in question... which is a shame. It is a small oversight by blizzard but a damn shame for such an underused set of units in the game.
You only get 2 levels in the campaign where you can use the Murgul Reaver. Last night-elf and Human 5. On the last night-elf level, Naga is the primary race, and the gameplay interface is fixed to naga soundset. If you attempt to build something with the allies night-elf wisps in a bad spot, it plays the naga sounds. On human 5, the soundsets are left as defaults. Because you enter the game as RACE_HUMAN, they go to the human sounds. The naga units you have are not your allies units, they are yours. Some sounds tied to them play human sounds, some play naga sounds.
From what I can tell, an override in war3skins.txt always takes priority. If you set CantBuildSound (or whatever the name was), it will always play no matter what worker you used.
If that field is still on its default, then if the worker is an acolyte/peasant/peon/wisp, it will play the sound associated with that units respective race.
If the field is still on its default and you use another worker (murgul reaver), it will play the sound associated with the race you picked in the games lobby.
I want to find a way to bind the Mur'gul Reavers CannotBuildThere sound to the one in the gamefiles, and have it actually work. I don't want to use the gameplay interface and fix the sound for all players.
If I can find a way to make this work, I can branch it out to all other relevant UI parts. Gold low. Gold drained. Idle worker icon. UI 2D static frames. Not enough food. Not enough gold. Not enough lumber.
Ones that should easily be do-able with triggers are the other ones: Ally under attack, hero slain, allied hero fallen, allies town under attack, building complete, anything else I've forgotten.
Edit: Finally getting somewhere now.
If I open the war3map.j inside the map, and change that RACE_PREF_XXXX to RACE_PREF_DEMON, it will start off setting the player to a demon race.
Next, by opening the war3patch.mpq and editing UI\war3skins.txt, I can add "Demon" to the skins and set its fields there.
My next goal is to find a way to replace that file using a map. Perhaps overwriting UI\war3skins.txt as an import?