Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 14, 2010, 18:22   #1
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,726
PowerDiver is on a distinguished road
why sort the pack?

I think it is a mistake to move items around in the pack. The standard complaint is that when you identify an item, it isn't there any more when you go to use it, but there are more problems than that. It would be reasonable if there was a tradeoff and you got something useful in return, but ...

I see hardly any value at all in sorting the pack. Why should the pack be sorted?

This is separate from how you should display lists. I am all in favor of sorted lists, keeping potions or scrolls etc together in the inventory list, although even there I question whether the current sorting rules are the best.

E.g. with items in arbitrary slots you might be asked
Code:
Quaff which potion?

(g) healing
(r) enlightenment
(m) speed
although perhaps the potions would be better sorted alphabetically rather than by sval as I believe is done currently.


A tangentially related issue is why to have the phantom extra slot in the pack? That seems to exist only so that when you unwield an item with a full pack you drop the last item in the resorted pack rather than the item you unwielded, which IMO is the wrong behavior anyway.
PowerDiver is offline   Reply With Quote
Old April 14, 2010, 18:49   #2
Atriel
Apprentice
 
Atriel's Avatar
 
Join Date: Aug 2007
Posts: 81
Atriel is on a distinguished road
As long as items of the same kind are kept together, I'm OK with anything! (Potions with potions, etc) ^^
Atriel is offline   Reply With Quote
Old April 14, 2010, 18:57   #3
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,022
Derakon is on a distinguished road
I definitely think that the display should always be sorted. Always having spellbooks at the top of the list, followed by potions and scrolls (um, food goes in there somewhere...whatever) is important. As for whether or not the visual display should correspond to the letters is a different matter, but personally I think that should also stay. My reasoning is twofold:

1) It makes it easier to deal with a series of items. If, for example, I'm sorting through the weapons I've just picked up, and the first weapon is in slot 'p', then I know that I can check the item in slot 'p', decide to chuck it, check the next weapon, which is now in slot 'p', decide to chuck it, check the next weapon in slot 'p', decide to keep it, check the next weapon in slot 'q', and so on. If your inventory didn't get resorted as you pick up and drop new items, then very rapidly the letters next to items in inventory would have absolutely nothing to do with their order in the visual list, which would render this approach pointless.

2) It's easier on newbies who need to do repetitive actions and haven't learned to use the macro system yet. They can easily train their muscle memory to type 'mad' and 'mcf' and so on, and that will work for every spellcaster they play regardless of when they get their books. With a non-sorting inventory, each spellcaster has to learn where their spellbooks go each time -- and worse, if they happen to lose one of their spellbooks temporarily, when they get it back it'll be in a new slot.

What does a non-sorting inventory gain us?

Incidentally, I agree with your reasoning about the phantom slot. If you're forced to drop something, it should be the item that you tried to stick into an overfull pack, not the notional "last" item in said pack.
Derakon is offline   Reply With Quote
Old April 14, 2010, 19:10   #4
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,726
PowerDiver is on a distinguished road
Quote:
Originally Posted by Derakon View Post
2) It's easier on newbies who need to do repetitive actions and haven't learned to use the macro system yet. They can easily train their muscle memory to type 'mad' and 'mcf' and so on, and that will work for every spellcaster they play regardless of when they get their books. With a non-sorting inventory, each spellcaster has to learn where their spellbooks go each time -- and worse, if they happen to lose one of their spellbooks temporarily, when they get it back it'll be in a new slot.

What does a non-sorting inventory gain us?
For one thing, it gets you what you want in (2), which currently IS NOT TRUE. If your (a) book gets burnt, the others move, and muscle memory results in casting the wrong spell. Or if you get book four before you get book three, etc. With unsorted inventory, you can [and the code should by default] assign forced slots to particular items, guaranteeing that the third book is in slot (c) if present, and no other usable book is ever in slot (c).

