1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  5. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  6. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Inventory & Equipment UI System v1.4.3

Submitted by TriggerHappy
This bundle is marked as approved. It works and satisfies the submission rules.
This is an extended Inventory and Equipment system. It allows any unit to have an unlimited (or limited) amount of items in their inventory.

An inventory window will pop up where you can manage or equip your items. The window is overlay onto the current camera, so it doesn't take you away from gameplay.

There are many things to configure in the Inventory trigger.

Full documentation coming soon™

Changelog

changelog

v1.4.3
  • Updated texttag positions to fit on patches 1.29.1+.
  • The selector glow is no longer shown when the inventory is closed.
  • The selector glow now longer shows in the middle of the screen on items with no equipment slot.
v1.4.2
  • Unofficial quick fix version for broken Blizzard patch.
v1.4.1
  • The selection glow no longer shows for the equipment window if it's not open.
  • Fixed a bug where a line of the tooltip might get overwritten.
  • Updated some items to have colored names.
  • Improved tooltip formatting.
v1.4.0
  • Updated the UserInterface library to 1.0.6. This fixes a desync (should be desync-free now).
  • Redesigned the interface layout to be more practical and compact.
  • You may now Right-Click to equip an item.
  • When selecting an item it will highlight and so will the corresponding equipment slot.
  • When socketing an item you can confirm it through a dialog (to prevent accidental socketing).
  • Added a Drop button which allows you to drop items from your inventory.
v1.3.4
  • Added different terrain heights and water levels to the demo.
  • Set dummy units movement type to float.
v1.3.3
  • Updated the UserInterface library to 1.0.5. This allows the the UI to be displayed over water.
  • Improved the default tooltip design.
  • Updated PlayerUtils to 1.2.8.
v1.3.2
  • Fixed a potential TimerUtils leak.
  • Reduced the default tooltip line length to support lower resolutions.
  • Adjusted default player name position on the hero window.
  • Updated PlayerUtils to v1.2.7.
v1.3.1
  • Tooltip position is now dynamic. It will popup over the item you clicked (see screenshot).
  • Equipment window is now bigger by default.
  • Many more configuration options added to the equipment window.
  • Removed timer timeout increment in favor of a static value (UI_REFRESH_RATE).
  • Renamed and organized custom imports.
  • The character model dummy is now destroyed when the equipment window is destroyed.
  • Updated UserInterface to v1.0.4.
  • Updated PlayerUtils to v1.2.6.
v1.3.0
  • Rewrote DGUI library and renamed it to "UserInterface". Many improvements were made here which will be announced in a separate thread.
  • Bonus abilities now preload properly, removing the initial lag when equipping an item.
v1.2.1
  • Number of sockets is now displayed in the tooltip.
  • Started rewrite of DGUI library.
  • Fixed a bug that could cause the removed gem bonus amount to be wrong when unequipping.
  • Fixed a bug where the timer timeout could end up below the minimum.
v1.2.0
  • Implemented socketing system.
  • New item type "gem" which can be socketed into gear items for bonus stats.
  • Unit no longer has to have vision of the inventory dummy units to be able to see it (dummies have sight now).
  • Fixed a potential desync in multiplayer.
v1.1.0
  • Added the option for items to have randomized stat values.
  • Implemented a parsing system which allows you to initialize items through a string.
  • Fixed a bug where items that added abilities when acquired (not equipped), wouldn't be removed.
  • Fixed a new bug (from v1.0.5) that wouldn't hide icons when switching pages.
v1.0.5
  • Added function "HERO_WINDOW_NAME" where you can configure what name is displayed in the equipment window.
  • onEquip/onUnequip are initialized to null to prevent a thread crash when they aren't used.
  • Moved equip/unequip event execution to their respective methods (opposed to on click functions).
  • Moved UnitDex check from DGUI library to the inventory & equipment structs.
v1.0.4
  • Fixed an issue where items could disappear and the camera wouldn't follow the unit when switching bag pages.
