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:
##############################################################################
# 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.
---------------
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.
-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.
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...
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 enough to reject this...
This is the best inventory system I've seen and I've seen maaaany.
Edit:
Since you updated I had to review it again. It looks good, but I did notice one thing >
1. You don't need those null filters like in CIEventHandler
JASS:
private function InvNullFilter takes nothing returns boolean
return true
endfunction
That bug has been fixed.
Other than that the code looks good and it's very easy to use.
Would be more awesome if the system had fewer lines though as this system is frikken HUGE. It hurts to review it.
hvo-busterkomo: After evaluating this system I do not think it meets the standards to be a Director's Cut. However, in respect to The_Reborn_Devil, I have left it as Highly Recommended.
When you mouse over the exit button, drop button or any of the armor slots, the board should say what it is
Attachment system
(Maybe) UI update when Elenai did so.
Vendors
Tradesystem
Enable swapping between units and trackables as selecters.
The potion slots should have potion icons to separate them from the normal slots
You used the name "hand" for the weapon slot (I think "weapon" would be better because people can confuse hand and gloves i guess
I think it would be less confusing to use the inventory icons i linked to so that people can distinguish the slots
Create a save/load code generator for this CI.
How to connect with a save-load system:
JASS:
private function loadItems takes unit theUnit returns nothing
// Load the inventory
local CustomInventory inv = CustomInventory.load(GetHandleId(theUnit))
// Load the item object
local CustomItem it1 = inv.getItem(0)
// Get the itemhandle
local item i1 = it1.getHandle()
// Print the itemname for testing purposes.
call BJDebugMsg(GetItemName(i1))
endfunction
This will load the first item of the inventory of unit theUnit and print the item name.
1) How do I drop an item? It seems a little confusing and doesn't work half the time.
2) The exit inventory button doesn't work
3) Is there a sell to vendor button?
4) If I right click to move on the empty black part of the inventory, the hero moves there. This might cause some problems.
Where do I go to change the icon placeholders in the equipment section. I looked around in the code but couldn't find it. I'm sure it's somewhere obvious but I'm not a jasser and can't find it
When I equipped the claws of attack and then the Clawns of Attack Powerup the item vanished completely and then when I picked up another item it showed up again.
I can't move my mainhand to offhand, offhand to mainhand.
The borders seems to be flickering and changing when I equip and unequip stuff.
If AdvancedTable is basicly Table then you should change it names to something else as there is a chance that someone will make a system named AdvancedTable.
I think that the multiboard should fill the entire right side from top bottom, that way it feels more UI like.
The lightning settings are at night, you should add something that makes it turn to day everytime you enter the UI so the lightning doesn't mess up the colours.
-------------------------------
I haven't really gotten into the code but these are stuff that I notice for now.
Thanks, please give feedback and the result of the stress test
Where do I go to change the icon placeholders in the equipment section. I looked around in the code but couldn't find it. I'm sure it's somewhere obvious but I'm not a jasser and can't find it
You have to change the destructables with these IDs in the object editor.
You will have to put the path to the new icon into the field with id 'texFile'
When I equipped the claws of attack and then the Clawns of Attack Powerup the item vanished completely and then when I picked up another item it showed up again.
If AdvancedTable is basicly Table then you should change it names to something else as there is a chance that someone will make a system named AdvancedTable.
You can easily do that, and I like it that way imho.
The lightning settings are at night, you should add something that makes it turn to day everytime you enter the UI so the lightning doesn't mess up the colours.
After moving the same item on other random slots, the map just crashed! Ô_Ô"
Anyway, very hard coded, has a lot of functionality, but you waste a lot of space with the slots.
I mean, seriously, why so much space between the slots? You can make them bigger or make more of them.
You should also add pages to the inventory. (That you can remove for the D3W project)
I can't wait for the other modules to be in the beta!
15 comments and my 16 comments when you post system. Thats popular. I was say that on discussion.
Need help. Downloaded a new Jass helper but what to do now with him?
15 comments and my 16 comments when you post system. Thats popular. I was say that on discussion.
Need help. Downloaded a new Jass helper but what to do now with him?
God, I have posted an vJass system, not the JassHelper itself.
I can not write a tutorial how to use that program. Please check out wc3c.net and ask for help if needed.
Sorry, but there is already enough to do with fixing the stuff and answering the posts related to the system itself.
So you didn't intend to have the exit button? If you have the time could you tell me how to get the button to work? And also get the inventory to show when I click an ability button (disable the esc key so it doesn't show it)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.