Get, Drop, Equip, Unequip. These commands are practically always done with verbs.

Now, I created my own Get, Drop, Equip and Unequip verbs. I make it so that the Unequip verb would only take equipped items as arguments, and the Equip verb would only take unequipped items as arguments. Simple enough, right?

The Equip verb still shows up on equipped items. But when you right click on an equipped item in your inventory and try to Equip it, it gives you a nice little red error. Bad form, that is.

So, I've decided that verbs are bad. At least, for my situation they are. I decided to try some other options, such as making it so that you equip and unequip items in your inventory by double clicking on them. Simple enough, right? Yeah, I suppose so.

But while I'm at it, I'd like to get away from using verbs entirely. It seems odd to have to type "get item", then go to your inventory and click on the item to use it. And since equip and unequip verbs are out of the question, I should need to remove the get verb instead. And drag and drop just isn't a good way to do it.

So, I'm trying to figure out a verbless way to create Get, Drop, Equip and Unequip commands. One solution would be to have a Get button on the HUD that would open the browser with a list of all items that can be gotten from there. But that would only work right until the player moves, then the browser would be out of date and clicking any objects in there wouldn't do anything. I could try to clear the browser every time they move, but that would be such a pain that it's hardly worth it. Browser popup windows suffer from the same problems, although they might be easier to close automatically whenever the player moves without causing any trouble, since each window can be manipulated individually.

So I'm kind of at a loss here. I need a clean and simple solution for how to work with items without verbs. But I can't think of anything.
verbs -= /obj/verb/Equip
verbs += /obj/verb/Unequip
verbs += /obj/verb/Equip
verbs -= /obj/verb/Unequip
In response to Garthor
I was asking for a verbless solution NOT another way to work with verbs.
In response to Triste
May be too simple to think of, but what about using cick and double click?
In response to Maz
It's hard and clumsy to click on items on the ground. I put that in the same league as drag and drop.
In response to Triste
Then set their mouse_opacity to 2.
In response to Garthor
Then you can always pick up the item on top. Wonderful.
When you say "verbs" do you mean right-clicking an item and performing an action that way, or do you mean clicking a verb in the statpanel? I think right-clicking the verbs is the closest you'd get to verbless; just set them so they don't show in the statpanel.
In response to Triste
Last time I checked, it's a lot easier to pick up something from the top of a pile of junk than the bottom. If you want that thing at the bottom, move everything else.
In response to Triste
Macros? I thin you can only attach verbs to macros. But I think we might be able to use procs too? Well Im not quite sure. But I BARELY use verbs. I use aliases instead. Maybe you should try using aliases?
I do think that you shouldn't be quite so quick to discard BYOND's verb interface unless you're substituting something that can compare in terms of power and flexibility (i.e., putting in your own command parser), unless you're working on a very simple game that has very few commands to input (such as an action game that consists of movement and a firing button). That said, I do think that having alternate interface options is generally a very good idea. If you don't want to go with drag-and-drop, I think the most intuitive sort of interface would be to restrict getting objects to the same tile, and putting up some sort of list via HUD, statpanel, or browser when there's something to pick up--basically what you suggested, but continuous and automatic. If done properly this shouldn't be too CPU intensive, unless you plan on carpeting the game world with objects; expanding it to allow players to pick things up from farther away would be difficult, however.
In response to Garthor
I'm looking for a verbless system, not a more realistic one.
In response to Leftley
I suppose having another statpanel containing all the objects in the player's location. I don't know how laggy that would be, but then I doubt players would spend too much time in that panel unless they were meaning to pick something up anyway.
This may not be appropriate for the game you have in mind, but I'll offer it as a suggestion anyway:

1) "get" is automatic. If you walk into a tile containing a gettable object, you get it.

2) Each main type of item gets its own statpanel. "Weapons" contains all carried weapons. "Clothing" contains all choices of clothing (sorted by type, if you distinguish between head/torso/leg/hand/foot coverings). Clicking an item in a statpanel equips it (replacing whatever item is currently equipped); double-clicking drops it. An explicit "unequip" is unnecessary because there's no particular reason to unequip an item unless you want to replace it with another, which can be accomplished by clicking the replacement object.

