Jump to content

Recommended Posts

Hello dear metin2dev community,

I learned a lot from there, and I want to pay back to you, it's not much and it probably could be done more efficiently and better by someone more expierenced than me. Let's start.

It looks like that:

 

13734778_645083005643133_1410289638_n.pn

 

the top attributes here are highlighted using this color.

 

So, in order to achieve that effect, open your uitooltip.py file and serach for __AppendAttributeInformation function definition.

 

you will see this:

affectColor = self.__GetAttributeColor(type, value)

and it is needed to be swapped with

 

affectColor = self.__GetAttributeColorEx(value, type)

now, under __AppendAttributeInformation function add an other one

	    def __GetAttributeColorEx(self, value, type):
	        TOP_BONY = [[1,2000],
                    [2,80],
                    [3,12],
                    [4,12],
                    [5,12],
                    [6,12],
                    [7,8],
                    [8,20],
                    [9,20],
                    [10,30],
                    [11,30],
                    [12,8],
                    [13,8],
                    [14,8],
                    [15,10],
                    [16,10],
                    [17,10],
                    [18,20],
                    [19,20],
                    [20,20],
                    [21,20],
                    [22,20],
                    [23,10],
                    [24,10],
                    [25,10],
                    [26,10],
                    [27,15],
                    [28,15],
                    [29,15],
                    [30,15],
                    [31,15],
                    [32,15],
                    [33,15],
                    [34,15],
                    [35,15],
                    [36,15],
                    [37,15],
                    [38,15],
                    [39,15],
                    [41,5],
                    [43,20],
                    [44,20],
                    [45,20],
                    [48,1],
                    [53,50],
                    [71,10],
                    [72,35]]
        for i in range(len(TOP_BONY)):    
            if int(TOP_BONY[i][0]) == int(type):
                if int(TOP_BONY[i][1]) == int(value):
                    return 0xff51A351
                else:
                    return self.SPECIAL_POSITIVE_COLOR
        if value == 0:
            return self.NORMAL_COLOR

 

The first element of the table is the TYPE, you can find all of the types being used by your game at the bottom of your uitooltip.py file in AFFECT_DICT dictionary. The second element is the max value. 

 

 

Have fun and thank you for everything <3

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 2
Link to comment
https://metin2.dev/topic/12688-highlight-top-attribute/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.