[RELEASE] Needing STATs instead of LVL

08/08/2017 15:41 ericblck#1
In Metin2 - like other MMORPGs - you can make items need status points to be equipped. I'll show you how.

Open locale_game.txt (in locale_xy)

Search for: TOOLTIP_ITEM_LIMIT_CON

Below you'll see the rest, you can set the way you want them to appear like

TOOLTIP_ITEM_LIMIT_CON Needed CON: %d
TOOLTIP_ITEM_LIMIT_DEX Nedded DEX: %d
TOOLTIP_ITEM_LIMIT_INT Needed INT: %d
TOOLTIP_ITEM_LIMIT_LEVEL %d. szinttől
TOOLTIP_ITEM_LIMIT_STR Needed STR: %d

Next, open uitooltip.py in root and search for: if item.LIMIT_LEVEL == limitType:

Modify this part to make it look something like this (take care of tabulators):
Code:
			if item.LIMIT_LEVEL == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.LEVEL), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_LEVEL % (limitValue), color)
			elif item.LIMIT_STR == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.ST), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_STR % (limitValue), color)
			elif item.LIMIT_DEX == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.DX), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_DEX % (limitValue), color)
			elif item.LIMIT_INT == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.IQ), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_INT % (limitValue), color)
			elif item.LIMIT_CON == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.HT), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_CON % (limitValue), color)
If you're using txt item proto, then write DEX, INT, CON or STR to limittype0 and the value to limitvalue0 like when you set the level limit.

If you're item_proto is in mysql, then the limitvalue values are:
2 - STR
3 - DEX
4 - INT
5 - CON
08/08/2017 22:19 .T4Ump#2
Screen?
08/09/2017 19:01 Samael#3
Quote:
Originally Posted by ericblck View Post
In Metin2 - like other MMORPGs - you can make items need status points to be equipped. I'll show you how.

Open locale_game.txt (in locale_xy)

Search for: TOOLTIP_ITEM_LIMIT_CON

Below you'll see the rest, you can set the way you want them to appear like

TOOLTIP_ITEM_LIMIT_CON Needed CON: %d
TOOLTIP_ITEM_LIMIT_DEX Nedded DEX: %d
TOOLTIP_ITEM_LIMIT_INT Needed INT: %d
TOOLTIP_ITEM_LIMIT_LEVEL %d. szinttől
TOOLTIP_ITEM_LIMIT_STR Needed STR: %d

Next, open uitooltip.py in root and search for: if item.LIMIT_LEVEL == limitType:

Modify this part to make it look something like this (take care of tabulators):
Code:
			if item.LIMIT_LEVEL == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.LEVEL), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_LEVEL % (limitValue), color)
			elif item.LIMIT_STR == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.ST), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_STR % (limitValue), color)
			elif item.LIMIT_DEX == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.DX), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_DEX % (limitValue), color)
			elif item.LIMIT_INT == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.IQ), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_INT % (limitValue), color)
			elif item.LIMIT_CON == limitType:
				color = self.GetLimitTextLineColor(player.GetStatus(player.HT), limitValue)
				self.AppendTextLine(localeInfo.TOOLTIP_ITEM_LIMIT_CON % (limitValue), color)
If you're using txt item proto, then write DEX, INT, CON or STR to limittype0 and the value to limitvalue0 like when you set the level limit.

If you're item_proto is in mysql, then the limitvalue values are:
2 - STR
3 - DEX
4 - INT
5 - CON
Interesting.. Thanks :)