• 0

    posted a message on TWO 16 Slot Inventory, Always Open?

    In the data, you can only have 8 columns per row. What you do is set the following row to align next to the first row (see 9 slot inventory, button 08). Now, the size of the container is dependant on the size of the largest button. So what we do in this circumstance is set a faux button where no items can be stored (give it a item classes of "No item allowed" (create this and dont give the class to any item. hense, no item allowed lol).)

    In this case, it might take some tricky positioning, Set button 00 Width and Height to something like 800, then set the left min anchor to -800 or until its not visible anymore.  Now set Button 08 and button16 to anchor to left max of button 07 and button 15 respectivly. Then set button 17 to anchor to bottom min (I think?) of Button 01, and set Button 23 to anchor to left max, top min of button 22. I think that should do it.

    Posted in: UI Development
  • 0

    posted a message on TWO 16 Slot Inventory, Always Open?

    its hard if not impossible to reposition the actual containers (I couldnt manage without breaking ui functionality).

    You might want to consider this:
    2 containers, both have 1 row, 16 slots. Now when the inventories are always open, itll look like you want. Then just reposition the buttons so it looks like 2 groups of 8x2. Then set your container classes so it functions like you want.

    Container 1 = [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]      [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
    Container 2 = [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]      [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]

    Typically, you would set the anchor for the frame.
    In this case, if it worked normally, it would be:
    Note: (it doesnt work normally, and the positioning doesnt seem to work. you might have better luck though)

    <Frame name="Container00">
    <!-- container positioning via anchors-->
    </Frame>
    <Frame name="Container01">
    <Anchor side="top" relative="Container00" pos="Min" offset="0"/>
    <Anchor side="left" relative="Container00" pos="Max" offset="0"/>
    </Frame>

    Posted in: UI Development
  • 0

    posted a message on 9 Slot Inventory, Always Open

    I've updated the main code with cleaner code, more improvements, and more descriptive comments in the XML.

    Posted in: UI Development
  • 0

    posted a message on 9 Slot Inventory, Always Open
    Quote from kappyd23s: Go

    I'm trying to get this to work well with window re-sizing and without weirdness with offscreen buttons. For the inventory panel, why do you need to specify a height and width when you already have anchors? I would like everything to be relative, so is there a way around this?

    p.s. For any other noobs trying to figure this out, note that (0,0) is in the UPPER LEFT of the screen. This fooled me for a while. That means that when specifying anchors for Top and Bottom, 'min' and 'max' probably mean the opposite of what you expect.

    Update to keep it center: Remove the width/height (no its not really needed unless you absolutely want it a specific size regardless of resizing Set Right and Left pos to "mid" set the value to -300 for both. This should center it.

    Posted in: UI Development
  • 0

    posted a message on Dynamically changing from custom UI to standard UI in same map

    To get an answer, you usually have to elaborate on your question and what you're trying to accomplish.

    Posted in: UI Development
  • 0

    posted a message on 1.5 UI stuff demo 1: Control built-in UI stuff with trigger and Alway-Open inventory container panel
    Quote from kappyd23s: Go

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

    Posted in: General Chat
  • 0

    posted a message on 1.5 UI stuff demo 1: Control built-in UI stuff with trigger and Alway-Open inventory container panel
    Quote from kappyd23s: Go

    @DieHappy1234: Go

    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.

    Posted in: General Chat
  • 0

    posted a message on [XML] Inventory, items, powerups and more - Part 1

    @MacSC2: Go

    I'm not sure I understand the question?

    Posted in: Tutorials
  • 0

    posted a message on [Data] Button Tooltip Referencing
    Quote from thequiet: Go

    I couldn't find the info in your tutorial but I'd really love some help here. I made an "Agility" attribute, like the WC3 one, that increments in level. It's a behavior attribute and I want to reference it it's tooltip so a player can see the damage he can do. For example: "Ability does "Agilityx5" damage to target unit.

    When I reference my behavior attribute, the damage always stays at 0, even in-game.

    Note: There will always only be 1 copy of this unit on the map, so there won't be any interference with extra numbers. Help please! :x

    I dont know how you set your attribute, but you can use a combination of abilities, effects, and upgrades to achieve what you want. It's complicated but heres what I do:

    On level up, player clicks the "add agility button", the button is a learn ability, which triggers a "behavior ability". The behavior has an effect: initial of "Effect: Type: Set". The set effect links to 2 effects. 1 adds a stack to the "agility behavior", the other is an effect of type "Issue Order". The order is linked to a research ability, in this case lets call it "research upgrades". Index 0 is strength, 1 is intelligence, and 2 is agility. These link respectively to an upgrade which increases our dummy "Agility Behavior Count" effect's "add stack count" field. Then in the tooltip, we link the modifiers to our dummy effect, so <d ref="Behavior,Agility,Modification[0],FractionalDamage[Spell] * Effect,AgilityDummyCounter,StackCount"/>

    Breaking it down

    Ability: Learn->Ability: Behavior Ability:Behavior->Dummy Behavior for each level Dummy Behavior triggers Effect: Set Effect: Set -> Effect: Add 1 to Agility; Effect: Issue Order, Ability: Hero Research, Index 2 Ability: Hero Research->Agility Upgrade->Adds 1 to Effect: (Add behavior) Agility Counter Stack count

    Posted in: Tutorials
  • 0

    posted a message on [XML] Inventory, items, powerups and more - Part 1

    @MacSC2: Go

    I dont know xml well enough to do coding by it, but from the looks of it, its a basic inventory.

    You have 1 inventory ability, and 2 containers. container 1 is your "bag". Add however many slots you want (64 cap) container 2 is your "equipment". When you add slots to your equipment bag, make sure you check "equip". This should make your hero automatically equip the items when theyre moved. Also be sure to set the specific class you want. Ex. Wrists, Armor, Weapon, etc

    container 2 is the same as container 1 with a couple of differences. 1. Set the model you want and the size. The model is usually the unit thats selected (I think) 2. Strategic positioning: Note the locations of the item slots in the "equipment" bag. This is simply row and column positioning. In this case, he has the bag item slots (column,row) at locations 2,3; 3,4; 4,0; 4,7; 5,0; 5,7; 5,0; 5,8; 7,0; 7,2,;7,3; 7,4; 7,5; and 7,7

    Posted in: Tutorials
  • 0

    posted a message on 9 Slot Inventory, Always Open

    @Alevice: Go

    If you're looking for a map to dig into, Id recommend looking at renee's http://www.sc2mapster.com/forums/general/general-chat/40030-1-5-ui-stuff-demo-1-control-built-in-ui-stuff-with

    If you want to recreate the 9 slot inventory, the code above is there for you.

    Posted in: UI Development
  • 0

    posted a message on 1.5 UI stuff demo 1: Control built-in UI stuff with trigger and Alway-Open inventory container panel

    @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?

    Posted in: General Chat
  • 0

    posted a message on 1.5 UI stuff demo 1: Control built-in UI stuff with trigger and Alway-Open inventory container panel

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

    Posted in: General Chat
  • 0

    posted a message on 1.5 UI stuff demo 1: Control built-in UI stuff with trigger and Alway-Open inventory container panel
    Quote from petrov1: Go

    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

    Posted in: General Chat
  • 0

    posted a message on 9 Slot Inventory, Always Open

    @Helral: Go No, I meant actual inventory containers. The ones with 64 slots. The 6 slot InventoryButtons is hidden and only has 1 slot used in this example for the container. BTW Thanks for the epic xml listing. I've been using that the last 3 days trying to figure out xml. Couldn't have done it without it.

    The hookup doesn't exactly work as expected. By hooking up the panel, I gain controls over the hookup and the original UI panel, allowing me to show/hide it via dialog commands. - Show/Hide dialog item "Container" will show both the dialog item hookup, and the original UI container (woot! opening inventories through commands) - The Dialog Item wont work like a normal inventory. It'll look like the default, but it wont respond to clicks. - The Dialog item will not read any UI XML edits.

    What I've done is edit the default UI XML, and used the dialog hookup command as a means of repositioning the default UI some and then ordering it to show. What you're seeing is the default UI. All dialogs that its tied into are hidden. I hope that makes sense.

    Edit: Oh NOW he posts his code, 5 hours after I figure this out. lol.

    @Fullachain: Go Yes, actually the code I pasted was a updated version which has all inventory slots the same size. We basically fake the hookup, make the first container button HUGE, and then hide it out of the container with negative positioning. The inventory container is the size of the largest button *8 (so in this case, we make the first button 240, then adjust with -238 to hide). That makes the container big enough to accomidate 9 buttons with a size of 80. If you decreased the button size down to 70 you could probably fit 10 or 11. If you increased the first button size to around 300 you could probably fit 14+ on a single row.

    If you want the default look, (2 rows of 8) you dont have to do anything but increase the size of the buttons to what you desire (and remove the little XML snippet that repositions Slot07 next to Slot06)

    Using this method, I see no problems in designing whatever type/size of inventory you want. The only downside to this method is you lose 1 slot per container (which leaves you with a total of 378 workable inventory slots.

    Posted in: UI Development
  • To post a comment, please or register a new account.