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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. 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.

[vJass] (System) CustomInventory

Submitted by Anachron
This bundle is marked as approved. It works and satisfies the submission rules.
By far the biggest inventory system for Warcraft 3.
It's designed to have optional features, like FullScreenInventory-UI.

With a little bit of modification you can use this Inventory System in the normal Warcraft 3 Inventory too.

It is written in vJASS and has the following features:
- 12 Slot Equipment
- MPI
- Very flexible
- Easy to add bonuses to items
- Item Stacking
- Item Forging
- Item Sets (With bonuses)
- Inventory fixes warcraft 3 bugs (Double pickup bug)
- Fast
- Gives the ability to add your own areas with a little bit of code

A small note on the classes:
Basic readme for developers

##############################################################################
# USER INTERFACE - CUSTOM WINDOW
##############################################################################
---------------
CWDestructable
---------------
It's an object that has an destructable for a local player.
(Such as icons, borders and more)

---------------
CWTrackable
---------------
This is basically an object that triggers player events for hovering the icons (CWDestructable).
Whenever an event occurs, it fires an action to the CustomWindow

---------------
CustomWindow
---------------
A collection of CWTrackable and CWDestructable. Every destructable will have an trackable object.
So whenever you hover over or click a trackable, this will be fired.
You will use this object to create hooks to the inventory system.

##############################################################################
# CUSTOM WINDOW - HOOK AND EXTENDING
##############################################################################

---------------
CIAll
---------------
This is a container object of items. It has conditions for pickup and drop and is the base
class for any container, like Slots, Potions, Equipment or even spell slots that you could create!
It has a variety of methods like adding, removing and checks and throws errors.

---------------
CIActions
---------------
This is a library which only use is to find out what the user wants to do. It supports up to 5
different steps which can be done in a row so if you need to build up something complicated here you go.
This action decides when to move, drop, pick and destroy items. It's bound to CIWindow and uses its
events to trigger / delegate events to the CISlots/CIEquips/CIPotions objects.

---------------
CIContent
---------------
This is a little help class for the CIActions object which puts a wrapper around the Equipment,
Potions and Slots. It will also update the camera.

---------------
CIWindow
---------------
This is the hook between CustomWindow, CIActions and the CustomInventory. It also provides
fake units to provide the Interface Functionality and delegates events to CIActions.

---------------
CISlots / CIEquips / CIPotions
---------------
The containers you see (Top left, top right and bottom left) are basically these objects.
They have special / unique conditions for pickup / drop and handle when to add or remove bonuses from the hero.

##############################################################################
# CUSTOM INVENTORY - CORE
##############################################################################

---------------
CIForging
---------------
This module forges items. You can combine any items and merge them to a bigger item. This will
always happen when your inventory updates.

---------------
CIStacking
---------------
You like items that can stack in your Inventory? Well this module is for you!
Create stackable items and make a maximum conditions. Item stacking is automatic, whenever
inventory updates.

---------------
CISet
---------------
Don't we all love this thing from World of Warcraft? Collecting items of a special set and
then get some bonus stuff once we have all of them. If you are cool, use this feature. It
even supports SET STACKING!

---------------
CIAttachment
---------------
Not done yet.

---------------
CIBonus
---------------
This is the hook between items and the unit state modifier library. You can use this module
to add and remove bonuses to the hero on the fly whenever needed.

---------------
CIError
---------------
Throw errors to the user whenever something bad happens.

---------------
CIEventHandler
---------------
Like every other Inventory system, we need some kind of hook for pickup/drop actions to
connect them with our CustomInventory. This will trigger the CustomInventory events.

---------------
CIEvents
---------------
Name may not be completely self-speaking, but this actually triggers the events on the item.
But only when the unit really has the item. (Safety layer)

---------------
CIItemDrop
---------------
This will allow pickup/drop actions of the items WITHOUT triggering the inventory events.
It will be required for many things so this module is a life safer!

---------------
CIItemInfo
---------------
Wouldn't it be cool if items could display what they are in a multiboard. Yes it would.
This module is exactly for that.

---------------
CIItemBoard
---------------
Yes, this is the multiboard which displays all the item statistics. It uses hooks to get
the attached events from the CUstomWindow.

---------------
CIItemProtection
---------------
Every item has states, like locked, owend, equiped and such. This module gives the ability
to change the states and make them available.

---------------
CIItemDest
---------------
Simple module for setting the destructable (icon) for the CustomWindow.

---------------
CIItemSeek
---------------
Module which is build to search and collect information about the inventory.
Find out how many items of which type you have that are not stacked, find out how many duplicated
items you have and even if you have errors in your inventory indexing.

---------------
CIItemSlot
---------------
Small module that adds classes to the items. You can only equip items with the right class
on the right positions.

---------------
CIItemEffect
---------------
This module allows to attach effects to an item wearer. Do whatever you want, but keep in mind
that one item has a maximum of 3 effects.

---------------
CIPowerup
---------------
Not done yet.

---------------
CISetup
---------------
Changes the area around the inventory to be black and create the UI for all players.


---------------
CustomItem
---------------
The item object itself. Will trigger and get triggered from all kind of sources.
Modules are completing the collection of members and methods.

---------------
CustomInventory
---------------
The main object. It forges, stacks, creates sets, triggers events, gets triggered and uses
optional modules to provide the full repository of features to the user.


