Jump to content

Mob/Stone attack effect problem (shaking)


Recommended Posts

  • Active+ Member

Hello there.
When I attack stones, the rocking (shake) effect of the stone does not work and remains fixed. How can I solve this?

That is, it does not vibrate when I hit the stone. No syserr.

 

Sorry for my bad english, I using Google Translate.

 

spacer.png

 

 

 

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

Hello,

Basically the metin stones use the same animation of both "wait" and "damage" and for most animations.

I bolded "wait" and "damage" the metinstone motlist that i found in my pack.

Spoiler

GENERAL SPAWN metinstone_drop.msa 100
GENERAL WAIT metinstone_loop.msa 100
GENERAL RUN metinstone_loop.msa 100
GENERAL NORMAL_ATTACK metinstone_attack.msa 100
GENERAL FRONT_DAMAGE metinstone_loop.msa 100
GENERAL FRONT_DEAD metinstone_blow.msa 100
GENERAL FRONT_KNOCKDOWN metinstone_loop.msa 100
GENERAL FRONT_STANDUP metinstone_loop.msa 100
GENERAL BACK_DAMAGE metinstone_loop.msa 100
GENERAL BACK_KNOCKDOWN metinstone_loop.msa 100
GENERAL BACK_STANDUP metinstone_loop.msa 100
GENERAL BACK_DEAD metinstone_blow.msa 100 

If you want "Shake" the effect or stone, you should animate and re-export a new animation (where metinstone shakes).

In that case if connected to the right bone as well the effect shake.

 

I hope I have answered your question.

-LN-

Edited by LoKnarash
  • Metin2 Dev 1
Link to comment
Share on other sites

  • Active+ Member
On 10/30/2021 at 12:45 AM, LoKnarash said:

Hello,

Basically the metin stones use the same animation of both "wait" and "damage" and for most animations.

I bolded "wait" and "damage" the metinstone motlist that i found in my pack.

  Hide contents

GENERAL SPAWN metinstone_drop.msa 100
GENERAL WAIT metinstone_loop.msa 100
GENERAL RUN metinstone_loop.msa 100
GENERAL NORMAL_ATTACK metinstone_attack.msa 100
GENERAL FRONT_DAMAGE metinstone_loop.msa 100
GENERAL FRONT_DEAD metinstone_blow.msa 100
GENERAL FRONT_KNOCKDOWN metinstone_loop.msa 100
GENERAL FRONT_STANDUP metinstone_loop.msa 100
GENERAL BACK_DAMAGE metinstone_loop.msa 100
GENERAL BACK_KNOCKDOWN metinstone_loop.msa 100
GENERAL BACK_STANDUP metinstone_loop.msa 100
GENERAL BACK_DEAD metinstone_blow.msa 100 

If you want "Shake" the effect or stone, you should animate and re-export a new animation (where metinstone shakes).

In that case if connected to the right bone as well the effect shake.

 

I hope I have answered your question.

-LN-

Firstly, thank you.
But as you showed me the motlist.txt(client and server);

GENERAL SPAWN metinstone_drop.msa 100
GENERAL WAIT metinstone_loop.msa 100
GENERAL RUN metinstone_loop.msa 100
GENERAL NORMAL_ATTACK metinstone_attack.msa 100
GENERAL FRONT_DAMAGE metinstone_loop.msa 100
GENERAL FRONT_DEAD metinstone_blow.msa 100
GENERAL FRONT_KNOCKDOWN metinstone_loop.msa 100
GENERAL FRONT_STANDUP metinstone_loop.msa 100
GENERAL BACK_DAMAGE metinstone_loop.msa 100
GENERAL BACK_KNOCKDOWN metinstone_loop.msa 100
GENERAL BACK_STANDUP metinstone_loop.msa 100
GENERAL BACK_DEAD metinstone_blow.msa 100 

.msa files are also available. But it still doesn't happen.
I think there is a problem with the source files, but I still haven't been able to solve the problem.

Link to comment
Share on other sites

  • 9 months later...
  • Premium
void CActorInstance::__ProcessDataAttackSuccess(const NRaceData::TAttackData& c_rAttackData, CActorInstance& rVictim, const D3DXVECTOR3& c_rv3Position, UINT uiSkill, BOOL isSendPacket)
	else if (rVictim.IsStone() || rVictim.IsDoor())
	{
		__HitStone(rVictim);
	}
void CActorInstance::__HitStone(CActorInstance& rVictim)
{
	if (rVictim.IsStun())
	{
		rVictim.Die();
	}
	else
	{
		rVictim.__Shake(100); // This is what triggers the shake, make sure it's there.
	}
}

 

  • Metin2 Dev 1
  • Smile Tear 1

 

"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

6 hours ago, Syreldar said:
void CActorInstance::__ProcessDataAttackSuccess(const NRaceData::TAttackData& c_rAttackData, CActorInstance& rVictim, const D3DXVECTOR3& c_rv3Position, UINT uiSkill, BOOL isSendPacket)
	else if (rVictim.IsStone() || rVictim.IsDoor())
	{
		__HitStone(rVictim);
	}
void CActorInstance::__HitStone(CActorInstance& rVictim)
{
	if (rVictim.IsStun())
	{
		rVictim.Die();
	}
	else
	{
		rVictim.__Shake(100); // This is what triggers the shake, make sure it's there.
	}
}

 

Thank you for your advice. I have this this code in ActorInstanceBattle.cpp but it doesnt work.

It is not working after I added shoulder sash system. When I load backup without sash, metin stones shaking normally.

Maybe I added some code badly, but there is no changes in ActorInstanceBattle.cpp

Link to comment
Share on other sites

  • Active Member

@SevenfoldiaI have the same issue, so it's not only your problem and it's not related to the __Shake function. As the @Sevenfoldia said, it's related to the sash system, so would be nice, if someone can check the sash system for this problem. Personally I couldn't see anything.

Edited by ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • Premium

This problem was a pain in the ass, but it was because of the worldmatrix. The sash system also has a scale system, so we need to also update the shake function matrix, since the sash system is updating our deform functions over in ThingInstance.

 

Enough talking, let's fix it:

GameLib/ActorInstanceBattle.cpp

 

Search:

void CActorInstance::ShakeProcess()

 

Replace

		m_worldMatrix._41	+= v3Pos.x;
		m_worldMatrix._42	+= v3Pos.y;
		m_worldMatrix._43	+= v3Pos.z;

 

With

		m_TransformMatrix._41	+= v3Pos.x;
		m_TransformMatrix._42	+= v3Pos.y;
		m_TransformMatrix._43	+= v3Pos.z;

 

  • Metin2 Dev 1
  • Love 1
Link to comment
Share on other sites

4 hours ago, dumita123 said:

This problem was a pain in the ass, but it was because of the worldmatrix. The sash system also has a scale system, so we need to also update the shake function matrix, since the sash system is updating our deform functions over in ThingInstance.

 

Enough talking, let's fix it:

GameLib/ActorInstanceBattle.cpp

 

Search:

void CActorInstance::ShakeProcess()

 

Replace

		m_worldMatrix._41	+= v3Pos.x;
		m_worldMatrix._42	+= v3Pos.y;
		m_worldMatrix._43	+= v3Pos.z;

 

With

		m_TransformMatrix._41	+= v3Pos.x;
		m_TransformMatrix._42	+= v3Pos.y;
		m_TransformMatrix._43	+= v3Pos.z;

 

It works! Than you very much!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.