Jump to content

Legendary items effect


Recommended Posts

hi, long story short

i've seen some global servers adding a certain effects to some items to make them LEGENDARY

and i think it looks cool

so i've decided to code it and make it public

and this is a gif to show u what i mean

spacer.png

spacer.png

 

 

Downsides

- The alpha is a miss for some unknown reason

- the effect won't apply on items that dosen't use SLOT

 

 

other than that it's great,

and you can choose a certain set of items and apply a certain color on each set too

 

for example

	0: ((19, 40101, 41117, 45053), (1.0, 1.0, 1.0, 1.0)),
	1: ((18, 40102, 41118, 45054), (0.5, 1.0, 1.0, 1.0)),

 

link:

Spoiler

This is the hidden content, please

This is the hidden content, please

 

  • Metin2 Dev 28
  • Good 2
  • Love 1
  • Love 14
Link to comment
Share on other sites

Posted (edited)
56 minutes ago, Hekate said:

Hi, im working on (martysama) files but u can try to adjust your source whatever it's like this

PythonWindow.cpp

Spoiler
#if defined(ENABLE_LEGENDARY_SLOT_EFFECT)
	void CAniImageBox::AppendImage(const char * c_szFileName, float r, float g, float b, float a)
#else
	void CAniImageBox::AppendImage(const char * c_szFileName)
#endif
	{
		CResource * pResource = CResourceManager::Instance().GetResourcePointer(c_szFileName);
		if (!pResource->IsType(CGraphicImage::Type()))
			return;

		CGraphicExpandedImageInstance * pImageInstance = CGraphicExpandedImageInstance::New();
		pImageInstance->SetImagePointer(static_cast<CGraphicImage*>(pResource));
#if defined(ENABLE_LEGENDARY_SLOT_EFFECT)
		pImageInstance->SetDiffuseColor(r, g, b, a);
#endif

		if (pImageInstance->IsEmpty())
		{
			CGraphicExpandedImageInstance::Delete(pImageInstance);
			return;
		}

		m_ImageVector.push_back(pImageInstance);
		m_bycurIndex = rand() % m_ImageVector.size();
	}

 

PythonWindow.h

Spoiler
#if defined(ENABLE_LEGENDARY_SLOT_EFFECT)
			void	AppendImage(const char * c_szFileName, float r = 1.0, float g = 1.0, float b = 1.0, float a = 1.0);
#else
			void	AppendImage(const char * c_szFileName);
#endif

 

 

 

Edited by CONTROL
  • Love 1
Link to comment
Share on other sites

  • Honorable Member

Nice idea.

Yesterday I  wanted to mention that the guide might be wrong for some people whom have no clue about the things, in this case the custom AppendImage from the Sash system by LeNnT or whoever.

Alpha channel is a thing, not that hard to deal with it, but you forgot to refresh the links after you managed to fix them 😄.
Also white image might be better to recolor with diffuse.

Spoiler

spacer.png

 

  • Lmao 1
Link to comment
Share on other sites

7 hours ago, xP3NG3Rx said:

Nice idea.

Yesterday I  wanted to mention that the guide might be wrong for some people whom have no clue about the things, in this case the custom AppendImage from the Sash system by LeNnT or whoever.

Alpha channel is a thing, not that hard to deal with it, but you forgot to refresh the links after you managed to fix them 😄.
Also white image might be better to recolor with diffuse.

  Hide contents

spacer.png

 

- the problem wasn't the alpha channel tho it was something with the RenderingMode XD

- sry, im not really active in here and i didn't know how to edit the topic so i just report it to the mod with the new link

- i didn't really make the pics my self, a friend just sent them to me with the idea 

Edited by CONTROL
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.