Jump to content
  • 0

Consumables in favorites


Seravy

Question


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.02
  • Content Count:  176
  • Reputation:   60
  • Joined:  01/11/19
  • Last Seen:  

I've discovered that no matter how many times I put my Blue Gemstones into the favorites tab, they keep going back to to the etc tab soon after.

The reason seems to be very simple - whether something has been moved to the tab or not is stored in the item itself. Once I use up the gemstones and refill them from a shop or storage, they are new gemstones so they server won't remember they were set to be in the favorites tab. This is a problem especially because I changed my storeall and gstoreall commands to not store favorites, and use those to clean my inventory from loot but even otherwise, the point of the favorites tab is to have the items you need to keep in your inventory at all time separated. Gems, potions, arrows, quivers, etc are definitely those kinds of items.

So I request a way to PERMANENTLY store an item on the favorites tab, even if it's consumable and gets used up. Normally I'd do it myself but I'm pretty sure this requires adding a new database field or table and storing the favorites there, and I have no idea whatsoever how to do that. Basically, if something that isn't an equipment is set to a favorite, the item ID+char ID pair should be stored in a separate database table, and restored from there whenever a new instance of the matching item is placed into the inventory. (In case of equipment, they won't ever leave your inventory in the first place, and they are unique pieces, so the existing system is perfect for them.)

I don't know how this works on official - so this might actually be a bug, or might not, but it's certainly a missing, critically useful feature even if not a bug.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  228
  • Reputation:   19
  • Joined:  10/27/12
  • Last Seen:  

1 hour ago, Seravy said:

I've discovered that no matter how many times I put my Blue Gemstones into the favorites tab, they keep going back to to the etc tab soon after.

The reason seems to be very simple - whether something has been moved to the tab or not is stored in the item itself. Once I use up the gemstones and refill them from a shop or storage, they are new gemstones so they server won't remember they were set to be in the favorites tab. This is a problem especially because I changed my storeall and gstoreall commands to not store favorites, and use those to clean my inventory from loot but even otherwise, the point of the favorites tab is to have the items you need to keep in your inventory at all time separated. Gems, potions, arrows, quivers, etc are definitely those kinds of items.

So I request a way to PERMANENTLY store an item on the favorites tab, even if it's consumable and gets used up. Normally I'd do it myself but I'm pretty sure this requires adding a new database field or table and storing the favorites there, and I have no idea whatsoever how to do that. Basically, if something that isn't an equipment is set to a favorite, the item ID+char ID pair should be stored in a separate database table, and restored from there whenever a new instance of the matching item is placed into the inventory. (In case of equipment, they won't ever leave your inventory in the first place, and they are unique pieces, so the existing system is perfect for them.)

I don't know how this works on official - so this might actually be a bug, or might not, but it's certainly a missing, critically useful feature even if not a bug.

SQL table + source...

take a loot at item hotkey ...

it's save in sql table and read from ...(i dont know what reads from it thou)

may be you can find something there...

Edited by utofaery
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

why so complicated ?

 src/map/pc.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 5aace7ecb..f13aa90c3 100755
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -4595,6 +4595,9 @@ char pc_additem(struct map_session_data *sd,struct item *item,int amount,e_log_p
 		if (!itemdb_isstackable2(id) || id->flag.guid)
 			sd->inventory.u.items_inventory[i].unique_id = item->unique_id ? item->unique_id : pc_generate_unique_id(sd);
 
+		if ( item->nameid == 717 )
+			sd->inventory.u.items_inventory[i].favorite = 1;
+
 		clif_additem(sd,i,amount,0);
 	}
 

any character pick up, gets a blue_gemstone(717), is automatically put into favorite tab

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.02
  • Content Count:  176
  • Reputation:   60
  • Joined:  01/11/19
  • Last Seen:  

Oh, you mean I should hardcode it into the source? Yeah that could work but I need to make it different based on class... priests will need their blue gems, but alchemists need their stems, fabrics and bombs instead, every class uses different stuff. And it can be well over a dozen items for some, like archers need all the arrow types and quivers.

Doable of course, but it's seems to actually take more time and effort that way than making the SQL table...

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.02
  • Content Count:  176
  • Reputation:   60
  • Joined:  01/11/19
  • Last Seen:  

On 2/11/2019 at 11:11 AM, utofaery said:

SQL table + source...

take a loot at item hotkey ...

it's save in sql table and read from ...(i dont know what reads from it thou)

may be you can find something there...

Thanks, searching for hotkey was a good idea, was able to find all the relevant SQL parts through that. So far only tested on my GM account but my implementation seems to work correctly. If no bugs surface in the next few days, I'll consider posting it in source releases.

Edited by Seravy
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  228
  • Reputation:   19
  • Joined:  10/27/12
  • Last Seen:  

On 2/12/2019 at 10:52 AM, Seravy said:

Oh, you mean I should hardcode it into the source? Yeah that could work but I need to make it different based on class... priests will need their blue gems, but alchemists need their stems, fabrics and bombs instead, every class uses different stuff. And it can be well over a dozen items for some, like archers need all the arrow types and quivers.

Doable of course, but it's seems to actually take more time and effort that way than making the SQL table...

Sql means more process needed in action.

Client -> Server -> SQL -> Server -> Client

source means 

Client -> Server -> Client

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...