ergod 2 Posted February 14, 2020 Share Posted February 14, 2020 (edited) The bug is: When you have no selected skills (you used skill reset or you just haven't got picked up skills) you can see in uicharacter board at skillpage two buttons for example: I have warrior character so I can see two skill pages Body & Mental buttons. When you have a horse level 21 or above (that means you can use horse skills) you can see only one skill page and second page is for horse skills here you should see Body & Mental buttons not Body & Horse skill buttons. Here must be something edited in uicharacter.py to see only character skills buttons until player select a skill group. I will be glad if someone can fix it. Thanks for answers! Edited August 26, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium Hunger 472 Posted February 15, 2020 Premium Share Posted February 15, 2020 (edited) I think you will need to make a new button that shows up when you have the horse skill using if self.__CanUseHorseSkill(): There is the function in uiCharacter.py if self.__CanUseHorseSkill(): self.activeSkillGroupName.Hide() self.skillGroupButton1.SetText(nameList.get(group, "Noname")) self.skillGroupButton2.SetText(localeInfo.SKILL_GROUP_HORSE) self.skillGroupButton1.Show() self.skillGroupButton2.Show() I will give it a try in about one hour. Edit: I manage to add the new page somehow. There is a bug i can't understand while selecting the pages. The bug comes from __SelectSkillGroup function which i don't know how it works https://metin2.download/picture/f291HfN8yaMEF8lNCFsNZ8AWrYly4qkg/.gif uiCharacter.py: From PAGE_HORSE = 2 to PAGE_HORSE = 3 Find: self.skillGroupButton2 = None Add after: self.skillGroupButton3 = None Find: self.skillGroupButton2 = self.GetChild("Skill_Group_Button_2") Add after: self.skillGroupButton3 = self.GetChild("Skill_Group_Button_3") In self.skillGroupButton = ( find : self.GetChild("Skill_Group_Button_2"), Add below: self.GetChild("Skill_Group_Button_3"), Replace the def __SetSkillGroupName(self, race, group): function with this: def __SetSkillGroupName(self, race, group): job = chr.RaceToJob(race) if not self.SKILL_GROUP_NAME_DICT.has_key(job): return nameList = self.SKILL_GROUP_NAME_DICT[job] if 0 == group: self.skillGroupButton1.SetText(nameList[1]) self.skillGroupButton2.SetText(nameList[2]) if self.__CanUseHorseSkill(): self.skillGroupButton3.SetText(localeInfo.SKILL_GROUP_HORSE) self.skillGroupButton3.Show() self.skillGroupButton3.SetPosition(95, 2) else: self.skillGroupButton3.Hide() self.skillGroupButton1.Show() self.skillGroupButton2.Show() self.activeSkillGroupName.Hide() else: if self.__CanUseHorseSkill(): self.activeSkillGroupName.Hide() self.skillGroupButton1.SetText(nameList.get(group, "Noname")) self.skillGroupButton3.SetText(localeInfo.SKILL_GROUP_HORSE) self.skillGroupButton1.Show() self.skillGroupButton2.Hide() self.skillGroupButton3.Show() self.skillGroupButton3.SetPosition(50, 2) else: self.activeSkillGroupName.SetText(nameList.get(group, "Noname")) self.activeSkillGroupName.Show() self.skillGroupButton1.Hide() self.skillGroupButton2.Hide() self.skillGroupButton3.Hide() uiscript/characterdetails.py Find: { "name" : "Skill_Group_Button_2", "type" : "radio_button", "x" : 50, "y" : 2, "text" : "Group2", "text_color" : 0xFFFFE3AD, "default_image" : "d:/ymir work/ui/game/windows/skill_tab_button_01.sub", "over_image" : "d:/ymir work/ui/game/windows/skill_tab_button_02.sub", "down_image" : "d:/ymir work/ui/game/windows/skill_tab_button_03.sub", }, Add below: ##horse skill page { "name" : "Skill_Group_Button_3", "type" : "radio_button", "x" : 95, "y" : 2, "text" : "Group3", "text_color" : 0xFFFFE3AD, "default_image" : "d:/ymir work/ui/game/windows/skill_tab_button_01.sub", "over_image" : "d:/ymir work/ui/game/windows/skill_tab_button_02.sub", "down_image" : "d:/ymir work/ui/game/windows/skill_tab_button_03.sub", }, Sorry if i couldn't do the job, im a beginner. I thought it's easier but it seems not. Edited September 4, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
DrTurk 133 Posted February 15, 2020 Share Posted February 15, 2020 You also have to edit the SelectSkillGroup function then Link to comment Share on other sites More sharing options...
ergod 2 Posted February 15, 2020 Author Share Posted February 15, 2020 (edited) @VegaS™ maybe can you help us? Edited February 15, 2020 by ergod Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10275 Posted February 16, 2020 Forum Moderator Share Posted February 16, 2020 (edited) On 2/15/2020 at 1:23 PM, Anix said: Sorry if i couldn't do the job, im a beginner. I thought it's easier but it seems not. On 2/15/2020 at 5:56 PM, ergod said: @VegaS™ maybe can you help us? The basic changes are: From: def __SelectSkillGroup(self, index): for btn in self.skillGroupButton: btn.SetUp() self.skillGroupButton[index].Down() if self.__CanUseHorseSkill(): if 0 == index: index = net.GetMainActorSkillGroup()-1 elif 1 == index: index = self.PAGE_HORSE self.curSelectedSkillGroup = index self.__SetSkillSlotData(net.GetMainActorRace(), index+1, net.GetMainActorEmpire()) To: This is the hidden content, please Sign In or Sign Up After some minutes of debugging I rewrote this shit, there're more changes, when i'll have some free time (at Monday), i'll post the code. Without skill group +/- horse riding: https://metin2.download/picture/u5wG0ef5SH8x99gEFSAqB0jCMhQjsAgf/.gif With skill group +/- horse riding: https://metin2.download/picture/sif5gRDVO31rF1Q5T7QzziLWHDYJ3WDc/.gif Edited August 27, 2022 by Metin2 Dev Core X - External 2 Internal 22 1 8 1 12 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
ergod 2 Posted February 16, 2020 Author Share Posted February 16, 2020 (edited) 5 hours ago, VegaS™ said: The basic changes are: From: def __SelectSkillGroup(self, index): for btn in self.skillGroupButton: btn.SetUp() self.skillGroupButton[index].Down() if self.__CanUseHorseSkill(): if 0 == index: index = net.GetMainActorSkillGroup()-1 elif 1 == index: index = self.PAGE_HORSE self.curSelectedSkillGroup = index self.__SetSkillSlotData(net.GetMainActorRace(), index+1, net.GetMainActorEmpire()) To: def __SelectSkillGroup(self, pageIndex, (PAGE_SKILL_1, PAGE_SKILL_2, PAGE_SKILL_HORSE) = range(3)): for pageButton in self.skillGroupButton: pageButton.SetUp() self.skillGroupButton[pageIndex].Down() if pageIndex in (PAGE_SKILL_1, PAGE_SKILL_2): skillGroupIndex = net.GetMainActorSkillGroup() if bool(skillGroupIndex): (tmpCurSkillGroup, tmpSkillGroup) = (skillGroupIndex - 1, skillGroupIndex) else: (tmpCurSkillGroup, tmpSkillGroup) = (pageIndex, pageIndex + 1) self.curSelectedSkillGroup = tmpCurSkillGroup self.__SetSkillSlotData(net.GetMainActorRace(), tmpSkillGroup, net.GetMainActorEmpire()) elif pageIndex == PAGE_SKILL_HORSE and self.__CanUseHorseSkill(): self.curSelectedSkillGroup = self.PAGE_HORSE self.RefreshSkill() After some minutes of debugging I rewrote this shit, there're more changes, when i'll have some free time (at Monday), i'll post the code. Without skill group +/- horse riding: https://metin2.download/picture/u5wG0ef5SH8x99gEFSAqB0jCMhQjsAgf/.gif With skill group +/- horse riding: https://metin2.download/picture/sif5gRDVO31rF1Q5T7QzziLWHDYJ3WDc/.gif Vegas our hero thank you! Edited August 27, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium DemOnJR 564 Posted July 2, 2023 Premium Share Posted July 2, 2023 On 2/16/2020 at 4:06 AM, VegaS™ said: The basic changes are: From: def __SelectSkillGroup(self, index): for btn in self.skillGroupButton: btn.SetUp() self.skillGroupButton[index].Down() if self.__CanUseHorseSkill(): if 0 == index: index = net.GetMainActorSkillGroup()-1 elif 1 == index: index = self.PAGE_HORSE self.curSelectedSkillGroup = index self.__SetSkillSlotData(net.GetMainActorRace(), index+1, net.GetMainActorEmpire()) To: Hidden Content def __SelectSkillGroup(self, pageIndex, (PAGE_SKILL_1, PAGE_SKILL_2, PAGE_SKILL_HORSE) = range(3)): for pageButton in self.skillGroupButton: pageButton.SetUp() self.skillGroupButton[pageIndex].Down() if pageIndex in (PAGE_SKILL_1, PAGE_SKILL_2): skillGroupIndex = net.GetMainActorSkillGroup() if bool(skillGroupIndex): (tmpCurSkillGroup, tmpSkillGroup) = (skillGroupIndex - 1, skillGroupIndex) else: (tmpCurSkillGroup, tmpSkillGroup) = (pageIndex, pageIndex + 1) self.curSelectedSkillGroup = tmpCurSkillGroup self.__SetSkillSlotData(net.GetMainActorRace(), tmpSkillGroup, net.GetMainActorEmpire()) elif pageIndex == PAGE_SKILL_HORSE and self.__CanUseHorseSkill(): self.curSelectedSkillGroup = self.PAGE_HORSE self.RefreshSkill() After some minutes of debugging I rewrote this shit, there're more changes, when i'll have some free time (at Monday), i'll post the code. Without skill group +/- horse riding: https://metin2.download/picture/u5wG0ef5SH8x99gEFSAqB0jCMhQjsAgf/.gif With skill group +/- horse riding: https://metin2.download/picture/sif5gRDVO31rF1Q5T7QzziLWHDYJ3WDc/.gif Did you post this fix full? Link to comment Share on other sites More sharing options...
[TiTAN] 32 Posted July 15, 2023 Share Posted July 15, 2023 (edited) As vegas fix is not complete, i quickly made up this shit that at least works, i will rewrite it when i have some time: def __SelectSkillGroup(self, pageIndex): for pageButton in self.skillGroupButton: pageButton.SetUp() self.skillGroupButton[pageIndex].Down() if self.__CanUseHorseSkill(): if 0 == pageIndex: pageIndex = net.GetMainActorSkillGroup()-1 elif 1 == pageIndex: pageIndex = self.PAGE_HORSE else: skillGroupIndex = net.GetMainActorSkillGroup() if bool(skillGroupIndex): (tmpCurSkillGroup, tmpSkillGroup) = (skillGroupIndex - 1, skillGroupIndex) else: (tmpCurSkillGroup, tmpSkillGroup) = (pageIndex, pageIndex + 1) if self.__CanUseHorseSkill(): self.curSelectedSkillGroup = pageIndex self.__SetSkillSlotData(net.GetMainActorRace(), pageIndex+1, net.GetMainActorEmpire()) else: self.curSelectedSkillGroup = tmpCurSkillGroup self.__SetSkillSlotData(net.GetMainActorRace(), tmpSkillGroup, net.GetMainActorEmpire()) self.RefreshSkill() LE: We maybe need 3rd button because you will not be able to use horse skills if you have them when no skill group selected Edited July 15, 2023 by [TiTAN] Link to comment Share on other sites More sharing options...
Premium DemOnJR 564 Posted July 15, 2023 Premium Share Posted July 15, 2023 (edited) Thanks On 7/15/2023 at 3:42 PM, [TiTAN] said: As vegas fix is not complete, i quickly made up this shit that at least works, i will rewrite it when i have some time: def __SelectSkillGroup(self, pageIndex): for pageButton in self.skillGroupButton: pageButton.SetUp() self.skillGroupButton[pageIndex].Down() if self.__CanUseHorseSkill(): if 0 == pageIndex: pageIndex = net.GetMainActorSkillGroup()-1 elif 1 == pageIndex: pageIndex = self.PAGE_HORSE else: skillGroupIndex = net.GetMainActorSkillGroup() if bool(skillGroupIndex): (tmpCurSkillGroup, tmpSkillGroup) = (skillGroupIndex - 1, skillGroupIndex) else: (tmpCurSkillGroup, tmpSkillGroup) = (pageIndex, pageIndex + 1) if self.__CanUseHorseSkill(): self.curSelectedSkillGroup = pageIndex self.__SetSkillSlotData(net.GetMainActorRace(), pageIndex+1, net.GetMainActorEmpire()) else: self.curSelectedSkillGroup = tmpCurSkillGroup self.__SetSkillSlotData(net.GetMainActorRace(), tmpSkillGroup, net.GetMainActorEmpire()) self.RefreshSkill() LE: We maybe need 3rd button because you will not be able to use horse skills if you have them when no skill group selected Solved, by mistake i have edited this row and forget to remove it: Edited July 17, 2023 by DemOnJR Link to comment Share on other sites More sharing options...
[TiTAN] 32 Posted July 15, 2023 Share Posted July 15, 2023 47 minutes ago, DemOnJR said: Is doing nothing to the page: Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now