Jump to content

Enable specular on NPCs and Monsters


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Through this piece of code you will be able to attach the specular on NPCs and Monsters.

 

// 1. Search:
bool CInstanceBase::Create(const SCreateData& c_rkCreateData)
{
	[...]
	return true;
}

// 2. Add this piece of code above the return true;

struct SAttachSpecularData
{
	DWORD race;
	float specularPower;
};

const int SPECULAR_MAX_NUM = 5;
static SAttachSpecularData structInfo[SPECULAR_MAX_NUM] =
{
	{ 101,	0.09f },
	{ 102,	0.06f },
	{ 9001,	0.04f },
	{ 9002,	0.01f },
	{ 9005,	0.09f },
//	{ npc_vnum,	specular }, Warning: When you add new NPCs / Monsters inside the structure, you must increase the SPECULAR_MAX_NUM
};

for (DWORD i = 0; i < SPECULAR_MAX_NUM; i++)
{
	if (GetRace() == structInfo[i].race)
	{
		SMaterialData data;
		data.pImage = NULL;
		data.isSpecularEnable = TRUE;
		data.fSpecularPower = structInfo[i].specularPower;
		data.bSphereMapIndex = 1;
		m_GraphicThingInstance.SetMaterialData(0, NULL, data);
	}
}

 

Credit: @VegaS™

  • Metin2 Dev 58
  • Think 2
  • Confused 2
  • Good 23
  • Love 12
  • Love 27
Link to comment
Share on other sites

  • Forum Moderator

 

54 minutes ago, Await said:


struct SAttachSpecularData
{
	DWORD race;
	float specularPower;
};

const int SPECULAR_MAX_NUM = 5;
static SAttachSpecularData structInfo[SPECULAR_MAX_NUM] =
{
	{ 101,	0.09f },
	{ 102,	0.06f },
	{ 9001,	0.04f },
	{ 9002,	0.01f },
	{ 9005,	0.09f },
//	{ npc_vnum,	specular }, Warning: When you add new NPCs / Monsters inside the structure, you must increase the SPECULAR_MAX_NUM
};

for (DWORD i = 0; i < SPECULAR_MAX_NUM; i++)
{
	if (GetRace() == structInfo[i].race)
	{
		SMaterialData data;
		data.pImage = NULL;
		data.isSpecularEnable = TRUE;
		data.fSpecularPower = structInfo[i].specularPower;
		data.bSphereMapIndex = 1;
		m_GraphicThingInstance.SetMaterialData(0, NULL, data);
	}
}

 


Thanks for my release from 2016, soon 5 years since it has been done.
Shame on you... making copy-paste and uploading the code on GitHub, won't make you a "programmer".


spacer.png

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Not Good 1
  • Lmao 11
Link to comment
Share on other sites

  • 7 months later...

🙂 Good job, delete my Posts.

 

Thank you very much for this System.

Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2004. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
Share on other sites

  • Management

The purpose is similar...
The code looks different between you and VegaS :

094006Sans-titre-1.png

Link to comment
Share on other sites

but why did you delete my Post?

You treat me really badly here 🙂

I just wanted to draw attention to the fact that I also had something releasing in 2015 🙂

Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2004. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
Share on other sites

  • Management
Link to comment
Share on other sites

13 minutes ago, ASIKOO said:

I haven't deleted anything..

i Posted something there, and some one delete it 🙂

that's not cool ASIKOO..

it's okay, it's your board and your Rules.

Edited by Ace
Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2004. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
Share on other sites

  • Management

If your post was deleted by VegaS, it was because it wasn't really useful...
It's not against you and nothing to do with the rules.

  • Dislove 1
  • Love 1
Link to comment
Share on other sites

1 hour ago, ASIKOO said:

If your post was deleted by VegaS, it was because it wasn't really useful...
It's not against you and nothing to do with the rules.

So doesn't it make sense to say thanks for a release?

 

Ridiculous answer.

 

Thank you very much for your understanding.

Edited by Ace
  • Lmao 1
Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2004. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
Share on other sites

  • Management

You just wanted to boast because you've made something first... 😅
We can thank for a release without bragging. 🙃

  • Not Good 1
Link to comment
Share on other sites

3 minutes ago, ASIKOO said:

You just wanted to boast because you've made something first... 😅
We can thank for a release without bragging. 🙃

brag? to be honest, no. Anyway, my dear administrator of Metin2Dev, I think it's a real shame ... It's pretty sad.

  • Metin2 Dev 3
  • Dislove 1
  • Confused 1
  • Lmao 2
Spoiler

Ymir Entertainment was founded in 1999 in Seoul, Korea and 
is currently headed by Byoung Gwan Kim as CEO. The company 
started developing its first 2D online game Metin the same 
year it was founded. The game was commercially launched in 
Korea a year later and received a prize from the Korean 
                    Ministry of Information and Communication in December of the 
                    same year. Following the success of their flagship game Ymir 
                    Entertainment immediately started work on the game’s sequel 
                    Metin 2, which went into Closed Beta in Korea in May 2004. 
                    The game was officially launched in Korea and China in March 
                    2005 before being launched in Asia, Europe and North America 
                    in the years that followed. In January 2011 all of the company’s 
                    shares were bought by Webzen Inc., a Korean game giant known for 
                    their popular MMORPG, MU Online. The company was also awarded 
                    Gameforge’s Global Best Partner of the Year in 2011.
                    
                    Source: https://mmos.com/publishers/ymir-entertainment
                    
                    Thank you ymir 🙂 ❤️ and F*** you Gameforge, 2011 you ruined it.

 

Link to comment
Share on other sites

  • Forum Moderator
2 hours ago, Ace said:

brag? to be honest, no. Anyway, my dear administrator of Metin2Dev, I think it's a real shame ... It's pretty sad.

Hi, please read this: https://metin2.dev/board/rules/

 

252730RedInfo.pngLinks to competing forums are only tolerated if the content of the link is related to the latest posts, for example: a response to a request for help if Metin2 Dev does not have the information, during a public debate... Keep in mind that this is tolerated, if you abuse it for no good reason you can be penalized. Take advantage of missing content to improve Metin2 Dev by creating a new tutorial.

No hidden advertising will be approved.

Also, I invite all of the people who will see their posts deleted to read all rulesthen flame the staff.

  • Your post it had included a link to a competitive forum.
  • You made a post that has nothing related to the subject, just talking about that you did it first back in 2015 but it's a different implementation and how it works here.

I was talking in my first reply that this guy copied 1/1 of my tutorial from other forums, not even changing a variable name or the implementation. (see it here)
I didn't give you a warning, I have just hidden your post because I thought you didn't do it intentionally and we forgive you, somehow.
But from your reactions and how you treat the staff now, I think you would have deserved it.

Thanks.

  • Metin2 Dev 4
  • Angry 1
  • Not Good 1
  • Confused 1
  • Lmao 3
  • Good 9
  • Love 2
  • Love 2
Link to comment
Share on other sites

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.