Btw, I've changed the ui in GameUI successfully this way, but for some reason whatever I do, I can't figure out how to change MinimapPanel.SC2Layout file. I assumed it followed the same model with file="MinimapPanel", etc. but that's not working. Maybe there's something I'm missing.
Edit: It turns out it matters in which sequence you override the different UI elements.
For instance, to change the minimap buttons, it was necessary to first override the "MinimapPanelTemplate" in MinimapPanel.SC2Layout, and afterwards override the "MinimapPanel" in GameUI.SC2Layout. If done in the wrong order, the changes would not make it into the game.
So that's something to keep in mind every time you want to modify a frame which derives from a template frame elsewhere.
you can change the minimap stuff without adjusting the minimap template by referencing through the template, see the inventory container example. Blizzard adjusted the Inventory buttons there by referencing to them from the GameUI file and not the InventoryPanelTemplate.
Edit: I will probably have some time this weekend to write a more complete tutorial about the second method, and advised method for UI adjustment. This method was already available in Patch 1.2 but it wasn't generally known until the release of the Aiur Chef map. (at which point post #2 came into being.)
Thanks, that's useful to know. I didn't realize you could modify the inner workings without editing the template first. Works perfectly without having to worry about doing it in the right order.
Is it possible to give different UI to certain players in your map? Like completely different.
Also is replacing sc2layout files still viable... I read somewhere that it is not 'officially' supported, says blizzard. And that theres a different way to do it or something..?
I've tried everything I can think of and it seems that you can only change things in the GameUI file. After over 20 hours of trying different things I still can't get this to work. I can override any values I want in the GameUI just fine, but if I try to touch any other file nothing happens.
Here is my attempt to override the InfoPanel file, Just for verification that it worked, I changed the offsets of the behavior frame to 50 50 and I swapped the locations of the life and energy text. Nothing happens in game though (as usual). Here is my xml:
http://pastebin.com/03apPtxK
Someone please tell me i'm doing something horribly wrong and that I can make it work fine by simply adding an = sign somewhere :)
I've experimented a lot after 1.3 patch and got 2 questions
1) seems ConsolePanel cant be moved now, or im doing something wrong (i moved minimap, but cant move ConsolePanel)
<Frametype="ConsolePanel"name="GameUI/UIContainer/ConsolePanel"file="GameUI"><Anchorside="Bottom"relative="$parent"pos="Max"offset="300"/><Anchorside="Left"relative="$parent"pos="Min"offset="300"/></Frame><</code>>\\
2) i cant modify minimap buttons in MinimapPanel.SC2Layout
<<code>>
<Desc><Constantname="ColorMinimapButtonIcon_Prot"val="128,0,0"/><Constantname="ColorMinimapButtonIcon_Terr"val="128,0,0"/><Constantname="ColorMinimapButtonIcon_Zerg"val="128,0,0"/><Frametype="Minimap"name="MinimapPanelTemplate/Minimap"file="MinimapPanel"><Anchorside="Top"relative="$parent"pos="Min"offset="320"/><Anchorside="Left"relative="$parent"pos="Min"offset="32"/></Frame>
so buttons are red but wtf Minimap isnt moved
@Grimshad - i modified buttons colors in MinimapPanel.SC2Layout, so it seems possible to modify
2) That's the same problem I had. The reason it won't move is because the UI is created sequentially. First the templates are defined, then the UI elements using those templates are created. If you override a template, anything deriving from that template will still be using the default template instead of your updated one. There are multiple ways of overcoming this. The simplest might be to edit the main UI element you want to change, and specify everything you want changed in the template at the same time.
Here's an example that will move the minimap to the top right of the screen, and hiding it's three buttons. Notice how the frame "MinimapPanelTemplate/Minimap" from the file "MinimapPanel" can be accessed directly from the frame "GameUI/UIContainer/ConsoleUIContainer/MinimapPanel" from the file "GameUI" since "GameUI/UIContainer/ConsoleUIContainer/MinimapPanel" builds on the template "MinimapPanelTemplate".
thanks, it works!
i still looking for more elegant solution, cuz making 1 big GameUI File isnt good for big projects...
There is no need to have all changes to GameUI in the same imported file. You're also allowed to override multiple different SC2Layout files in the same imported file. Split and mix however you want.
Messing with the Info Panel again, I found that the override works fine as long as I only override the position. If I try to touch anything inside the other file nothing works.
Here's the right syntax for modifying the infopanel. Btw, you only need to enter the values that you want to modify. Anything you don't specify will be default.
Here's the right syntax for modifying the PortraitPanel. Know that even if you add new anchors like "Top" and "Left", the default "Bottom" and "Right" anchors will remain in effect. You may override them as well of course.
@Hookah604: Go
patch.SC2Archive/Mods/Core.SC2Mod/Base.SC2Data/UI/Layout/UI/
Btw, I've changed the ui in GameUI successfully this way, but for some reason whatever I do, I can't figure out how to change MinimapPanel.SC2Layout file. I assumed it followed the same model with file="MinimapPanel", etc. but that's not working. Maybe there's something I'm missing.
Edit: It turns out it matters in which sequence you override the different UI elements.
For instance, to change the minimap buttons, it was necessary to first override the "MinimapPanelTemplate" in MinimapPanel.SC2Layout, and afterwards override the "MinimapPanel" in GameUI.SC2Layout. If done in the wrong order, the changes would not make it into the game.
So that's something to keep in mind every time you want to modify a frame which derives from a template frame elsewhere.
@Builder_Bob: Go
Best practise for UI development is using what is said in post #2
you can change the minimap stuff without adjusting the minimap template by referencing through the template, see the inventory container example. Blizzard adjusted the Inventory buttons there by referencing to them from the GameUI file and not the InventoryPanelTemplate.
Edit: I will probably have some time this weekend to write a more complete tutorial about the second method, and advised method for UI adjustment. This method was already available in Patch 1.2 but it wasn't generally known until the release of the Aiur Chef map. (at which point post #2 came into being.)
@Helral: Go
Thanks, that's useful to know. I didn't realize you could modify the inner workings without editing the template first. Works perfectly without having to worry about doing it in the right order.
Solved
About 3 people have the same question. Did anyone find out how to make it being open all the time ? Like in Sotis...
Is it possible to give different UI to certain players in your map? Like completely different.
Also is replacing sc2layout files still viable... I read somewhere that it is not 'officially' supported, says blizzard. And that theres a different way to do it or something..?
I've tried everything I can think of and it seems that you can only change things in the GameUI file. After over 20 hours of trying different things I still can't get this to work. I can override any values I want in the GameUI just fine, but if I try to touch any other file nothing happens.
Here is my attempt to override the InfoPanel file, Just for verification that it worked, I changed the offsets of the behavior frame to 50 50 and I swapped the locations of the life and energy text. Nothing happens in game though (as usual). Here is my xml: http://pastebin.com/03apPtxK
Someone please tell me i'm doing something horribly wrong and that I can make it work fine by simply adding an = sign somewhere :)
I've experimented a lot after 1.3 patch and got 2 questions
1) seems ConsolePanel cant be moved now, or im doing something wrong (i moved minimap, but cant move ConsolePanel)
so buttons are red but wtf Minimap isnt moved
@Grimshad - i modified buttons colors in MinimapPanel.SC2Layout, so it seems possible to modify
very weird, i spend all night doing this
@Fen1kz: Go
2) That's the same problem I had. The reason it won't move is because the UI is created sequentially. First the templates are defined, then the UI elements using those templates are created. If you override a template, anything deriving from that template will still be using the default template instead of your updated one. There are multiple ways of overcoming this. The simplest might be to edit the main UI element you want to change, and specify everything you want changed in the template at the same time.
Here's an example that will move the minimap to the top right of the screen, and hiding it's three buttons. Notice how the frame "MinimapPanelTemplate/Minimap" from the file "MinimapPanel" can be accessed directly from the frame "GameUI/UIContainer/ConsoleUIContainer/MinimapPanel" from the file "GameUI" since "GameUI/UIContainer/ConsoleUIContainer/MinimapPanel" builds on the template "MinimapPanelTemplate".
1) I haven't really looked into the console panel, but it might be a similar problem to the one above.
@Builder_Bob: Go
thanks, it works!
i still looking for more elegant solution, cuz making 1 big GameUI File isnt good for big projects...
what about console - i make changes in GameUI file and it seems like i should change something in ConsolePanelTemplate file o0. will test it later
also - to lazy ppl theres 1.3.0 UI files:
http://dl.dropbox.com/u/19647338/Starcraft/UI.rar
There is no need to have all changes to GameUI in the same imported file. You're also allowed to override multiple different SC2Layout files in the same imported file. Split and mix however you want.
@Builder_Bob: Go
If you check the pastebin I posted, I did use the method you posted and It doesn't work... I will post it again: http://pastebin.com/03apPtxK
Can someone please try to edit the Infopanel and have it work before they post solutions that don't work?
I tried to change the position of the unit portrait, but without success. This is what I added to the layout file so far:
<Frame type="PortraitPanel" name="GameUI/UIContainer/ConsoleUIContainer/PortraitPanel" file="GameUI">
<Anchor side="Top" relative="$parent" pos="Min" offset="40"/>
<Anchor side="Right" relative="$parent" pos="Max" offset="-40"/>
<Anchor side="Bottom" relative="$parent" pos="Min" offset="380"/>
<Anchor side="Left" relative="$parent" pos="Max" offset="-380"/>
<Width val="320"/>
<Height val="320"/>
<Frame type="PortraitPanel" name="PortraitPanelTemplate">
<Frame type="Image" name="Background">
<Anchor side="Top" relative="$parent" pos="Min" offset="40"/>
<Texture val="@@UI/BlankPortraitBackground" layer="0"/>
</Frame>
<Frame type="Portrait" name="Portrait">
<Anchor side="Top" relative="$parent" pos="Min" offset="40"/>
</Frame>
</Frame>
</Frame>
I played a bit with the anchors, but nothing seems to change anything. Any ideas ?
Thanks in advance !
Messing with the Info Panel again, I found that the override works fine as long as I only override the position. If I try to touch anything inside the other file nothing works.
Works: http://pastebin.com/sdGLN8uX
Doesn't work: http://pastebin.com/Ezhv1W3R
NOTE: Ignore that the tabs in pastebin don't look right, pastebin isn't displaying it correctly, they are correct in my file.
Hi everyone. I want to make console transparent, but leave portrait panel, so i need to hide next frame:
I've tried <Visible val = "false"> and <Alpha val = "0"> but it doesn't work. Any ideas?
@Grimshad: Go
Here's the right syntax for modifying the infopanel. Btw, you only need to enter the values that you want to modify. Anything you don't specify will be default.
@Oneiros33: Go
Here's the right syntax for modifying the PortraitPanel. Know that even if you add new anchors like "Top" and "Left", the default "Bottom" and "Right" anchors will remain in effect. You may override them as well of course.
Note: I got 404 error when trying to edit last post.
Does anyone knows in which layout file is the command panel buttons? I want to modify their arrangements and they removed commandpanel.sc2layout!
@Hookah604: Go Commandpannel.sc2layout is still here: Mods/Core.sc2Mod->Base.sc2data->UI->Layout->UI->CommandPanel.SC2Layout
How are you opening the patch.SC2Archive files? MPQ editor refuses to open them saying they are not valid..
Update: Apparently you cannot open these when the editor is open or the game is running. Fixed.