Jump to content

Recommended Posts

There is a problem. if you level up a skill from m3 -> m4 for example, the needed books don't reset to 0, only after teleport or reading another book. 

https://metin2.download/video/nrUlvyuL2Z5D3VZr3gSp2wA20z0hUjQg/.mp4

How to fix?

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Good 1
  • Active+ Member
2 hours ago, SCOOB said:

There is a problem. if you level up a skill from m3 -> m4 for example, the needed books don't reset to 0, only after teleport or reading another book. 

https://metin2.download/video/nrUlvyuL2Z5D3VZr3gSp2wA20z0hUjQg/.mp4

How to fix?

I have updated the file, you should change char_skill.cpp

First search

                        pPC->SetFlag(flag, 0);

And remove

                        SkillLevelUp(dwSkillVnum, SKILL_UP_BY_BOOK);

Now change this This

#ifdef ENABLE_SKILL_DESCRIPTION_RENEWAL
						m_pSkillLevels[dwSkillVnum].bBooks = 0;
#else
						pPC->SetFlag(flag, 0);
#endif

To this:

#ifdef ENABLE_SKILL_DESCRIPTION_RENEWAL
						m_pSkillLevels[dwSkillVnum].bBooks = 0;
						SkillLevelUp(dwSkillVnum, SKILL_UP_BY_BOOK);
#else
						SkillLevelUp(dwSkillVnum, SKILL_UP_BY_BOOK);
						pPC->SetFlag(flag, 0);
#endif
Edited by m2Ciaran

I dont know if I do something wrong, but it works only for M1-M9 (M10 and more doesnt show anything)

Edit: So its only for books? If yes, it would by nice when M10 to G1 is too showed and not only M1-M9

Edit2: Ahhh

					if app.ENABLE_SKILL_DESCRIPTION_RENEWAL:
						if skillGrade == 1: #Show the remaining books on 'M' level only
							if self.HasSkillLevelDescription(skillIndex, skillLevel):
								self.AppendTextLine(localeInfo.TOOLTIP_SKILL_BOOKS % (player.GetRemainingBooks(slotIndex), need_bookcount), 0xff375cd4)

but problem is when you got M9 you cannot see books from M9 to M10

Edited by Filachilla
  • Active+ Member
9 minutes ago, Filachilla said:

I dont know if I do something wrong, but it works only for M1-M9 (M10 and more doesnt show anything)

Edit: So its only for books? If yes, it would by nice when M10 to G1 is too showed and not only M1-M9

Yes only for books and that is right, I forget about the "master" level.. crazy things. Dl is updated once again

Just move the uitooltip if like that to make it work with m10 (master):

		if skillLevel > 0:
			if self.HasSkillLevelDescription(skillIndex, skillLevel):
				self.AppendSpace(5)
				if skillGrade == skill.SKILL_GRADE_COUNT:
					pass
				elif skillLevel == skillMaxLevelEnd:
					self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL_MASTER % (skillLevel), self.NORMAL_COLOR)
				else:
					self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL % (skillLevel), self.NORMAL_COLOR)
				if app.ENABLE_SKILL_DESCRIPTION_RENEWAL:
					if skillGrade == 1:
						if self.HasSkillLevelDescription(skillIndex, skillLevel):
							self.AppendTextLine(localeInfo.TOOLTIP_SKILL_BOOKS % (player.GetRemainingBooks(slotIndex), need_bookcount), 0xff375cd4)
				self.AppendSkillLevelDescriptionNew(skillIndex, skillCurrentPercentage, self.ENABLE_COLOR)

 

  • Love 1

1118 23:12:26178 :: 
game.py(line:260) Open
game.py(line:771) StartGame
game.py(line:929) RefreshCharacter
interfaceModule.py(line:830) RefreshCharacter
uiCharacter.py(line:1235) RefreshCharacter
uiCharacter.py(line:1282) __SetSkillSlotData
uiCharacter.py(line:983) RefreshSkill
uiCharacter.py(line:959) __RefreshSkillPage

