Jump to content

Target and Select Color


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Spoiler

28255390a2fbb9e9.png.a19b6906e51487de48d

 

Is the color that appears to each character when selected or give click, this color is changed depending on the kingdom which is the pj, this same applies to the NPC.

The mobs appear with a different effect to common and is a matter of each effect changes the color depending on individual taste

 

[Source Binary]

 

1. open InstanceBase.cpp in UserInterface

 

Spoiler

1.Search CInstanceBase :: OnSelected and replace everything:



void CInstanceBase::OnSelected()
{
#ifdef __MOVIE_MODE__
	if (!__IsExistMainInstance())
		return;
#endif

	if (IsStoneDoor())
		return;

	if (IsDead())
		return;

	if (IsEnemy())
	{
		__AttachSelectEffectMonster();
	}

	if (IsPC() || IsNPC())
	{
		if (m_dwEmpireID == 1) // Shinshoo
		{
			__AttachSelectEffectShinsoo();
		}
		else if (m_dwEmpireID == 2) // chunjo
		{
			__AttachSelectEffectChunjo(); 
		}
		else if (m_dwEmpireID == 3)//Jinnos
		{
			__AttachSelectEffectJinnos();
		}
	}
}

2.Search CInstanceBase :: OnUnselected () and replace everything:



void CInstanceBase::OnUnselected()
{
	//__DetachSelectEffect();


	if (IsPC() || IsNPC())
	{
		if (m_dwEmpireID == 1) //Shinsoo
		{
			__DetachSelectEffectShinsoo();
		}
		else if (m_dwEmpireID == 2)//Chunjo
		{
			__DetachSelectEffectChunjo();
		}
		else if (m_dwEmpireID == 3)//Jinnnos
		{
			__DetachSelectEffectJinnos();
		}
	}
	if (IsEnemy())
	{
		__DetachSelectEffectMonster();
	}
}

3. Search CInstanceBase :: OnTargeted () and replace everything:



void CInstanceBase::OnTargeted()
{
#ifdef __MOVIE_MODE__
	if (!__IsExistMainInstance())
		return;
#endif

	if (IsStoneDoor())
		return;

	if (IsDead())
		return;

	if (IsEnemy())
	{
		__AttachTargetEffectMonster();
	}

	if (IsPC() || IsNPC())
	{
		if (m_dwEmpireID == 1) //Shinsoo
		{
			__AttachTargetEffectShinsoo();
		}
		else if (m_dwEmpireID == 2)//Chunjo
		{
			__AttachTargetEffectChunjo();
		}
		else if (m_dwEmpireID == 3)//Jinnnos
		{
			__AttachTargetEffectJinnos();
		}
	}


}

 

4. Search CInstanceBase :: OnUntargeted () and replace everything:

 



void CInstanceBase::OnUntargeted()
{

	if (IsPC() || IsNPC())
	{
		if (m_dwEmpireID == 1) //Shinsoo
		{
			__DetachTargetEffectShinsoo();
		}
		else if (m_dwEmpireID == 2)//Chunjo
		{
			__DetachTargetEffectChunjo();
		}
		else if (m_dwEmpireID == 3)//Jinnnos
		{
			__DetachTargetEffectJinnos();
		}
	}
	if (IsEnemy())
	{
		__DetachTargetEffectMonster();
	}
}

 

2. Open InstanceBase.h in UserInterface

 

Spoiler

1.Search EFFECT_EMOTICON_END = EFFECT_EMOTICON + EMOTICON_NUM, and put down:



EFFECT_MONSTER,
EFFECT_SHINSOO,
EFFECT_CHUNJO,
EFFECT_JINNOS,
EFFECT_TARGET_SHINSOO,
EFFECT_TARGET_JINNOS,
EFFECT_TARGET_CHUNJO,
EFFECT_TARGET_MONSTER,

2.Search __DetachTargetEffect and put down that:



void __AttachTargetEffectMonster();
void __DetachTargetEffectMonster();
void __AttachSelectEffectMonster();
void __DetachSelectEffectMonster();

void __AttachTargetEffectShinsoo();
void __DetachTargetEffectShinsoo();
void __AttachSelectEffectShinsoo();
void __DetachSelectEffectShinsoo();

void __AttachTargetEffectJinnos();
void __DetachTargetEffectJinnos();
void __AttachSelectEffectJinnos();
void __DetachSelectEffectJinnos();

void __AttachTargetEffectChunjo();
void __DetachTargetEffectChunjo();
void __AttachSelectEffectChunjo();
void __DetachSelectEffectChunjo();

 

