1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  3. Participate in Blizzard's Public Test Realm to give them feedback on the upcoming patches. Info is here.
    Dismiss Notice
  4. Take part in forum poll and decide the winner of Icon Contest #16!
    Dismiss Notice
  5. Congratulate the winners of the first ATC contest!
    Dismiss Notice
  6. Zwiebelchen is hosting a special UI texturing contest. Whomever wins will get a $150 reward through paypal! Come along and draw your texturing tools for the Fantastic Adventurer UI contest.
    Dismiss Notice
  7. Sneak, pickpocket and assassinate! Create a stealth map in Mini-Mapping Contest #14!
    Dismiss Notice
  8. Music Contest #8 - Hive Soundtrack is up! Create the soundtrack for the upcoming videos of Hive Workshop's YouTube Channel.
    Dismiss Notice

Easy Item Stack 'n Split v2.7.4

Submitted by Dangerb0y
This bundle is marked as approved. It works and satisfies the submission rules.
Easy Item Stack 'n Split v2.7.4
by Dangerb0y

FEATURES:
- Automatically stacks obtained items to an optional stack limit.
- Allows stacking items within a unit's inventory.
- Allows splitting item stacks within a unit's inventory.
- Allows units to seamlessly pick up items regardless of a full inventory.
- Copy-paste implementation.

STACKING ITEMS:
- Obtained items are automatically stacked with same-type items in a unit's inventory.
- Placing same-type items on top of each other will stack them together.

SPLITTING ITEMS:
- Double right-clicking or dropping an item stack on itself will split 1 off the pile. (optional)
- Consecutively split items will stack together. (optional)
- If a unit's inventory slots are full when splitting an item stack, the split item will be dropped on the ground in front of the unit. (optional)

ITEM STACKS:
- The maximum stack size is set by the item's level in the Object Editor (Shift+Double-click allows entering levels greater than 8).
- Setting an item's level to 0 will give it an unlimited stack size.
- Items must have charges in order to be stacked; non-charged items will function as Blizzard intended.

RELEASE NOTES:
- This system can be implemented into just about any map.
- This system is completely leak-free.
- This system is completely lag-free.
- This system is fully MUI and MPI.
- This system works with all inventory sizes.
- This system does NOT use hashtables or gamecache, i.e. it is much faster.
- This system is available in vJASS and GUI.

IMPLEMENTATION (vJASS):
1) Copy the trigger "EasyItemStacknSplit" to your Trigger Editor.
You must have JNGP + The Latest JassHelper to implement this version!

IMPLEMENTATION (GUI):
1) In map view, go to File > Preferences... and tick "Automatically create unknown variables while pasting trigger data" under the General tab.
2) Copy the trigger "EasyItemStacknSplitGUI" to your Trigger Editor.

UPDATING? Make sure to first delete old EasyItemStacknSplit triggers and, if you use the GUI version, all the variables with the "EasyItem" prefix.

