Jump to content

Recommended Posts

  • Contributor

.jpg
 

It's a method to see the dews & water potions affect icons on the affectshower using the python side only, It's bit late to share this but it's an idea given by a dear friend of mine long ago.

I tested this on both normal and extended blend system.

I uploaded guide  for easier implementation..

 

This is the hidden content, please
 / 
This is the hidden content, please

1@ ClientSource/UserInterface/InstanceBase.h:

Before:

			NEW_AFFECT_AUTO_HP_RECOVERY		= 534,

Add:

			NEW_AFFECT_BLEND = 531,

2@ ClientSource/UserInterface/PythonCharacterModule.cpp:

At the end of the file and before:

}

Add:

	PyModule_AddIntConstant(poModule, "NEW_AFFECT_BLEND", CInstanceBase::NEW_AFFECT_BLEND);

3@ ClientSource/UserInterface/PythonPlayerModule.cpp:

At the end of the file and before:

}

Add:

	PyModule_AddIntConstant(poModule, "RESIST_MAGIC",	POINT_RESIST_MAGIC);

3@ root/constInfo.py:

Add:

ENABLE_POTIONS_AFFECTSHOWER = 1 ## 0=Disable / 1=Enable

4@ root/uiAffectShower.py:

Add at top of the file:

import constInfo

Search:

	MALL_DESC_IDX_START = 1000

Add:

	if constInfo.ENABLE_POTIONS_AFFECTSHOWER:
		## As long the values arent reserved
		WATER_DESC_IDX_START = 1100
		DEW_DESC_IDX_START = 1200
		

 

Search:

	chr.NEW_AFFECT_DRAGON_SOUL_DECK2: (localeInfo.TOOLTIP_DRAGON_SOUL_DECK2, "d:/ymir work/ui/dragonsoul/buff_ds_land1.tga",),

Add:

	if constInfo.ENABLE_POTIONS_AFFECTSHOWER:
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.POINT_PENETRATE_PCT] = (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT, 	"icon/item/50813.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.POINT_CRITICAL_PCT] = (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT, 	"icon/item/50814.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.ATT_BONUS] = (localeInfo.TOOLTIP_ATT_GRADE, 			"icon/item/50817.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.DEF_BONUS] = (localeInfo.TOOLTIP_DEF_GRADE, 			"icon/item/50818.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.RESIST_MAGIC] = (localeInfo.TOOLTIP_MAGIC_DEF_GRADE, 		"icon/item/50819.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.ATT_SPEED] = (localeInfo.TOOLTIP_ATT_SPEED, 			"icon/item/50820.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.POINT_CRITICAL_PCT] = (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT, 	"icon/item/50821.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.POINT_PENETRATE_PCT] = (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT, 	"icon/item/50822.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ATT_SPEED] = (localeInfo.TOOLTIP_ATT_SPEED, 			"icon/item/50823.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.RESIST_MAGIC] = (localeInfo.TOOLTIP_RESIST_MAGIC, 			"icon/item/50824.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ATT_BONUS] = (localeInfo.TOOLTIP_ATT_GRADE, 			"icon/item/50825.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.DEF_BONUS] = (localeInfo.TOOLTIP_DEF_GRADE, 			"icon/item/50826.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ENERGY] = (localeInfo.TOOLTIP_ENERGY, 			"icon/item/51002.tga")

Do this next step twice(Inside def BINARY_NEW_AddAffect & def BINARY_NEW_RemoveAffect) :

After:

		if type == chr.NEW_AFFECT_MALL:
			affect = self.MALL_DESC_IDX_START + pointIdx

Add:

		elif constInfo.ENABLE_POTIONS_AFFECTSHOWER and type == chr.NEW_AFFECT_EXP_BONUS_EURO_FREE:
			affect = self.WATER_DESC_IDX_START + pointIdx
		elif constInfo.ENABLE_POTIONS_AFFECTSHOWER and type == chr.NEW_AFFECT_BLEND:
			affect = self.DEW_DESC_IDX_START + pointIdx

## Note: If you want to use the dews & water potions together!
## If you use the water potions before the dews(specifically Mong Water == 50819), You won't be able to use any of the dews.

@ GameSource/char_item.cpp:

Search:

		case ITEM_BLEND:

Replace:

					if (FindAffect(AFFECT_EXP_BONUS_EURO_FREE, POINT_RESIST_MAGIC))
					{
						ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This effect is already activated."));
					}
					else
					{
						AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
						item->SetCount(item->GetCount() - 1);
					}

With:

					AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
					item->SetCount(item->GetCount() - 1);

 

You can do the same for the Dragon god affects(Affect 510==NEW_AFFECT_MALL).

  • Metin2 Dev 241
  • Eyes 3
  • Angry 1
  • Think 2
  • Scream 1
  • Good 51
  • Love 17
  • Love 126

My only accounts are here and on M2D, Don't trust anyone else from other shitty sites.
266868740522639360.png

  • 9 months later...
  • Active Member
On 4/19/2022 at 10:34 AM, MrQuin said:

.jpg
 

It's a method to see the dews & water potions affect icons on the affectshower using the python side only, It's bit late to share this but it's an idea given by a dear friend of mine long ago.

I tested this on both normal and extended blend system.

I uploaded guide  for easier implementation..

 

This is the hidden content, please
 / 
This is the hidden content, please

1@ ClientSource/UserInterface/InstanceBase.h:

Before:

			NEW_AFFECT_AUTO_HP_RECOVERY		= 534,