3. Open InstanceBaseEffect.cpp in UserInterface

 

Spoiler

1.Search CInstanceBase :: __ StoneSmoke_Inialize and put up



///////////////////////////////////////////////////////////////////////

void CInstanceBase::__AttachSelectEffectMonster()
{
	__EffectContainer_AttachEffect(EFFECT_MONSTER);
}
void CInstanceBase::__DetachSelectEffectMonster()
{
	__EffectContainer_DetachEffect(EFFECT_MONSTER);
}
void CInstanceBase::__AttachTargetEffectMonster()
{
	__EffectContainer_AttachEffect(EFFECT_TARGET_MONSTER);
}
void CInstanceBase::__DetachTargetEffectMonster()
{
	__EffectContainer_DetachEffect(EFFECT_TARGET_MONSTER);
}

/////////////////////////////////////////////////////////////

void CInstanceBase::__AttachSelectEffectShinsoo()
{
	__EffectContainer_AttachEffect(EFFECT_SHINSOO);
}
void CInstanceBase::__DetachSelectEffectShinsoo()
{
	__EffectContainer_DetachEffect(EFFECT_SHINSOO);
}
void CInstanceBase::__AttachTargetEffectShinsoo()
{
	__EffectContainer_AttachEffect(EFFECT_TARGET_SHINSOO);
}
void CInstanceBase::__DetachTargetEffectShinsoo()
{
	__EffectContainer_DetachEffect(EFFECT_TARGET_SHINSOO);
}

/////////////////////////////////////////////////////////////

void CInstanceBase::__AttachSelectEffectChunjo()
{
	__EffectContainer_AttachEffect(EFFECT_CHUNJO);
}
void CInstanceBase::__DetachSelectEffectChunjo()
{
	__EffectContainer_DetachEffect(EFFECT_CHUNJO);
}
void CInstanceBase::__AttachTargetEffectChunjo()
{
	__EffectContainer_AttachEffect(EFFECT_TARGET_CHUNJO);
}
void CInstanceBase::__DetachTargetEffectChunjo()
{
	__EffectContainer_DetachEffect(EFFECT_TARGET_CHUNJO);
}

/////////////////////////////////////////////////////////////

void CInstanceBase::__AttachSelectEffectJinnos()
{
	__EffectContainer_AttachEffect(EFFECT_JINNOS);
}
void CInstanceBase::__DetachSelectEffectJinnos()
{
	__EffectContainer_DetachEffect(EFFECT_JINNOS);
}
void CInstanceBase::__AttachTargetEffectJinnos()
{
	__EffectContainer_AttachEffect(EFFECT_TARGET_JINNOS);
}
void CInstanceBase::__DetachTargetEffectJinnos()
{
	__EffectContainer_DetachEffect(EFFECT_TARGET_JINNOS);
}

/////////////////////////////////////////////////////////////

 

4. Open PythonCharacterManagerModule.cpp in UserInterface

 

Spoiler

1.Search EFFECT_CRITICAL and placed under



PyModule_AddIntConstant(poModule, "EFFECT_MONSTER",			CInstanceBase::EFFECT_MONSTER);
PyModule_AddIntConstant(poModule, "EFFECT_TARGET_MONSTER",	CInstanceBase::EFFECT_TARGET_MONSTER);
PyModule_AddIntConstant(poModule, "EFFECT_SHINSOO",			CInstanceBase::EFFECT_SHINSOO);
PyModule_AddIntConstant(poModule, "EFFECT_TARGET_SHINSOO",	CInstanceBase::EFFECT_TARGET_SHINSOO);
PyModule_AddIntConstant(poModule, "EFFECT_CHUNJO",			CInstanceBase::EFFECT_CHUNJO);
PyModule_AddIntConstant(poModule, "EFFECT_TARGET_CHUNJO",	CInstanceBase::EFFECT_TARGET_CHUNJO);
PyModule_AddIntConstant(poModule, "EFFECT_JINNOS",			CInstanceBase::EFFECT_JINNOS);
PyModule_AddIntConstant(poModule, "EFFECT_TARGET_JINNOS",	CInstanceBase::EFFECT_TARGET_JINNOS);

 

[Python Client]

 

1. Open playersettingmodule.py in root:

 

Spoiler

1. Look up and place chrmgr.EFFECT_STUN



