• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

TasItemBag

This bundle is marked as pending. It has not been reviewed by a staff member yet.

Introduction


TasItemBag is a custom UI system/addition for Warcraft 3 V1.31 or higher, in vjass or Lua.
It adds additional item storage. An unit can still only equip 6 items (use their boni).

Details


The storage UI is a grid of buttons, each contains upto one item. One can scroll up and down by rolling the mouse wheel while the mouse points at the TasItemBag UI. The storage is only shown after you clicked the showbutton (default next to the inventory) and it can be closed/hidden again.

Any unit has it's own bag which can contain x amount of items (x can be choosen, but is a global rule).
TasItemBag works with default Warcraft 3 Items, only the items in the Warcraft 3 inventory count as equiped.
Equiping an Item can have requirements. Builtin requirements:
  • Item Level <= Hero Level
  • Unit has Ability x
  • Only x of each ItemClass at once
All can be turned off in the system settings
Units with "can not use items" inventory skills, allways pass requirements to equip (can be disabled and only works if you told TasItemBag of all used InventorySkills)
Item Level and needs Ability x can be displayed additional to the item's tooltip inside the bag.

TasItemBag sends items taken, into the bag. Dummy Units (Skill 'Aloc') are excluded. You can prevent this by setting a flag (udg_TasItemBagEquipNow) which you have to reset, when you are done. The systems uses the pick up event and delays the transfer using a 0s timer hence using the create item for hero api might not put the item into the bag.
GroupSelection is not supported, means it is "random" which unit's storage is displayed in group selection.
Non-Heroes drop all their storage on death.
Items in the storage will follow the unit's inventory drop on death flag (When you told TasItemBag about the used inventory-Skills, all default Inventory skills are covered Hero, 4xUnit + mule) and the item's value for that.

TasItemBag moves used items into the item storage (can be disabled).

How to install


Requiers Warcraft 3 1.31+ or higher
  • Copy the TasItemBag Folder (trigger Editor).
  • remove the Lua folder, if you are in jass mode. Or remove the vjass folder, if your map is in Lua mode.
  • If you want to use GUI, remove the unwanted script FIle in GUI Folder and enable the needed one.
  • export
    • war3mapImported\TasItemBag.fdf
    • war3mapImported\TasItemBag.toc
    • WHEN USING THE EXPORT ALL BUTTON, IT CAN HAPPEN THAT THE CONTENT OF THIS FILES SWAP
    • import them into your map
  • Installed

Credits


Nestharus
Bribe
Mayday

ChangeLog

1.3) ShowButton can close UI
1.2) UndropAble, SwapButton
1.1) Only Equip/Drop in the Bag UI for controlled Units.


Keywords: Bag, Inventory
Contents

TasItemBag (Map)

Level 11
Joined
Jul 4, 2016
Messages
627
About time someone made a public inventory system. Great stuff.

Regarding the non-hero drop all items upon death, is this a hard coded limitation? Will it be possible to make configurable, such as making specific items undroppable or droppable, or even specific units/unit types have droppable or undroppable items or even change configurations dynamically throughout.
 
Last edited:
Regarding the non-hero drop all items upon death, is this a hard coded limitation?
I did not add a config for this feature. Because when a non hero dies most times, then it was it for the unit and the items in the bag shouldn't be gone.

Will it be possible to make configurable, such as making specific items undroppable or droppable, or even specific units/unit types have droppable or undroppable items or even change configurations dynamically throughout.
Heroes drop items on death, when the item has the drop on death flag or the inventory skill has the drop on death flag (if you use a custom Inventory skill you need to add it to the config)
jass inside function UserInt
Lua inside the table InventorySkills.

As one can set this item/ability flags using triggers (set ability integer level field), object Editor I don't see a reason for TasItemBag to have such a Unit/Type setting.

In the demo map I changed the default Inventory (hero) skill to drop items on death.

I could check for the undroppable flag (item). What should happen in that case?



I forgot a critical feature hence: Updated to V1.1)
Added Player Control Check for using the Bag UI, In V1.0 one could drop/Equip for any unit.
Added a Function to get an Item in the TasBag TasItemBagGetItem, this functions does not remove it from the bag it only returns a reference to the item.
 
Level 11
Joined
Jul 4, 2016
Messages
627
I could check for the undroppable flag (item). What should happen in that case?
Thanks for the clarification.

For units, the items would just disappear with the unit. There are cases where you do not want certain items to drop, such as when facing a boss unit whose items are for him alone to use or if the unit is revivable, you do not want items to drop.

Also, will it be possible to allow items to be moved within the inventory? The ability to reorganize most used items at the top would reduce the time ones need to look for them in the inventory.
 
TasItemBag only moves items gained into the bag when none of the preventer is set ( there is one in GUI and one System own, I would prefere if one uses the GUI one from the outside) and at least 0s of game time passed. And then has conditions to equip an item from the bag into the normal warcraft 3 inventory.
A NPC boss has very limited usage of a Bag, outside from maybe showing drops.

I care about dropping items from the bag, this does not include the default Inventory as that is managed by warcraft 3.

I probably add a feature to swap 2 slots in the Bag (when I find a good way).
 
Level 2
Joined
Feb 24, 2020
Messages
11
I am trying to combine this with TriggerHappy's codeless load system but I am not even sure where to start. I am guessing that I have to loop through BagItem[] to save the item? Would you mind giving me a hint whether I am on the right path or not?
 
Level 11
Joined
Jul 4, 2016
Messages
627
Thanks for that feature.

I wonder is it possible to make a drag and drop feature similar to how the default items work in wc3 for the ui?
It can technically be done but you can’t really use the default wc3 inventory for it to work properly.
 
Level 8
Joined
May 19, 2016
Messages
146
Is it possible to put the item into the TasBag from the Hero Inventory ? or do i have to drop the Item everytime and pick it up again ?
 
Top