Jump to content

Recommended Posts

  • Premium
2 hours ago, CITY said:

GM.mse not work 😞  problem with effect [GM]

https://metin2.download/picture/79wyE4ZzLzywCzt92D6fS0qHXt7FGgAY/.jpg

another problem 😞

add 
#include "PythonPlayer.h"

problem solver

Thanks for mentioning, forget to add include. I'll eat my rosół and then update the repository. 

 

Updated repository. Those who already added the code, please replace it with new one. Otherwise when you use emoticons (ctrl + 1 etc) players around you won't see it. 

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

  • 2 weeks later...
  • 2 weeks later...
On 4/9/2022 at 7:29 PM, avertusss said:

I have the same problem @filipw1 Any solution? 

Yes : "Bip01", "D:/ymir work/pc/common/effect/armor/armor_9_terabithia.mse"

No :(VS ERROR) :   "Bip01", 'D:/ymir work/pc/common/effect/armor/armor_9_terabithia.mse"

' ' ' ' No 
" " "  Yes 

OK?

 

Control files.

        { pkBase.EFFECT_EMOTICON + 17, "", "d:/ymir work/effect/etc/emoticon/hungry.mse" },
        { pkBase.EFFECT_EMOTICON + 18, "", "d:/ymir work/effect/etc/emoticon/siren.mse" },
        { pkBase.EFFECT_EMOTICON + 19, "", "d:/ymir work/effect/etc/emoticon/letter.mse" },
        { pkBase.EFFECT_EMOTICON + 20, "", "d:/ymir work/effect/etc/emoticon/call.mse" },
        { pkBase.EFFECT_EMOTICON + 21, "", "d:/ymir work/effect/etc/emoticon/celebration.mse" },
        { pkBase.EFFECT_EMOTICON + 22, "", "d:/ymir work/effect/etc/emoticon/alcohol.mse" },
        { pkBase.EFFECT_EMOTICON + 23, "", "d:/ymir work/effect/etc/emoticon/busy.mse" },
        { pkBase.EFFECT_EMOTICON + 24, "", "d:/ymir work/effect/etc/emoticon/whirl.mse" },

 

new emotions(emotion bag) added but not working.

On 3/13/2022 at 3:46 PM, Thorek said:

You must add new emotion to m_vecEffectData vector and v_vecEmoticonString.

new emotions(emotion bag) added but not working.

 

 

        { pkBase.EFFECT_EMOTICON + 17, "", "d:/ymir work/effect/etc/emoticon/hungry.mse" },
        { pkBase.EFFECT_EMOTICON + 18, "", "d:/ymir work/effect/etc/emoticon/siren.mse" },
        { pkBase.EFFECT_EMOTICON + 19, "", "d:/ymir work/effect/etc/emoticon/letter.mse" },
        { pkBase.EFFECT_EMOTICON + 20, "", "d:/ymir work/effect/etc/emoticon/call.mse" },
        { pkBase.EFFECT_EMOTICON + 21, "", "d:/ymir work/effect/etc/emoticon/celebration.mse" },
        { pkBase.EFFECT_EMOTICON + 22, "", "d:/ymir work/effect/etc/emoticon/alcohol.mse" },
        { pkBase.EFFECT_EMOTICON + 23, "", "d:/ymir work/effect/etc/emoticon/busy.mse" },
        { pkBase.EFFECT_EMOTICON + 24, "", "d:/ymir work/effect/etc/emoticon/whirl.mse" },

Link to comment
Share on other sites

It's working perfectly now.

here is the plugin for new feelings for you:

Search:

 

{ pkMotionManager.NAME_ANGRY, "angry.msa", 0 },

ADD:

        { pkMotionManager.NAME_DANCE_7, "dance_7.msa", 0 },
        { pkMotionManager.NAME_JOY, "joy.msa", 0 },
        { pkMotionManager.NAME_PUSHUP, "pushup.msa", 0 },
        { pkMotionManager.NAME_EXERCISE, "exercise.msa", 0 },
        { pkMotionManager.NAME_DOZE, "doze.msa", 0 },
        { pkMotionManager.NAME_SELFIE, "selfie.msa", 0 },

Search:

 

        { pkBase.EFFECT_EMOTICON + 11, "", "d:/ymir work/effect/etc/emoticon/fish.mse" },

 

