HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

[System] Advanced Inventory

09-21-2009, 02:53 PM#1
Kricz
Advanced Inventory System
Version 2.02


Hi,

this is an advanced equipment system, i made for a RPG, I'm actually creating with some other mappers.

Features:
  • Equipment Menu with 8 Slots
  • 8 Slot Backpack
  • Advanced Item Handling
  • Auto Stack Detection
  • Custom Item Pickup System
  • Custom Item Classes and HeroClasses

Requirements:[list]
This System if fully MUI, MPI and leakless. It allows the user to create an extended Inventory to his heroes with a equipment menu, a backpack and some other features. The System is based on 3 structs, where 2 are private and the third is the Inventory Struct itself. Some examples how to use the System:


That's the way you can add heroes to the system:
Expand JASS:

So you can have 2 paladins for example, which can have other availabe items types.

You can add items as easy as heros to the system:

Expand JASS:

Here are the two required Librarys "Inventory System" and "Item List":

Expand JASS:

Expand JASS:

Additional Credits to:
BruZzl3R_17C for creating the Icons for the emtpy slots (extra for this system).

If the screenshot is a "little" bit ugly, I've got a laptop with widescreen, so sry
Hope everything here fits the submission rules ;)

Changelogs:



Version 2.02:
Inventory System:
- fixed a bug when equiping an item which type was already equiped
- fixed a bug with dragging equipment items from inventory to backpack and vice versa
- updated BonusMod and UnitMaxState Librarys and implemented Movespeed-BonusMod
- some small code changes...

Item List:
- changed some Struct Members to "readonly" and delated some method operators with it
- added support for xe_preload and AbilityPreload using static if's

Other Librarys:
- added AutoIndex (required by UnitMaxStateBonuses and MovementBonus)
- added AbilityPreload (optional for preloading ability in BonusMod and ItemList)
- removed SearchString and implemented directly in the System Code

Notes:
I had to change something in the scripts of the UnitMaxStateBonuses and MovementBonus Librarys because it used
an old function of AutoIndex that no longer exists. Please switch the librarys until Earth-Fury fixed that.


//////////////////////////////////////////
// OLD CHANGELOGS: //
//////////////////////////////////////////

Version 2.01b:
Demo Map:
- added a computer bot to demo map, so it can be runned direct through warcraft

Version 2.01:
Inventory System:
- added two new globals for movement speed
Item List:
- added movement speed bonus
- fixed bug in addNormelItem method

Version 2.00:
Inventory System:
- added a 8 slot backpack
- added a auto stack detection system
- added fully triggered item pickup
- ALOT code changes and improvements
- Added some more constants
- now uses TimerUtils
- Item now can be equipped when the equipment menu is opened (through auto equip for example)
Item List:
- added more configurations
- removed / delated methods which are not required
- added some new methods / operators for handling with "Items"
- made some struct member private
- added possibility to add potions to the system (uses the new configurations)
- added the possibility to add "special efffects" to items (only for Equipment)
Demo Map:
- added 6 new Items

Version 1.02:
Inventory System:
-added auto equip to the system
-added normal functions to add heroes to the system, get its Inventory and specific items in slots
-some small code changes
Item List:
-added functions to add items directly to their Slot
Demo Map:
-added 3 example items

Version 1.01:
Inventory System:
-added custom Icons for "Emtpy Slots".
-you now can setup the position of the 'Inventory-Item'.
-After closing the inventory, the items now will be added to the place they where before closing.
-When equiping an item and its slot is full, the item will be switched to the same slot, the new equipped item was

Attached Images
File type: jpgInventoryScreen.jpg (760.8 KB)
Attached Files
File type: w3xInventory System v2.02.w3x (174.2 KB)
09-21-2009, 07:12 PM#2
deolrin
Hey, judging from the screenshot, it looks quite awesome. I assume the "Slot" and all that info is a part of the tooltip of the item? Or is it an actual part of the system?
09-21-2009, 08:26 PM#3
ploks
Can you please use [hiddenjass] tags instead. It's easier to view. :)
09-21-2009, 08:45 PM#4
Anachron
High disadvantages: You can NOT give items spells.
I suggest detect drop events with this system,
or this won't get approved.
09-22-2009, 12:55 PM#5
Kricz
Hi,
@ploks: Thanks for the information, will change this.