How to remove WC3's Full Inventory error
1) Create a blank text document on your desktop and name it "blank.wav".
2) Import it with Import Manager and give it the custom path "Sound\Interface\Warning\Human\KnightInventoryFull1.wav".
Repeat this step for the following:
- "Sound\Interface\Warning\Orc\GruntInventoryFull1.wav"
- "Sound\Interface\Warning\Naga\NagaInventoryFull1.wav"
- "Sound\Interface\Warning\Undead\NecromancerInventoryFull1.wav"
- "Sound\Interface\Warning\NightElf\SentinelInventoryFull1.wav"
3) In map view, go to Advanced > Game interface... look for "Text - Message - 'Inventory is full.'" and put in a single space as its value.
4) Give yourself a firm yet gentle pat on the back. :)
What's changed?
v2.7.4:
--> Fixed a bug causing powerups to double up. Thank you to pks9067 for picking this up.
v2.7.3:
--> Added functionality for item stacks larger than their set stack size.
v2.7.2:
--> Fixed a split-stacking bug in GUI version. Thank you to xorkatoss for picking this up.
v2.7.1:
--> Fixed a stacking overflow bug in GUI version. Thank you to ABM for picking this up.
v2.7:
--> Consecutively split items now stack together!
--> Added parameters for split-stacking.
--> Majorly optimized GUI version.
v2.6.1:
--> Minor item cooldown incongruity fixed.
--> Minor code optimization.
v2.6:
--> Added parameter to enable/disable using item levels to determine stack limit.
--> Removed the full inventory error message. It's just not worth the ClearTextMessages.
--> Got rid of custom scripts in the GUI version where possible.
--> Reworked sounds a bit.
v2.5:
--> Modernized vJASS version a bit.
--> Condensed GUI version into a single trigger.
--> Fixed 1 or 2 potential bugs.
v2.4.2:
--> Another desync issue fixed (both versions). Looks like we're finally out of the woods.
v2.4.1:
--> System parameter added for enabling/disabling item split-dropping.
--> Desync issue fixed in GUI version. Thank you to gadina_prokleta for picking this up.
v2.4:
--> System parameter added for enabling/disabling item splitting.
--> System parameters added to GUI version.
--> Some much needed security added.
v2.3.2:
--> Timer cycle performance enhanced.
v2.3.1:
--> Minor lag issue fixed.
--> Some minor bugs fixed.
v2.3:
--> Optimized timer recycling.
--> Minor sound bugs fixed.
--> Some other important bugs fixed.
v2.2:
--> Major bug fix regarding desyncs in multiplayer maps.
--> Fixed a stacking issue in GUI version.
--> Minor code optimization.
v2.1:
--> Added the ability to have unlimited stack sizes by setting item level to 0.
v2.0.1:
--> Fixed minor sound bug in vJASS version.
--> Optimized code a bit more in vJASS version.
v2.0:
--> Completely revamped code to allow full inventory usage!
--> Removed the JASS version and added a vJASS version. Anyone coding in JASS should be doing it in vJASS anyway.
v1.7:
--> Optimized code slightly more.
--> Added GUI version for the GUIers.
v1.6:
--> Converted to JASS for better optimization and easier implementation.
--> Optimized code for slightly faster execution.
--> Added more comments.
v1.5:
--> Changed loops to use a set variable to avoid any conflict with other loops in a map. Thank you to Caedrus for picking this up.
v1.4:
--> Fixed a bug (which somehow created itself after months of working fine) causing items not to split properly. Thank you to 88WaRCraFT3 for picking this up.
v1.3:
--> Added several comments to the script to make it easier to understand.
v1.2:
--> Fixed a bug causing split-off-stack-and-auto-dropped items to be placed at position of unit instead of in front of it.
v1.1:
--> Fixed point leaks caused by creating items at points with polar offsets. This system is now 100% leak-free!
Thanks for stuff and things
+REP for anyone who finds a bug or leak for me to fix :)

Keywords:
item, stack, split, inventory, full, items, system, simple, easy, everything, unit, jass, vjass, gui, warcraft, editor, wc3
Contents

Easy Item Stack 'n Split v2.7.4 (Map)