0.2.2.6

-Fixed a bug found by Dr. Boom:
Dead units were able to change the inventory and caused bugs.
-Also added a little bit of documentation.


Keywords:
CustomInventory, Inventory, Custom, Anachron, FullScreen, Module, vJass, Stack, Forge, Combine, Set, Powerup, Drop, Equip, Equipment, Equip, System
Contents

CustomInventory - 0.2.2.6 (Map)

Reviews
Moderator
18:27, 18th Feb 2010 The_Reborn_Devil: Ohsh- That describes pretty much what I'm thinking. My eyes were sore even before I was done reviewing half of the code. The code looks really good and I couldn't find just one little thing that would be...
  1. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,221
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Because hvo said its not special...
     
  2. knight_godryu

    knight_godryu

    Joined:
    May 20, 2010
    Messages:
    274
    Resources:
    0
    Resources:
    0
    uhhm...is there any guide for here?? or something like how to use it for begginners? coz i would love to use to use it if it does T_T
     
  3. CloudMax

    CloudMax

    Joined:
    Jun 9, 2007
    Messages:
    2,438
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    This is not for begginners so start with. You must know how to code to use such a system.
     
  4. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    You would need to code a lot if you want to use this... as this isn't one of those CnP, edit a few lines type of system...
     
  5. knight_godryu

    knight_godryu

    Joined:
    May 20, 2010
    Messages:
    274
    Resources:
    0
    Resources:
    0
  6. hayatesasaki

    hayatesasaki

    Joined:
    Dec 16, 2010
    Messages:
    97
    Resources:
    0
    Resources:
    0
    Awesoooooooooome!!!!!!! 8972/10
     
  7. SanKakU

    SanKakU

    Joined:
    May 11, 2008
    Messages:
    1,183
    Resources:
    1
    Maps:
    1
    Resources:
    1
    there is a coder working on something similar to this who will hopefully make a much imrpoved version of this(what he working on has nothing to do with items, though...)...i tried looking at the system and gave up since it is immense and really difficult...maybe it needs redone from scratch, but the basics of the ui are fascinating realm of war3 editing i have never seen before...

    but i wouldn't hope too much on it...my suspicion is that the inventory needs a far simpler approach and should try to focus on ONLY increasing item slots and some minor attributes added like equipment types. it's kindof a cool undertaking what happened but imo he bit off more than he could chew when coding it... :/

    i should get back to making my map before same thing happens to me ^^
     
  8. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    If it has nothing to do with items, then it is not that related to this... (maybe only to the CustomWindow modules)
     
  9. CloudMax

    CloudMax

    Joined:
    Jun 9, 2007
    Messages:
    2,438
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    This system does not have to be redone at all. It is fine as it is.
    Some people just like to do stuff in different ways, thats the issue with open-source stuff like this system.


    That's not true at all.
    This system was once rated 6/5 by the moderators due to the system being well made.
     
  10. Killjaes

    Killjaes

    Joined:
    May 9, 2009
    Messages:
    12
    Resources:
    0
    Resources:
    0
    Is it difficult to learn Vjass? I want to use this system but I don't understand anything :(
     
  11. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    its not that hard to learn if you put time and effort, but being proficient in it is a different thing...
     
  12. sofia

    sofia

    Joined:
    Mar 22, 2010
    Messages:
    40
    Resources:
    0
    Resources:
    0
    LOOOL I cant even test the freking map?!... -.- I cant even play it normaly... and when i tryd to save your map to test... i got "Syntax error" allover! On your librarys...
     
  13. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    make sure you have at least wc3 version 1.24 or better yet, the latest one...

    as for testing, you need to have NewGenWE and the latest jass helper...
     
  14. Dr. Boom

    Dr. Boom

    Joined:
    May 1, 2008
    Messages:
    1,550
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Moin moin =)

    Your system is a good way, to see how complex vJass can be and I think I understand more and more of the way you code there!

    Very very good job with the system, but there's a little thing:

    When the hero dies, you can still open the inventory. But when you pick a potion and try to place it into the hero inventory (at the inventar the 4 []), then the item is dropped on the system and lost.

    Possible you can fix this a little - else awesome job =D

    Greetings and Peace
    Dr. Boom
     
  15. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    This system will never get updated again, Ana left hive. Or at least modding.
     
  16. Shartuku

    Shartuku

    Joined:
    Jul 17, 2011
    Messages:
    16
    Resources:
    0
    Resources:
    0
    AAaaaa sorry but my friend and me got some error whit your script.
    Here info bout it:
     

    Attached Files:

  17. baassee

    baassee

    Joined:
    Nov 14, 2008
    Messages:
    3,220
    Resources:
    17
    Spells:
    14
    Tutorials:
    3
    Resources:
    17
    Update JH.
     
  18. Shartuku

    Shartuku

    Joined:
    Jul 17, 2011
    Messages:
    16
    Resources:
    0
    Resources:
    0
  19. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    You can put a filter urself on the part which opens the inventory which checks if the hero is alive or not... ^.^

    because as baassee said...
     
    Last edited: Nov 3, 2011
  20. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,221
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Okay guys, I will try to write a little documentation because as it seems, people are still using this inventory.

    Thanks all for using. If I get my QX412 laptop back I may also fix a few bugs. Is someone nice enough to make a list of known bugs?

    Thanks all for feedback and using.