Sort Container Contents?

Started by Feco, June 18, 2010, 08:54:16 PM

This seems like it should have popped up before, but I can't find any trace of a topic... so... Here we go!

How about a way to sort things in a container in some manner?  Might seem a little silly, but containers with lots of really small items can get sort of difficult to read.  It does make it a bit easier using "key ." but it would just be cool to have a nice, neat, orderly container.  Perhaps adding a delay to the command would be nice.  It can be assumed that an unsorted container just has things thrown around in it, and sorting one would take a little time to accomplish.

It was pointed out to me by Cutthroat that shops already sort things alphabetically, so maybe that code could be applied somehow.  Pain in the ass and not worth the effort, or "great idea Feco we love you"?
QuoteSunshine all the time makes a desert.
Vote at TMS
Vote at TMC

It'd be great to be able to sort the contents of containers without having to go through them and take everything out and put them back in the order you want them in. As long as you remember that game resets reverse whatever order it's in. So if you sorted it alphabetically and the game reset, you'll see that it's all still alphabetical, but with Z stuff first and A stuff last.

Oh and then..while we're at it:

be able to type:
@move all.white.blocky 3.trunk 2.chest
which would do the same thing that "pour" does now with items in containers, except you wouldn't have to pick up the container to do it and you can move all of a specific thing, instead of everything from point A to point B. The "virtual" story, is that you are picking up a few handsful of these things at a time, and dumping them into another container, then going back and picking up more, and dumping them in...and the delay would reflect how much stuff you're moving.

Talia said: Notice to all: Do not mess with Lizzie's GDB. She will cut you.
Delirium said: Notice to all: do not mess with Lizzie's soap. She will cut you.

Quote from: Lizzie on June 18, 2010, 09:06:31 PM

be able to type:
@move all.white.blocky 3.trunk 2.chest
which would do the same thing that "pour" does now with items in containers, except you wouldn't have to pick up the container to do it and you can move all of a specific thing, instead of everything from point A to point B. The "virtual" story, is that you are picking up a few handsful of these things at a time, and dumping them into another container, then going back and picking up more, and dumping them in...and the delay would reflect how much stuff you're moving.

Seconded -- while we're at it :p
QuoteSunshine all the time makes a desert.
Vote at TMS
Vote at TMC

Quote from: Lizzie on June 18, 2010, 09:06:31 PM
@move all.white.blocky 3.trunk 2.chest

This can already be done. The "get" and "put" commands can be overlapped.

if you type:
get all.white.blocky 3.trunk
put all.white.blocky 2.chest

This will accomplish what you have in mind. If you type them in fast enough, you'll usually get 2 of the white.blocky from 3.trunk and then start to put white.blocky into 2.chest. This cycle will automatically continue until all of the items are transferred.
Squinting at the such-and-such dwarf, the so-and-so woman asks, in sirihish:
     "You put jam in your peenee hole to keep from making baby juice?"

I tend to have to use copy/paste or some variant to type such commands quickly enough.

This:
Quote>get all.doodad 1.trunk;put all.doodad 2.trunk
You get a doodad from the trunk.
You get a doodad from the trunk.
You put a doodad in the trunk.
You get a doodad from the trunk.
You put a doodad in the trunk.
You do not see any 'doodads' in a trunk.
You put a doodad in the trunk.
You have no 'doodads'.
Quote from: MalifaxisWe need to listen to spawnloser.
Quote from: Reiterationspawnloser knows all

Quote from: SpoonA magicker is kind of like a mousetrap, the fear is the cheese. But this cheese has an AK47.

I meant that it'd be great if it could be done without the screen scroll. That's why I compared it to the "pour.container" command; because if you type 'pour bag 2.bag" you get -no- screen scroll, but a big delay. And you can't pour "only the red things" into the other bag.

So when I said "get all.blocky 3.chest;put all.blocky 2.trunk" I'd want the result to be

the code transfers all the blocky things from the 3rd chest to the 2nd trunk, but there's no echo in the game. However, there is a delay, and at the end of the delay you get a single line saying "Okay, you've poured all the blocky things into the 2nd trunk."
Talia said: Notice to all: Do not mess with Lizzie's GDB. She will cut you.
Delirium said: Notice to all: do not mess with Lizzie's soap. She will cut you.

I don't mind that as much as I mind a bin filled with ingredients or really small foraged/skinned items being in so sort of order.  Something as simple as sticking them in alphabetical would be great.

Of course the items wouldn't "actually" be alphabetical -- it's just the best way to say "this container has been sorted."
QuoteSunshine all the time makes a desert.
Vote at TMS
Vote at TMC

I had posted earlier - about a "transfer" command, which would basically do the same thing as the move command mentioned in this thread:

transfer (qty or all) #.item <from container> <to container>

In the absence of a coded command, I use a rudimentary ZMUD alias to help me.
#alias trans %1 %2 %3 {get %1 %2;put %1 %3}
where
%1 = item
%2 = from container
%3 = to container
So, trans marble 2.backpack 3.crate = would perform "get marble 2.backpack" and then "put marble 3.crate".
Nifty if you need it, or you're picky about organizing your stuff.

While we're on the subject of sorting I would like to suggest:
sort <container> <argument>
where possible arguments would be:
a) Value (sort container -v)
b) Weight (sort container -w)
c) Wear_Pos (sort container -p)
d) Alphabetically (sort container -a)
e) Type (sort container -t)

Think about it - wouldn't it be really awesome if you could first sort your entire container by type (armors first, then clothing, and going down alphabetically, ending up with weapons), and then re-sorting the same container by value - so you'd get all the armors from highest value to lowest value grouped first, and so on and so forth. (Or possibly use both the arguments in tandem - whatever works code-wise).
The figure in a dark hooded cloak says in rinthi-accented Sirihish, 'Winrothol Tor Fale?'

Have to be careful with value and weight, because, correct me if I'm wrong, accurately determining those two variables for an item is a skill not all characters can have.

Otherwise, yes, it would be neat to be able to sort containers a few ways.  However, if it makes it annoying or difficult to implement, I'm all for just alphabetical.
QuoteSunshine all the time makes a desert.
Vote at TMS
Vote at TMC

Getting an accurate weight, sure, requires skill.  Telling if two things are heavier/lighter than each other, though, shouldn't take much skill at all.
Quote from: MalifaxisWe need to listen to spawnloser.
Quote from: Reiterationspawnloser knows all

Quote from: SpoonA magicker is kind of like a mousetrap, the fear is the cheese. But this cheese has an AK47.

Quote from: spawnloser on June 21, 2010, 01:20:46 PM
Getting an accurate weight, sure, requires skill.  Telling if two things are heavier/lighter than each other, though, shouldn't take much skill at all.

This.