Interface improvements suggestion thread

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
paulo

Interface improvements suggestion thread

Post 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?
paulo

Re: Interface improvements suggestion thread

Post 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.
paulo

Re: Interface improvements suggestion thread

Post by paulo »

"number of stackable items" should be "number of types of stackable items"
paulo

Re: Interface improvements suggestion thread

Post 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.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Interface improvements suggestion thread

Post by Dominus »

on lockpicks, I prefer using the p key :)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
paulo

Re: Interface improvements suggestion thread

Post 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).
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: Interface improvements suggestion thread

Post by drcode »

Closing the inventory is probably due to usecode.
paulo

Re: Interface improvements suggestion thread

Post by paulo »

Can't you do patches to usecode like scummvm does patches to buggy scripts sometimes?
Friendly79
Posts: 7
Joined: Thu May 14, 2020 1:34 pm

Re: Interface improvements suggestion thread

Post 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
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Interface improvements suggestion thread

Post 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 ;)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
paulo

Re: Interface improvements suggestion thread

Post 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).
paulo

Re: Interface improvements suggestion thread

Post by paulo »

Õh, it happens for drops on top of another shape of the same type, yeah.
paulo

Re: Interface improvements suggestion thread

Post 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?
paulo

Re: Interface improvements suggestion thread

Post by paulo »

code is confusing btw :)
paulo

Re: Interface improvements suggestion thread

Post 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?
paulo

Re: Interface improvements suggestion thread

Post 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.
Locked