ADD:

 

        { pkBase.EFFECT_EMOTICON + 12, "", "d:/ymir work/effect/etc/emoticon/charging.mse" },
        { pkBase.EFFECT_EMOTICON + 13, "", "d:/ymir work/effect/etc/emoticon/nosay.mse" },
        { pkBase.EFFECT_EMOTICON + 14, "", "d:/ymir work/effect/etc/emoticon/weather1.mse" },
        { pkBase.EFFECT_EMOTICON + 15, "", "d:/ymir work/effect/etc/emoticon/weather2.mse" },
        { pkBase.EFFECT_EMOTICON + 16, "", "d:/ymir work/effect/etc/emoticon/weather3.mse" },
        { pkBase.EFFECT_EMOTICON + 17, "", "d:/ymir work/effect/etc/emoticon/hungry.mse" },
        { pkBase.EFFECT_EMOTICON + 18, "", "d:/ymir work/effect/etc/emoticon/siren.mse" },
        { pkBase.EFFECT_EMOTICON + 19, "", "d:/ymir work/effect/etc/emoticon/letter.mse" },
        { pkBase.EFFECT_EMOTICON + 20, "", "d:/ymir work/effect/etc/emoticon/call.mse" },
        { pkBase.EFFECT_EMOTICON + 21, "", "d:/ymir work/effect/etc/emoticon/celebration.mse" },
        { pkBase.EFFECT_EMOTICON + 22, "", "d:/ymir work/effect/etc/emoticon/alcohol.mse" },
        { pkBase.EFFECT_EMOTICON + 23, "", "d:/ymir work/effect/etc/emoticon/busy.mse" },
        { pkBase.EFFECT_EMOTICON + 24, "", "d:/ymir work/effect/etc/emoticon/whirl.mse" },


If you use it this way, the emoji of new emotions will not appear in the game (except for animations such as dancing, selfie)

So use it this way.

Open PlayerSettingsModule.py

Search:

def __LoadGameEffect():
    if app.ENABLE_CPP_PSM:
        cpsm.LoadGameEffect()

ADD:

        net.RegisterEmoticonString("(sweat)")
        net.RegisterEmoticonString("(money)")
        net.RegisterEmoticonString("(happy)")
        net.RegisterEmoticonString("(love)")
        net.RegisterEmoticonString("(love2)")
        net.RegisterEmoticonString("(angry)")
        net.RegisterEmoticonString("(aha)")
        net.RegisterEmoticonString("(gloom)")
        net.RegisterEmoticonString("(sorry)")
        net.RegisterEmoticonString("(!)")
        net.RegisterEmoticonString("(?)")
        net.RegisterEmoticonString("(fish)")
        if app.ENABLE_EXPRESSING_EMOTION: ## THANK YOU OWSAP ❤️
            net.RegisterEmoticonString("(charging)")
            net.RegisterEmoticonString("(nosay)")
            net.RegisterEmoticonString("(weather1)")
            net.RegisterEmoticonString("(weather2)")
            net.RegisterEmoticonString("(weather3)")
            net.RegisterEmoticonString("(hungry)")
            net.RegisterEmoticonString("(siren)")
            net.RegisterEmoticonString("(letter)")
            net.RegisterEmoticonString("(call)")
            net.RegisterEmoticonString("(celebration)")
            net.RegisterEmoticonString("(alcohol)")
            net.RegisterEmoticonString("(busy)")
            net.RegisterEmoticonString("(whirl)")

 

now everything is ok. If you are using the S Skill system.

PlayerSettingsModule.cpp Open

Search and Replace:

 

static const DWORD GUILD_SKILL_DRAGONBLOOD = pkMotionManager.NAME_SKILL + 107;
static const DWORD GUILD_SKILL_DRAGONBLESS = pkMotionManager.NAME_SKILL + 108;
static const DWORD GUILD_SKILL_BLESSARMOR = pkMotionManager.NAME_SKILL + 109;
static const DWORD GUILD_SKILL_SPPEDUP = pkMotionManager.NAME_SKILL + 110;
static const DWORD GUILD_SKILL_DRAGONWRATH = pkMotionManager.NAME_SKILL + 111;
static const DWORD GUILD_SKILL_MAGICUP = pkMotionManager.NAME_SKILL + 112;

