Dialog Based Asset System (DBAS) - Beta (v2)
Details
-
FilenameDialog_Based_Asset_System__DBAS_.SC2Lib
-
Uploaded by
-
UploadedMar 4, 2012
-
Size791.11 KB
-
Downloads632
-
MD55e60e90f8272e33930d1a3cbeea826d4
Changelog
Revision 2
New Features
Drop In Front
When the inventory is full and you attempt to pick up another item, it will recreate the item in-front of you. This may be toggled using the public api action "Set Full Inventory Drop Location". There are two presets as options.
Item Level Restrictions
Set the value of the "Item Data Type"::Level to the appropriate level requirement for your unit. This requires your unit to have a behavior known as "Veterancy." The level requirement will show in red in the description upon drag if your unit is unable to equip this item.
- Warning: This reintroduces the minor graphical bug for items which are too high for your hero's level. An equipped item icon will briefly appear in your unit's statuses if the item is too high for your unit to use upon pickup and there is an empty slot in this unit's equipment slots for this item.
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
- Sometimes items can get trapped in the equipment dialog (please tell me how you did this)