System (vJass) CustomInventory

Anachron

New Member
Reaction score
53
CustomInventory – Improved vJass Inventory System
Content
  • What it is
  • What it isn‘t
  • Getting started
  • Feedback / Credits / Misc

What it is
This is an advanced inventory system for Warcraft III – The Frozen Throne.
This inventory system is designed to fit in most peoples needs, so it is:

  • Flexibel
  • Fast
  • Dynamic
  • vJass
What it isn’t
This isn’t

  • finished.
  • in GUI
  • useable without the knowledge of vJass.
  • useable with any other inventory system out there at the same time.
Getting started
Please read the readme.

Feedback / Credits / Misc
Vexorian for vJass, Rising_Dusk for his help about modules, MindWorx for JassNewGenPack,
LTGH, 88Warcraft88, CBX_Entertainment, Slaydon, catch_ya, Adiktuz, etc. for all of their input, ideas, suggestions, critique, feedback, comments. Really big thanks to all of you!

CustomInventory

Content

·[FONT=&quot]
Introduction
·[FONT=&quot] [/FONT]Requirements
·[FONT=&quot] [/FONT]Getting started
·[FONT=&quot] [/FONT]Developing
·[FONT=&quot] [/FONT]Modules / Feedback
·[FONT=&quot] [/FONT]Thanks / Credits
·[FONT=&quot] [/FONT]About

Introduction

This is my CustomInventory project. I’ve started it August 2009, with the wish to make a full functional multiplayer inventory system that is easily advanceable and actually is open-source so other people can develop it too.
The idea came up as I was needing a FSI (FullScreenInventory) and there was none that supported MPI, Stacking and Combining. So I started my own.
The first try was really awful, and in Dec 2009 I noticed that. So I started again from scratch.
Thanks to Rising_Dusk, I learned about modules and how great they are.
Now the last 6 weeks I have been developing it again and again and I think I made much the last weeks. I know that Warcraft III is kinda dying, so this might be one of my last projects.
However, I am glad you are reading this and have interest in the stuff I do!
Requirements

·[FONT=&quot] [/FONT]Latest Version of Warcraft 3 – TFT
·[FONT=&quot] [/FONT]JassNewGenPack 5.d or higher.
This tool adds vJass support to your World Editor! It also gives you really great bonus features. There is no bad thing about it, imho.
You can download it here.
·[FONT=&quot] [/FONT]JassHelper 0.A.2.B or higher.
This tool adds the vJass parser to the map, that actually creates JASS2 code out of your vJass programs.
You can download it here.
If you are unsure how to use the vJass features please read the manual here.
I am not able to explain you how vJass works, even if I wanted to.
Getting started

·[FONT=&quot] [/FONT]Open JassNewGenPack
·[FONT=&quot] [/FONT]Open CustomInventory (Unprotected) in the editor.
·[FONT=&quot] [/FONT]CnP all of the contents into your map. [I am sorry, I am atm not able to create generating scripts for the contents]
·[FONT=&quot] [/FONT]Check how it‘s build.
·[FONT=&quot] [/FONT]Read the comments, descriptings carefully!
·[FONT=&quot] [/FONT]Thats it, you can now work with it!
Developing

As already mentioned, this is open-source. This means everybody is allowed to develop it, aslong as I get credits for the „framework“.
Do NOT remove the author notes at any place! Do not change them, and do not add your notes in my modules! I am also NOT responsible for any damage, harm or changing of computers caused by this map.
You are allowed to modify any of the contents I’ve written, however, do that on your own risk!
Modules / Feedback

I am glad for every feedback that I can get.
If you create new modules, please post them in the map thread on hiveworkshop.com.
That has to include the base version of CustomInventory, the modules you have used, and a short description what the module does.
Thanks / Credits

·[FONT=&quot] [/FONT]Vexorian for vJass
·[FONT=&quot] [/FONT]You, for waiting! J
·[FONT=&quot] [/FONT]Rising_Dusk for his help about modules
·[FONT=&quot] [/FONT]MindWorx for JassNewGenPack
Librarys:

·[FONT=&quot] [/FONT]AbilityPreload by Vexorian
·[FONT=&quot] [/FONT]AutoIndex by grim001
·[FONT=&quot] [/FONT]ARGB by Vexorian
·[FONT=&quot] [/FONT]BonusMod by Earth-Fury
·[FONT=&quot] [/FONT]Board by Earth-Fury
·[FONT=&quot] [/FONT]MovementBonus by Earth-Fury
·[FONT=&quot] [/FONT]SimError by Vexorian
·[FONT=&quot] [/FONT]UnitMaxState[Bonus] by Earth-Fury
·[FONT=&quot] [/FONT]CIGenDestructibles by Ammorth
·[FONT=&quot] [/FONT]PreventOrders by Element_of_Water
About

CustomInventory © 2010 Anachron.
Date: 2010/02/15