v1.0.3
  • Dummy units are created per-player instead of per-instance (drastically reduce dummy count).
  • X/Y variables are no longer constant (dynamically move window location).
  • Can now specify scale for models in the preview window.
  • Organized code and modules. Tooltip is now a separate module.
Previews
Contents

Inventory & Equipment System v1.4.1 (Map)

Inventory & Equipment System v1.4.3 (Map)

Reviews
KILLCIDE
Extremely powerful system, and a great example of what your User Interface library can do. As I mentioned in that thread, the logic behind it is beyond me, but I do see the amazing potential and usefulness of having this system in the database. With...
  1. GolluM_KoMe

    GolluM_KoMe

    Joined:
    Jun 15, 2008
    Messages:
    663
    Resources:
    7
    Models:
    1
    Skins:
    1
    Maps:
    4
    Template:
    1
    Resources:
    7
    "This, is a revolution"

    'Steve Jobs, from hell'
     
  2. Ady ICSDE

    Ady ICSDE

    Joined:
    Jun 16, 2016
    Messages:
    8
    Resources:
    0
    Resources:
    0
    it the same at the spells at import?
     
  3. Ady ICSDE

    Ady ICSDE

    Joined:
    Jun 16, 2016
    Messages:
    8
    Resources:
    0
    Resources:
    0
    i did as at the spells...and at the spells i.m blocking at trigger....how i make there?
     
  4. Eagle XI

    Eagle XI

    Joined:
    Mar 9, 2012
    Messages:
    1,360
    Resources:
    117
    Models:
    2
    Icons:
    109
    Packs:
    4
    Skins:
    2
    Resources:
    117
    well done looking replication of wow inventory in wc3, looking forward to an sensible documentation appearing so can be made use of.
     
  5. Lord_Marrowgrath

    Lord_Marrowgrath

    Joined:
    Aug 23, 2011
    Messages:
    646
    Resources:
    9
    Maps:
    5
    Template:
    4
    Resources:
    9
    Is it matches with your save & load system?
     
  6. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,709
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Updated, v1.0.5.
    • Added function "HERO_WINDOW_NAME" where you can configure what name is displayed in the equipment window.
    • onEquip/onUnequip are initialized to null to prevent a thread crash when they aren't used.
    • Moved equip/unequip event execution to their respective methods (opposed to on click functions).
    • Moved UnitDex check from DGUI library to the inventory & equipment structs.
    Anything that can be represented as an integer, which is anything, can be used with a save/load system.

    You can retrieve the items that are equipped like:

    Code (vJASS):

    local Equipment gear = Equipment[GetTriggerUnit()] // any unit

    call savecode.save(gear.item[0].id) // or something similar, and for the rest of the gear items
     
     
  7. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,709
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Updated, v1.1.0.
    • Added the option for items to have randomized stat values.
    • Implemented a parsing system which allows you to initialize items through a string.
    • Fixed a bug where items that added abilities when acquired (not equipped), wouldn't be removed.
    • Fixed a new bug (from v1.0.5) that wouldn't hide icons when switching pages.
    Example of the string parsing system:

    Code (vJASS):
    // Claws of Attack +15
    call InitEquipItem.execute('ratf', "Increases the attack damage of the Hero by 15 when worn.^type=weapon; class=1h; icon='D009'; cost=28; ^dmg=15;0;0;")
       
    // Robe of the Last Guardian
    call InitEquipItem.execute('I007', "Powerful magic robe.^type=armor; lvl=10; icon=B00Z; utype='Ulic'; cost=600; ^def=0;10;20; int=20;0;5; life=300;0;0;")


    It's potentially much shorter compared to the default way. It takes a bit more processing power so you should use .execute like above.

    The format is
    "Description ^parameter=value;  ^bonus=base;min;max;"


    The available keywords are:

    Paramaters: type, lvl, cost, abil, utype, icon, class
    Bonuses: dmg, def, str, agi, int, ias, hp, mana, manareg, sight, ms, lifereg
    Types: weapon, whield, armor, boots, bracers, gloves, belt, helm, pauldron, amulet, pants, ring, shield
    Class: 1h
     
  8. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,709
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Updated, v1.2.0
    • Implemented socketing system.
    • New item type "gem" which can be socketed into gear items for bonus stats.
    • Unit no longer has to have vision of the inventory dummy units to be able to see it (dummies have sight now).
    • Fixed a potential desync in multiplayer.
     
    Last edited: Feb 23, 2017
  9. Cyk

    Cyk

    Joined:
    Dec 22, 2016
    Messages:
    2
    Resources:
    0
    Resources:
    0
    Last edited: Feb 22, 2017
  10. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,709
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Updated, v1.2.1
    • Number of sockets is now displayed in the tooltip.
    • Started rewrite of DGUI library.
    • Fixed a bug that could cause the removed gem bonus amount to be wrong when unequipping.
    • Fixed a bug where the timer timeout could end up below the minimum.
    [​IMG]

    If someone is looking to review the system ignore code optimizations for now because I'm aware of many of them. I will get to it.

    I just answered that question two posts above yours.

    EDIT: in gui

    • Set EquipSlot to 5
    • Custom script: set udg_SomeInteger = integer(Equipment[udg_SomeUnit])
    • Custom script: set udg_ItemID = Equipment(udg_SomeInteger).item[udg_EquipSlot-1].id
    • Game - Display to (All Players) the text (Item in slot + EquipSlot + ItemID)
     
    Last edited: Feb 24, 2017
  11. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,709
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Updated, v1.3.0
    • Rewrote DGUI library and renamed it to "UserInterface". Many improvements were made here which will be announced in a separate thread.
    • Bonus abilities now preload properly, removing the initial lag when equipping an item.
     
  12. Ady ICSDE

    Ady ICSDE

    Joined:
    Jun 16, 2016
    Messages:
    8
    Resources:
    0
    Resources:
    0
    can you help me how to import it?pls
     
    Last edited: Mar 19, 2017
  13. Quilnez

    Quilnez

    Joined:
    Oct 12, 2011
    Messages:
    3,294
    Resources:
    37
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    2
    JASS:
    4
    Resources:
    37
    Imo, "Inventory & Equipment UI System" doesn't sound like a fitting name since this is a fully working full screen inventory system, not just the user interface. "Dynamic/Floating Fullscreen Inventory & Equipment System" might do it.
     
  14. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,709
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Except that it's not "fullscreen"?

    I don't know the name makes sense to me.

    "Inventory & Equipment UI"
     
    Last edited: Mar 8, 2017
  15. Quilnez

    Quilnez

    Joined:
    Oct 12, 2011
    Messages:
    3,294
    Resources:
    37
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    2
    JASS:
    4
    Resources:
    37
    Ah right. So maybe "Dynamic/Floating UI Inventory & Equipment System" will do.
     
  16. purparisien

    purparisien

    Joined:
    Jul 17, 2011
    Messages:
    624
    Resources:
    49
    Models:
    26
    Icons:
    11
    Maps:
    12
    Resources:
    49
    Very impressive system. I really like it. However, I've encounter some annoying bug. After some time, the game freezes when I open the inventory system. It's very annoying and I don't really know what does it.
     
  17. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,709
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    I have that fixed for the next version already. I also created a dynamic tooltip window, but I'm not sure if people would want it over the current setup.

    [​IMG]
     
  18. purparisien

    purparisien

    Joined:
    Jul 17, 2011
    Messages:
    624
    Resources:
    49
    Models:
    26
    Icons:
    11
    Maps:
    12
    Resources:
    49
    Maybe it makes more sense to combine the two spells : the inventory and the character. Most of the time, when I want to manage both at the same time.
     
  19. Ady ICSDE

    Ady ICSDE

    Joined:
    Jun 16, 2016
    Messages:
    8
    Resources:
    0
    Resources:
    0
    fuck sake....who can help me how to import...?i said it 2 times and nothink,...
     
  20. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,709
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    You either need to figure it out or wait until instructions and documentation are created. Basically just copy all object data and make sure the raw id's are correct.

    A new version is coming soon as well.