static const DWORD HORSE_SKILL_WILDATTACK = pkMotionManager.NAME_SKILL + 113;
static const DWORD HORSE_SKILL_CHARGE = pkMotionManager.NAME_SKILL + 114;
static const DWORD HORSE_SKILL_SPLASH = pkMotionManager.NAME_SKILL + 115;

 

Note : If your 6th Skills are not visible

Open PlayerSettingsModule.py and Search and Change :

 

NEW_678TH_SKILL_ENABLE = constInfo.NEW_678TH_SKILL_ENABLE

 

Now everything is smooth. Take care of yourselves. I love you. Greetings from Turkey.

 

Edited by EAkar
Link to comment
Share on other sites

The idea is good, but after adding this, you will notice that when a player approaches or you go to cities with players, the game loses fps (possibly this is normal on all clients before adding this, don't know, never had it on my server, probably been using LoadStaticCache forever)

I recommend using the LoadStaticCache, this makes loading slower but will prevent fps drop when rendering nearby players.

Example:

char szFileName[FILE_MAX_NUM];
    pRaceData->RegisterMotionMode(pkMotionManager.MODE_GENERAL);
    for (const auto& it : m_vecEmotion)
    {
        snprintf(szFileName, sizeof(szFileName), "%s%s%s", stFolder, "action/", it.stName);
        auto pkMootionThing = pRaceData->RegisterMotionData(pkMotionManager.MODE_GENERAL, it.wMotionIndex, szFileName, it.byPercentage);

        if (pkMootionThing)
        {
            CResourceManager::Instance().LoadStaticCache(pkMootionThing->GetFileName());
        }
    }

For emoticons, I suggest you change the way they are done, for example in game.py:

Replace:

net.SendChatPacket("(double_kill)")

For:

chrmgr.SetEmoticon(-1,14)
net.SendEmoticon(14)

 

#####Note: If you do the LoadStaticCache instead of making the load faster, it will make it slower.###

Edited by Akino
  • Lmao 1
Link to comment
Share on other sites

  • Premium
in pythonplayersettingsmodule.cpp search const bool CPlayerSettingsModule::LoadGameSound() and under add:
  
const bool CPlayerSettingsModule::LoadGameNPC()
{
	using namespace boost::algorithm;

	CMappedFile file;
	const VOID* pvData;
	if (!CEterPackManager::Instance().Get(file, NPC_LIST_FILE_NAME, &pvData))
	{
		TraceError("CPythonPlayerSettingsModule::LoadGameNPC(fileName=%s) - Load Error", NPC_LIST_FILE_NAME);
		return false;
	}

	CMemoryTextFileLoader fileLoader;
	fileLoader.Bind(file.Size(), pvData);

	CTokenVector kTokenVector;

	for (size_t i = 0; i < fileLoader.GetLineCount(); ++i)
	{
		if (!fileLoader.SplitLineByTab(i, &kTokenVector))
			continue;

		const uint32_t& vnum = atoi(kTokenVector[0].c_str());
		std::string& name = kTokenVector[1];
		trim(name);

		if (vnum)
		{
			CRaceManager::Instance().RegisterRaceName(vnum, name.c_str());
		}
		else
		{
			std::string& src = kTokenVector[2];
			trim(src);
			CRaceManager::Instance().RegisterRaceSrcName(name.c_str(), src.c_str());
		}
	}
	return true;
}

search cpsmLoadGameSkill and under add:

PyObject* cpsmLoadGameNPC(PyObject* poSelf, PyObject* poArgs)
{
	CPlayerSettingsModule::LoadGameNPC();
	return Py_BuildNone();
}

search { "LoadGameSkill",				cpsmLoadGameSkill,					METH_VARARGS }, and add under:

{ "LoadGameNPC",				cpsmLoadGameNPC,					METH_VARARGS },

in pythonplayersettingsmodule.h search #pragma once and under add:

static const char* NPC_LIST_FILE_NAME = "npclist.txt";

search const static bool LoadGameSound(); and under add:

const static bool LoadGameNPC();

in root playersetingmodule.py searh def __LoadGameNPC(): and replace:

def __LoadGameNPC():
	if app.ENABLE_CPP_PSM:
		cpsm.LoadGameNPC()
	else:
		## paste your code here
		pass

update npclist.txt 

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

  • 2 months later...
  • 4 weeks later...
  • 1 month later...

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.