Obviously that won't be appropriate for all games, but it's one possible approach.
In response to Gughunter
Gughunter wrote:
Clicking an item in a statpanel equips it (replacing whatever item is currently equipped); [...] An explicit "unequip" is unnecessary [...]

Just make a single click on an equipped item unequip it. :-)
Heh, the inventory system for DBTC was the big project that I just finished yesterday, actually...and since I've turned DBTC into a verbless, statpanel-less, HUD-operated system, I'll share my ideas...

First off, I simply moved all item getting into Bumped()... I mean, why make it any harder than just walking into what you want to pick up? Of course, objects will probably never be stacked, so there's no need for a way to pick which item to pick up... Only one per location...

Then, all inventory control is done through an interface that consists of left and right arrows that scroll through the objects in your inventory (all have been given a screen_loc var, turning them into screen objects themselves, so there's no need to create more objects), and you Click() on the one you want to do something with... I have multiple object types, so their Click() functions are different, but Clicking basic items brings up an input prompt with the available actions that can be performed with that object... (Use, Drop, and Cancel are all I really need, though)

The interface also includes buttons to change between categories of items (Quest related items, Fight support items, etc) that when clicked on, change the list of objects that scroll through the window to only those of that category (objects are separated by keeping them stored in lists upon being picked up... I.E.
for(var/obj/o in usr.questitems)
or whatnot)...

This method could be used to separate equipped items from unequipped items, and a small change could be made to the interface to have an extra HUD button for Equip/Unequip that only appears when the proper type of item is in the window (
if(item in usr.equipped) usr.client.screen += new/obj/Equip
or vice versa, for a bit of pseudo-code...)

However, I think the much better and simpler option for your case is to give each object a list of possible actions (Drop, Equip, Unequip, Examine, etc) and use that list in an input prompt when the item is clicked... When an item is Equipped, simply remove "Equip" from its list, and add "Unequip"... And vice versa...

Something like this:

// "Unequip" wouldn't be a starting action...
//since it obviously has to be equipped
//before it can be unequipped, and we'll deal
//with adding it when the item is equipped...
src.loc = M.loc
//equipping code here
//unequipping code here
var/action = input(usr, "What action?) in src.actionlist
if(action == "Equip")
if(action == "Unequip")
if(action == "Drop")

Or something like
Another idea would be to make the entire game function entirely through screen buttons and hotkeys. I think this is the way most games do it, since most games don't have verbs. That way, clicking a button or hitting a hotkey both do the same thing - and if the verbs themselves are hidden so the players can't type them, then I wouldn't have to worry about players manually typing anything in. Even dialog could be done through a popup text input box via button or hotkey.

The only thing that troubles me with this idea is that, suppose I have two items. One item is at 50% max quality, and the other is at 100%. You want to equip the 100% one, but using the equip verb would popup a list of equipment in your inventory that can be equippped. It would just list the two items together and you wouldn't get an option which one you wanted.

Well, I suppose I could modify items to show their quality percentages in their name. "Item (50%)" for example. Well, I'm just typing my thoughts here.
Look up "expanding" in the code reference. Verbs are very useful, and the expanding lists should allow you to accomplish what you're trying to do here. I've experimented with the verbless interface myself and found that its usually more hectic, at least with the ways I've tried. (dragging objects into your inventory to get them, out to drop them where you want, and on to your character to equip them) Currently I'm using a combonation of the two, so people can choose. The drag-and-drop is very useful for when you want to drop or toss an item to an exact location, but when you're trying to drag items into your inventory, you'll have to take into account when two players may have been dragging the same object, and whether or not they were going to be able to get that object. I don't know if your system uses weight to determine how much characters can carry. In any case, the expanding list thing will help you limit the criteria for what objects a player can affect. I ran into a problem similar to yours recently which I posted in code problems. Anyways, hope this has been of some help.

In response to SuperSaiyanGokuX
SuperSaiyanGokuX wrote:
Heh, the inventory system for DBTC was the big project that I just finished yesterday,

And its not uploaded why?
Why not use the browser, but have it so that you have a browser window that updates every time you move?

It'd make sense to me.
Page: 1 2