• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

CustomConsoleUI

Introduction

CustomConsoleUI changes the ingame UI allowing to swap the UI during the game.​
It does not change the Menus found in F9 to F12 and the mouse cursor, which will still be fitting to the initial Race selected.​
In Warcraft 3 V1.31, it can not change the idle worker button (the Lua version auto detects the users version).​

How does that work?

CustomConsoleUI expects that all default UI textures were replaced by blank textures inside Game interface:​
Then it places custom frames over the not seeable. The Day Time clock model has to be replaced because it is hardcoded to use Texture x, hence it has to go and be replaced by a custom one which is provided in the demo map.​
The custom created frames than can be changed during the game, allowing the UI swap effect.​
At init you give the system bunches of texturePaths for each UI which each saved to an index. During the game you can then swap to an CustomUI with that index for a wanted player using:​
UseCustomConsole(player, consoleIndex)

How to install?

First you have to make the default Console Textures be hidden that is done in Game Interface.​
Set ConsoleTexture01 to ConsoleTexture06 to UI\Widgets\EscMenu\Human\blank-background.blp.​
ConsoleTexture05 & ConsoleTexture06 can not be set in World Editor - Game Interface.​
Set ConsoleInventoryCoverTexture to UI\Widgets\EscMenu\Human\blank-background.blp.​
The Day of Time clock has hardcoded textures therefore you need to swap it out. That also should be done in Gameinterface.​
Set TimeOfDayIndicator to the model included in this system.​
Now export and Import war3mapImported\CustomConsoleUI.toc & war3mapImported\CustomConsoleUI.fdf​
Finally you have to set the used textures for the system which differs between vjass and Lua​
in the Lua version you fill the local table data at the top of the system with table entries holding the wanted textures.​
In the vjass version you fill the array data which is used as 2d array with the pageSize 11. data[0*11 + 1] = ConsoleTexture01 of UI 0. or you use the provided function doing that for you as shown in function init_function of library CustomConsoleUI​
The day time clock is a bit wierd hence one can set an offset to fit the texture better to the glowing orbs represeting the current hour of day. Default value for Orc is wrong. While the others are quite fine.​
While the demo map only uses normal UI, this also works for custom imported UI.​

ChangeLog

V8 Use UI scale options​
V7 Replaydetect Reforged V2​
V3 (vjass) Fixed a desync Reason​
V2​
InventoryCover changes in 1.31.​
the vjass version uses the FrameLoader now, if provided (which will make it work over buggy Frame Save&Load).​
Contents

CustomConsoleUI (Map)

CustomConsoleUI (Map)

Updated to V2)
Changes the InventoryCover for Warcraft 3 V1.31. For such one should set the default Texture in game interface to UI\Widgets\EscMenu\Human\blank-background.blp
(vjass) did not use the provided FrameLoader which broke the customUI after loading a saved game.
 
Last edited:
Level 7
Joined
May 28, 2011
Messages
101
I have a problem
I just started learning from your UI tutorials and wanted to try this out. It seems no matter if i use the Lua or Jass version of the written code in the map, i am unable to see the units health and mana bars upon switching race UI.
 
Level 7
Joined
May 28, 2011
Messages
101
Happy new year :)
And sorry for the late reply. I tried to re-download your map to test it untouched. In the Jass version i can now switch to Human and see the health/mana bar but with any other race it disappears once again.
The Console Texture 1, 2, 3, 4 and Console Inventory are replaced with "UI\Widgets\EscMenu\Human\blank-background.blp" and the Rime Of Day Indicator is replaced with "war3mapImported\CustomTimeIndicator.mdx"
 
The reason for the desync in Reforged is: I disabled a Line inside CreateCustomConsole for Reforge usage in the vjass version. It uses the frame child api to get the worker button but I can't save that in 1.31 so i commented out the line that contains BlzFrameGetChild but that leads to a broken frame creation in the next line.
JASS:
// can do that only in Reforged, enable it if you develop for reforged
//set idleWorkerButton = BlzFrameGetChild(BlzGetFrameByName("ConsoleUI", 0), 7)
set idleWorkerButtonOverlayParent = BlzCreateSimpleFrame( "SimpleTextureFrame", idleWorkerButton, 0 )
set idleWorkerButtonOverlay = BlzGetFrameByName("SimpleTextureFrameValue", 0)
call BlzFrameSetAllPoints(idleWorkerButtonOverlay, idleWorkerButton)
call BlzFrameSetLevel(idleWorkerButtonOverlayParent, 4)


