• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

MUI Hero Inventory

Status
Not open for further replies.
Level 2
Joined
Mar 4, 2009
Messages
7
Hey folks, I'm a complete n00b, so please bear with me. I'm gonna try not to make myself look too incredibly incompetent, here.

Basically, my issue is this: I’ve been working on attempting to create an RPG map. (My first) 4 Players, 12 Hero types, No duplicate Heroes (if any of that matters). I’ve been having a lot of trouble creating an inventory system that will allow the heroes to ‘Use’ an item, hence equipping it to an inventory, and modifying the appropriate hero stat. Also, I would like this to encompass class specific and/or restricted items.

Example:
A fighter type picks up a sword. The sword would add, say, 10 to strength. I would like to be able to click the sword, in the hero’s inventory, make it go away, and increase the base strength of that fighter by 10.
Now, if a mage were to pick up that same sword and click it, it would just pop up a message saying that they were not able to equip that item.

I have a multiboard set up, where all players would be able to view their own equipment, and that of any other players (All players are allied). I’ve gotten that to work, more or less. It’s the rest of it I’m having trouble with.

I’ve been searching forums for like 3 days now, and I’ve seen a lot of options. Problem is, none of them actually do what I want them to. The few that were even close did not appear to really be adaptable to multiplayer.

If anybody has even the beginning of an idea, I’d be very appreciative. Please, bear in mind I’m working with GUI. I’m wayyy to stupid to use JASS. I’m pretty sure I could do this if I put in a pretty extensive trigger for every single different item available, but that could be hundreds. Is there any easy way of doing this in GUI?
More importantly, did any of that make sense? If not, just let me know. I will attempt to clarify.

{EDIT}
For any who care, I think I've pretty much determined that this is not going to be possible in GUI.

At this point, I'm attempting to follow some of the JASS tutorials on this site but, as mentioned in my previous post, I'm retarded. If anybody has any opinions or ideas, I'd love to hear them. Or, you know, hear anything. It's no fun being the new guy.

Anywho, I will continue to update. If I can get anywhere with JASS, I'll post. If I can't... Well, I'll be back at square one. Again.
 
Last edited by a moderator:
Level 2
Joined
Mar 4, 2009
Messages
7
Still in progress. This is gonna take a while. Don't have a lot of spare time, right now. Hopefully, that will change soon. Probably, not so much.
 
Level 12
Joined
Feb 13, 2009
Messages
386
A fighter type picks up a sword. The sword would add, say, 10 to strength. I would like to be able to click the sword, in the hero’s inventory, make it go away, and increase the base strength of that fighter by 10.

You make a dummy "activate" ability for the sword which does nothing and +10 str ability based on that from tomes. Then you make a trigger if a hero is using the item and item equal to sword. Then check the type of the triggering unit and if it was a warrior you remove the manipulated item from the inventory and add the +10str ability to the unit, or if it's a mage you just show the message that this unit cannot wear swords. This is the GUI algorythm.
 
Level 2
Joined
Mar 4, 2009
Messages
7
Deon,

I appreciate the response. What you advised was pretty much what I was referring to in my original post, when I said that I could probably do it but, I'd have to make a seperate trigger for ever single item. Is there not a better (more efficient) way, where it could say, look at a portion of the item name, and maybe the ability that the sword was pulling from?

Sticking with the example of the sword: Say there are 10 different 'levels' of swords. The weapon type 'sword' is usable by 4 classes. Is there a way to make a single trigger for the entire item type 'sword', as opposed to creating 10 different triggers?

Is there a way to have it search the name of the item, find the word 'sword', compare that to a list of classes, and then look at what ability the sword is using and know how much it needs to add to what. Better yet, is there a way to have that sword do nothing in the hero inventory? I does not add anything until you 'equip' it.

The only reason that I even ask this is I've seen it done in a JASS tutorial. It used 'or if' and the raw data item name. Problem is, as stated previously, I'm too stupid to be able to adapt what was in that tutorial to my own needs.

Anywho, if it's not possible, it's NBD. I'll live. I'm just trying not to bog everything down with 5,000 inefficient triggers, if I could do it in 50.
 
Level 11
Joined
Nov 15, 2007
Messages
781
Why don't you do the opposite? Have equipped items in the unit's inventory and then have another sub-inventory you can access through dialogs or something. It's what I do for my RPG item systems because it's actually more efficient and simpler than all of the "equip" systems.
 
Level 2
Joined
Mar 4, 2009
Messages
7
Sorry for the delay in response. Life sucks :/.

Anyhow, I'm back.

To answer your question; It's a matter of simple preference. The fact that I would like to be able to have something like 9 different inventory 'slots' (Helm, Armor, Main hand, Off hand, Greaves, Gloves, Belt, Amulet, and a misc 'Artifact'), combined with the fact that I don't like to have to open a submenu to access cure/mana pots, makes me prefer to use some type of equip system. I am forced to admit, however, that the idea of using a 'multi-inventory' system was fiercely battled in my head, before I settled on trying to do an equip sytem.
 
Level 11
Joined
Nov 15, 2007
Messages
781
I could write up a system like the one you want, but it would take a while and I'd have to send you a map with the system in it because it'd be too much to post here. How much of it are you able to do yourself? If you stated this already, sorry for missing it.
 
Level 2
Joined
Mar 4, 2009
Messages
7
Hmm... That's actually a really good question. It kinda boils back down to the me being a noob part. Since I've not really done this before, it's very difficult to state an exact "I can do this. I can't do that." What I can tell you is what I've managed to figure out (more or less), versus what I wanted to accomplish. Bear in mind, I didn't come here to try and find someone to do my work for me. I mean, if you really want to, I'll take it. I'll also happily credit you for it, obviously. Just wanted to kinda make that known.

Anyhow; What I wanted vs What I managed:

Want
System to function for 4 players
Include class specific and restricted items (for 12 classes)
Equipped items to display on a multiboard
Compatible with custom items
An 'Unequip' system
System not hinge on 'Item class' or 'Item level'
Pro-ssibly more stuff, that I've managed to overlook

Have
Multiboard - Basically, it displays a variable. The variable changes whenever you 'equip' the item.
An 'Unequip' system - Using the same variable as above.

If it's still something that you're interested in trying to tackle, it might be easier to try an PM or email the details back and forth. Just let me know. I might be able to figure out more myself, if I had a better idea of what I might be working with.
 
Status
Not open for further replies.
Top