wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > - Submit a resource -
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 11-12-2009, 01:18 AM   #1
weaaddar
User


Respected User
 
Join Date: Apr 2002
Posts: 2,372

Submissions (3)

weaaddar has a spectacular aura about (131)

Default [script] ItemMenu

Hi all,
Here is my latest rendition of itemMenu its included in a demo map. But it can work as a standalone script.

ItemMenu is out to make it easy to use items as a menu system. It does so by giving you a bunch of event handlers and having really drop dead simple implementation.

Included is a customizable Storage Menu, an Annoying Menu, and a Build menu.

Check it out let me know what you think. There is more documentation in the readme, but the premise is you implement an OnOpen, an OnInterupt, and any event handler you'd like and it sets up the rest. ItemMenus can be registed to state that they provide storage, and you get granular control on how things will be placed. If none of the default settings meet your need you can always write your own.

The system was coded in Zinc. To be fair and partisan to non-zinc users, I wrote the most "complicated" of the menus included (the build Menu) in Vjass to demo how easy it is to use.

Credit::
Vexorian -- For Zinc/VJass and SimError.

The map is using Table and Cohandlar's version of GetItemCostById. Neither are required for core operation.
It also includes a library I created call Collections that implements list_$$ Obviously its less awesome in Zinc compared to its CJass equivalent, but CJass is toxic on this site.

Code by request::
ItemMenu Library
Expand Zinc:
Collections
Expand Zinc:
Simerror can be found in this thread :: http://www.wc3c.net/showthread.php?t...light=SimError

Implementation guide text::
Expand Zinc:
Attached Files
File Type: w3x itemmenu3.w3x (48.4 KB, 106 views)

Last edited by weaaddar : 11-13-2009 at 11:42 PM.
weaaddar is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 11-12-2009, 02:41 AM   #2
Veev
User
 
Join Date: Nov 2006
Posts: 199

Veev will become famous soon enough (63)Veev will become famous soon enough (63)Veev will become famous soon enough (63)

Default

I tested just the test map (as in, I didn't change a single thing) and I think I bugged out the system.

Initially, I had 12 free slots, and I picked up all the Reports on the ground. When I paged through the inventory, there was 4 on page one. But, 3 on page 2 with the pseduo-item "Next Page" in the 4th inventory slot and an empty item slot in the 5th slot (where normally the "Next Page" item is). Page 3 was fine, it had all the reports...

This next bug is based on the previous. Keeping Page 2 open and picking up another item will place it in Page 2, Slot 5. Cycling through the pages and returning to it causes the item to vanish completely. In my experiment, I used a crown of kings and it was gone when I cycled back.
EDIT: More elaboration. Picking up an item causes the 6th item slot to become open again BUT the item does not get added to the inventory. Attempting to pick up the item will add it to your inventory. Upon picking up said item, the 6th item slot becomes filled with a black pseudo-item.

EDIT 2: Another bug. In the small inventory, I filled it with 4 items and swapped to another inventory. When I went back to the 4-slot inventory, I dropped one item. For some reason, the black square pseudo-item in the 6th slot gets removed. Upon picking up an item, it replaces the black square into slot 6.

Last edited by Veev : 11-12-2009 at 02:46 AM.
Veev is offline   Reply With Quote
Old 11-12-2009, 03:15 AM   #3
weaaddar
User


Respected User
 
Join Date: Apr 2002
Posts: 2,372

Submissions (3)

weaaddar has a spectacular aura about (131)

Default

Thanks a lot for testing. I thought I ironed out most of the kinks.

I did find a bit of a bug and fixed, I'm not sure about the next getting stuck on a wrong slot. I don't know how that happens. I'm trying to see if I can reproduce it. Obviously if the nextItem is part of the inventory that is a bad thing. I'm not sure how to catch that easily.

As for the small inventory bug this is unfortunately correct behavior. When all inventory space is full it seals up the 6th slot with the blank item so that you cna't pick up more items. Once you drop something, a space is freed so you can pick something up.

I'm uploading a fixed version of the map.
Change:
Fix issue where dropping an item on itself caused an incorrect count change in storage.
Fix issue where orderItem gave the wrong item back.
weaaddar is offline   Reply With Quote
Old 11-12-2009, 04:04 AM   #4
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Please include the code in the first post. Also, it wouldn't hurt if you made your first post a bit easier on the eyes.
__________________
Rising_Dusk is offline   Reply With Quote
Old 11-12-2009, 06:57 AM   #5
Veev
User
 
Join Date: Nov 2006
Posts: 199

Veev will become famous soon enough (63)Veev will become famous soon enough (63)Veev will become famous soon enough (63)

Default

Quote:
Originally Posted by weaaddar
As for the small inventory bug this is unfortunately correct behavior. When all inventory space is full it seals up the 6th slot with the blank item so that you cna't pick up more items. Once you drop something, a space is freed so you can pick something up.

Ah, gotcha. I'll post back (later today) with (hopefully) no bugs! I'm going to try really hard this time, though, to bug it out. =P
Veev is offline   Reply With Quote
Old 11-12-2009, 09:02 AM   #6
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

I made the same system, but I never decided to upload.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 11-12-2009, 02:55 PM   #7
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Err, your library has to actually require the SimError in the database, you can't submit your own ZINC version. Also, your "Collections" library is not an approved script, so you cannot use it in your submission per the submission rules.
__________________
Rising_Dusk is offline   Reply With Quote
Old 11-13-2009, 12:18 AM   #8
weaaddar
User


Respected User
 
Join Date: Apr 2002
Posts: 2,372

Submissions (3)

weaaddar has a spectacular aura about (131)

Default

I couldn't find simerror when I looked so I just stole one from an old map written in Vjass and switched it over to zinc as it made it so when I was developing I could save everything as Zn file. As for collections its a simple arraylist class. I have no idea if there is an equivalent arraylist in the database. I suppose I could submit Collection and its list_$type$.
weaaddar is offline   Reply With Quote
Old 11-13-2009, 01:04 AM   #9
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Found it on a ten second search.
Quote:
Originally Posted by weaaddar
I have no idea if there is an equivalent arraylist in the database
There probably is.
__________________
Rising_Dusk is offline   Reply With Quote
Old 11-13-2009, 11:41 PM   #10
weaaddar
User


Respected User
 
Join Date: Apr 2002
Posts: 2,372

Submissions (3)

weaaddar has a spectacular aura about (131)

Default

There wasn't so I submitted it. I realize that it isn't approved but I don't think anyone has done one yet.
weaaddar is offline   Reply With Quote
Old 11-14-2009, 01:57 AM   #11
Veev
User
 
Join Date: Nov 2006
Posts: 199

Veev will become famous soon enough (63)Veev will become famous soon enough (63)Veev will become famous soon enough (63)

Default

Okay so, this is strange and I don't remembering it happen in my first test.

I picked up enough items to fill all 6 slots in the AnnoyingMenu, which I believe acts as storage. (The debug messages did say I was storing the correct item into the AnnoyingMenu.) However, when I opened up the AnnoyingMenu, there were NO items there, just the black box things in all 6 slots.
Veev is offline   Reply With Quote
Old 11-14-2009, 09:53 PM   #12
weaaddar
User


Respected User
 
Join Date: Apr 2002
Posts: 2,372

Submissions (3)

weaaddar has a spectacular aura about (131)

Default

Yeah I was able to repeat it I'll try to figure out whats cause it.
weaaddar is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 05:08 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services