• CIForging
This allows you to forge items.
• CIStacking
This allows you to stack items
• CISet
This allows you to create item sets which give bonuses
• CIBonus
This is a global bonus for anything. Used by CISet, for example
• CIError
Just an error handler. Because we want it ;)
• CIEventHandler
As it says, an event handler.
• CIEvents
Actually this has all data of CustomInventory events. (what should happen when)
• CIItemDrop
This is a module that helps you dropping temporary. (Without actually removing it from the inventory). (Ignores CIEventHandler)
• CIItemInfo
This saves any information you want to the items.
• CIItemBoard
This is an module that displays boards for the items you show.
• CIItemProtection
This is actually for locking/unlocking items to make them able to be used/moved/etc.
• CIItemDest
This just saves the destructible of the icon for the item to the item object.
• CIItemSlot
This creates some classes that can be attached to items.
• CIPowerup
[Only the raw dummy, not made right now]
• CINormalUI
The data for the normal wc3 UI.
• CIFullscreenUI
The settings for the fullscreen UI.
#Update - 0.2.2.1
  • You shouldn't be able to add one items to two inventories at the same time anymore.
  • You can't change inventory stuff during normal gameplay, even when you see it.
  • Multiplayer test are available again.
  • Huge code update.
  • CISetup has some really great settings for implementing the CI easy into your map.
  • Removed disselect button,.. Now you disselect when clicking on an item twice.
  • To many small fixes that I can list them here.
  • Only needs 1/4 of the area from the last UI.
  • Important Fixed all bugs with indexing and such. Enjoy.
  • Important Removed the bug again. Hopefully it won't bug anymore.
  • Important indexing fix of items. Now the 'Already have item' bug can again appear, but shouldn't matter on next pickup. This is due wc3, I will check if I can get an workaround.
  • Prerelease of a new version, fixing several bugs.
  • Huge code update.
  • Fixed potentional bug places.
  • Now works faster due to new index method: Direct table 1:1 indexing.
  • Now the to fast item pickup bug should be fixed.
  • Minimap isn't black anymore.
  • Tried to fix the picking up items to fast-bug. Please test.
  • Fixed sorting engine of slots.
  • Now only weapons can be equipped into the hand slots.
  • White icon bug fixed.
  • Random bugs caused by item picking fix.
  • Potions now totally have been fixed.
  • ItemStacking has gotten a few big updates.
Initial release.

Fixed escape button. Now works.
Removed powerups. They are not supported yet, but were in the demo.

Fixed some bugs when picking up items to fast. Now you can not pick items before the loading process has been finished.
Now only Potions can be equipped in potion slots.

Inventory now refreshes after 1 second of not doing anything.
This keeps my system away from creating a stack overflow which caused bugs.

Fixed an huge bug caused not to load items proberbly, thread stuck, potion bugging and random item removing.

Added an automatic destructable creater script written by Ammorth at wc3c.net.
You can check it here.

Rightclick orders are now prevented when inventory is watched.
Borders are now removed from the actual map and created at map initialisation.
Created a new oject to easily create borders.

Stupid bugfix with disappearing of items caused by stack module.

I don't have enough space here to upload any pictures.
So please use the other links.
At wc3c.net.
At hiveworkshop.com.
 

Attachments

  • CI.zip
    35.8 KB · Views: 305
  • UI2.0.jpg
    UI2.0.jpg
    135.4 KB · Views: 572
  • CI_UP_v.0.2.2.2.w3x
    232.3 KB · Views: 395

Anachron

New Member
Reaction score
53
Yes, but only one small place for all players. This is one of its main features. I think there is no other inventory system that only needs one place for all players.
 

RaiJin

New Member
Reaction score
40
so will this system might allow units to buy items even when they have full inventory?
 

Anachron

New Member
Reaction score
53
This has nothing to do with buying items actually.
Its kinda like a replacement for the original WC3 Inventory.

This means that it doesn't matter how many items are in the 6 slot warcraft inventory, they will go into the big CustomInventory anyway. (No matter whether they are bought or picked up)

Short answer: Yes, if your CustomInventory isn't full.
 

the Immortal

I know, I know...
Reaction score
51
> I think there is no other inventory system that only needs one place for all players.
Mine does. Though it's not going to be finished anywhere soon so.. it doesn't count, eh?

Kinda mixed feelings. Think I like it, though it looks really.. idk.. strange o_O

Still, real nice work ;]
 

Anachron

New Member
Reaction score
53
Yes, I was actually talking about the finished ones.
Why strange? You are free to change the UI what it looks like. Isn't a big deal.
 

Anachron

New Member
Reaction score
53
Oh yes, I fixed the Game-Night issue in a later version.
Please test the actual version :)
 
Reaction score
456
A lot better. It looks like you "redraw" the inventory UI when I move a item in the inventory? This doesn't happen always, though.

Also when I hover over the inventory's close button, I think it should say what it is in the multiboard. Looks stupid when it says no item in slot. Same for that blue square..
 

Anachron

New Member
Reaction score
53
A lot better. It looks like you "redraw" the inventory UI when I move a item in the inventory? This doesn't happen always, though.
Yeah, I don't know why though.

