• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Dynamic item tooltips for container items (OTClient + TFS 0.4)

Zazeros

Member
Joined
Feb 13, 2012
Messages
84
Reaction score
21
Hello everyone.

I'm trying to extend my dynamic item tooltip system in OTClient/TFS 0.4. Tooltips already work for equipped items, because the client can request the correct server-side item and the server can return all custom attributes (enchantments, bonus stats, etc.).

Now I want the same behavior for items inside containers (backpacks and loot), but the client only receives basic item data and not the real server-side item instance. Because of that, the server cannot generate the correct tooltip for container items.

My current idea is to modify the protocol so the server also sends a unique UID for every item in containers, and then add a function on the server like getPlayerItemByUid to retrieve the real item. The client would then request tooltips using this UID.

Before I go further, is there an easier or more common method to get the actual server item from inventory containers for tooltips? Or is modifying the protocol and adding item UIDs the correct approach?


Any advice would be appreciated.
 
Back
Top