Dialog Based Asset System

Dialog Based Asset System

File Details

Dialog Based Asset System (DBAS) - Beta (v1)

  • B
  • Mar 3, 2012
  • 656.50 KB
  • 346

File Name

Dialog_Based_Asset_System__DBAS_.SC2Lib

Supported Versions

    Revision 1

    New Features

    Equip on Pickup

    Items will equip first upon pickup if possible.

    Dropping Distance Calculated

    Dropping items will now be based on a calculated angle and max distance. So clicking a specific point to drop an item is meaningful.

    Initial Branch from Public Domain

    New Features

    Toggle Equipment/Inventory Dialog

    Added two public functions "Toggle Equipment Dialog" and "Toggle Inventory Dialog". Hook these up to your own buttons or abilities to trigger the display of a beautiful interface :)

    Full Inventory Handling

    Handling a full inventory was not completed. Now it removes the item from the actual inventory and creates a new one on the floor.

    Dragged Item Preview

    Dragged Item Panel now has a 100x100 image preview of the button of the item. I'm not sure if it should be resizable or how it should look but it's an early beta I suppose.

    Bug Fixes

    Import Errors

    Importing the library causes the "Inventory Item Clicked" trigger to break. I fixed it by removing the Set Catalog for Cursor action. I'm not sure why this doesn't work but I'm guessing it has something to do with not hiding the cursor.

    Equipping on Double Click

    Double clicking on an item which may be equipped will cause it to become equipped but not show on the equipment dialog. Added a used item check to make sure the item was removed upon use. If not, the item is removed and no longer removed from dragging. Thus you will hold and put down your weapon if you try to double click it. This fix would break stacked items if that is implemented in your asset system.

    Sticky Tooltips

    Tooltips would stick around for long periods of time after I have picked up and moved or dropped the item. Now tooltips are removed by destroying the dialog item creating it and remaking that dialog item. Please let me know if you know a better way to do this properly.

    "ZealotInventory"

    In trigger "Inventory Item Clicked": UnitIssueOrder(lib2_gv_inventories[EventPlayer()].lv_linkedUnit, OrderTargetingItem(lib2_gf_AbilityCommand("ZealotInventory", 3), UnitInventoryLastCreated()), c_orderQueueAddToFront); This trigger references the ability "ZealotInventory" which does not exist in most maps. This has been fixed to reflect the current unit's inventory ability whatever that may be: UnitIssueOrder(lib1_gv_inventories[EventPlayer()].lv_linkedUnit, OrderTargetingItem(lib1_gf_AbilityCommand((lib1_gf_GetInventoryAbility(EventPlayer())), 3), UnitInventoryLastCreated()), c_orderQueueAddToFront);

    Known Issues

    • Attempting to pick up an item when your inventory is full will recreate the item on top of you.
    • Sometimes items can get trapped in the equipment dialog (please tell me how you did this)