Add:

			NEW_AFFECT_BLEND = 531,

2@ ClientSource/UserInterface/PythonCharacterModule.cpp:

At the end of the file and before:

}

Add:

	PyModule_AddIntConstant(poModule, "NEW_AFFECT_BLEND", CInstanceBase::NEW_AFFECT_BLEND);

3@ ClientSource/UserInterface/PythonPlayerModule.cpp:

At the end of the file and before:

}

Add:

	PyModule_AddIntConstant(poModule, "RESIST_MAGIC",	POINT_RESIST_MAGIC);

3@ root/constInfo.py:

Add:

ENABLE_POTIONS_AFFECTSHOWER = 1 ## 0=Disable / 1=Enable

4@ root/uiAffectShower.py:

Add at top of the file:

import constInfo

Search:

	MALL_DESC_IDX_START = 1000

Add:

	if constInfo.ENABLE_POTIONS_AFFECTSHOWER:
		## As long the values arent reserved
		WATER_DESC_IDX_START = 1100
		DEW_DESC_IDX_START = 1200
		

 

Search:

	chr.NEW_AFFECT_DRAGON_SOUL_DECK2: (localeInfo.TOOLTIP_DRAGON_SOUL_DECK2, "d:/ymir work/ui/dragonsoul/buff_ds_land1.tga",),

Add:

	if constInfo.ENABLE_POTIONS_AFFECTSHOWER:
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.POINT_PENETRATE_PCT] = (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT, 	"icon/item/50813.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.POINT_CRITICAL_PCT] = (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT, 	"icon/item/50814.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.ATT_BONUS] = (localeInfo.TOOLTIP_ATT_GRADE, 			"icon/item/50817.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.DEF_BONUS] = (localeInfo.TOOLTIP_DEF_GRADE, 			"icon/item/50818.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.RESIST_MAGIC] = (localeInfo.TOOLTIP_MAGIC_DEF_GRADE, 		"icon/item/50819.tga")
		AFFECT_DATA_DICT[WATER_DESC_IDX_START+player.ATT_SPEED] = (localeInfo.TOOLTIP_ATT_SPEED, 			"icon/item/50820.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.POINT_CRITICAL_PCT] = (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT, 	"icon/item/50821.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.POINT_PENETRATE_PCT] = (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT, 	"icon/item/50822.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ATT_SPEED] = (localeInfo.TOOLTIP_ATT_SPEED, 			"icon/item/50823.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.RESIST_MAGIC] = (localeInfo.TOOLTIP_RESIST_MAGIC, 			"icon/item/50824.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ATT_BONUS] = (localeInfo.TOOLTIP_ATT_GRADE, 			"icon/item/50825.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.DEF_BONUS] = (localeInfo.TOOLTIP_DEF_GRADE, 			"icon/item/50826.tga")
		AFFECT_DATA_DICT[DEW_DESC_IDX_START+player.ENERGY] = (localeInfo.TOOLTIP_ENERGY, 			"icon/item/51002.tga")

Do this next step twice(Inside def BINARY_NEW_AddAffect & def BINARY_NEW_RemoveAffect) :

After:

		if type == chr.NEW_AFFECT_MALL:
			affect = self.MALL_DESC_IDX_START + pointIdx

Add:

		elif constInfo.ENABLE_POTIONS_AFFECTSHOWER and type == chr.NEW_AFFECT_EXP_BONUS_EURO_FREE:
			affect = self.WATER_DESC_IDX_START + pointIdx
		elif constInfo.ENABLE_POTIONS_AFFECTSHOWER and type == chr.NEW_AFFECT_BLEND:
			affect = self.DEW_DESC_IDX_START + pointIdx

## Note: If you want to use the dews & water potions together!
## If you use the water potions before the dews(specifically Mong Water == 50819), You won't be able to use any of the dews.

@ GameSource/char_item.cpp:

Search:

		case ITEM_BLEND:

Replace:

					if (FindAffect(AFFECT_EXP_BONUS_EURO_FREE, POINT_RESIST_MAGIC))
					{
						ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This effect is already activated."));
					}
					else
					{
						AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
						item->SetCount(item->GetCount() - 1);
					}

With:

					AddAffect(affect_type, apply_type, apply_value, 0, apply_duration, 0, false);
					item->SetCount(item->GetCount() - 1);

 

You can do the same for the Dragon god affects(Affect 510==NEW_AFFECT_MALL).

Hi, thanks for the release! Unfortunately in my client the icons of the dews are displayed but not of the waters, can you help me? Syerr is empty!
EDIT: Fixed: Icon files were missing in my client

Edited by 4peppe
  • Good 2
  • Love 1
  • 1 year later...

I got an issue like that but a little bit different...

IF I start metin2distribute.exe the game starts with a blackscreen and the client instantly closes?

Maybe this Error could help : Fatal Error. Python library not found

I use TMP4 files please help me out..

  • 2 months later...
  • Active+ Member

Thank you! 

https://metin2.download/picture/IrYi1ZsZSIMgNT3x9Txz1n0h48cnFzU8/.png at some point were TMP4 files what im using rn. so no issues with that. 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 1
  • 6 months later...

Icons work fine, they disappear when the effect ends, but the time "x minutes remaining", sometimes it works, other times it gets "stuck", I've checked everything, does anyone have any idea what's causing it?

When time gets stuck, if you teleport for example, it updates and gets stuck again.

*When you teleport, time gets stuck.

Edited by Klaus

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.