I guess i just remove this worker feature all together in vjass.
 
Last edited:
Oh, didn't know that could happen.
Something trivial to check in Lua would be impossible to do in JASS..

Keep the feature behind a static if, and leave it up to the user to enable. That would necessitate having to uncomment the line containing the newer native, and would downplay the automatic version detection feature and subsequent system adjustment in response.

 
How did you set Consoletexture05-06 to blank? I've been looking in the Game Interface and cannot find them. Everything else works as advertised, though, which I like a lot thank you :)
I used a local file version of "ui/skinmetadata.slk" which added that to Game Interface.

Otherwise you need to export your map's war3mapSkin.txt add
ConsoleTexture05=UI\Widgets\EscMenu\Human\blank-background.blp
ConsoleTexture06=UI\Widgets\EscMenu\Human\blank-background.blp
and reimport that file back into your map, creating a backup before doing that is recommented. World Editor should keep the new Lines even after saving.
 
Level 34
Joined
Aug 6, 2015
Messages
733
Tried to use this system with a custom interface.
Specifically - Gothic Minimalistic UI Widescreen
Attached Test Map
Seems to be a bug , you can't see units health/mana points.
(Tested it on another empty map by just replacing the UI elements manually in the editor and the hp/mp info was visible there)
Screenshot_31.jpg
 

Attachments

  • CustomConsoleUIV3.w3x
    568.7 KB · Views: 15
Ty, for reporting that bug.
I guess it happens because the default UIs have transparent textures at that spot, but the used custom one does not.
Means my system places it above the texts, but it didn't matter yet.

One can give the default ConsoleUI a higher level to place it above again.
That next jass line should be insert before // Preload but after "CustomConsoleUI" was created.
call BlzFrameSetLevel(BlzGetFrameByName("ConsoleUI", 0), 4)
I am unsure about other consequenzes by doing that.
 
Level 34
Joined
Aug 6, 2015
Messages
733
Ty, for reporting that bug.
I guess it happens because the default UIs have transparent textures at that spot, but the used custom one does not.
Means my system places it above the texts, but it didn't matter yet.

One can give the default ConsoleUI a higher level to place it above again.
That next jass line should be insert before // Preload but after "CustomConsoleUI" was created.
call BlzFrameSetLevel(BlzGetFrameByName("ConsoleUI", 0), 4)
I am unsure about other consequenzes by doing that.
Yep that seems to fix it
 
Level 34
Joined
Aug 6, 2015
Messages
733
Hmm , odd , so i tried to import the system to a blank map. and i ended up having default human texture on top of the ui. (not sure what is causing that)
The installation Guide says to replace Set ConsoleTexture01 to ConsoleTexture06 to UI\Widgets\EscMenu\Human\blank-background.blp.
Though there are only 4 textures paths in gameplay interface. (1 to 4) , 5 and 6 are missing.
1641051991970.png
 

Attachments

  • tete.w3m
    568.5 KB · Views: 17
Last edited:
Hmm , odd , so i tried to import the system to a blank map. and i ended up having default human texture on top of the ui. (not sure what is causing that)
The installation Guide says to replace Set ConsoleTexture01 to ConsoleTexture06 to UI\Widgets\EscMenu\Human\blank-background.blp.
Though there are only 4 textures paths in gameplay interface. (1 to 4) , 5 and 6 are missing.
View attachment 392620
When Blizzard added widescreen they also added ConsoleTexture 5/6, but they forgot to add it to the world editor game interface menu.
Without a moded database (allow local files) you'll need to take the war3mapskin.txt file from your map and inser the wanted Textures for 5/6 by hand, save the file and reimport it into your map (or copy the content from the file found in the system as it has them).
 
Level 34
Joined
Aug 6, 2015
Messages
733
Wouldn't hurt to have this in the post description, also what i found can work too, is to import a blank transparent texture and write its path to default path of ui 05/06 (for each race), after that importing the default ui textures of ui 05/06 (for each race) and write a custom path for them and replace it in the system itself.

(Maybe there is a way of doing it without reimporting the default textures again but dunno)

The only downside is that the map size will be increased by about 3 mb.
 
Level 27
Joined
Feb 2, 2006
Messages
1,570
The cursor does not change with HD graphics, not sure about SD. The background and borders of game menus are still Human.
The code looks like you only change the idle worker button if it is not Reforged?
Other than that this system is pretty awesome! You could combine it with a custom sound system for the announcer. Replace the default sound paths with empty files and fake the sounds in triggers when your hero is killed, your goldmine collapses etc.
Then it would make a perfect custom race system!
Maybe add Naga race with the custom Naga UI as example custom race to the demo map. It has already the announcer sounds from the campaign.
And what about the area of effect texture and icons/models for rally points?

