Jump to content

Recommended Posts

  • Bot

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 16
  • Good 4
  • muscle 1
  • Love 3
  • Love 10

english_banner.gif

Link to comment
https://metin2.dev/topic/32105-createadd-new-support-skills/
Share on other sites

  • 5 months later...
On 1/28/2024 at 7:59 PM, Doose said:

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.

  Reveal hidden contents

SVN Game

  Reveal hidden contents
//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,

 

 

  Reveal hidden contents

SVN Client

  Reveal hidden contents
//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;

 

 

  Reveal hidden contents

CLIENT ROOT

  Reveal hidden contents
//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

 

 

  Hide contents

CLIENT LOCALE

  Hide contents

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

 

  Hide contents

SERVER

  Hide contents

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.



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

i try add but something bad 

slot empty and is not a skill lvl up to get status 

https://metin2.download/picture/V8EvzDrz801jwa52WN73mCirxKMwILo2/.png



can you explain how to do this part ?  and how to add image on ETC ?? 

Edited by Metin2 Dev International
Core X - External 2 Internal

now i have icon and discription like this 
https://metin2.download/picture/NGRjklHhMn6NeB26wn2uY7QGR1jEac89/.png

How i can put  like 1 point 150HP 2 points 150HP 3 points 175HP ?

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 1
  • Bot
3 hours ago, Protozaki said:

now i have icon and discription like this 
https://metin2.download/picture/NGRjklHhMn6NeB26wn2uY7QGR1jEac89/.png

How i can put  like 1 point 150HP 2 points 150HP 3 points 175HP ?

To put the bonuses you will need char.cpp, skill_desc.txt and skill_proto from navicat.

For skill_desc.txt i really can't tell you much, you simply need to look to another skill and adapt it, same goes for skill_proto.

For char.cpp you simply have to follow the tutorial and put the bonus you want.

Edited by Metin2 Dev International
Core X - External 2 Internal

english_banner.gif

3 hours ago, Doose said:

To put the bonuses you will need char.cpp, skill_desc.txt and skill_proto from navicat.

For skill_desc.txt i really can't tell you much, you simply need to look to another skill and adapt it, same goes for skill_proto.

For char.cpp you simply have to follow the tutorial and put the bonus you want.



i'm just using this part 

value_skill = static_cast<int>(pkSk->kPointPoly.Eval()); PointChange(POINT_MAX_HP_PCT,value_skill );

i delete the two another bonus 

my prolem is when the skil is P visual appears i  get more 50% but on status is the same HP 

3892 HP have the Character, when i put skill P stay 3892


on client part do i need use "SKILL_REALM_UNITY"

for the files read when the skil are upgrading ?


in my head i think the problem is skill_proto.sql
 

https://metin2.download/picture/7pHIoQcCXUfNMXGBSm44jydB1874v8nI/.png

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Bot
14 hours ago, Protozaki said:



i'm just using this part 

value_skill = static_cast<int>(pkSk->kPointPoly.Eval()); PointChange(POINT_MAX_HP_PCT,value_skill );

i delete the two another bonus 

my prolem is when the skil is P visual appears i  get more 50% but on status is the same HP 

3892 HP have the Character, when i put skill P stay 3892


on client part do i need use "SKILL_REALM_UNITY"

for the files read when the skil are upgrading ?


in my head i think the problem is skill_proto.sql
 

https://metin2.download/picture/7pHIoQcCXUfNMXGBSm44jydB1874v8nI/.png

Are you sure you followed the whole tutorial entirely?
If you're asking something like: "on client part do i need use "SKILL_REALM_UNITY"", it means you didn't do the tutorial 100%.

Re-do it all again without skipping any step and it will work 100%.

Edited by Metin2 Dev International
Core X - External 2 Internal

english_banner.gif

6 hours ago, Doose said:

Are you sure you followed the whole tutorial entirely?
If you're asking something like: "on client part do i need use "SKILL_REALM_UNITY"", it means you didn't do the tutorial 100%.

Re-do it all again without skipping any step and it will work 100%.

