I've looked for the same before and never found a way to do it in the Data Editor. The simple solution is to use a dummy effect, and have a trigger catch the effect and move the unit. I'm sure you've already though about that though
Using the event Unit is Highlighted/Unhighlighted and a unit variable to hold the unit being highlighted could work for you.
Here's a test I set up to see if it worked.
I set up a Unit is Clicked trigger as well for comparison. Using this method is less flexible as the unit being clicked will be selected, while in the first method, this will be up to you.
Note: In the Data Editor you must uncheck the Unit Flags 'Cannot be Highlighted' for the first method and 'Cannot be Clicked' for the second.
I don't have the editor open now, so I'm only doing this from memory.
In the Model object in the Data Editor there should be a field where you can enter an offset for your selection circle. Try adjusting the numbers to fit the planet.
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.
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.
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.
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, 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.
If anyone is interested in doing the same, you can enable mouse clicks through the minimap by adding the value <AcceptsMouse val="false"/> to "MinimapPanelTemplate/Minimap" in MinimapPanel.SC2Layout
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.
Adding this SC2Layout file in the Default SC2 UI Settings in the Data Editor will override the two anchors "Bottom" and Right" to these new values.
file="GameUI" tells the game to modify the file GameUI.SC2Layout
name="GameUI/UIContainer/ConsoleUIContainer/BattleNetButtonFriendsFrameImage" tells the game to modify the frame with the same path and name
The rest is the same.
Edit: The path to the new SC2Layout files is patch.SC2Archive/Mods/Core.SC2Mod/Base.SC2Data/UI/Layout/UI/
0
I've looked for the same before and never found a way to do it in the Data Editor. The simple solution is to use a dummy effect, and have a trigger catch the effect and move the unit. I'm sure you've already though about that though
0
Using the event Unit is Highlighted/Unhighlighted and a unit variable to hold the unit being highlighted could work for you.
Here's a test I set up to see if it worked.
I set up a Unit is Clicked trigger as well for comparison. Using this method is less flexible as the unit being clicked will be selected, while in the first method, this will be up to you.
Note: In the Data Editor you must uncheck the Unit Flags 'Cannot be Highlighted' for the first method and 'Cannot be Clicked' for the second.
0
@GryphonMane: Go
I don't have the editor open now, so I'm only doing this from memory.
In the Model object in the Data Editor there should be a field where you can enter an offset for your selection circle. Try adjusting the numbers to fit the planet.
0
Press H
Brush: Painted Pathing
Operation: Add Pathing
Type: Ground
Paint over the cliff and it will become traversable as well as buildable.
I've tested this and it really works.
0
@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.
0
@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.
0
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.
0
@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.
0
Maybe something changed after 1.3. that map is made pre-1.3.
I'll see if I can recreate the actor later when I have some time.
0
Is this what you mean?
0
@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.
0
Solved!
If anyone is interested in doing the same, you can enable mouse clicks through the minimap by adding the value <AcceptsMouse val="false"/> to "MinimapPanelTemplate/Minimap" in MinimapPanel.SC2Layout
0
@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.
0
@Hookah604: Go
You can't use the same files that you used pre-1.3.
Let's say you pre-1.3 used to modify GameUI.SC2Layout as follows to move the battlebuddy icon to the lower right of the screen:
In 1.3, you don't replace the file itself. Instead you override specific parts of it. Here's an example to achieve the same as in the example above:
Adding this SC2Layout file in the Default SC2 UI Settings in the Data Editor will override the two anchors "Bottom" and Right" to these new values.
file="GameUI" tells the game to modify the file GameUI.SC2Layout
name="GameUI/UIContainer/ConsoleUIContainer/BattleNetButtonFriendsFrameImage" tells the game to modify the frame with the same path and name
The rest is the same.
Edit: The path to the new SC2Layout files is patch.SC2Archive/Mods/Core.SC2Mod/Base.SC2Data/UI/Layout/UI/
0
bump