SQ command with wands, scrolls, potions

Completed suggestions should be posted here. Note that replies from other forum members are disallowed in this subforum.


Moderators: Forum Moderators, Suggestion Moderators

Locked
Quidix
Arelith Gold Supporter
Arelith Gold Supporter
Posts: 399
Joined: Sun Dec 30, 2018 1:49 pm

SQ command with wands, scrolls, potions

Post by Quidix » Sat Mar 18, 2023 8:47 am

The new sq command is simply amazing. Thank you! Such a smart QoL feature.

Could wands, scrolls, and potions be added through another set of modifiers? (eg w for wand, p for potion, sc for scroll; so if I typed -sq 102sc it would find a Mage Armor scroll in my inventory and use it on self)


User avatar
Sincra
Project Lead
Project Lead
Posts: 1024
Joined: Fri Oct 08, 2021 6:48 pm

Re: SQ command with wands, scrolls, potions

Post by Sincra » Sun Mar 19, 2023 12:42 am

This becomes increasingly heavier the more we add to it that has to iterate an inventory repeatedly.

For example we have three approaches:
Method 1:
Capture all items you're looking to use/apply
Iterate inventory and compare every item found to the entire set of items you specified, the longer this list the more intensive this becomes.

Method 2:
Capture each item in the list 1 at a time
This then requires every item in the list iterates over the entire inventory to see if any match.

Method 3:
Json capture the data set
Compare the entire inventory data dump page by page for any values in the Json set, then somehow activate these in the desired order.

Matching an items properties for method 1 and 2 requires several more grabs of data so it's not just "oh a wand of X" it's:
A wand
With a spell property
The spell property matches the data

All of this is valid but depending on the size of input it is also inefficient.

Irongron wrote:I've literally never used -guard on anyone.

Locked