i dont skip nothing my problem is just if i put the skill m6 G1 P what ever HP never change to more 

Edited by Protozaki
  • Bot
9 hours ago, Protozaki said:

i dont skip nothing my problem is just if i put the skill m6 G1 P what ever HP never change to more 

Hmm really strange.

Can you show me the whole char.cpp code also skill_proto from navicat.

english_banner.gif

5 hours ago, Doose said:

Hmm really strange.

Can you show me the whole char.cpp code also skill_proto from navicat.

Yes sure 


This is the hidden content, please



skill_proto.sql

132    SKILL_REALM_UNITY    0    1    1    40    MAX_HP    maxhp*0.2*k    0.38 + 0.247 * (k - 1)                        DISABLE_BY_POINT_UP    YMIR    NONE            YMIR    NONE                0    0    NORMAL    0    1    0    0

 

  • Metin2 Dev 4
  • Eyes 1
  • Good 2
  • Love 4
4 hours ago, Doose said:

Send also skill.cpp and char_skill.cpp pls.

http://My-edit/char_skill.cpp at main · Protozaki/My-edit · GitHub
http://My-edit/skill.cpp at main · Protozaki/My-edit · GitHub


PS: on your tutorial you never say to edit skill.cpp just say to edit on skill.h

Edited by Protozaki
  • Metin2 Dev 1
  • Bot
24 minutes ago, Protozaki said:

It's not necessary, i just want to see something.
By the way, i can't see your files.

8 hours ago, Protozaki said:

Yes sure 


This is the hidden content, please



skill_proto.sql

132    SKILL_REALM_UNITY    0    1    1    40    MAX_HP    maxhp*0.2*k    0.38 + 0.247 * (k - 1)                        DISABLE_BY_POINT_UP    YMIR    NONE            YMIR    NONE                0    0    NORMAL    0    1    0    0

 

"132    SKILL_REALM_UNITY    0    1    1    40    MAX_HP    maxhp*0.2*k    0.38 + 0.247 * (k - 1)                        DISABLE_BY_POINT_UP    YMIR    NONE            YMIR    NONE                0    0    NORMAL    0    1    0    0"

You are adjusting bMaxLevel to be 1 point instead of 40.

You can't use maxhp*0.2*k, you must do it for example: 7.692*k.

 

Here is mine as example.

132    Realm Unity    0    1    40    0    MAX_HP_PCT    7.692*k                            DISABLE_BY_POINT_UP        HP_REGEN    30.768*k            MALL_DEFBONUS    -1.538*k        50+140*k    0    0    NORMAL    0    1    0    0

Edited by Doose
  • Metin2 Dev 2

english_banner.gif

25 minutes ago, Doose said:

It's not necessary, i just want to see something.
By the way, i can't see your files.

"132    SKILL_REALM_UNITY    0    1    1    40    MAX_HP    maxhp*0.2*k    0.38 + 0.247 * (k - 1)                        DISABLE_BY_POINT_UP    YMIR    NONE            YMIR    NONE                0    0    NORMAL    0    1    0    0"

You are adjusting bMaxLevel to be 1 point instead of 40.

You can't use maxhp*0.2*k, you must do it for example: 7.692*k.

 

Here is mine as example.

132    Realm Unity    0    1    40    0    MAX_HP_PCT    7.692*k                            DISABLE_BY_POINT_UP        HP_REGEN    30.768*k            MALL_DEFBONUS    -1.538*k        50+140*k    0    0    NORMAL    0    1    0    0



If is possible can u show me you skilldesc.txt?
not all just part of this skill

Ha and is fix it the problem was the part of skill_proto.sql  🙂 ty 

Edited by Protozaki
  • Metin2 Dev 1
15 minutes ago, Doose said:

You can create a quest.

https://metin2.download/picture/1I56D7xBis2C61sk4b3NC14nqxvJrhxF/.png

for that skill all ready maybe have the books i just dont know what vnum of the two books are....

Edited by Metin2 Dev International
Core X - External 2 Internal
  • 1 year later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.