Jump to content
  • We need you!

    You must register to discover all the features of our community!

[RLS]Compare Item Tooltip


Recommended Posts

Didnt tested it but it could cause lags when you switch items by yourself instead of using switchbot, because the tooltip always changes every second. Same problem was in the item preview system so i had do make a config option to disable it. Did you tried this?

Link to post
Posted (edited)
2 hours ago, Mafuyu said:

Didnt tested it but it could cause lags when you switch items by yourself instead of using switchbot, because the tooltip always changes every second. Same problem was in the item preview system so i had do make a config option to disable it. Did you tried this?

**Update:

Hold ALT for preview

 

Edited by Mali61
update (see edit history)
  • Love 1

no paid service

use at least c++11 and VS19, otherwise I won't help.

Link to post

@Mali61 I have a small problem, if i try to compare a weapon or armor with stones it doesn't work :(

The equipped Item with stones is okay, but the item in inventory with stones can't be compared. Let me know if you can try it and see what I mean

Link to post
24 minutes ago, Cripplez said:

@Mali61 I have a small problem, if i try to compare a weapon or armor with stones it doesn't work :(

The equipped Item with stones is okay, but the item in inventory with stones can't be compared. Let me know if you can try it and see what I mean

spacer.png

no paid service

use at least c++11 and VS19, otherwise I won't help.

Link to post
1 hour ago, Cripplez said:

@Mali61 I have a small problem, if i try to compare a weapon or armor with stones it doesn't work :(

The equipped Item with stones is okay, but the item in inventory with stones can't be compared. Let me know if you can try it and see what I mean

 

54 minutes ago, Mali61 said:

spacer.png


I tested again and it works for me too when the player is GM, when the player is not GM I can't compare weapon/armor with stones :(

Link to post
Posted (edited)
18 minutes ago, Cripplez said:

 


I tested again and it works for me too when the player is GM, when the player is not GM I can't compare weapon/armor with stones :(

here is normal player https://puu.sh/FFkua/9309c491cd.png

I think it's enough, try to add to clean files

Edited by Mali61 (see edit history)
  • Love 1

no paid service

use at least c++11 and VS19, otherwise I won't help.

Link to post

Good idea - but I think it would be a better way to show a extra tooltip like your way but in this tooltip if you hover the item in inventory should be visible in green the difference of values when it is better and in red when the values are bad than the equipped

so the people don’t have to check them self - this could be useful

 

Maybe you find the idea good.

Link to post
Posted (edited)
5 hours ago, JeeX said:

Good idea - but I think it would be a better way to show a extra tooltip like your way but in this tooltip if you hover the item in inventory should be visible in green the difference of values when it is better and in red when the values are bad than the equipped

so the people don’t have to check them self - this could be useful

 

Maybe you find the idea good.

this version is quite enough for the free release

 

**Update:

-Inventory(with ALT key)

-Shop(except mainshop)

-Exchange(target)

-Safebox

-Mall

Edited by Mali61
shitty color (see edit history)

no paid service

use at least c++11 and VS19, otherwise I won't help.

Link to post
Posted (edited)

Good idea, the part of GetCompareIndex could be improved for better customization, by that people can add easily new types/subtypes.

 

Quote
def SetCompareItem(self, itemVnum):
	item.SelectItem(itemVnum)
	if not self.CompareTooltip:
		self.CompareTooltip = ItemToolTip()
		self.CompareTooltip.IsCompare = True
	self.CompareTooltip.Hide()
	idx = item.GetCompareIndex()
	if idx:
		self.CompareTooltip.SetInventoryItem(idx, player.INVENTORY, False)
		self.CompareTooltip.AutoAppendTextLine("{}Equipped".format("|cffADFF2F"))
		self.CompareTooltip.ResizeToolTip()

 

To:

 

Hidden Content

    Give reaction to this post to see the hidden content.

 