@Anachron:
Its very hard to give these items usable item spells, because they are equipped/unequipped on use...
But you can add passive abilitys ;)
But i think, i could add the possibility to drop items direct from their slots, will see how i do that..
@deolin:
Everything, which is in shown in the screenshot-tooltip is part of the system (just an example to show, what it can do ;) )
09-22-2009, 01:30 PM#6
Anachron
Quote:
@Anachron:
Its very hard to give these items usable item spells, because they are equipped/unequipped on use...
But you can add passive abilitys ;)
But i think, i could add the possibility to drop items direct from their slots, will see how i do that..
Yes, but items mostly have spells, so I see no use in disallowing items to have spells.

You have to add this feature, or I can't use it.
(Won't use it though, I made my own one, which isn't finished yet).

Basicly, thanks for the nice system, I learned some things.
(Like using the UnitStatLibrary)
09-22-2009, 02:12 PM#7
Kricz
Yeah, but you told me about your system on hiveworkshop.
And yours seems more to be an "Bagpack" System or something simular.
Mines is only an equippment system for maps like RPG's (where I use it).
And I think, in an RPG, you don't really need equippable items with active abilitys. It would also suck, to open the inventory each time, just for casting on of the item's abilitys :)
09-22-2009, 02:18 PM#8
Anachron
Then you should rename it into maybe KriczsRPGInventorySystem or something like that. This name is to general.
09-22-2009, 02:24 PM#9
Rising_Dusk
I hate it when people name shit after themselves. About the only times I haven't gotten frustrated over it is for ABuff/Damage and vJass. Granted, the current library name isn't very descriptive, but KriczsRPGInventorySystem is just as nondescript, even longer than before, and screams arrogance at the same time. Name it after what it does, not just "AdvancedInventory."
09-22-2009, 02:33 PM#10
Anachron
Quote:
Originally Posted by Rising_Dusk
I hate it when people name shit after themselves. About the only times I haven't gotten frustrated over it is for ABuff/Damage and vJass. Granted, the current library name isn't very descriptive, but KriczsRPGInventorySystem is just as nondescript, even longer than before, and screams arrogance at the same time. Name it after what it does, not just "AdvancedInventory."
It 1.) adds the author,
2.) removes the posability of doubled system naming
3.) Is better then AdvancedInventory, which is none at all.

I agree with you that mine isn't the best, because you should know what the system does while reading the name, but mine was just a tip, nothing more.
09-22-2009, 05:17 PM#11
Tot
semms a bit like vex's inventory, doesn't it?
09-22-2009, 07:06 PM#12
Kricz
Hi,
@Rising_Dusk:
Would "(Advanced)EquipmentSystem" be better?^^
So everyone would know what it means...

@Tot:
Hmm..
I was inspired by the AAA Inventory, but that was very old, uses the old CasterSystem and wasn't in vJass.
So I decided to make it new but with 8 slots and in vJass.
09-22-2009, 07:26 PM#13
Rising_Dusk
Quote:
Originally Posted by Anachron
It 1.) adds the author,
2.) removes the posability of doubled system naming
3.) Is better then AdvancedInventory, which is none at all.

I agree with you that mine isn't the best, because you should know what the system does while reading the name, but mine was just a tip, nothing more.
Okay, it's official, you're the next FP.

The author name does not need to be in the library title. Christ, dude, could you only imagine how retarded it would be if everything Vex made was called "VexoriansTimerUtils" or "VexoriansTable"? Can you even conceive how lame that is?
Quote:
Originally Posted by Kricz
Would "(Advanced)EquipmentSystem" be better?^^
So everyone would know what it means...
What does "Advanced" mean in the first place? And it is an Equipment System? So then call it RPGEquipmentSystem or something like that.

Quote:
Originally Posted by Kricz
# Bonus Mod by Earth-Fury (Not uploaded here in wc3c...)
# SearchString by D1000 (he wrote this library extra for this system.)
These libraries cannot be used in a submitted system if they are not present within the WC3C database. Sorry, you will have to replace them.
09-22-2009, 07:38 PM#14
Kricz
How should I replace these BonusMod Library?
It's from the same maker like SetUnitMaxState, only that the didn't upload the BonusMod Library here on Wc3c..
And I found no other BonusMod System working with patch 1.24 and using vJass, and also is approved here on Wc3c.
And SearchString is only a small library (which isn't a system or so), which searches a string for another...
And UnitUtilities, or how these Library was called doesn't exist anymore... (delated)
How i said, he's a friend of mine, who also works on the RPG, the system also made for, so he made me this library for me...
09-22-2009, 07:39 PM#15
D1000
Quote:
Originally Posted by Rising_Dusk
These libraries cannot be used in a submitted system if they are not present within the WC3C database. Sorry, you will have to replace them.
Is it really necessary that I submit this 2 function, in order that kricz´ system can be approved?