chrmgr.RegisterCacheEffect(chrmgr.EFFECT_SHINSOO, "", "d:/ymir work/effect/world/shinsoo_select.mse")
chrmgr.RegisterCacheEffect(chrmgr.EFFECT_TARGET_SHINSOO, "", "d:/ymir work/effect/world/shinsoo_glow_select.mse")
chrmgr.RegisterCacheEffect(chrmgr.EFFECT_CHUNJO, "", "d:/ymir work/effect/world/chunjo_select.mse")
chrmgr.RegisterCacheEffect(chrmgr.EFFECT_TARGET_CHUNJO, "", "d:/ymir work/effect/world/chunjo_glow_select.mse")
chrmgr.RegisterCacheEffect(chrmgr.EFFECT_JINNOS, "", "d:/ymir work/effect/world/jinnos_select.mse")
chrmgr.RegisterCacheEffect(chrmgr.EFFECT_TARGET_JINNOS, "", "d:/ymir work/effect/world/jinnos_glow_select.mse")
chrmgr.RegisterCacheEffect(chrmgr.EFFECT_MONSTER, "", "d:/ymir work/effect/world/mob_select.mse")
chrmgr.RegisterCacheEffect(chrmgr.EFFECT_TARGET_MONSTER, "", "d:/ymir work/effect/world/mob_glow_select.mse")

 

 

Finally add eix epk and I leave at Download

 

Img System

90a2fbb9e9.png

 

Credits: me :)

Greetings!

 

This is the hidden content, please

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 39
  • Angry 1
  • Not Good 1
  • Smile Tear 1
  • Good 6
  • Love 1
  • Love 44
Link to comment
Share on other sites

You can do this for a GM too

I guess this is so

if (IsGameMaster())
{
	__AttachSelectEffectMonster(); // Effect Example
}

nice idea :) ... but like this you can't attach the horse with any of this effects .

I guess this is so

if (IsMounting())
{
	__AttachSelectEffectMonster();
 // Effect Example
}

 

 

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

  • Premium

Can you do this for stones?

Yes, but you have to use IsStone

You can do this for a GM too

I guess this is so

if (IsGameMaster())
{
	__AttachSelectEffectMonster(); // Effect Example
}

nice idea :) ... but like this you can't attach the horse with any of this effects .

I guess this is so

if (IsMounting())
{
	__AttachSelectEffectMonster();
 // Effect Example
}

 

 

Yes, I did a system like that before

Link to comment
Share on other sites

  • 4 weeks later...

sorry speak english

 

Is the color that appears to each character when selected or give click, this color is changed depending on the kingdom which is the pj, this same applies to the NPC.

The mobs appear with a different effect to common and is a matter of each effect changes the color depending on individual taste

 

[Source Binary]

 

1. open InstanceBase.cpp in UserInterface

 

Hidden Content

2. Open InstanceBase.h in UserInterface

 

Hidden Content

3. Open InstanceBaseEffect.cpp in UserInterface

 

Hidden Content

4. Open PythonCharacterManagerModule.cpp in UserInterface

 

Hidden Content

[Python Client]

 

1. Open playersettingmodule.py in root:

 

Hidden Content

 

Finally add eix epk and I leave at Download

 

Img System

90a2fbb9e9.png

 

Credits: me :)

Greetings!

 

This is the hidden content, please

if (IsEnemy())

change all

if (IsEnemy() || IsStone())

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

  • 2 weeks later...
  • 1 month later...

I have solved it.

I write "return;" after all "__Attachxy()" and "__Detachxy()" in Instancebase.cpp

example:

    if (IsPC() || IsNPC())
    {
        if (m_dwEmpireID == 1) //Shinsoo
        {
            __DetachTargetEffectShinsoo();
            return;
        }
        else if (m_dwEmpireID == 2)//Chunjo
        {
            __DetachTargetEffectChunjo();
            return;
        }
        else if (m_dwEmpireID == 3)//Jinnnos
        {
            __DetachTargetEffectJinnos();
            return;
        }
        else
        {
            __DetachTargetEffectMonster();
            return;
        }
    }
    if (IsEnemy())
    {
        __DetachTargetEffectMonster();
        return;
    }
    
    if (IsStone())
    {
        __DetachTargetEffectMonster();
        return;
    }

 

Edited by TheSLZ
  • Metin2 Dev 1
  • Love 2
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
  • Bot

Nice idea!

I successfully implemented this to my game, but now I wanna to change color of that circle. But I have a little problem with that.

In .mse file are this lines:

  •         ColorOperationType             4
  •         ColorFactor                    0.031373 0.227451 0.992157 1.000000

I think that ColorOperationType is quantity of with how many numbers we want work. (So there are four colors in that cirlce?)

And ColorFactor is config of that color. But I don't know what form of enrollment is this.

 

Am I right?

If not..how can I change color of circle?

Thanks for all help.

english_banner.gif

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.