Jump to content

Create/Add new support skills


Recommended Posts

  • Active+ Member

Hello metin2 Dev.

I'm here to present a method on how to create a new passive skill.

the design of my own passive won't be shared so i recommend you to create a new one.

Here is a gif.

So, let's go to the tutorial.

Spoiler

SVN Game

Spoiler
//File: char.cpp

//Search for:
	Int iMaxStamina;

//Add after:
    CSkillProto* pkSk;
    int value_skill = 0;

//Search for:
	iMaxHP += static_cast<int>(pkSk->kPointPoly.Eval());

//Add after:
        {
            pkSk = CSkillManager::instance().Get(SKILL_REALM_UNITY);

            if (NULL != pkSk)
            {
                pkSk->SetPointVar("k", 1.0f * GetSkillPower(SKILL_REALM_UNITY) / 100.0f);      //SKILL_REALM_UNITY -> Variable name for skill.
                value_skill = static_cast<int>(pkSk->kPointPoly.Eval());
                PointChange(POINT_MAX_HP_PCT,value_skill );
                value_skill = static_cast<int>(pkSk->kPointPoly2.Eval());
                PointChange(POINT_HP_REGEN,value_skill );
                value_skill = static_cast<int>(pkSk->kPointPoly3.Eval());
                PointChange(POINT_MALL_DEFBONUS,value_skill );
            }
        }

//Search for:

	int CHARACTER::GetLeadershipSkillLevel() const
	{ 
	    return GetSkillLevel(SKILL_LEADERSHIP);
	}

//Add after:
	int CHARACTER::GetRealmSkillLevel() const
	{
      	return GetSkillLevel(SKILL_REALM_UNITY);
	}

//File: char.h

//Search for:
	int                GetLeadershipSkillLevel() const;

//Add after:
	int                GetRealmSkillLevel() const;

//File: char_skill.cpp

//Search for:

	SKILL_RESIST_PENETRATE

//Add after:
      , SKILL_REALM_UNITY
      
      
//File: skill.h

//Search for:

	SKILL_HORSE_SUMMON        = 131,

//Add after:

	SKILL_REALM_UNITY        = 132,

 

 

Spoiler

SVN Client

Spoiler
//File: PythonPlayerModule.cpp

//Search for:

	extern const DWORD c_iSkillIndex_Summon        = 131;

//Add after:

	extern const DWORD c_iSkillIndex_Realm        = 132;

//Search for:

	PyModule_AddIntConstant(poModule, "SKILL_INDEX_SUMMON",            c_iSkillIndex_Summon);

//Add after:
	PyModule_AddIntConstant(poModule, "SKILL_INDEX_REALM",            c_iSkillIndex_Realm);

//File: PythonPlayerSkill.cpp

//Search for:


	bool CPythonPlayer::__CheckShortMana(TSkillInstance& rkSkillInst, CPythonSkill::TSkillData& rkSkillData)
	{
	    extern const DWORD c_iSkillIndex_Summon;
	    if (c_iSkillIndex_Summon == rkSkillInst.dwIndex)
 	       return false;


//Add after:

    extern const DWORD c_iSkillIndex_Realm;
    if (c_iSkillIndex_Realm == rkSkillInst.dwIndex)
        return false;

 

 

Spoiler

CLIENT ROOT

Spoiler
//File: playersettingmodule.py

//Search for:

	SKILL_INDEX_DICT = {

//Do:    Extend your "SUPPORT" for all jobs with: 132


//File: uicharacter.py

//Search for:

	SHOW_LIMIT_SUPPORT_SKILL_LIST

//Do: 	Extend with: 132
  
//Search for:

	skillType = skill.GetSkillType(skillIndex)


//Add after:

        if skillIndex == 132:
            if skillGrade == 1:
                skillLevel += 19
            elif skillGrade == 2:
                skillLevel += 29
            elif skillGrade == 3:
                skillLevel += 39
            self.toolTipSkill.SetSkillNew(srcSlotIndex, skillIndex, skillGrade, skillLevel)
            return

 

 

Spoiler

CLIENT LOCALE

Spoiler

Edit your skilldesc.txt, skilltable.txt and add the image on ETC.

 

Spoiler

SERVER

Spoiler

Edit your skill_proto.sql on navicat with your new skill.

 

 

And this is how you create a new support skill.

Anything you need help with, don't hesitate to write here or to contact.

With best regards,
Doose.

Edited by Doose
I had to change the format of writing.
  • Metin2 Dev 3
  • Good 1
  • muscle 1
  • Love 1
  • Love 3
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.