Is there a simple way to switch between protoss, terran and zerg UIs after a game has started? Preferably something that doesn't involve creating new layout files...but I am open to any suggestions.
It's probably possible to switch the console models out during a game. I can think of one method, but it would require layout files to set up a different template for each race. I will test later.
Changing out everything, however, like the button colors, would require tons of work and might not be possible in some cases.
After some complicated testing, I figured out that it's possible.
I can explain it to you, or I can just create the entire thing. It would take a lot of work though, so before I do I want to know what it's for (and not just a waste of my time).
Otherwise, the brief explanation is that you have two options: create templates for each race UI, and use the "create dialog item from template" trigger action to swap out to the various races...
Or, you can use the layout files to actually just create each race UI, and hide them offscreen - then use the "hookup standard dialog item" action to get them and move them onscreen when so desired.
The purpose is the GameHeart overlay. I use an in-game lobby for the overlay and I would like to allow players to change their race in the lobby. Of course, I can do this easily enough but when they do their UI may not necessarily match the race they are playing. Someone has suggested to be that this might actually be a feature, as a lot of people find the protoss and to a lesser extent the zerg UIs to be really obnoxious.
The other option is to just not allow players to change their race in the in game lobby and require them to do it before the game starts.
Problems with swapping the UI that I hadn't previously considered are things like game sounds... having a zerg ui with terran sounds might be really strange.
I wouldn't go through all the work, I am not sure what I am going to do yet and I don't want you to work so hard on something that may not even be used.
I personally find the Zerg UI most annoying. Big annoying tentacles wrapping around it.
Anyways, it shouldn't be that difficult now that I have most of the "research" done. I'll throw it together for you. It'll have a few imported SC2Layout files, and I'll make an action definition for changing the UI race for a player group.
I only made the console change race, but it is conceivable to make all the elements change, including the buttons etc. I thought this would be a good demo, and if you like it, I can work more, but if you don't, then I can simply consider it a learning experience.
You can view the layout files used in the UI module, of course.
That's pretty cool. I did notice something strange with it though. The lighting and the colors are different on your UIs that are swapping than the normal UIs. I made a quick gif to demonstrate what I am talking about:
I thought I might also post a couple of images of the GameHeart overlay for you to see so you can understand it's not a project that will never happen, it's actually pretty much finished. At this point I am mostly just rewriting some sections of code that are old and not as efficient as they could be.
The features include stuff like a telestrator for casters/observers to use, adding league and team logos in the bases/map, zooming out really far to get more of the action in, multiple layouts for observers to choose from, built in scoreboards....and many more features to make the lives of tournament organizers and broadcasters easier.
Anyways that is mostly just to answer your "I want to know what it's for" question and hopefully to demonstrate it isn't a complete waste of time.
I did notice that. I think it might have something to do with the the "HDR" tag in the layout. The normal console panel layout is also tagged "HDR", but I still feel like it's the only reasonable explanation for this change in lighting and detail.
I'm gonna try removing that tag and see what happens.
Your project is amazing! So much detail. Do you have a project page? I want to see how this progresses.
Edit: Removing the HDR tag did indeed make the console models appear at least closer to as they normally do, but it also made the other UI elements (minimap etc.) render beneath them. That could be fixed, though. For now, I have to go.
Here's the other method of doing it that I discussed. I think it looks normal now, for the most part.
To me, though, it really doesn't seem necessary. You can have them select their race in-game but I think they'll probably join the lobby with their desired race anyways.
Well, I tried changing the color and render type values to no avail.
The problem could be that unlike the original console models, these ones are inside of frames inside of the console panel. I have no idea if it's true, just a guess. If it is the case then the solution would be to move the new models directly into the console panel modification and hook up every model.
Is there a simple way to switch between protoss, terran and zerg UIs after a game has started? Preferably something that doesn't involve creating new layout files...but I am open to any suggestions.
@rtschutter: Go
It's probably possible to switch the console models out during a game. I can think of one method, but it would require layout files to set up a different template for each race. I will test later.
Changing out everything, however, like the button colors, would require tons of work and might not be possible in some cases.
After some complicated testing, I figured out that it's possible.
I can explain it to you, or I can just create the entire thing. It would take a lot of work though, so before I do I want to know what it's for (and not just a waste of my time).
Otherwise, the brief explanation is that you have two options: create templates for each race UI, and use the "create dialog item from template" trigger action to swap out to the various races...
Or, you can use the layout files to actually just create each race UI, and hide them offscreen - then use the "hookup standard dialog item" action to get them and move them onscreen when so desired.
The purpose is the GameHeart overlay. I use an in-game lobby for the overlay and I would like to allow players to change their race in the lobby. Of course, I can do this easily enough but when they do their UI may not necessarily match the race they are playing. Someone has suggested to be that this might actually be a feature, as a lot of people find the protoss and to a lesser extent the zerg UIs to be really obnoxious.
The other option is to just not allow players to change their race in the in game lobby and require them to do it before the game starts.
Problems with swapping the UI that I hadn't previously considered are things like game sounds... having a zerg ui with terran sounds might be really strange.
I wouldn't go through all the work, I am not sure what I am going to do yet and I don't want you to work so hard on something that may not even be used.
@rtschutter: Go
I personally find the Zerg UI most annoying. Big annoying tentacles wrapping around it.
Anyways, it shouldn't be that difficult now that I have most of the "research" done. I'll throw it together for you. It'll have a few imported SC2Layout files, and I'll make an action definition for changing the UI race for a player group.
Here's what I came up with.
I only made the console change race, but it is conceivable to make all the elements change, including the buttons etc. I thought this would be a good demo, and if you like it, I can work more, but if you don't, then I can simply consider it a learning experience.
You can view the layout files used in the UI module, of course.
I suggest simply viewing it in game first.
That's pretty cool. I did notice something strange with it though. The lighting and the colors are different on your UIs that are swapping than the normal UIs. I made a quick gif to demonstrate what I am talking about:
I thought I might also post a couple of images of the GameHeart overlay for you to see so you can understand it's not a project that will never happen, it's actually pretty much finished. At this point I am mostly just rewriting some sections of code that are old and not as efficient as they could be.
https://dl.dropbox.com/u/49867307/Overlays/countdown_01.jpg
https://dl.dropbox.com/u/49867307/Overlays/lobby_04.jpg
https://dl.dropbox.com/u/49867307/Overlays/upgradeicons.jpg
https://dl.dropbox.com/u/49867307/Overlays/ingamelogo10.jpg
https://dl.dropbox.com/u/49867307/Overlays/drawing.jpg
The features include stuff like a telestrator for casters/observers to use, adding league and team logos in the bases/map, zooming out really far to get more of the action in, multiple layouts for observers to choose from, built in scoreboards....and many more features to make the lives of tournament organizers and broadcasters easier.
Anyways that is mostly just to answer your "I want to know what it's for" question and hopefully to demonstrate it isn't a complete waste of time.
@rtschutter: Go
I did notice that. I think it might have something to do with the the "HDR" tag in the layout. The normal console panel layout is also tagged "HDR", but I still feel like it's the only reasonable explanation for this change in lighting and detail.
I'm gonna try removing that tag and see what happens.
Your project is amazing! So much detail. Do you have a project page? I want to see how this progresses.
Edit: Removing the HDR tag did indeed make the console models appear at least closer to as they normally do, but it also made the other UI elements (minimap etc.) render beneath them. That could be fixed, though. For now, I have to go.
Strange that it would change the render priority of the objects.
I do not have a project page, but I will probably make one in a couple of days when I have a new video to demonstrate the features.
@rtschutter: Go
Here's the other method of doing it that I discussed. I think it looks normal now, for the most part.
To me, though, it really doesn't seem necessary. You can have them select their race in-game but I think they'll probably join the lobby with their desired race anyways.
Yeah that definitely looks closer to the normal UI than it did previously. I wonder if the lighting is related to the map?
Thanks MasterWrath. Has anyone been able to figure out how to fix the lighting when swapping out the UI? It just show up darker
@DrHu: Go
You need to use the second file I attached. That one looks normal.
Edit: Oh wait, it looks dark now too... That's strange. When I first uploaded it the colors looked right to me.
@MasterWrath: Go
Well that sucks. this seems like it shouldnt even be problem when using the hook event. A bug? Since it did work fine before
@DrHu: Go
I could be remembering it wrong.
I'll look to see if there's any way to improve it later.
Well, I tried changing the color and render type values to no avail.
The problem could be that unlike the original console models, these ones are inside of frames inside of the console panel. I have no idea if it's true, just a guess. If it is the case then the solution would be to move the new models directly into the console panel modification and hook up every model.
No way to fix this? Would help really a lot with custom races!
@alfx01: Go
might this help you? http://www.sc2mapster.com/forums/development/triggers/69256-dynamically-change-race-of-button-solved/