CustomConsoleUI

This bundle is marked as approved. It works and satisfies the submission rules.

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.
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

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)

Level 6
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 6
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"
 

MyPad

Spell Reviewer
Level 21
Joined
May 9, 2014
Messages
1,649
The ability to customize UI is something that does not cease to impress. However, when testing
this in local multiplayer (Reforged), the game immediately desynced when the UI was changed. This
desync occurred regardless of who initiated the UI change.

Until then, this has been moved to Awaiting Update
 
Last edited:
Level 26
Joined
Jul 18, 2010
Messages
1,830
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:

MyPad

Spell Reviewer
Level 21
Joined
May 9, 2014
Messages
1,649
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.

 
Level 26
Joined
Jul 18, 2010
Messages
1,830
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.
 
Top