Quote
#if defined(__COMPARE_TOOLTIP__)
PyObject* itemGetCompareIndex(PyObject* poSelf, PyObject* poArgs)
{
	CItemData* pItemData = CItemManager::Instance().GetSelectedItemDataPointer();
	if (!pItemData)
		return Py_BuildException("no selected item data");

	DWORD idx = 0;
	const BYTE Type = pItemData->GetType();
	const BYTE SubType = pItemData->GetSubType();

	if (Type == CItemData::ITEM_TYPE_ARMOR) {
		switch (SubType) {
		case CItemData::ARMOR_BODY:	idx = c_Equipment_Body; break;
		case CItemData::ARMOR_HEAD:	idx = c_Equipment_Head; break;
		case CItemData::ARMOR_SHIELD:	idx = c_Equipment_Shield; break;
		case CItemData::ARMOR_WRIST:	idx = c_Equipment_Wrist; break;
		case CItemData::ARMOR_FOOTS:	idx = c_Equipment_Shoes; break;
		case CItemData::ARMOR_NECK:	idx = c_Equipment_Neck; break;
		case CItemData::ARMOR_EAR:	idx = c_Equipment_Ear; break;
		}
	}
	else if (Type == CItemData::ITEM_TYPE_WEAPON) {
		idx = c_Equipment_Weapon;
	}
	else if (Type == CItemData::ITEM_TYPE_COSTUME) {
		switch (SubType) {
		case CItemData::COSTUME_BODY:	idx = c_Costume_Slot_Body; break;
		case CItemData::COSTUME_HAIR:	idx = c_Costume_Slot_Hair; break;
#if defined(ENABLE_SASH_SYSTEM)
		case CItemData::COSTUME_SASH:	idx = c_Costume_Slot_Sash; break;
#endif
		}
	}
#if defined(ENABLE_NEW_EQUIPMENT_SYSTEM)
	else if (Type == CItemData::ITEM_TYPE_BELT) {
		idx = c_Equipment_Belt;
	}
#endif

	return Py_BuildValue("i", idx);
}
#endif

 

To:

 

Hidden Content

    Give reaction to this post to see the hidden content.

 

Edited by VegaS™ (see edit history)
  • Love 10
Link to post
  • 3 weeks later...

I have improved the code about show/hide the compare tooltip because you need press the button alt before move the mouse over the item, my english isnt good but here you can see the fix:
https://gyazo.com/2065ce1f010068384504732baf3ff564

Open uitooltip.py and find:

		if app.__COMPARE_TOOLTIP__ and app.IsPressed(app.DIK_LALT) and not slotIndex >= player.EQUIPMENT_SLOT_START and CompareItem:
			self.SetCompareItem(itemVnum)

remove or comment that code

now go to def OnUpdate(self):

and over this code

		if app.__COMPARE_TOOLTIP__:
			if self.IsCompare:
				return

add:

		if app.IsPressed(app.DIK_G):
			if self.IsCompare:
				return
			if not self.CompareTooltip:
				self.SetCompareItem(self.itemVnum)
		else:
			if self.CompareTooltip:
				self.CompareTooltip.Hide()
				self.IsCompare = False
				self.CompareTooltip = None

must see like this:
https://prnt.sc/sl7ohg

PD: I have changed the key to G because in key ALT i have the Rendertarget system and 2 systems made a bug in same key, but you can change the key to any you want.

 

Thanks for the release.

 

Link to post
  • 3 weeks later...

Hello everyone.
After I put it in. You receive the following error.

0606 12:37:26630 :: Traceback (most recent call last):

0606 12:37:26630 ::   File "ui.py", line 2206, in OnOverInItem

0606 12:37:26630 ::   File "ui.py", line 120, in __call__

0606 12:37:26631 ::   File "ui.py", line 111, in __call__

0606 12:37:26631 ::   File "uiInventory.py", line 1006, in OverInItem

0606 12:37:26631 ::   File "uiInventory.py", line 1182, in ShowToolTip

0606 12:37:26631 ::   File "uiToolTip.py", line 571, in SetInventoryItem

0606 12:37:26631 :: AttributeError
0606 12:37:26631 :: : 
0606 12:37:26631 :: 'ItemToolTip' object has no attribute 'SetCompareItem'

 

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Current Donation Goals

  • Activity

    1. 11

      Mysql56 to Mysql8

    2. 0

      Does anyone have Kami-Sama's Contact?

    3. 1

      [Trailer][1/3]NerviL2 The return of the Legend

    4. 0

      Won " price" change

    5. 10

      Inferna - The new "metin3"?

    6. 6

      We need you!

    7. 2

      Highlight system bug

  • Recently Browsing

    No registered users viewing this page.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.