edit:
Tested it in my map and enabling the Idle worker button seems to have it constantly shown even if there are zero workers?
 
Last edited:
Replay :( , needs extra work.

spontaneous guess, I would say that the children of ConsoleUI are not the same in normal and replay mode. When the child api is used it copies the dimensions of child at index 7 which from the image is wrong in replay mode.

One could in replay mode set alpha of idleWorkerButtonOverlayParent to 0 than it would be invis or not overlay the idleworker button overall.
In the code it is something like
BlzFrameGetChild(BlzGetFrameByName("ConsoleUI", 0), 7)
 
Level 34
Joined
Aug 6, 2015
Messages
733
Is it possible to add support for
  • "ui\widgets\console\human\human-console-button-back-active"
  • "ui\widgets\console\human\human-console-buttonstates2"
  • "ui\widgets\escmenu\human\human-options-button-highlight"
  • "ui\widgets\escmenu\human\human-options-menu-background"
  • "ui\widgets\escmenu\human\human-options-menu-border"
 
Is it possible to add support for
  • "ui\widgets\console\human\human-console-button-back-active"
  • "ui\widgets\console\human\human-console-buttonstates2"
  • "ui\widgets\escmenu\human\human-options-button-highlight"
  • "ui\widgets\escmenu\human\human-options-menu-background"
  • "ui\widgets\escmenu\human\human-options-menu-border"
As far I know, no sry.

console-button which should be the F9 to F12 Buttons are simplebuttons of which one can't change textures by map script. non simple buttons can't crop textures -> need textures in other format.

menu-background would work, but menu-border not. Such border can only be set in fdf. When one sets the texture by map script it will remove the ESC-Menu Border.

Map script api can't change Highlight texture.
 
Level 13
Joined
Aug 16, 2019
Messages
168
A huge thank you for the ultra-urgent update, Tasyen! 🙏✨ I was thinking about this all day. 🧠💭

It looks like you’ve simply disabled the idle worker icon display for now. 🔧 Will there be an update later on to fully restore its functionality? 🔄 I’m asking so I can plan out my project roadmap 📅—should I add this to my development queue, or can I rely on your expertise to handle it? 🤔

Thanks again! 🚀👏
 
in the vjass version the idle worker button overlay needs to be enabled with a boolean in the globals of the system
private constant boolean workerFace = true

the system would not compile in warcraft 3 V1.31.1 in vjass without such a flag.

the replay detection has a commented out line that hides the workerface overlay, when one enables it then the worker overlay is hidden in replays.
 
Level 13
Joined
Aug 16, 2019
Messages
168
in the vjass version the idle worker button overlay needs to be enabled with a boolean in the globals of the system
private constant boolean workerFace = true

the system would not compile in warcraft 3 V1.31.1 in vjass without such a flag.

the replay detection has a commented out line that hides the workerface overlay, when one enables it then the worker overlay is hidden in replays.

You reacted so quickly to the error that it seemed like you were just introducing a temporary solution. Now I've finally figured it out.

Thank you SO MUCH for the reactive solution to the problem!
 
Level 2
Joined
Dec 19, 2022
Messages
4
Hey, everybody. I was able to connect the script in lua, the standard races are fully working, but I could not figure out how to connect an additional races (for example naga) with its own custom interface. For my map I use handicap to select new races, but how to connect a custom interface to them? I do not know Lua, so I would be very grateful if someone can explain how to do for example so that when I select night elfs with a handicap of 90 I have a custom interface, and if the handicap is 100, then the standard interface remains.
 
you tell customconsoleui about your custom ui files. for that you choose an unique not yet used integer. copy the format the default ones have in customconsoleui .

Then in a 0s time expired trigger, you loop all players,
is player race == night elf and also real handicap == 90
UseCustomConsole(GetEnumPlayer(), yourIndex)
 
Level 2
Joined
Dec 19, 2022
Messages
4
you tell customconsoleui about your custom ui files. for that you choose an unique not yet used integer. copy the format the default ones have in customconsoleui .

Then in a 0s time expired trigger, you loop all players,
is player race == night elf and also real handicap == 90
UseCustomConsole(GetEnumPlayer(), yourIndex)
Thank you so much, its working :)
 
Top