tdauth / wowr

Warcraft III: Reforged funmap World of Warcraft Reforged.
https://wowreforged.org
8 stars 0 forks source link

Improve custom race support #335

Open tdauth opened 3 years ago

tdauth commented 3 years ago

The following features would massively improve custom races and the player's feeling that it is an actual race in Warcraft:

Create a custom race soundset system for the different sounds. Naga sounds do already exist. There are Generic sounds which could be used for other races or use existing stuff:

Add chat commands to change the UI, turn off the system:

A system to dynamically swap the UI: https://www.hiveworkshop.com/threads/customconsoleui.328354/ test it really well and combine it with custom sounds. It does not work for the cursor and area of effect texture nor the rally point icon/model. The idle worker icon seems to be shown permanently.

[CustomSkin]
ConsoleInventoryCoverTexture=UI\Widgets\EscMenu\Human\blank-background.blp
ConsoleTexture01=UI\Widgets\EscMenu\Human\blank-background.blp
ConsoleTexture02=UI\Widgets\EscMenu\Human\blank-background.blp
ConsoleTexture03=UI\Widgets\EscMenu\Human\blank-background.blp
ConsoleTexture04=UI\Widgets\EscMenu\Human\blank-background.blp
ConsoleTexture05=UI\Widgets\EscMenu\Human\blank-background.blp
ConsoleTexture06=UI\Widgets\EscMenu\Human\blank-background.blp

Old: One solution would be to hide everything existing and replace it with empty files and customize everything. Play the announcer sounds via triggers etc. Maybe create a proof of concept system.

library CustomRacesSystem

globals
constant integer TEXTURE_TYPE_CONSOLE_UI_0 = 0
constant integer TEXTURE_TYPE_IDLE_WORKER = 1
...

constant integer SOUND_TYPE_UNABLE_TO_BUILD = 0
constant integer SOUND_TYPE_COLLAPSED_GOLD_MINE = 1
constant integer SOUND_TYPE_LOW_GOLD_MINE = 2
constant integer SOUND_TYPE_MORE_FARMS = 3
constant integer SOUND_TYPE_ALLIED_HERO_DEAD = 4
constant integer SOUND_TYPE_ALLIED_BASE_ATTACKED = 5
constant integer SOUND_TYPE_ALLIED_NEEDS_HELP = 6
constant integer SOUND_TYPE_HERO_DEAD = 7
constant integer SOUND_TYPE_INVENTORY_FULL = 8
constant integer SOUND_TYPE_NO_MANA = 9
constant integer SOUND_TYPE_NO_GOLD = 10
constant integer SOUND_TYPE_NO_LUMBER = 11
constant integer SOUND_TYPE_NO_ROOT = 12
constant integer SOUND_TYPE_BASE_ATTACKED = 13
constant integer SOUND_TYPE_WARRIORS_ATTACKED = 14
endglobals

function AddCustomRace takes string name returns integer
function ConvertCustomRaceToNativeRace takes integer whichRace returns race
function IsCustomRaceNative takes integer whichRace returns boolean
function SetCustomRaceUITexture takes integer whichRace, string tex returns nothing
function SetCustomRaceAnnouncerSound takes integer whichRace, integer soundType sound whichSound returns nothing
function SetPlayerCustomRace takes player whichPlayer, integer whichRace returns nothing
function GetPlayerCustomRace takes player whichPlayer returns integer

// optional unit type (requires hashtable):
function AddCustomRaceUnitType takes integer whichRace, integer unitTypeId returns nothing
function GetUnitTypeCustomRace takes integer unit unitTypeId returns integer

endlibrary
tdauth commented 1 year ago

Asked: https://www.hiveworkshop.com/threads/change-race-ui-per-player-with-frame-natives.346421/