Also when I hover over the inventory's close button, I think it should say what it is in the multiboard. Looks stupid when it says no item in slot. Same for that blue square..
Yes, already on the todo. What about the other features? Do you like or dislike it?
And what about scripting?
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
I looked the pictures and it seemed very nice. Downloaded the map. (...)

I had no clue how to test the damn system.

Basiscly, I played it but I couldn't get it to work. Please make a dang testable testmap that demonstrates well you system. :)
 

Anachron

New Member
Reaction score
53
Post the code? Then I'll investigate it further ;)

I would like to, but 45 librarys with together 2,6k lines of vJass code highly decreased with a lot of textmacros and stuff isn't that easy to post.

I really highly recommend checking the code from the map itself.
Code.jpg
 

Anachron

New Member
Reaction score
53
Bump. Please tell me what you think of this. And any moderator checked the code yet?
 

Jesus4Lyf

Good Idea™
Reaction score
397
JASS:
set ci.desc = "This item increases your damage \nby 9 if carried."

I think that should automatically place the new line feeds...

Using a multiboard will interfere with other multiboards, wont it? Why not use floating text tags?

JASS:
local    integer             iID	= GetHandleId(i)

What's this for? (Unused local.)

Some of your triggering looks terrible to me, like putting all events on one trigger and then forking it with ifs. I don't understand why this is recursive:
JASS:
		local    CustomInventory     cin    = CustomInventory.load(uID)
        local    boolean             did    = false
		
		if cin == 0 then
		    if AutoGenerate then
		        set cin = CustomInventory.create(u)
                call CIEventCall(u, i, e)

But that's more just general feedback, since the efficiency of this will not affect anything.

Please don't spam message when in debug mode. Debug mode should be used to display errors, generally. Or at least let there be a way to disable them.

Your trigger actions could at least be in the conditions, and remove the dummy filter.
JASS:
    globals
        CIEHonPick      CIEHPickAct     = 0
        CIEHonDrop      CIEHDropAct     = 0
        CIEHonPawn      CIEHPawnAct     = 0
        CIEHonUse       CIEHUseAct      = 0
	endglobals

Is this just for code obfuscation and inefficiency? These aren't even private, or something..

Your code is difficult to read, purely because it keeps changing modules and libraries. It doesn't appear to be necessary...

Other concerns are the black minimap in your demo map (?), how many trigger evaluates you fire per item event (almost every time you call a method), etc. I'd like you to clean your code a bit, but due to the nice, neat functionality this provides, it might be approvable anyway. I haven't had time to thoroughly test it, yet.
 

Anachron

New Member
Reaction score
53
JASS:
set ci.desc = "This item increases your damage \nby 9 if carried."

I think that should automatically place the new line feeds...
It does.

Using a multiboard will interfere with other multiboards, wont it? Why not use floating text tags?
Because they are limited to 90 to player and can not display images. Also they look horrible.

JASS:
local    integer             iID	= GetHandleId(i)

What's this for? (Unused local.)
It will be used in future versions.

Some of your triggering looks terrible to me, like putting all events on one trigger and then forking it with ifs. I don't understand why this is recursive:
JASS:
		local    CustomInventory     cin    = CustomInventory.load(uID)
        local    boolean             did    = false
		
		if cin == 0 then
		    if AutoGenerate then
		        set cin = CustomInventory.create(u)
                call CIEventCall(u, i, e)

But that's more just general feedback, since the efficiency of this will not affect anything.
This basically loads an inventory of the unit, and if the unit has none, it creates one. I don't know why this is inefficent in any way.

Please don't spam message when in debug mode. Debug mode should be used to display errors, generally. Or at least let there be a way to disable them.
The event is one of the real big things you should care of in debug mode. It helps me to see when exactly the stuff happens.

Your trigger actions could at least be in the conditions, and remove the dummy filter.
Future use.

JASS:
    globals
        CIEHonPick      CIEHPickAct     = 0
        CIEHonDrop      CIEHDropAct     = 0
        CIEHonPawn      CIEHPawnAct     = 0
        CIEHonUse       CIEHUseAct      = 0
	endglobals

Is this just for code obfuscation and inefficiency? These aren't even private, or something..
Thats because they can be overwritten by external modules.

Your code is difficult to read, purely because it keeps changing modules and libraries. It doesn't appear to be necessary...
It is, because the modules and librarys you use are optional.

Other concerns are the black minimap in your demo map (?), how many trigger evaluates you fire per item event (almost every time you call a method), etc. I'd like you to clean your code a bit, but due to the nice, neat functionality this provides, it might be approvable anyway. I haven't had time to thoroughly test it, yet.
There really is no other way to do it. I am sorry, but to make the multiboard update automatically, I need to run that much stuff, because its optional stuff :p

Thanks for your input!
 

Anachron

New Member
Reaction score
53
By the way, didn't you say you want to approve this nonetheless?
Anyone else has tested this?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top