Jump to content
×
×
  • Create New...

How To Synchronize skill_proto ( Server <> Client )


Recommended Posts

  • Moderator

M2 Download Center

Hidden Content

    Give reaction to this post to see the hidden content.
( Internal )

8ef68592c3f5627a244b93f55d67b440.png

 

As the title says, here's how you can synchronize your skill_table from client with skill_proto from server.

[1]. First of all we've to rewrite the enum part of tokens (which is used in CPythonSkill::RegisterSkillTable), that means we change the order of index-tab-line with a new order, because ymir didn't used all columns. In that way we keep the file much cleaner and just with necessary columns (9 columns instead of 27).

Spoiler
// Not used
TABLE_TOKEN_TYPE_NAME
TABLE_TOKEN_TYPE_TYPE
TABLE_TOKEN_TYPE_LEVEL_STEP
TABLE_TOKEN_TYPE_POINT_ON
TABLE_TOKEN_TYPE_MASTER_BONUS_POLY
TABLE_TOKEN_TYPE_ATTACK_GRADE_POLY
TABLE_TOKEN_TYPE_FLAG
TABLE_TOKEN_TYPE_AFFECT_FLAG
TABLE_TOKEN_TYPE_POINT_ON2
TABLE_TOKEN_TYPE_POINT_POLY2
TABLE_TOKEN_TYPE_DURATION_POLY2
TABLE_TOKEN_TYPE_AFFECT_FLAG2
TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_VNUM
TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_LEVEL
TABLE_TOKEN_TYPE_SKILL_TYPE
TABLE_TOKEN_TYPE_MAX_HIT
TABLE_TOKEN_TYPE_SPLASH_AROUND_DAMAGE_ADJUST_POLY
TABLE_TOKEN_TYPE_SPLASH_RANGE

 


Srcs/Client/UserInterface/PythonSkill.h

Search for the next enum:

Spoiler
		enum ESkillTableTokenType
		{
			[...]
		};

 

Replace it with:

Spoiler
#ifdef ENABLE_SKILL_TABLE_RENEW
		enum ESkillTableTokenType
		{
			TABLE_TOKEN_TYPE_VNUM,
			TABLE_TOKEN_TYPE_MAX_LEVEL,
			TABLE_TOKEN_TYPE_LEVEL_LIMIT,
			TABLE_TOKEN_TYPE_POINT_POLY,
			TABLE_TOKEN_TYPE_SP_COST_POLY,
			TABLE_TOKEN_TYPE_DURATION_POLY,
			TABLE_TOKEN_TYPE_DURATION_SP_COST_POLY,
			TABLE_TOKEN_TYPE_COOLDOWN_POLY,
			TABLE_TOKEN_TYPE_TARGET_RANGE,
			TABLE_TOKEN_TYPE_MAX_NUM,
		};
#else
		enum ESkillTableTokenType
		{
			TABLE_TOKEN_TYPE_VNUM,
			TABLE_TOKEN_TYPE_NAME,
			TABLE_TOKEN_TYPE_TYPE,
			TABLE_TOKEN_TYPE_LEVEL_STEP,
			TABLE_TOKEN_TYPE_MAX_LEVEL,
			TABLE_TOKEN_TYPE_LEVEL_LIMIT,
			TABLE_TOKEN_TYPE_POINT_ON,
			TABLE_TOKEN_TYPE_POINT_POLY,
			TABLE_TOKEN_TYPE_SP_COST_POLY,
			TABLE_TOKEN_TYPE_DURATION_POLY,
			TABLE_TOKEN_TYPE_DURATION_SP_COST_POLY,
			TABLE_TOKEN_TYPE_COOLDOWN_POLY,
			TABLE_TOKEN_TYPE_MASTER_BONUS_POLY,
			TABLE_TOKEN_TYPE_ATTACK_GRADE_POLY,
			TABLE_TOKEN_TYPE_FLAG,
			TABLE_TOKEN_TYPE_AFFECT_FLAG,
			TABLE_TOKEN_TYPE_POINT_ON2,
			TABLE_TOKEN_TYPE_POINT_POLY2,
			TABLE_TOKEN_TYPE_DURATION_POLY2,
			TABLE_TOKEN_TYPE_AFFECT_FLAG2,
			TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_VNUM,
			TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_LEVEL,
			TABLE_TOKEN_TYPE_SKILL_TYPE,
			TABLE_TOKEN_TYPE_MAX_HIT,
			TABLE_TOKEN_TYPE_SPLASH_AROUND_DAMAGE_ADJUST_POLY,
			TABLE_TOKEN_TYPE_TARGET_RANGE,
			TABLE_TOKEN_TYPE_SPLASH_RANGE,
			TABLE_TOKEN_TYPE_MAX_NUM,
		};
#endif

 

Srcs/Client/UserInterface/Locale_Inc.h

Spoiler
#define ENABLE_SKILL_TABLE_RENEW // Enable synchronization skill_proto -> skilltable

 

 

[2]. Compile the source client again.

[3]. Open Navicat (preferably the latest versions) and do the following things:

  • Open player table
  • Export Wizard -> Mark skill_proto -> Export to ../location/skilltable.txt
  • Export format -> *.txt
  • Unmark All fields then Unselect All
  • Select available fields: -> {'dwVnum', 'bMaxLevel', 'bLevelLimit', 'szPointPoly', 'szSPCostPoly', 'szDurationPoly', 'szDurationSPCostPoly', 'szCooldownPoly', 'dwTargetRange'}
  • Unmark: Include column titles
  • Text Qualifier: None
  • Copy the skilltable.txt from Desktop to ../locale/en/

 

Hidden Content

    Give reaction to this post to see the hidden content.
 (The video is just an example, please follow the tutorial from step [3])

Hidden Content

    Give reaction to this post to see the hidden content.

 

 

Thanks to @Syreldar for the idea.

Edited by VegaS™
  • Metin2 Dev 25
  • Love 48
  • Love 3
  • Good 17
  • Scream 2
Link to comment
  • 3 weeks later...
  • 4 weeks later...
  • 7 months later...
  • Moderator
On 7/28/2021 at 2:20 PM, Hik said:

Attention, I believe the skilltable_new is wrong, I think a column is missing.

You are right, I helped some people with this problem in PM but I forgot to edit the topic.

Update: For those who know what they're doing, I did a small script that doing this faster, otherwise, use the manual method from the first post.

Hidden Content

    Give reaction to this post to see the hidden content.

Edited by VegaS™
  • Metin2 Dev 9
  • Love 2
  • Good 11
  • Lmao 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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.