• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Change race UI per player with frame natives

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,689
Hi,
is it somehow possible to change the race UI per player with the new frame natives? We can access the default frames from the game right? The Big UI-Frame Tutorial Are they available per player or only for all players together? Can I change something with GetLocalPlayer without desync like the texture?

Basically, I would love to change the console textures, idle worker icon and maybe even command buttons like the rally point button (maybe command buttons), rally point model, area of effect texture and cursor texture, so I could use custom UIs like Sin'dorei UI by I3lackDeath in addition to the original UIs.


Simply overwriting the stuff in the game interface settings like this or importing stuff with the default file paths for the 4 races is not an option since 4 races are not enough for my map and I need to keep the base races as well:

JASS:
[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

Previous threads had no helpful answer. Is it impossible?
The worst solution I can think of is allowing local files and let players place the files with a third party tool before starting the map.
Maybe I could hide the default frames and create custom fake frames per player?

edit:
Forgot about CustomConsoleUI for a while.
I can try this. I thought for the sound effects I could create custom triggers, replace all sound files with empty imported files and only play the sounds from custom triggers which the user can configure in JASS.
Some API like this for a system would be great:

JASS:
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

and then you only have import empty files for sounds and race textures etc.
 
Last edited:
Status
Not open for further replies.
Top