Jump to content
×
×
  • Create New...

How To Synchronize skill_proto ( Server <> Client )


Recommended Posts

  • Moderator

M2 Download Center

This is the hidden content, please
( 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/

 

HOW-TO - VIDEO (The video is just an example, please follow the tutorial from step [3])

This is the hidden content, please

 

 

Thanks to @Syreldar for the idea.

Edited by VegaS™
  • Metin2 Dev 45
  • Love 62
  • Love 4
  • Good 24
  • Scream 3
  • Confused 2
Link to comment
Share on other sites

  • Premium

When you do nothing but still get mentioned in the "Thanks to" by @VegaS™

 

0778wFT.png

  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
  • 7 months later...
  • 1 month 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.

This is the hidden content, please

Edited by VegaS™
  • Metin2 Dev 31
  • Love 8
  • Good 20
  • Lmao 1
  • Confused 1
Link to comment
Share on other sites

  • 5 weeks later...
  • Web Developer

If anyone gets an error like this:

Traceback (most recent call last):
  File "C:\Users\Karbust\Desktop\skill_proto.py", line 26, in <module>
    int(query['dwVnum']): '\t'.join(
TypeError: sequence item 0: expected str instance, int found

Just edit this:

Kug9k7g.png

Wrap the columnValue in str().

Edited by VegaS™
  • Metin2 Dev 1

QJ0orbR.png

Metin2 Icon Database

Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Activity

    1. 36

      Destroy Item System

    2. 1

      Brillances

    3. 0

      Fusion.org is Looking for Staff Members

    4. 1

      Brillances

    5. 3

      ELONIA2 | PVM-MEDIUM | 11 LANGUAGES | INTERNATIONAL | A NEW STORY

    6. 4

      Spider Queen not spawining in spider dungeon v1

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.