Jump to content

Dragon Soul Change Attribute


Recommended Posts

  • Honorable Member

This is the hidden content, please

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

To implement this feature, you need the Mythical Grade expansion implemented on your server! Google is your friend.

Exchange of Dragon Stone Bonuses
"Change Attribute"

To change the bonuses of a mythical dragon stone unlike the different cases, you will have to select another option from the alchemist, that is "Mythical Dragon Stone: Bonus Change".

.png

You will need the stone that you intend to modify and the variable number of Dragon Flames depending on the clarity of the stone you intend to modify.

According to the Wiki's, this is the table of variables for each clarity.

.png

 

SIDE NOTE

I'm not sure where they got these numbers so I just hard coded them in a header file.
They have also added a new group in the "dragon_soul_table.txt" parser file but for what I understood, it's just another probability table.
I didn't find it necessary to follow their logic because the "ApplyNumSettings" group already has probabilities of 0 to 3 for adding additional bonuses.
 

Video Preview

If you find any problems, please let me know!

Have fun! 🌻

  • Metin2 Dev 79
  • kekw 1
  • Eyes 1
  • Scream 2
  • Good 14
  • Love 3
  • Love 46
Link to comment
Share on other sites

  • Premium
Quote

They have also added a new group in the "dragon_soul_table.txt" parser file but for what I understood, it's just another probability table.
I didn't find it necessary to follow their logic because the "ApplyNumSettings" group already has probabilities of 0 to 3 for adding additional bonuses.

 

The mentioned table for reference:

# ¿ëÈ¥¼® ¼Ó¼ºº¯°æ AddÈ®·ü Å×À̺í (¿¬°ü Å×À̺í : ApplyNumSettings)
Group ChangeAttrStepTables
{
	Group GRADE_MYTH
	{
		#--#	STEP	0	1	2	3
		STEP_LOWEST	500	400	8	1
		STEP_LOW	500	400	16	5
		STEP_MID	500	400	40	10
		STEP_HIGH	500	400	100	30
		STEP_HIGHEST	500	400	300	150
	}
}

So the way it works is it renders that specific probability, x% more likely to happen.

As Owsap mentioned, it is not supported by the system by default.

Edited by Syreldar
  • Good 2

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

You are the best @Owsap as usual, thanks a lot !. Just a little suggestions, you didn't check the Dragon Flames item server side other than "IsDragonSoulRefineMaterial" but it's can be true with any DS material, so we can imagine a cheat sending other items if bypassing the client check

 


bool IsDragonSoulRefineMaterial(LPITEM pItem)
{
	if (pItem->GetType() != ITEM_MATERIAL)
		return false;
	return (pItem->GetSubType() == MATERIAL_DS_REFINE_NORMAL ||
			pItem->GetSubType() == MATERIAL_DS_REFINE_BLESSED ||
			pItem->GetSubType() == MATERIAL_DS_REFINE_HOLLY
#if defined(__DS_CHANGE_ATTR__)
			|| pItem->GetSubType() == MATERIAL_DS_CHANGE_ATTR
#endif
	);
}

 

I will suggest to add a little check also

 

// Replace this line in DragonSoul.cpp  DSManager::DoChangeAttribute
else if (IsDragonSoulRefineMaterial(pItem))
  
// With subtype check
else if (IsDragonSoulRefineMaterial(pItem) && pItem->GetSubType() == MATERIAL_DS_CHANGE_ATTR)
  
// Or with vnum check
else if (IsDragonSoulRefineMaterial(pItem) && (pItem->GetVnum() == 100700 || pItem->GetVnum() == 100701))

 

  • Confused 1
Link to comment
Share on other sites

  • Honorable Member
50 minutes ago, Kafa said:

Thanks for the release Owsap,

 

i've got one question tho. In official the luck of getting additional attributes is based on the dragon stone.

 

So if you change a mythical one with 1x 100700 

it has a very very low chance to get an additional bonus, could you maybe change that? if not still thanks. ❤️ 

Maybe I will do that when I have free time, depending as well if many people request this.

Link to comment
Share on other sites

  • 8 months later...

https://metin2.download/picture/RhWpGIsrn57cMLyRMQoFVN6l16987dcd/.png

In uiDragonSoul.py

On 6/29/2022 at 3:55 AM, Owsap said:

This is the hidden content, please

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

To implement this feature, you need the Mythical Grade expansion implemented on your server! Google is your friend.

Exchange of Dragon Stone Bonuses
"Change Attribute"

To change the bonuses of a mythical dragon stone unlike the different cases, you will have to select another option from the alchemist, that is "Mythical Dragon Stone: Bonus Change".

.png

You will need the stone that you intend to modify and the variable number of Dragon Flames depending on the clarity of the stone you intend to modify.

According to the Wiki's, this is the table of variables for each clarity.

.png

 

SIDE NOTE

I'm not sure where they got these numbers so I just hard coded them in a header file.
They have also added a new group in the "dragon_soul_table.txt" parser file but for what I understood, it's just another probability table.
I didn't find it necessary to follow their logic because the "ApplyNumSettings" group already has probabilities of 0 to 3 for adding additional bonuses.
 

Video Preview

If you find any problems, please let me know!

Have fun! 🌻

I am having problems with "ITEM_SLOT_COUNT" :

'module' object has no attribute


while for "localeInfo.DS_SYSTEM_MSG_1" I have nothing assigned in locale_game.txt or locale_interface.txt, what should I write?

 

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
Share on other sites

  • Honorable Member
11 hours ago, Nuzzo said:

Add this in your PythonPlayerModule.cpp, you should add it at the end of the file above "}".

	PyModule_AddIntConstant(poModule, "ITEM_SLOT_COUNT", c_ItemSlot_Count);

 

Link to comment
Share on other sites

  • 2 months later...

If it gives this error to someone:
fd2dfea14750d79bab89f3f196bd7815.png

While compiling the server source

go to src/common/item_lenght.h

Search for enum EMaterialSubTypes and add at the end of the function this "MATERIAL_DS_CHANGE_ATTR,"

 

Edited by Metin2 Dev International
Core X - External 2 Internal
Link to comment
Share on other sites

  • 2 months later...

Announcements



×
×
  • 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.