Sneaky 2 Posted September 17, 2019 Share Posted September 17, 2019 (edited) hey i try to add rarity in the uitooltip via AddItemData for the attributes. For example, 1 to 5 is common and 6-7 is rare I tried So Does anyone have a solution? greetings if player.ATTRIBUTE_SLOT_RARE_START >=1 and player.ATTRIBUTE_SLOT_RARE_START <=5: self.AppendTextLine("Common", self.CONDITION_COLOR) Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Sneaky 2 Posted September 17, 2019 Author Share Posted September 17, 2019 Habs done .. was just stupid. xD It was right in front of my eye .. ^^ Greetings. Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10264 Posted September 18, 2019 Forum Moderator Share Posted September 18, 2019 (2.5) Questions & Answers specific rules Don't modify your thread (or reply to it) to mark it solved, and not explain the solution to the issue. For those who want this, you can do something like: [Not tested] This is the hidden content, please Sign In or Sign Up 15 1 3 10 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Sneaky 2 Posted September 18, 2019 Author Share Posted September 18, 2019 vor 13 Stunden schrieb VegaS™: (2.5) Questions & Answers specific rules Don't modify your thread (or reply to it) to mark it solved, and not explain the solution to the issue. For those who want this, you can do something like: [Not tested] uiToolTip.py # Search for: def __SetSpecialItemTitle(self): self.AppendTextLine(item.GetItemName(), self.SPECIAL_TITLE_COLOR) # Add after: def __GetRarityTitleByAttr(self, attrSlot): attrCount = len([slot for slot in attrSlot if slot[1]]) if attrCount in range(1, player.ATTRIBUTE_SLOT_NORM_NUM + 1): return localeInfo.TOOLTIP_ITEM_TITLE_COMMON elif attrCount in range(player.ATTRIBUTE_SLOT_NORM_NUM + 1, player.ATTRIBUTE_SLOT_RARE_END + 1): return localeInfo.TOOLTIP_ITEM_TITLE_RARE return None # Search for: self.__SetSpecialItemTitle() # Add before: rarityTitle = self.__GetRarityTitleByAttr(attrSlot) if rarityTitle: self.AppendTextLine(rarityTitle, self.CONDITION_COLOR) locale/uk/locale_game.txt TOOLTIP_ITEM_TITLE_COMMON Common TOOLTIP_ITEM_TITLE_RARE Rare I'm sorry for breaking the rules. Hey Vegas, Thank you for your solution! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now