Unsorted inventory is easier on newbies than sorted inventory in this case.
PowerDiver is offline   Reply With Quote
Old April 14, 2010, 19:28   #5
RogerN
Swordsman
 
RogerN's Avatar
 
Join Date: Jul 2008
Posts: 308
RogerN is on a distinguished road
Quote:
A tangentially related issue is why to have the phantom extra slot in the pack? That seems to exist only so that when you unwield an item with a full pack you drop the last item in the resorted pack rather than the item you unwielded, which IMO is the wrong behavior anyway.
That sounds like a bug. The correct behavior is to store the unwielded item in the "phantom slot". Pack overflowing occurs before inventory sorting (or at least it ought to) so that the unwielded item is dropped. Perhaps some recent code changes broke the order of events in certain circumstances?

It's also possible that I'm remembering code from a variant instead of Vanilla.
RogerN is offline   Reply With Quote
Old April 14, 2010, 20:07   #6
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,726
PowerDiver is on a distinguished road
Quote:
Originally Posted by Derakon View Post
If, for example, I'm sorting through the weapons I've just picked up, and the first weapon is in slot 'p', then I know that I can check the item in slot 'p', decide to chuck it, check the next weapon, which is now in slot 'p', decide to chuck it, check the next weapon in slot 'p', decide to keep it, check the next weapon in slot 'q', and so on.
This is a good point, but I think the answer might be to implement an orthogonal solution. I cannot imagine that anyone tests items more than I do, and in my experience it does not quite work. When testing consumables, you need to increment the letter only sometimes. When testing weapons, the mix of slice vs thrust vs blunt means that I still have to examine the letters. I found that I was wrong so often I just had to instill the discipline to read the letter every time.

Better sorting would help, placing all tested/id'ed weapons before all untested regardless of tval, actually untested before tested probably works better, but that is still only a partial solution.

How about a change to the item selection hook so that, say, ',' means to use an item that has not previously been tried [unless it has a !use modifier]? So when I find the stairs, I can repeatedly 'r' ',' to test all the new scrolls in my pack. When you collect a bunch of wieldables from a pit, 'w' ',' to try each in turn. Perhaps there should be both ',' and '.' with the difference being one is safe and only wields pseudoed non-cursed items, and the other also wields jewelry and non-pseudoed stuff.

I've never thought about this before, so it may have some glaring flaws, but I think it would be useful.
PowerDiver is offline   Reply With Quote
Old April 14, 2010, 23:38   #7
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Quote:
Originally Posted by PowerDiver View Post
How about a change to the item selection hook so that, say, ',' means to use an item that has not previously been tried [unless it has a !use modifier]? So when I find the stairs, I can repeatedly 'r' ',' to test all the new scrolls in my pack. When you collect a bunch of wieldables from a pit, 'w' ',' to try each in turn. Perhaps there should be both ',' and '.' with the difference being one is safe and only wields pseudoed non-cursed items, and the other also wields jewelry and non-pseudoed stuff.

I've never thought about this before, so it may have some glaring flaws, but I think it would be useful.
Huh, I'd use that. It would be easy to keep one from drinking the last !CCW when there is an unid potion below it. Also it supports the shift to pseudo id that has happened.
Sirridan is offline   Reply With Quote
Old April 15, 2010, 23:17   #8
fph
Veteran
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 1,020
fph is on a distinguished road
Quote:
Originally Posted by Sirridan View Post
It would be easy to keep one from drinking the last !CCW when there is an unid potion below it.
This can easily be avoided by inscribing them {!*}. You gotta learn this inscription, it's one of @'s best friends.
fph is offline   Reply With Quote
Old April 16, 2010, 01:21   #9
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Quote:
Originally Posted by fph View Post
This can easily be avoided by inscribing them {!*}. You gotta learn this inscription, it's one of @'s best friends.
I actually do this to pretty much everything, and have for a while. But there are those times I forget, and I don't really like auto-inscriptions much.
Sirridan is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump


All times are GMT +1. The time now is 03:11.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.