Page 1 of 1

Interface improvements suggestion thread

Posted: Tue Jun 21, 2011 7:09 pm
by paulo
As the title says (i'm not much for justifications)

One thing that always annoyed me was the moving around of stacks. 99% of the time you want to move it all. Now that we have mouses with 3 buttons, how about adding a alternate drag mode for the middle mouse button: always drop everything if it's possible.

Another:
Using lockpicks is a process that is somewhat predictable, you open the dragdoll, open inventory click on the picks, and click on the locked thing. Oh but you missed - and Spark helpfully explains you missed. When Spark stops talking, your inventory is closed. Thanks Spark!

Another yet:
Manual aggregation of inventory stacks in the party is so 1994. If i want 20 10 coin piles i will separate them myself, and i only want that if i am dividing my gold to another party member and that happens naturally when i drop it.
Technical details are a bitch obviously (memory from all those containers), but i think that just doing it for the party members containers is good enough: it simulates a fussy, "avatar" like personalty.
Then you'd only need to keep a "last not filled stack" in memory, for the items where it applies (stackable).

What other suggestions you have?

Should i file a request for enhancement?

Re: Interface improvements suggestion thread

Posted: Tue Jun 21, 2011 7:27 pm
by paulo
To do it for the party members containers you could mark containers as "party" containers when dropped into a party member, or dropped into a "party" container.

This would allocated a fixed size (of number of stackable items) array of counters

NULL means no last stack, add stack as last stack, otherwise add stacks and conditionally create a new one and replace the stack (do all stacks have limits?).

Removing a stack is also needs to check if the stack is the current last stack. If it is, set to NULL.

Remove the dynamic memory when a container is removed from the party members (and don't forget any container inside the container).

Also scripts giving sacks, like the keymod.

Seems like it teh hard.

Re: Interface improvements suggestion thread

Posted: Tue Jun 21, 2011 7:29 pm
by paulo
"number of stackable items" should be "number of types of stackable items"

Re: Interface improvements suggestion thread

Posted: Tue Jun 21, 2011 7:42 pm
by paulo
Maybe instead of fixed size it's better to make it a set, sets can grow and it's less bookkeeping. Just check if the added item is stackable and it already exists in the set.

Re: Interface improvements suggestion thread

Posted: Tue Jun 21, 2011 7:48 pm
by Dominus
on lockpicks, I prefer using the p key :)

Re: Interface improvements suggestion thread

Posted: Tue Jun 21, 2011 7:52 pm
by paulo
Still, dialog should not close the inventory if it was open (or maybe restore it, layers or something, though this is probably pushing it).

Re: Interface improvements suggestion thread

Posted: Wed Jun 22, 2011 7:30 pm
by drcode
Closing the inventory is probably due to usecode.

Re: Interface improvements suggestion thread

Posted: Wed Jun 22, 2011 11:39 pm
by paulo
Can't you do patches to usecode like scummvm does patches to buggy scripts sometimes?

Re: Interface improvements suggestion thread

Posted: Thu Jun 23, 2011 8:06 pm
by Friendly79
I would like to suggest an improvement to the inventory mechanic..
We have I to bring up the Avatar's paper doll I think you call it.
Then we also have 1, 2, 3, 4, etc.. to bring up the corresponding character doll.
What I'm thinking is with having the health/mana bar at the bottom and it being easy enough to dbl click a particular character to see his/her doll, why don't we change the 1, 2, 3 etc. to be the actual backpack of that character..

so I = Avatar doll, 1 = Avatar's backpack, 2 = Character 2's backpack..

you could even go so far as to add Shift-1, 2, 3 etc. to open the belt pouch if equipped

Re: Interface improvements suggestion thread

Posted: Thu Jun 23, 2011 9:23 pm
by Dominus
Please make use of the feature request tracker. As with bugs, stuff not tracked will eventually be lost/forgotten/out of sight
http://sourceforge.net/tracker/?group_i ... tid=352335

Even better would be if you could submit patches ;)

Re: Interface improvements suggestion thread

Posted: Thu Jun 23, 2011 11:00 pm
by paulo
Well, funny enough, the container code appears to already do something similar:

if (combine) // Should we try to combine?
{
Shape_info& info = obj->get_info();
int quant = obj->get_quantity();
// Combine, but don't add.
int newquant = add_quantity(quant, obj->get_shapenum(),
info.has_quality() ? obj->get_quality() : c_any_qual,
obj->get_framenum(), true);
if (newquant == 0) // All added?
{
obj->remove_this();
return true;
}
else if (newquant modify_quantity(newquant - quant);
}

contain.cc

Bizarrely this never seems to happen, guess combine is never true? Whatever, C++ is beneath my fists (don't ask, it's a rpgcodex meme).

Re: Interface improvements suggestion thread

Posted: Thu Jun 23, 2011 11:03 pm
by paulo
Õh, it happens for drops on top of another shape of the same type, yeah.

Re: Interface improvements suggestion thread

Posted: Fri Jun 24, 2011 12:39 am
by paulo
Well i found the code where to put in the "alternate drag mode" effect:

drag.cc line 534
Gump *on_gump = gumpman->find_gump(x, y);
// Don't prompt if within same gump.
if (quantity > 1 && (!on_gump || on_gump != gump))
quantity = gumpman->prompt_for_number(0, quantity,
1, quantity);

So i have to add a check for a "alternate drag key button", remove the prompt and either move everything or move nothing.

Have some guidance about that?

Re: Interface improvements suggestion thread

Posted: Fri Jun 24, 2011 12:41 am
by paulo
code is confusing btw :)

Re: Interface improvements suggestion thread

Posted: Fri Jun 24, 2011 12:53 am
by paulo
Yeah i "only" have to disable the if if i find i'm in the "alternate drag mode" (ie: the middle mouse button), and replace the middle mouse to use that you have with a alias for the normal left click.

Then maybe do a menu option.
Know where i can do this?

Re: Interface improvements suggestion thread

Posted: Fri Jun 24, 2011 10:38 am
by paulo
Guys i've been using a compile with that branch disabled and it's much less irritating, you should probably even do a mode where this is the default (left click to drag without confirmation, middle to drag with confirmation).

I think i will open a RFE.