GameWindow.Open - <type 'exceptions.RuntimeError'>:skill.GetSkillType - Failed to find skill by 119

1118 23:12:26179 :: ============================================================================================================
1118 23:12:26179 :: Abort!!!!


119 skill?

  • Active+ Member
18 minutes ago, FrozenShower said:

1118 23:12:26178 :: 
game.py(line:260) Open
game.py(line:771) StartGame
game.py(line:929) RefreshCharacter
interfaceModule.py(line:830) RefreshCharacter
uiCharacter.py(line:1235) RefreshCharacter
uiCharacter.py(line:1282) __SetSkillSlotData
uiCharacter.py(line:983) RefreshSkill
uiCharacter.py(line:959) __RefreshSkillPage

GameWindow.Open - <type 'exceptions.RuntimeError'>:skill.GetSkillType - Failed to find skill by 119

1118 23:12:26179 :: ============================================================================================================
1118 23:12:26179 :: Abort!!!!


119 skill?

I assume the error you posted is not related with this qol code (I work on clean files I don't know what code you have)

1 minute ago, m2Ciaran said:

I assume the error you posted is not related with this qol code (I work on clean files I don't know what code you have)

It is not that difficult to install, I installed the one in the subject, but there is such an error.

Note; After editing tables.h, get the full build.

Thanks for releases

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

 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 1
5 minutes ago, ForgiveN said:

Note; After editing tables.h, get the full build.

Thanks for releases

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

 

well yes, when you change something in common it is usually best to compile both GAME and DB.

  • Metin2 Dev 1
On 11/18/2023 at 10:21 PM, FrozenShower said:

1118 23:12:26178 :: 
game.py(line:260) Open
game.py(line:771) StartGame
game.py(line:929) RefreshCharacter
interfaceModule.py(line:830) RefreshCharacter
uiCharacter.py(line:1235) RefreshCharacter
uiCharacter.py(line:1282) __SetSkillSlotData
uiCharacter.py(line:983) RefreshSkill
uiCharacter.py(line:959) __RefreshSkillPage

GameWindow.Open - <type 'exceptions.RuntimeError'>:skill.GetSkillType - Failed to find skill by 119

1118 23:12:26179 :: ============================================================================================================
1118 23:12:26179 :: Abort!!!!


119 skill?

Same error : skill.GetSkillType - Failed to find skill by 119

“𝓐𝓵𝓵 𝔀𝓮 𝓱𝓪𝓿𝓮 𝓽𝓸 𝓭𝓮𝓬𝓲𝓭𝓮 𝓲𝓼 𝔀𝓱𝓪𝓽 𝓽𝓸 𝓭𝓸 𝔀𝓲𝓽𝓱 𝓽𝓱𝓮 𝓽𝓲𝓶𝓮 𝓽𝓱𝓪𝓽 𝓲𝓼 𝓰𝓲𝓿𝓮𝓷 𝓾𝓼.” ~ 𝓖𝓪𝓷𝓭𝓪𝓵𝓯 𝓽𝓱𝓮 𝓖𝓻𝓮𝔂

  • Active+ Member

Really sad to hear you have such a problem guys. Recently, I have installed the code in 40250 base by @ TMP4 and everything is fine. My bet is that you use some additional system, which require modification ? If its possible you can show me the edited files in PM I'll take a look.

  • Active+ Member
On 11/22/2023 at 7:10 AM, Fenczu said:

Everything works after adding but when I change the character it resets the skils what could I have done wrong?

Change to array size might be required if you use any additional system related with skill table or 64bit files or or or...

db src-> static char text[4096 + 1] ?

  • Premium
On 11/18/2023 at 9:21 PM, FrozenShower said:

1118 23:12:26178 :: 
game.py(line:260) Open
game.py(line:771) StartGame
game.py(line:929) RefreshCharacter
interfaceModule.py(line:830) RefreshCharacter
uiCharacter.py(line:1235) RefreshCharacter
uiCharacter.py(line:1282) __SetSkillSlotData
uiCharacter.py(line:983) RefreshSkill
uiCharacter.py(line:959) __RefreshSkillPage

GameWindow.Open - <type 'exceptions.RuntimeError'>:skill.GetSkillType - Failed to find skill by 119

1118 23:12:26179 :: ============================================================================================================
1118 23:12:26179 :: Abort!!!!


119 skill?

Those, who also have this problem:
 

in: UserInterface/PythonNetworkStreamPhaseGame.cpp
Search:
 

	if (i >= 112 && i <= 115 && rPlayerSkill.bLevel)
            rkPlayer.SetSkill(7, i);

        if (i >= 116 && i <= 119 && rPlayerSkill.bLevel)
            rkPlayer.SetSkill(8, i);

Change it to:

#ifndef ENABLE_SKILL_DESCRIPTION_RENEWAL
        if (i >= 112 && i <= 115 && rPlayerSkill.bLevel)
            rkPlayer.SetSkill(7, i);

        if (i >= 116 && i <= 119 && rPlayerSkill.bLevel)
            rkPlayer.SetSkill(8, i);
#endif

 

  • Love 1

Ulthar

  • Forum Moderator

Do not do that on a live-server!

It is an excellent tutorial, it works just fine and it is really cool. However, and like the following tutorial : Do not do it on a live server.

For those wondering why the skills are completely broken, or why you have "skill.GetSkillType - Failed to find skill by 119" or why you have your character entirely broken, it is normal.

I won't get into details, but all skill data, like quickslots, are stored in what we call a BLOB. When it comes to skill, all skill data, including passives and all classes from Warrior to Wolfman (if you have it), along with the skill level, are stored in this blob as hexadecimal. Depending on your datatype, it should be 1.49KB. However, if you add from tables.h a new byte, it will end up weighting 1.74KB. A direct result will be that the second line, which should start at offset 0x060 and end at offset 0x07F will have an additional byte, which will shift every skill result and end up overflowing into the next skill then, for example other columns. Well, in that case it is the other way around (it will read more than it should and end up short for the last skills) but your skills will be completely messed up anyway. 

You have tree solutions if you want to add this on a live-server :

  • Rewrite skills to be stored in their own table instead of a BLOB in the player table, allowing you to properly extend data without having to mess with the Hexadecimal blob and export necessary data to the table.
  • Properly understand the blob, then tinker with the data for every players to compensate this new BYTE.
  • Replace every blob with a proper, reset one, but the impact will be a complete reset of every skill, for everyone.

Bonus solution:

  • Write your own version of the tutorial not impacting packets. For example through cmdchat, but it will be less clean, but that is what we used to do up to 2014 (legacy solution).

Excellent tutorial however, I love this kind of quality of life, and it applies for both of what you shared! ?

  • Good 1
  • Love 4

Gurgarath
coming soon
My Services

On 11/29/2023 at 10:30 PM, Gurgarath said:

Do not do that on a live-server!

It is an excellent tutorial, it works just fine and it is really cool. However, and like the following tutorial : Do not do it on a live server.

For those wondering why the skills are completely broken, or why you have "skill.GetSkillType - Failed to find skill by 119" or why you have your character entirely broken, it is normal.

I won't get into details, but all skill data, like quickslots, are stored in what we call a BLOB. When it comes to skill, all skill data, including passives and all classes from Warrior to Wolfman (if you have it), along with the skill level, are stored in this blob as hexadecimal. Depending on your datatype, it should be 1.49KB. However, if you add from tables.h a new byte, it will end up weighting 1.74KB. A direct result will be that the second line, which should start at offset 0x060 and end at offset 0x07F will have an additional byte, which will shift every skill result and end up overflowing into the next skill then, for example other columns. Well, in that case it is the other way around (it will read more than it should and end up short for the last skills) but your skills will be completely messed up anyway. 

You have tree solutions if you want to add this on a live-server :

  • Rewrite skills to be stored in their own table instead of a BLOB in the player table, allowing you to properly extend data without having to mess with the Hexadecimal blob and export necessary data to the table.
  • Properly understand the blob, then tinker with the data for every players to compensate this new BYTE.
  • Replace every blob with a proper, reset one, but the impact will be a complete reset of every skill, for everyone.

Bonus solution:

  • Write your own version of the tutorial not impacting packets. For example through cmdchat, but it will be less clean, but that is what we used to do up to 2014 (legacy solution).

Excellent tutorial however, I love this kind of quality of life, and it applies for both of what you shared! ?

So its pointless and useless for 70% of comunity ? btw. cmdchat is not the best way, but as you said we never had better solution in past tense ? personally from what you wrote, I recommend the first option ?

  • Metin2 Dev 1
  • Forum Moderator
9 hours ago, Filachilla said:

So its pointless and useless for 70% of comunity ? btw. cmdchat is not the best way, but as you said we never had better solution in past tense ? personally from what you wrote, I recommend the first option ?

It is neither pointless nor useless, it is a good release all things considered. The fact that is isn't retroactively easy to put in place has more to do with the design flaws of the game more than the release itself. Of course cmdchat is not optimal, I myself said it, I am just giving eventual ways to do the system on the go without having to do a lot of work. The first solution is indeed the best!

Gurgarath
coming soon
My Services

  • Active Member
On 11/29/2023 at 4:19 PM, Ulthar said:

Those, who also have this problem:
 

in: UserInterface/PythonNetworkStreamPhaseGame.cpp
Search:
 

	if (i >= 112 && i <= 115 && rPlayerSkill.bLevel)
            rkPlayer.SetSkill(7, i);

        if (i >= 116 && i <= 119 && rPlayerSkill.bLevel)
            rkPlayer.SetSkill(8, i);

Change it to:

#ifndef ENABLE_SKILL_DESCRIPTION_RENEWAL
        if (i >= 112 && i <= 115 && rPlayerSkill.bLevel)
            rkPlayer.SetSkill(7, i);

        if (i >= 116 && i <= 119 && rPlayerSkill.bLevel)
            rkPlayer.SetSkill(8, i);
#endif

 

Is no sense what you did there to be honest.

  • Metin2 Dev 1
  • Forum Moderator
49 minutes ago, Vaynz said:

Is no sense what you did there to be honest.

There is a sense, but this is like putting a bandage on a wooden leg and it just masks the error. The error occur as skills from 112 and 119 are not used (no data), but due to the shifting due to additional data, this piece of code will execute, the SetSkill will get called by the client, the client will notice that there is no data and the client will crash / hang due to that. By removing this, it won't, but the skills will be broken nonetheless and the issues described in my post above will trigger.

There is no reason however to add the piece of code he gave, people just have to make sure their player.sql is clean, or do one of the solution I gave.

  • Love 1

Gurgarath
coming soon
My Services

  • 1 year later...

I did everything as described!

1214 20:48:41315 :: Traceback (most recent call last):

1214 20:48:41315 ::   File "ui.py", line 2897, in OnOverInItem

1214 20:48:41316 ::   File "ui.py", line 97, in __call__

1214 20:48:41316 ::   File "ui.py", line 88, in __call__

1214 20:48:41316 ::   File "uiCharacter.py", line 952, in OverInItem

1214 20:48:41316 ::   File "uiToolTip.py", line 3994, in SetSkillNew

1214 20:48:41316 ::   File "uiToolTip.py", line 4141, in AppendSkillDataNew

1214 20:48:41316 :: ValueError
1214 20:48:41316 :: : 
1214 20:48:41316 :: incomplete format
1214 20:48:41316 :: 

 

The error comes on this line

self.AppendTextLine(localeInfo.TOOLTIP_SKILL_BOOKS % (player.GetRemainingBooks(slotIndex), need_bookcount), 0xff375cd4)

Edited by gamer6661102

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.