At last, I still haven't get enough time to create a english version tutorial to explain how to control the built-in UI in Starcraft II.
I'm a chinese, so I need to write the tutorial of the UI stuff series in CN community first, and then translate it into english. But this tutorial series has four parts, and so far, I had only did the part 1 of the series in chinese:
And the most important thing is: I'm really busy these days, and never sleep before 4:00 AM.
But last day when I check my PM in sc2mapster, I saw too many people ask me to just put a demo here. So I decide that I just throw the demo map of the tutorial series part 1 here, and see if I could get any time to explain the whole system in futhure(you can have a look at the chinese verion of p1 if you know how to use the google translate though, the article is very long)
This demonstrate map shows how you make the built-in inventory container panel to be always displayed. With this feature, you can create at most 6x8x8=384 extra "ability slots" in your interface, and change the "abilities"(items) in these slots dynamicly. So we are no longer in need of a offical version of UnitAddAbliity() function (I doubt blizzard would ever create such a function in SC2)
This map aslo shows you how to capture the events of built-in UI elements. In this demo, when ever you mouse enter/click/leave a command button in unit's command panel, there would be debug message to tell you that the trigger has captured these events.
There are just two most easy example, and if you can understand them, then you can capture the event's of any UI element if you want, and modify them with trigger dynamicly just like they are normal dialog items.
And this demonstrate map is just for the part 1 of the whole tutorial series. Expect more fantastic stuff, provide I can get enough free time in the future... :(
Interestnig. I would like to learn more about new inventories. But already it seems I need to redo my inventory UI for my map, just cause now you can do more tricks with they inventory.
This is quite nice. But I think I will still just use dialog + trigger, than UI + data. :D
(hmmm however your way, you can drag-drop abilities (items). hmmm)
Yea, now you can also set the "aoe cursors" for these item abilities, which make it even better.
And controling the inventory panel is just a example, 1.5 allows you to control almost all offical UI elements with triggers.
Since the tutorial would have 4 part, part 2 to would be some advanced tricks like how to dynamicly change the tooltips for every single items/command buttons(would be great while create Randomized Item system) and create/control the cooldown anim effects; Part 3 would be how to override unit status bar UI. Part 4 would be a more advanced mix of trigger and UI override stuff - at least that is what I have planed, just don't know when can I write them out.
Well, you are the one who send me PM last day and ask me to post the demo right? But now it seems you think I posted it too late - you express this both in PM and in forum posts.
Acutaly I posted it one month ago in my CN site, so if you just searh for "Hookup Standard Dialog Item" in google , you can find the CN version tutorial and the demo more earlier.
And "Hookup Standard Dialog Item" doesn't exist prior to 1.5.
In 1.4.4 you just have a "Hookup Dialog Item" action which allows you hookup templates in dialog items, which would never be perfect when you want to display inventory panels, many parts of the duplicated template are non-functional.
@Renee2islga: Go
I did ask for a demo, but you did post too late for my needs. I tend to take initiative to figure things out and I couldn't wait an indefinite amount of time for your response. No offense meant and that doesn't mean the community cant benefit from your efforts in 1.5.
I wish your site did come up in google, but it didn't for me and I went through about 20 different resources and tutorials searching for an answer. Perhaps you have custom search filtering turned on which would favor your site? It would have been nice if you had posted a link to your CN site when you posted originally as it would have saved me a lot of headache. Speaking of which, can you post a link to your site now for future reference?
I know Hookup Standard doesnt exist prior to 1.5.
In 1.4.4, Hookup Dialog Item does work, you just have to think outside the box. It works the same way "Hookup Standard" does, in that it links the UI item to the dialogs. In that way, theyre similar and you can use it to show/hide the default UI. As for the panel thats created, you hide that one because you're right, the cloned panel isnt fully functioning.
Any hey, credit where credit is due. Thanks for the 1.5 info. When it's released I'll be able to tidy up some code thanks to the info.
I already posted the link in OP. Maybe this is caused by google's region setting but have you put " " marke outside of the key word "Hookup Standard Dialog Item" when search?
And yea, the code in you post DOES work. And I know it would work because it is exactly what I want to say in tutorial p2. The whole concept of my tutorial is "UI and dialog item are essentially the same things"
Because "Hookup Standard Dialog Item" is more easy to be undersand, so I put it in P1.
But the "non-functional" I said in #9 isn't refering to your code in your thread, but what you said in this thread - duplicating the panel with "Create Dialog Item From Template" doesn't really works.
You can use the "Hookup Dialog Item" + "$parent" to hookup official UI, but it has nothing to do with the duplicated panel, you doesn't even need to do the duplicate step.
Ah, typing it in quotes worked and pulled it up. Then again, at the time I didn't know what action to look for so that could be why.
In #9, I did say you had to hide it as a dummy though ;)
I look forward to the additional information with "Hookup Dialog Item" + "$parent". The more information we have on this the better. Perhaps I could help you to make a comprehensive tutorial and/or translate some?
Is it possible to use the items via hotkeys rather than clicking them individually by mouse? I'm having difficulty understanding the actual mechanism for this. Like Renee mentioned in OP, this would be able to simulate the Add Ability function from Warcraft3, which is essentially what I'm trying to accomplish. Or is that what's going to be in parts 2-4?
Is it possible to use the items via hotkeys rather than clicking them individually by mouse? I'm having difficulty understanding the actual mechanism for this. Like Renee mentioned in OP, this would be able to simulate the Add Ability function from Warcraft3, which is essentially what I'm trying to accomplish. Or is that what's going to be in parts 2-4?
It looks like you can set the hotkeys for container slots in 1.5. This is however, unconfirmed, and it looks like there has to be a unit with a inventory container. Check the menu options. When I pulled it open, I had options to hotkey container slots 0-8.
Could you elaborate on how I would go about dynamically changing the ability in a command card slot (or other dialog button) using triggers?
I dont think this thread is aimed at covering "how to create your own UI", just "How to set it up".
That being said, what are you trying to do? From the sounds of it your question is more data (not UI) related.
Is it possible to use the items via hotkeys rather than clicking them individually by mouse? I'm having difficulty understanding the actual mechanism for this. Like Renee mentioned in OP, this would be able to simulate the Add Ability function from Warcraft3, which is essentially what I'm trying to accomplish. Or is that what's going to be in parts 2-4?
Sorry for not response for a long time.
Yea, this is something I want to talk about in the furture parts.
But you can do inventory item hotkey by overrride the item button frame, and add such a line in each of it. just like
<Shortcut val="@UI/C1Slot00"/>
I think there are detail tutorials about how to overrride sc2layout in this site already, so you can do it.
You can actually browse enemy's inventory with this.
Just select a enemy hero, and then use the functions above to open the inventory panel, then you can see enemy's items.(But cannot use them of course :) )
At last, I still haven't get enough time to create a english version tutorial to explain how to control the built-in UI in Starcraft II.
I'm a chinese, so I need to write the tutorial of the UI stuff series in CN community first, and then translate it into english. But this tutorial series has four parts, and so far, I had only did the part 1 of the series in chinese:
http://bbs.islga.org/read-htm-tid-1038317.html
And the most important thing is: I'm really busy these days, and never sleep before 4:00 AM.
But last day when I check my PM in sc2mapster, I saw too many people ask me to just put a demo here. So I decide that I just throw the demo map of the tutorial series part 1 here, and see if I could get any time to explain the whole system in futhure(you can have a look at the chinese verion of p1 if you know how to use the google translate though, the article is very long)
This demonstrate map shows how you make the built-in inventory container panel to be always displayed. With this feature, you can create at most 6x8x8=384 extra "ability slots" in your interface, and change the "abilities"(items) in these slots dynamicly. So we are no longer in need of a offical version of UnitAddAbliity() function (I doubt blizzard would ever create such a function in SC2)
This map aslo shows you how to capture the events of built-in UI elements. In this demo, when ever you mouse enter/click/leave a command button in unit's command panel, there would be debug message to tell you that the trigger has captured these events.
There are just two most easy example, and if you can understand them, then you can capture the event's of any UI element if you want, and modify them with trigger dynamicly just like they are normal dialog items.
And this demonstrate map is just for the part 1 of the whole tutorial series. Expect more fantastic stuff, provide I can get enough free time in the future... :(
Video of this demo map:
Some core triggers in this demo map:
Not sure if it is enough tough... so if you have any questions you can post them here...
This is quite nice. But I think I will still just use dialog + trigger, than UI + data. :D
(hmmm however your way, you can drag-drop abilities (items). hmmm)
Interestnig. I would like to learn more about new inventories. But already it seems I need to redo my inventory UI for my map, just cause now you can do more tricks with they inventory.
Yea, now you can also set the "aoe cursors" for these item abilities, which make it even better.
And controling the inventory panel is just a example, 1.5 allows you to control almost all offical UI elements with triggers.
Since the tutorial would have 4 part, part 2 to would be some advanced tricks like how to dynamicly change the tooltips for every single items/command buttons(would be great while create Randomized Item system) and create/control the cooldown anim effects; Part 3 would be how to override unit status bar UI. Part 4 would be a more advanced mix of trigger and UI override stuff - at least that is what I have planed, just don't know when can I write them out.
Didn't like how items were handled by blizzard back when I first tried to use them. Maybe a decent tutorial will make me like them again :D
But it doesn't seem that you can bind hotkeys to items? (T for storm in map doesn't work).
Since you know much more about this than I do, can't wait to see parts 2-4.
So now it´s possible to place buildings with dialog items?
Btw thx Renee for working your ass off, just to show us galaxy noobs how to use the new functions!
This is also possible in 1.4.4 by using hookup in panel. Same thing, just duplicates the panel (non-functioning) which you then hide as a "dummy" See http://www.sc2mapster.com/forums/development/gui/40021-9-slot-inventory-always-open/#p4
Well, you are the one who send me PM last day and ask me to post the demo right? But now it seems you think I posted it too late - you express this both in PM and in forum posts.
Acutaly I posted it one month ago in my CN site, so if you just searh for "Hookup Standard Dialog Item" in google , you can find the CN version tutorial and the demo more earlier.
And "Hookup Standard Dialog Item" doesn't exist prior to 1.5.
In 1.4.4 you just have a "Hookup Dialog Item" action which allows you hookup templates in dialog items, which would never be perfect when you want to display inventory panels, many parts of the duplicated template are non-functional.
@Renee2islga: Go I did ask for a demo, but you did post too late for my needs. I tend to take initiative to figure things out and I couldn't wait an indefinite amount of time for your response. No offense meant and that doesn't mean the community cant benefit from your efforts in 1.5.
I wish your site did come up in google, but it didn't for me and I went through about 20 different resources and tutorials searching for an answer. Perhaps you have custom search filtering turned on which would favor your site? It would have been nice if you had posted a link to your CN site when you posted originally as it would have saved me a lot of headache. Speaking of which, can you post a link to your site now for future reference?
I know Hookup Standard doesnt exist prior to 1.5.
In 1.4.4, Hookup Dialog Item does work, you just have to think outside the box. It works the same way "Hookup Standard" does, in that it links the UI item to the dialogs. In that way, theyre similar and you can use it to show/hide the default UI. As for the panel thats created, you hide that one because you're right, the cloned panel isnt fully functioning.
Any hey, credit where credit is due. Thanks for the 1.5 info. When it's released I'll be able to tidy up some code thanks to the info.
Well, never mind, I think I was just irritable.
I already posted the link in OP. Maybe this is caused by google's region setting but have you put " " marke outside of the key word "Hookup Standard Dialog Item" when search?
And yea, the code in you post DOES work. And I know it would work because it is exactly what I want to say in tutorial p2. The whole concept of my tutorial is "UI and dialog item are essentially the same things"
Because "Hookup Standard Dialog Item" is more easy to be undersand, so I put it in P1.
But the "non-functional" I said in #9 isn't refering to your code in your thread, but what you said in this thread - duplicating the panel with "Create Dialog Item From Template" doesn't really works.
You can use the "Hookup Dialog Item" + "$parent" to hookup official UI, but it has nothing to do with the duplicated panel, you doesn't even need to do the duplicate step.
@Renee2islga: Go
Ah, typing it in quotes worked and pulled it up. Then again, at the time I didn't know what action to look for so that could be why.
In #9, I did say you had to hide it as a dummy though ;)
I look forward to the additional information with "Hookup Dialog Item" + "$parent". The more information we have on this the better. Perhaps I could help you to make a comprehensive tutorial and/or translate some?
Is it possible to use the items via hotkeys rather than clicking them individually by mouse? I'm having difficulty understanding the actual mechanism for this. Like Renee mentioned in OP, this would be able to simulate the Add Ability function from Warcraft3, which is essentially what I'm trying to accomplish. Or is that what's going to be in parts 2-4?
I would like to know this as well.
It looks like you can set the hotkeys for container slots in 1.5. This is however, unconfirmed, and it looks like there has to be a unit with a inventory container. Check the menu options. When I pulled it open, I had options to hotkey container slots 0-8.
@Renee2islga: Go
Could you elaborate on how I would go about dynamically changing the ability in a command card slot (or other dialog button) using triggers?
I dont think this thread is aimed at covering "how to create your own UI", just "How to set it up". That being said, what are you trying to do? From the sounds of it your question is more data (not UI) related.
Sorry for not response for a long time.
Yea, this is something I want to talk about in the furture parts.
But you can do inventory item hotkey by overrride the item button frame, and add such a line in each of it. just like <Shortcut val="@UI/C1Slot00"/>
I think there are detail tutorials about how to overrride sc2layout in this site already, so you can do it.
A additional information:
You can actually browse enemy's inventory with this.
Just select a enemy hero, and then use the functions above to open the inventory panel, then you can see enemy's items.(But cannot use them of course :) )
@Renee2islga: Go
I'm still not sure how to add hotkeys for the inventory slots. Even going to the menu in-game and assigning hot keys does not work for some reason.