Jump to content

Monster Informations Official like - Lv + AIFlag


Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

Hi, developers!

Before you start, create a backup from your source files immediately!


Today I'm gonna share with you my last work. I have read every informations from the official binary from beta(metin2client_r11185) and r7071. It was not an easy task to understand functions but successed. I will not write down the implementation step by step, but I wrote some informations into the files what you should to do to implement the system. If you do not understand the steps I put original(from dev branch) and modified files into the archive to compare the original and the changed files with notepad++ or something else comparer tool to see the changes.

- There are some files which optional changes to show the mob-aiflag on those monsters which are not aggressive but summoned by aggressive with "/ma" command.
- There was a little problem with Python 2.7.3 therefore I split asunder the gui-script. And be careful, the main script is using True and False variables.
- You can disable the whole system in common/service.h and UserInterface/Locale_inc.h with undefined or with commented macro.
 

I hope everything are understandable and I did not miss something from the release, and sorry for my bad english.
Special thanks to TheSLZ for test the implementation.

And last but not least here is the result:
 

Spoiler

283009736f4fb927.jpg.c0ed1d9f1856ff486d6

 

This is the hidden content, please

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 162
  • kekw 2
  • Eyes 1
  • Dislove 2
  • Angry 4
  • Smile Tear 2
  • Think 4
  • Confused 3
  • Scream 2
  • Lmao 1
  • Good 56
  • muscle 1
  • Love 8
  • Love 108
Link to comment
Share on other sites

  • Honorable Member

First of all sorry for lately reply.
Yes I know already TheSLZ informed me, sorry for that but I missed out something from the UserInterface/NetworkActorManager.cpp, I will update the archive within some minutes after I had recheck everything again.

CInstanceBase* CNetworkActorManager::__AppendCharacterManagerActor(SNetworkActorData& rkNetActorData)

	kCreateData.m_dwLevel=rkNetActorData.m_dwLevel;
#if defined(WJ_SHOW_MOB_INFO)
	kCreateData.m_dwAIFlag=rkNetActorData.m_dwAIFlag;
#endif
	kCreateData.m_dwGuildID=rkNetActorData.m_dwGuildID;

 

The IsPet() part same with IsPC() if you follow the line in back(Go to definition in VS) just the different is that the Pets(the new growable pets) have new instance type (TYPE_PET = 10, pc is 6 etc).

gameLib/ActorInstance.cpp + Header file into class CActorInstance

		bool IsPet();
bool CActorInstance::IsPet()
{
	if (TYPE_PET == m_eActorType)
		return true;

	return false;
}

UserInterface/InstanceBase.cpp + Header file into class CInstanceBase

		BOOL					IsPet();
BOOL CInstanceBase::IsPet()
{
	return m_GraphicThingInstance.IsPet();
}

gameLib/ActorInstance.h

		enum EType
		{
			TYPE_ENEMY,
			TYPE_NPC,
			TYPE_STONE,
			TYPE_WARP,
			TYPE_DOOR,
			TYPE_BUILDING,
			TYPE_PC,
			TYPE_POLY,
			TYPE_HORSE,
			TYPE_GOTO,
			TYPE_PET,

			TYPE_OBJECT, // Only For Client
		};

 

@koray: Sorry but I do not know what does it mean the WJ tag.

@galet I have an unpacked r7071 but the imports are not corrected and crash when starts, but can load it in ida, and the (already not actual) r11185(from beta) able to debug with attach process when ... I do not want to tell that because "they" are reading this forum as Shogun said and I do not want to change this state, because I want to bebug the new binaries in the future continuously :).

About: Module object has no attribute "blablabla". Check your pythonsystemmodule.cpp file again and add the new variable if you did not do yet.

  • Love 5
Link to comment
Share on other sites

  • Premium

ahahah even after adding it into

CInstanceBase* CNetworkActorManager::__AppendCharacterManagerActor(SNetworkActorData& rkNetActorData)

under

	kCreateData.m_dwLevel=rkNetActorData.m_dwLevel;

i had added this as you said

#if defined(WJ_SHOW_MOB_INFO)
	kCreateData.m_dwAIFlag=rkNetActorData.m_dwAIFlag;
#endif

and there is still bug on it the * is not shown

Link to comment
Share on other sites

First of all sorry for lately reply.
Yes I know already TheSLZ informed me, sorry for that but I missed out something from the UserInterface/NetworkActorManager.cpp, I will update the archive within some minutes after I had recheck everything again.

CInstanceBase* CNetworkActorManager::__AppendCharacterManagerActor(SNetworkActorData& rkNetActorData)

	kCreateData.m_dwLevel=rkNetActorData.m_dwLevel;
#if defined(WJ_SHOW_MOB_INFO)
	kCreateData.m_dwAIFlag=rkNetActorData.m_dwAIFlag;
#endif
	kCreateData.m_dwGuildID=rkNetActorData.m_dwGuildID;

Works ! Thank you :D

https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

 

 

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

  • Honorable Member

@Despero:

I can't log into my skype, because of my slow internet bandwith(32kbps).

Optional update:

char_item.cpp>

//1. Search this function: bool CHARACTER::GiveItemFromSpecialItemGroup(DWORD dwGroupNum, std::vector<DWORD> &dwItemVnums, std::vector<DWORD> &dwItemCounts, std::vector <LPITEM> &item_gets, int &count)
//And replace the MOB case of switch (dwVnum) with this:
		case CSpecialItemGroup::MOB:
			{
				sys_log(0, "CSpecialItemGroup::MOB %d", dwCount);
				int x = GetX() + number(-500, 500);
				int y = GetY() + number(-500, 500);

				CHARACTER_MANAGER::instance().SpawnMob(dwCount, GetMapIndex(), x, y, 0, true, -1, true, true);

				bSuccess = true;
			}
			break;

questlua.cpp>

//1. Search the mob_spawn function.
//Replace this:
//############################################################################
mob = CHARACTER_MANAGER::instance().SpawnMob(mob_vnum, ch->GetMapIndex(), x, y, 0);
//############################################################################

//With this:
//############################################################################
mob = CHARACTER_MANAGER::instance().SpawnMob(mob_vnum, ch->GetMapIndex(), x, y, 0, false, -1, true, true);
//############################################################################

//2. Delete this from the mob_spawn function:
//############################################################################
				if (bAggressive)
					mob->SetAggressive();
//############################################################################

Edited by xP3NG3Rx
Update added
  • 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.