Active+ Member m2Ciaran 388 Posted November 17, 2023 Active+ Member Share Posted November 17, 2023 Small QoL Download Center This is the hidden content, please Sign In or Sign Up 62 1 14 4 16 Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 497 Posted November 18, 2023 Active+ Member Share Posted November 18, 2023 Awesome! Thank you These small things are very appreciated Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 497 Posted November 18, 2023 Active+ Member Share Posted November 18, 2023 (edited) 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 November 18, 2023 by Metin2 Dev International Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Active+ Member m2Ciaran 388 Posted November 18, 2023 Author Active+ Member Share Posted November 18, 2023 (edited) 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 November 18, 2023 by m2Ciaran Link to comment Share on other sites More sharing options...
Filachilla 29 Posted November 18, 2023 Share Posted November 18, 2023 (edited) 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 November 18, 2023 by Filachilla Link to comment Share on other sites More sharing options...
Active+ Member m2Ciaran 388 Posted November 18, 2023 Author Active+ Member Share Posted November 18, 2023 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) 1 Link to comment Share on other sites More sharing options...
FrozenShower 0 Posted November 18, 2023 Share Posted November 18, 2023 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? Link to comment Share on other sites More sharing options...
Active+ Member m2Ciaran 388 Posted November 18, 2023 Author Active+ Member Share Posted November 18, 2023 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) Link to comment Share on other sites More sharing options...
FrozenShower 0 Posted November 18, 2023 Share Posted November 18, 2023 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. Link to comment Share on other sites More sharing options...
ForgiveN 1 Posted November 19, 2023 Share Posted November 19, 2023 (edited) Note; After editing tables.h, get the full build. Thanks for releases https://metin2.download/picture/W1p6zh2KziEdptJjcYrPxIQ66LzWakgV/.png Edited November 19, 2023 by Metin2 Dev International Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 497 Posted November 19, 2023 Active+ Member Share Posted November 19, 2023 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. 1 Link to comment Share on other sites More sharing options...
Jimmermania 27 Posted November 21, 2023 Share Posted November 21, 2023 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 Link to comment Share on other sites More sharing options...
FrozenShower 0 Posted November 21, 2023 Share Posted November 21, 2023 1 hour ago, Jimmermania said: Same error : skill.GetSkillType - Failed to find skill by 119 there is no talent named 119 Link to comment Share on other sites More sharing options...
Active+ Member m2Ciaran 388 Posted November 21, 2023 Author Active+ Member Share Posted November 21, 2023 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. Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 497 Posted November 21, 2023 Active+ Member Share Posted November 21, 2023 (edited) Works perfectly! https://metin2.download/video/kb5gfY601D3JGl22ags1phSdVJyXGIy8/.mp4 Edited November 21, 2023 by Metin2 Dev International Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Fenczu 2 Posted November 22, 2023 Share Posted November 22, 2023 Everything works after adding but when I change the character it resets the skils what could I have done wrong? Link to comment Share on other sites More sharing options...
BadiuAndrei 2 Posted November 22, 2023 Share Posted November 22, 2023 (edited) Works perfectly! Thanks. https://metin2.download/picture/irlJ6moY8cNM2kPZS2et1nZWU3AjJPy1/.gif Edited November 22, 2023 by Metin2 Dev International Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Active+ Member m2Ciaran 388 Posted November 23, 2023 Author Active+ Member Share Posted November 23, 2023 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] Link to comment Share on other sites More sharing options...
Premium Ulthar 3096 Posted November 29, 2023 Premium Share Posted November 29, 2023 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 1 Ulthar Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 2512 Posted November 29, 2023 Forum Moderator Share Posted November 29, 2023 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! 1 2 Gurgarath coming soon Link to comment Share on other sites More sharing options...
Filachilla 29 Posted December 2, 2023 Share Posted December 2, 2023 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 1 Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 2512 Posted December 2, 2023 Forum Moderator Share Posted December 2, 2023 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 Link to comment Share on other sites More sharing options...
Active Member Vaynz 1892 Posted December 2, 2023 Active Member Share Posted December 2, 2023 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. 1 Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 2512 Posted December 2, 2023 Forum Moderator Share Posted December 2, 2023 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. 1 Gurgarath coming soon Link to comment Share on other sites More sharing options...
Recommended Posts