Reviews
Moderator
11:23, 22nd Dec 2009 TriggerHappy: Review for Spell I suppose it can be useful for other GUI users. The other GUI ones IIRC aren't as advanced as this, therefor I will approve this. Status Feel free to message me here if you...
  1. Moderator

    Moderator

    Resources:
    0
    Resources:
    0
    11:23, 22nd Dec 2009
    TriggerHappy:
    Review for Spell
    I suppose it can be useful for other GUI users. The other GUI ones
    IIRC aren't as advanced as this, therefor I will approve this.
    Status
    Feel free to message me here if you have any issues with
    my review or if you have updated your resource and want it reviewed again.
    Approved
     
  2. X-OMG-X

    X-OMG-X

    Joined:
    Nov 10, 2008
    Messages:
    1,953
    Resources:
    15
    Icons:
    1
    Skins:
    3
    Maps:
    2
    Spells:
    8
    Template:
    1
    Resources:
    15
    Well. Looks cool from the description. Might be useful.
     
  3. Narandza

    Narandza

    Joined:
    Aug 30, 2008
    Messages:
    511
    Resources:
    33
    Models:
    16
    Icons:
    15
    Packs:
    1
    Maps:
    1
    Resources:
    33
    I think this is really great...
     
  4. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,471
    Resources:
    5
    Spells:
    5
    Resources:
    5
    There are loads of systems like this, only thing difrent here is that he has good eye atraction(the collors of the letters and screenshot) :p
     
  5. Dangerb0y

    Dangerb0y

    Joined:
    Oct 11, 2009
    Messages:
    41
    Resources:
    1
    Spells:
    1
    Resources:
    1
    You're right about the eye attraction :thumbs_up:, but i'm gonna have to disagree with you that there are loads of systems like this... i may be wrong, so if you can find a system like this (as easy to implement, completely bug & leak free, MUI & MPI, and as functional) please post a link so i can tell you why my system is still better :grin:
     
  6. NFWar

    NFWar

    Joined:
    Jul 27, 2008
    Messages:
    1,283
    Resources:
    224
    Models:
    1
    Icons:
    214
    Packs:
    1
    Skins:
    2
    Spells:
    6
    Resources:
    224
    6/5 from me. great idea.
     
  7. The_Witcher

    The_Witcher

    Joined:
    Dec 29, 2008
    Messages:
    229
    Resources:
    13
    Tools:
    1
    Spells:
    12
    Resources:
    13
    well if you ask me like that:grin::grin:
    :fp:My Bag and Advanced Item System
    It does the same as yours and many more things and you just need to implement 1 trigger without any variables...

    But know serious again:
    Your system is very good, too, most for GUI beginners which want to learn!!
     
  8. Dangerb0y

    Dangerb0y

    Joined:
    Oct 11, 2009
    Messages:
    41
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Yeah I've seen your system before. It has 1 or 2 kinks mentioned in the thread, but otherwise very nice. Still quite different to mine though.

    Thanks dude. That was pretty much what I was going for. Especially the GUI.
     
  9. Archangel_Tidusx

    Archangel_Tidusx

    Joined:
    Feb 24, 2007
    Messages:
    1,078
    Resources:
    9
    Models:
    1
    Icons:
    4
    Maps:
    4
    Resources:
    9
    Very useful but unoriginal system. It does look better than the rest, and caught my eye. I will definitely dl and use. 5/5
     
  10. Dangerb0y

    Dangerb0y

    Joined:
    Oct 11, 2009
    Messages:
    41
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Sure, it's definitely been done before, just not very well or efficiently from what I've seen... I guess the only real differences are quality and ease of use. Thanks for downloading and rating :)
     
  11. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,200
    Resources:
    16
    Maps:
    2
    Spells:
    14
    Resources:
    16
    It doesn't stack items if your inventory is full.

    If you have five stacks of 3 mana potions, and one stack of one mana potion, and you try to pick up more potions, it doesn't stack them. It just says inventory full.

    But I guess there's no way around it unless you base the thing around runes.
     
  12. Archangel_Tidusx

    Archangel_Tidusx

    Joined:
    Feb 24, 2007
    Messages:
    1,078
    Resources:
    9
    Models:
    1
    Icons:
    4
    Maps:
    4
    Resources:
    9
    I believe that's because you never changed the max level of the mana potion.

    Read the system.
     
  13. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,200
    Resources:
    16
    Maps:
    2
    Spells:
    14
    Resources:
    16
    Well the level is 3 by default, so it should stack up to 3 potions in the same stack. However if my inventory is full, and I try to pick up a stack of two potions, it doesn't pick it up, even though there is one inventory slot with only one mana potion.
     
  14. Archangel_Tidusx

    Archangel_Tidusx

    Joined:
    Feb 24, 2007
    Messages:
    1,078
    Resources:
    9
    Models:
    1
    Icons:
    4
    Maps:
    4
    Resources:
    9
    i guess the simple way around that would be:
    Drop both stacks.
    Pick up stack of 2
    Pick up stack of 1
    Problem solved. I mean.. the system still is more than what wc3 does for you.
    It doesn't tie your shoes and beat halo 3 on legendary for you though.
     
  15. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,200
    Resources:
    16
    Maps:
    2
    Spells:
    14
    Resources:
    16
    The simple way around it for me would be to use my own system :)
     
  16. Archangel_Tidusx

    Archangel_Tidusx

    Joined:
    Feb 24, 2007
    Messages:
    1,078
    Resources:
    9
    Models:
    1
    Icons:
    4
    Maps:
    4
    Resources:
    9
    Wahey! Problem solved..
     
  17. Dangerb0y

    Dangerb0y

    Joined:
    Oct 11, 2009
    Messages:
    41
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Yeah, the plan for this system was never really to solve the full-inventory-stacking problem, its purpose is just to add some much needed inventory capabilities to any map with little effort, and to be easily understandable by the average GUIer. A while ago i coded a system based on this one that gets around the full inventory problem, both with picking up and buying items, but as you mentioned, Maker, it works with runes which makes implementing it not so "easy" anymore...

    I'm still on the lookout for easier ways of overcoming the full inv problem, so if you have a link to your system please post it so we can take a look.
     
    Last edited: Dec 24, 2009
  18. The_Witcher

    The_Witcher

    Joined:
    Dec 29, 2008
    Messages:
    229
    Resources:
    13
    Tools:
    1
    Spells:
    12
    Resources:
    13
    Well I found a way... if youre still looking for a solution, tell me and i'll help you
     
  19. Dangerb0y

    Dangerb0y

    Joined:
    Oct 11, 2009
    Messages:
    41
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Sure, what you got?