Bot Metin2 Dev 4874 Posted May 11, 2019 Bot Share Posted May 11, 2019 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Spoiler A few days ago I saw a post where someone asked how to hide the effects of the character and if there was a way, it would be better to do it with options to enabled/disabled. So I was trying to replicate the feature that the official servers implemented in version 18.4 Here I leave you an advance, it is not finished. At the moment only the options for hiding effects of items (such as "EFFECT_AUTO_HPUP", "EFFECT_HAPPINESS_RING_EQUIP", etc.) work. I know that you can also hide the effects such as skills, emoticons, etc. But I still can not find the way to do it (I could do it from playersettingmodule.py, but in that case it would not be updated in real time, the client.exe would have to be restarted for the changes to be made.) I suppose that somewhere in the client src it will be possible to , but I still can not find it. But you can also try! So if you like you can do it and share in this thread. Download link: This is the hidden content, please Sign In or Sign Up 110 2 2 1 1 2 1 1 2 23 7 59 Link to comment Share on other sites More sharing options...
Arturogarcelan 7 Posted May 11, 2019 Share Posted May 11, 2019 Wow, it's great. People with bad computers would appreciate it very much. 1 Link to comment Share on other sites More sharing options...
Bizzy 101 Posted May 11, 2019 Share Posted May 11, 2019 gg mate 1 Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10267 Posted May 11, 2019 Forum Moderator Share Posted May 11, 2019 Good idea, but the python part is a bit too much, 200 lines for 5-6 functions. 2 hours ago, WLsj24 said: Spoiler self.effectLevelButtonList.append(GetObject("effect_level1")) self.effectLevelButtonList.append(GetObject("effect_level2")) self.effectLevelButtonList.append(GetObject("effect_level3")) self.effectLevelButtonList.append(GetObject("effect_level4")) self.effectLevelButtonList.append(GetObject("effect_level5")) self.privateShopLevelButtonList.append(GetObject("privateShop_level1")) self.privateShopLevelButtonList.append(GetObject("privateShop_level2")) self.privateShopLevelButtonList.append(GetObject("privateShop_level3")) self.privateShopLevelButtonList.append(GetObject("privateShop_level4")) self.privateShopLevelButtonList.append(GetObject("privateShop_level5")) self.dropItemLevelButtonList.append(GetObject("dropItem_level1")) self.dropItemLevelButtonList.append(GetObject("dropItem_level2")) self.dropItemLevelButtonList.append(GetObject("dropItem_level3")) self.dropItemLevelButtonList.append(GetObject("dropItem_level4")) self.dropItemLevelButtonList.append(GetObject("dropItem_level5")) Can be like: Spoiler for i in xrange(1, GRAPHIC_LEVEL_MAX_NUM + 1): self.effectLevelButtonList.append(GetObject("effect_level%d" % i)) self.privateShopLevelButtonList.append(GetObject("privateShop_level%d" % i)) self.dropItemLevelButtonList.append(GetObject("dropItem_level%d" % i)) _____________________________________________________________ 2 hours ago, WLsj24 said: Spoiler self.effectLevelButtonList[0].SAFE_SetEvent(self.__OnClickEffectLevel1Button) self.effectLevelButtonList[1].SAFE_SetEvent(self.__OnClickEffectLevel2Button) self.effectLevelButtonList[2].SAFE_SetEvent(self.__OnClickEffectLevel3Button) self.effectLevelButtonList[3].SAFE_SetEvent(self.__OnClickEffectLevel4Button) self.effectLevelButtonList[4].SAFE_SetEvent(self.__OnClickEffectLevel5Button) self.privateShopLevelButtonList[0].SAFE_SetEvent(self.__OnClickPrivateShopLevel1Button) self.privateShopLevelButtonList[1].SAFE_SetEvent(self.__OnClickPrivateShopLevel2Button) self.privateShopLevelButtonList[2].SAFE_SetEvent(self.__OnClickPrivateShopLevel3Button) self.privateShopLevelButtonList[3].SAFE_SetEvent(self.__OnClickPrivateShopLevel4Button) self.privateShopLevelButtonList[4].SAFE_SetEvent(self.__OnClickPrivateShopLevel5Button) self.dropItemLevelButtonList[0].SAFE_SetEvent(self.__OnClickDropItemLevel1Button) self.dropItemLevelButtonList[1].SAFE_SetEvent(self.__OnClickDropItemLevel2Button) self.dropItemLevelButtonList[2].SAFE_SetEvent(self.__OnClickDropItemLevel3Button) self.dropItemLevelButtonList[3].SAFE_SetEvent(self.__OnClickDropItemLevel4Button) self.dropItemLevelButtonList[4].SAFE_SetEvent(self.__OnClickDropItemLevel5Button) self.petStatusButtonList[0].SAFE_SetEvent(self.__OnClickPetStatusOnButton) self.petStatusButtonList[1].SAFE_SetEvent(self.__OnClickPetStatusOffButton) self.npcNameStatusButtonList[0].SAFE_SetEvent(self.__OnClickNpcNameStatusOnButton) self.npcNameStatusButtonList[1].SAFE_SetEvent(self.__OnClickNpcNameStatusOffButton) # Effect def __SetEffectLevel(self, index): self.__ClickRadioButton(self.effectLevelButtonList, index) self.effectLevel=index def __OnClickEffectLevel1Button(self): self.__SetEffectLevel(0) def __OnClickEffectLevel2Button(self): self.__SetEffectLevel(1) def __OnClickEffectLevel3Button(self): self.__SetEffectLevel(2) def __OnClickEffectLevel4Button(self): self.__SetEffectLevel(3) def __OnClickEffectLevel5Button(self): self.__SetEffectLevel(4) # PrivateShop def __SetPrivateShopLevel(self, index): self.__ClickRadioButton(self.privateShopLevelButtonList, index) self.privateShopLevel=index def __OnClickPrivateShopLevel1Button(self): self.__SetPrivateShopLevel(0) def __OnClickPrivateShopLevel2Button(self): self.__SetPrivateShopLevel(1) def __OnClickPrivateShopLevel3Button(self): self.__SetPrivateShopLevel(2) def __OnClickPrivateShopLevel4Button(self): self.__SetPrivateShopLevel(3) def __OnClickPrivateShopLevel5Button(self): self.__SetPrivateShopLevel(4) # DropItem def __SetDropItemLevel(self, index): self.__ClickRadioButton(self.dropItemLevelButtonList, index) self.dropItemLevel=index def __OnClickDropItemLevel1Button(self): self.__SetDropItemLevel(0) def __OnClickDropItemLevel2Button(self): self.__SetDropItemLevel(1) def __OnClickDropItemLevel3Button(self): self.__SetDropItemLevel(2) def __OnClickDropItemLevel4Button(self): self.__SetDropItemLevel(3) def __OnClickDropItemLevel5Button(self): self.__SetDropItemLevel(4) # PetStatus def __OnClickPetStatusOnButton(self): systemSetting.SetPetStatusFlag(True) self.RefreshPetStatus() def __OnClickPetStatusOffButton(self): systemSetting.SetPetStatusFlag(False) self.RefreshPetStatus() # NpcNameStatus def __OnClickNpcNameStatusOnButton(self): systemSetting.SetNpcNameStatusFlag(True) self.RefreshNpcNameStatus() def __OnClickNpcNameStatusOffButton(self): systemSetting.SetNpcNameStatusFlag(False) self.RefreshNpcNameStatus() Can be like: Spoiler for i in xrange(GRAPHIC_LEVEL_MAX_NUM): self.effectLevelButtonList[i].SAFE_SetEvent(self.__OnClickEffectLevelButton, i) self.privateShopLevelButtonList[i].SAFE_SetEvent(self.__OnClickPrivateShopLevelButton, i) self.dropItemLevelButtonList[i].SAFE_SetEvent(self.__OnClickDropItemLevelButton, i) for i in xrange(2): self.petStatusButtonList[i].SAFE_SetEvent(self.__OnClickPetStatusButton, bool(i)) self.npcNameStatusButtonList[i].SAFE_SetEvent(self.__OnClickNpcNameStatusButton, bool(i)) # Effect def __OnClickEffectLevelButton(self, index): self.__ClickRadioButton(self.effectLevelButtonList, index) self.effectLevel=index # PrivateShop def __OnClickPrivateShopLevelButton(self, index): self.__ClickRadioButton(self.privateShopLevelButtonList, index) self.privateShopLevel=index # DropItem def __OnClickDropItemLevelButton(self, index): self.__ClickRadioButton(self.dropItemLevelButtonList, index) self.dropItemLevel=index # PetStatus def __OnClickPetStatusButton(self, flag): systemSetting.SetPetStatusFlag(flag) self.RefreshPetStatus() # NpcNameStatus def __OnClickNpcNameStatusButton(self, flag): systemSetting.SetNpcNameStatusFlag(flag) self.RefreshNpcNameStatus() Btw, for rest you can take a look how they're rended and do something like: This is the hidden content, please Sign In or Sign Up Here you can hide the 'terrain', 'object', 'cloud', 'water', 'tree', and you can disable the effects and more too if you take a look inside of GameLib. Over 1.5 year ago i extended a bit my release but didn't had enough time to post it, i'll update the repository with the new code when i'll have time to finish it. That feature allow you to hide specific effects, tree, bulding by property crc or name (not finished) and write them into files like: graphic_mask/building.txt general_obj_stone14 ob-b1-005-woodbarrel landmark_statuestone B_general_obj_40 general_obj_jar_yellow01 graphic_mask/effect.txt 8182371290 1003918098 volcano_greatsmoke.mse warpgate01 fall_7 fire_general_obj_charcoal.mse PythonGraphicMask.cpp Spoiler /********************************************************************* * title_name : Graphic Mask * date_created : 2018.04.21 * filename : PythonGraphicMask.cpp * author : VegaS * version_actual : Version 1.0 */ #include "stdafx.h" #ifdef ENABLE_GRAPHIC_MASK #include "PythonGraphicMask.h" #include "PythonSystem.h" #include "../gamelib/MapOutDoor.h" #include "../gamelib/MapType.h" CPythonGraphicMask::CPythonGraphicMask() { Initialize(PROPERTY_TYPE_NONE, "graphic_mask/default.txt"); Initialize(PROPERTY_TYPE_TREE, "graphic_mask/tree.txt"); Initialize(PROPERTY_TYPE_BUILDING, "graphic_mask/building.txt"); Initialize(PROPERTY_TYPE_EFFECT, "graphic_mask/effect.txt"); } CPythonGraphicMask::~CPythonGraphicMask() { Destroy(); } void CPythonGraphicMask::Initialize(const BYTE bPropertyType, const char * c_pszFileName) { m_vecMaskObjectCRC[bPropertyType].clear(); FILE * fp = fopen(c_pszFileName, "r"); if (!fp) { Tracef("Can't open file %s.", c_pszFileName); return; } Tracef("-------------------- START PARSING --------------------"); Tracef("Read with successfully %s!", c_pszFileName); char line[256]; while (fgets(line, sizeof(line) - 1, fp)) { const auto dwCRC = strtoul(line, NULL, 0); m_vecMaskObjectCRC[bPropertyType].push_back(dwCRC); } TraceError("-------------------- END PARSING --------------------"); } void CPythonGraphicMask::Destroy() { for (size_t i = 0; i < PROPERTY_TYPE_MAX_NUM; ++i) m_vecMaskObjectCRC[i].clear(); } bool CPythonGraphicMask::IsEnabled(const BYTE bPropertyType) const { if (bPropertyType >= PROPERTY_TYPE_MAX_NUM) return false; switch (bPropertyType) { case prt::PROPERTY_TYPE_TREE: bPropertyType = CMapOutdoor::PART_TREE; break; case prt::PROPERTY_TYPE_BUILDING: bPropertyType = CMapOutdoor::PART_OBJECT; break; case prt::PROPERTY_TYPE_EFFECT: bPropertyType = CMapOutdoor::PART_EFFECT; break; } const CPythonSystem & rkSystem = CPythonSystem::Instance(); return rkSystem.GetGraphicMaskPart(bPropertyType); } bool CPythonGraphicMask::GetObjectByCRC(const BYTE bPropertyType, const DWORD dwCRC) const { if (bPropertyType >= PROPERTY_TYPE_MAX_NUM) return false; return std::find(m_vecMaskObjectCRC[bPropertyType].begin(), m_vecMaskObjectCRC[bPropertyType].end(), dwCRC) != m_vecMaskObjectCRC[bPropertyType].end());; } #endif PythonGraphicMask.h Spoiler #pragma once class CPythonGraphicMask : public CSingleton<CPythonGraphicMask> { public: CPythonGraphicMask(); virtual ~CPythonGraphicMask(); void Initialize(const BYTE bPropertyType, const char * c_pszFileName); void Destroy(); bool IsEnabled(const BYTE bPropertyType) const; bool GetObjectByCRC(const BYTE bPropertyType, const DWORD dwCRC) const; enum { PROPERTY_TYPE_NONE, PROPERTY_TYPE_TREE, PROPERTY_TYPE_BUILDING, PROPERTY_TYPE_EFFECT, PROPERTY_TYPE_MAX_NUM, }; protected: std::vector<DWORD> m_vecMaskObjectCRC[PROPERTY_TYPE_MAX_NUM]; }; 9 1 1 1 13 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...
Bot Metin2 Dev 4874 Posted May 11, 2019 Author Bot Share Posted May 11, 2019 Spoiler 1 hour ago, VegaS™ said: Good idea, but the python part is a bit too much, 200 lines for 5-6 functions. Can be like: Reveal hidden contents for i in xrange(1, GRAPHIC_LEVEL_MAX_NUM + 1): self.effectLevelButtonList.append(GetObject("effect_level%d" % i)) self.privateShopLevelButtonList.append(GetObject("privateShop_level%d" % i)) self.dropItemLevelButtonList.append(GetObject("dropItem_level%d" % i)) _____________________________________________________________ Can be like: Reveal hidden contents for i in xrange(GRAPHIC_LEVEL_MAX_NUM): self.effectLevelButtonList[i].SAFE_SetEvent(self.__OnClickEffectLevelButton, i) self.privateShopLevelButtonList[i].SAFE_SetEvent(self.__OnClickPrivateShopLevelButton, i) self.dropItemLevelButtonList[i].SAFE_SetEvent(self.__OnClickDropItemLevelButton, i) for i in xrange(2): self.petStatusButtonList[i].SAFE_SetEvent(self.__OnClickPetStatusButton, bool(i)) self.npcNameStatusButtonList[i].SAFE_SetEvent(self.__OnClickNpcNameStatusButton, bool(i)) # Effect def __OnClickEffectLevelButton(self, index): self.__ClickRadioButton(self.effectLevelButtonList, index) self.effectLevel=index # PrivateShop def __OnClickPrivateShopLevelButton(self, index): self.__ClickRadioButton(self.privateShopLevelButtonList, index) self.privateShopLevel=index # DropItem def __OnClickDropItemLevelButton(self, index): self.__ClickRadioButton(self.dropItemLevelButtonList, index) self.dropItemLevel=index # PetStatus def __OnClickPetStatusButton(self, flag): systemSetting.SetPetStatusFlag(flag) self.RefreshPetStatus() # NpcNameStatus def __OnClickNpcNameStatusButton(self, flag): systemSetting.SetNpcNameStatusFlag(flag) self.RefreshNpcNameStatus() Btw, for rest you can take a look how they're rended and do something like: This is the hidden content, please Sign In or Sign Up Here you can hide the 'terrain', 'object', 'cloud', 'water', 'tree', and you can disable the effects and more too if you take a look inside of GameLib. Over 1.5 year ago i extended a bit my release but didn't had enough time to post it, i'll update the repository with the new code when i'll have time to finish it. That feature allow you to hide specific effects, tree, bulding by property crc or name (not finished) and write them into files like: graphic_mask/effect.txt 8182371290 1003918098 PythonGraphicMask.cpp Reveal hidden contents /********************************************************************* * title_name : Graphic Mask * date_created : 2018.04.21 * filename : PythonGraphicMask.cpp * author : VegaS * version_actual : Version 1.0 */ #include "stdafx.h" #ifdef ENABLE_GRAPHIC_MASK #include "PythonGraphicMask.h" #include "PythonSystem.h" #include "../gamelib/MapOutDoor.h" #include "../gamelib/MapType.h" CPythonGraphicMask::CPythonGraphicMask() { Initialize(PROPERTY_TYPE_NONE, "graphic_mask/default.txt"); Initialize(PROPERTY_TYPE_TREE, "graphic_mask/tree.txt"); Initialize(PROPERTY_TYPE_BUILDING, "graphic_mask/building.txt"); Initialize(PROPERTY_TYPE_EFFECT, "graphic_mask/effect.txt"); } CPythonGraphicMask::~CPythonGraphicMask() { Destroy(); } void CPythonGraphicMask::Initialize(const BYTE bPropertyType, const char * c_pszFileName) { m_vecMaskObjectCRC[bPropertyType].clear(); FILE * fp = fopen(c_pszFileName, "r"); if (!fp) { Tracef("Can't open file %s.", c_pszFileName); return; } Tracef("-------------------- START PARSING --------------------"); Tracef("Read with successfully %s!", c_pszFileName); char line[256]; while (fgets(line, sizeof(line) - 1, fp)) { const auto dwCRC = strtoul(line, NULL, 0); m_vecMaskObjectCRC[bPropertyType].push_back(dwCRC); } TraceError("-------------------- END PARSING --------------------"); } void CPythonGraphicMask::Destroy() { for (size_t i = 0; i < PROPERTY_TYPE_MAX_NUM; ++i) m_vecMaskObjectCRC[i].clear(); } bool CPythonGraphicMask::IsEnabled(const BYTE bPropertyType) const { if (bPropertyType >= PROPERTY_TYPE_MAX_NUM) return false; switch (bPropertyType) { case prt::PROPERTY_TYPE_TREE: bPropertyType = CMapOutdoor::PART_TREE; break; case prt::PROPERTY_TYPE_BUILDING: bPropertyType = CMapOutdoor::PART_OBJECT; break; case prt::PROPERTY_TYPE_EFFECT: bPropertyType = CMapOutdoor::PART_EFFECT; break; } const CPythonSystem & rkSystem = CPythonSystem::Instance(); return rkSystem.GetGraphicMaskPart(bPropertyType); } bool CPythonGraphicMask::GetObjectByCRC(const BYTE bPropertyType, const DWORD dwCRC) const { if (bPropertyType >= PROPERTY_TYPE_MAX_NUM) return false; return std::find(m_vecMaskObjectCRC[bPropertyType].begin(), m_vecMaskObjectCRC[bPropertyType].end(), dwCRC) != m_vecMaskObjectCRC[bPropertyType].end());; } #endif PythonGraphicMask.h Reveal hidden contents #pragma once class CPythonGraphicMask : public CSingleton<CPythonGraphicMask> { public: CPythonGraphicMask(); virtual ~CPythonGraphicMask(); void Initialize(const BYTE bPropertyType, const char * c_pszFileName); void Destroy(); bool IsEnabled(const BYTE bPropertyType) const; bool GetObjectByCRC(const BYTE bPropertyType, const DWORD dwCRC) const; enum { PROPERTY_TYPE_NONE, PROPERTY_TYPE_TREE, PROPERTY_TYPE_BUILDING, PROPERTY_TYPE_EFFECT, PROPERTY_TYPE_MAX_NUM, }; protected: std::vector<DWORD> m_vecMaskObjectCRC[PROPERTY_TYPE_MAX_NUM]; }; Thanks for contributing this thread, it is very helpful. I think that hiding specifics effect through property src can be a great help for the "hide decoration" features. 1 1 Link to comment Share on other sites More sharing options...
Thundernatsu 36 Posted May 12, 2019 Share Posted May 12, 2019 help Spoiler Spoiler 0512 14:23:53297 :: ui.py(line:3196) LoadScriptFile system.py(line:197) execfile system.py(line:168) Run uiscript/systemoptiondialog.py(line:316) <module> LoadScriptFile!!!!!!!!!!!!!! - <type 'exceptions.TypeError'>:tuple indices must be integers, not str 0512 14:23:53297 :: ============================================================================================================ 0512 14:23:53297 :: Abort!!!! 0512 14:23:53299 :: uiSystemOption.py(line:76) __Load_LoadScript ui.py(line:3213) LoadScriptFile exception.py(line:36) Abort System.OptionDialog.__Load_LoadScript - <type 'exceptions.SystemExit'>: 0512 14:23:53299 :: ============================================================================================================ 0512 14:23:53299 :: Abort!!!! 1 Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4874 Posted May 12, 2019 Author Bot Share Posted May 12, 2019 45 minutes ago, Thundernatsu said: help Reveal hidden contents Reveal hidden contents 0512 14:23:53297 :: ui.py(line:3196) LoadScriptFile system.py(line:197) execfile system.py(line:168) Run uiscript/systemoptiondialog.py(line:316) <module> LoadScriptFile!!!!!!!!!!!!!! - <type 'exceptions.TypeError'>:tuple indices must be integers, not str 0512 14:23:53297 :: ============================================================================================================ 0512 14:23:53297 :: Abort!!!! 0512 14:23:53299 :: uiSystemOption.py(line:76) __Load_LoadScript ui.py(line:3213) LoadScriptFile exception.py(line:36) Abort System.OptionDialog.__Load_LoadScript - <type 'exceptions.SystemExit'>: 0512 14:23:53299 :: ============================================================================================================ 0512 14:23:53299 :: Abort!!!! Upload your systemoptiondialog.py Link to comment Share on other sites More sharing options...
Thundernatsu 36 Posted May 12, 2019 Share Posted May 12, 2019 10 minutes ago, WLsj24 said: Upload your systemoptiondialog.py https://paste2.org/jnp8waYh Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10267 Posted May 12, 2019 Forum Moderator Share Posted May 12, 2019 1 hour ago, Thundernatsu said: help Reveal hidden contents Reveal hidden contents 0512 14:23:53297 :: ui.py(line:3196) LoadScriptFile system.py(line:197) execfile system.py(line:168) Run uiscript/systemoptiondialog.py(line:316) <module> LoadScriptFile!!!!!!!!!!!!!! - <type 'exceptions.TypeError'>:tuple indices must be integers, not str 0512 14:23:53297 :: ============================================================================================================ 0512 14:23:53297 :: Abort!!!! 0512 14:23:53299 :: uiSystemOption.py(line:76) __Load_LoadScript ui.py(line:3213) LoadScriptFile exception.py(line:36) Abort System.OptionDialog.__Load_LoadScript - <type 'exceptions.SystemExit'>: 0512 14:23:53299 :: ============================================================================================================ 0512 14:23:53299 :: Abort!!!! Your children item from dictionary is a tuple, not a list. #1.1) Replace: window["children"][0]["children"] = window["children"][0]["children"] + [ #1.2) With: window["children"][0]["children"] += ( #2.1) Replace: },] #2.2) With: },) 1 1 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...
Thundernatsu 36 Posted May 12, 2019 Share Posted May 12, 2019 1 hour ago, VegaS™ said: Your children item from dictionary is a tuple, not a list. #1.1) Replace: window["children"][0]["children"] = window["children"][0]["children"] + [ #1.2) With: window["children"][0]["children"] += ( #2.1) Replace: },] #2.2) With: },) now it shows but it doesn't work it hides nothing Spoiler Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4874 Posted May 12, 2019 Author Bot Share Posted May 12, 2019 17 minutes ago, Thundernatsu said: now it shows but it doesn't work it hides nothing it is not finished. At the moment only the options for hiding effects of items (such as "EFFECT_AUTO_HPUP", "EFFECT_HAPPINESS_RING_EQUIP", etc.) work. 18 minutes ago, Thundernatsu said: Spoiler You must add the .sub files in public and replace (or modify) the public.dds file also so that the small buttons are displayed. Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted May 12, 2019 Share Posted May 12, 2019 You have a function that already exist to destroy all effects use it and select the effects that you only want them to be removed . and then add a condition on CInstanceBase::__AttachEffect for not attaching the effect after being removed . Not sure if that's gonna work but i guess it should 1 Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4874 Posted May 12, 2019 Author Bot Share Posted May 12, 2019 Thanks for the reply. I will try it. Link to comment Share on other sites More sharing options...
dosik202 0 Posted May 14, 2019 Share Posted May 14, 2019 It would not be bad to make the same function for sash^^ Link to comment Share on other sites More sharing options...
Tunga 10 Posted June 10, 2019 Share Posted June 10, 2019 (edited) Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4874 Posted June 11, 2019 Author Bot Share Posted June 11, 2019 @Tunga Regarding the above buttons that do not work, please read the description that I put to this thread. And regarding the non-clickable buttons: Spoiler def RefreshPetStatus(self): if systemSetting.IsPetStatus(): self.petStatusButtonList[0].SetUp() self.petStatusButtonList[1].Down() else: self.petStatusButtonList[0].Down() self.petStatusButtonList[1].SetUp() def RefreshNpcNameStatus(self): if systemSetting.IsNpcNameStatus(): self.npcNameStatusButtonList[0].SetUp() self.npcNameStatusButtonList[1].Down() else: self.npcNameStatusButtonList[0].Down() self.npcNameStatusButtonList[1].SetUp() 1 Link to comment Share on other sites More sharing options...
Tunga 10 Posted June 18, 2019 Share Posted June 18, 2019 On 6/11/2019 at 7:30 PM, WLsj24 said: @Tunga Regarding the above buttons that do not work, please read the description that I put to this thread. And regarding the non-clickable buttons: Hide contents def RefreshPetStatus(self): if systemSetting.IsPetStatus(): self.petStatusButtonList[0].SetUp() self.petStatusButtonList[1].Down() else: self.petStatusButtonList[0].Down() self.petStatusButtonList[1].SetUp() def RefreshNpcNameStatus(self): if systemSetting.IsNpcNameStatus(): self.npcNameStatusButtonList[0].SetUp() self.npcNameStatusButtonList[1].Down() else: self.npcNameStatusButtonList[0].Down() self.npcNameStatusButtonList[1].SetUp() ahh thanks i didnt think to check that. Link to comment Share on other sites More sharing options...
Kamol 1 Posted July 10, 2019 Share Posted July 10, 2019 Why no work Pets and NPC names? Link to comment Share on other sites More sharing options...
נσναnz 5 Posted August 8, 2020 Share Posted August 8, 2020 On 5/12/2019 at 4:47 PM, VegaS™ said: Your children item from dictionary is a tuple, not a list. #1.1) Replace: window["children"][0]["children"] = window["children"][0]["children"] + [ #1.2) With: window["children"][0]["children"] += ( #2.1) Replace: },] #2.2) With: },) Discontinued ? It was a nice idea tbh ! 1 Link to comment Share on other sites More sharing options...
kolamajszu 1 Posted November 18, 2020 Share Posted November 18, 2020 On 5/11/2019 at 4:07 PM, VegaS™ said: Good idea, but the python part is a bit too much, 200 lines for 5-6 functions. Can be like: Reveal hidden contents for i in xrange(1, GRAPHIC_LEVEL_MAX_NUM + 1): self.effectLevelButtonList.append(GetObject("effect_level%d" % i)) self.privateShopLevelButtonList.append(GetObject("privateShop_level%d" % i)) self.dropItemLevelButtonList.append(GetObject("dropItem_level%d" % i)) _____________________________________________________________ Can be like: Reveal hidden contents for i in xrange(GRAPHIC_LEVEL_MAX_NUM): self.effectLevelButtonList[i].SAFE_SetEvent(self.__OnClickEffectLevelButton, i) self.privateShopLevelButtonList[i].SAFE_SetEvent(self.__OnClickPrivateShopLevelButton, i) self.dropItemLevelButtonList[i].SAFE_SetEvent(self.__OnClickDropItemLevelButton, i) for i in xrange(2): self.petStatusButtonList[i].SAFE_SetEvent(self.__OnClickPetStatusButton, bool(i)) self.npcNameStatusButtonList[i].SAFE_SetEvent(self.__OnClickNpcNameStatusButton, bool(i)) # Effect def __OnClickEffectLevelButton(self, index): self.__ClickRadioButton(self.effectLevelButtonList, index) self.effectLevel=index # PrivateShop def __OnClickPrivateShopLevelButton(self, index): self.__ClickRadioButton(self.privateShopLevelButtonList, index) self.privateShopLevel=index # DropItem def __OnClickDropItemLevelButton(self, index): self.__ClickRadioButton(self.dropItemLevelButtonList, index) self.dropItemLevel=index # PetStatus def __OnClickPetStatusButton(self, flag): systemSetting.SetPetStatusFlag(flag) self.RefreshPetStatus() # NpcNameStatus def __OnClickNpcNameStatusButton(self, flag): systemSetting.SetNpcNameStatusFlag(flag) self.RefreshNpcNameStatus() Btw, for rest you can take a look how they're rended and do something like: This is the hidden content, please Sign In or Sign Up Here you can hide the 'terrain', 'object', 'cloud', 'water', 'tree', and you can disable the effects and more too if you take a look inside of GameLib. Over 1.5 year ago i extended a bit my release but didn't had enough time to post it, i'll update the repository with the new code when i'll have time to finish it. That feature allow you to hide specific effects, tree, bulding by property crc or name (not finished) and write them into files like: graphic_mask/building.txt general_obj_stone14 ob-b1-005-woodbarrel landmark_statuestone B_general_obj_40 general_obj_jar_yellow01 graphic_mask/effect.txt 8182371290 1003918098 volcano_greatsmoke.mse warpgate01 fall_7 fire_general_obj_charcoal.mse PythonGraphicMask.cpp Reveal hidden contents /********************************************************************* * title_name : Graphic Mask * date_created : 2018.04.21 * filename : PythonGraphicMask.cpp * author : VegaS * version_actual : Version 1.0 */ #include "stdafx.h" #ifdef ENABLE_GRAPHIC_MASK #include "PythonGraphicMask.h" #include "PythonSystem.h" #include "../gamelib/MapOutDoor.h" #include "../gamelib/MapType.h" CPythonGraphicMask::CPythonGraphicMask() { Initialize(PROPERTY_TYPE_NONE, "graphic_mask/default.txt"); Initialize(PROPERTY_TYPE_TREE, "graphic_mask/tree.txt"); Initialize(PROPERTY_TYPE_BUILDING, "graphic_mask/building.txt"); Initialize(PROPERTY_TYPE_EFFECT, "graphic_mask/effect.txt"); } CPythonGraphicMask::~CPythonGraphicMask() { Destroy(); } void CPythonGraphicMask::Initialize(const BYTE bPropertyType, const char * c_pszFileName) { m_vecMaskObjectCRC[bPropertyType].clear(); FILE * fp = fopen(c_pszFileName, "r"); if (!fp) { Tracef("Can't open file %s.", c_pszFileName); return; } Tracef("-------------------- START PARSING --------------------"); Tracef("Read with successfully %s!", c_pszFileName); char line[256]; while (fgets(line, sizeof(line) - 1, fp)) { const auto dwCRC = strtoul(line, NULL, 0); m_vecMaskObjectCRC[bPropertyType].push_back(dwCRC); } TraceError("-------------------- END PARSING --------------------"); } void CPythonGraphicMask::Destroy() { for (size_t i = 0; i < PROPERTY_TYPE_MAX_NUM; ++i) m_vecMaskObjectCRC[i].clear(); } bool CPythonGraphicMask::IsEnabled(const BYTE bPropertyType) const { if (bPropertyType >= PROPERTY_TYPE_MAX_NUM) return false; switch (bPropertyType) { case prt::PROPERTY_TYPE_TREE: bPropertyType = CMapOutdoor::PART_TREE; break; case prt::PROPERTY_TYPE_BUILDING: bPropertyType = CMapOutdoor::PART_OBJECT; break; case prt::PROPERTY_TYPE_EFFECT: bPropertyType = CMapOutdoor::PART_EFFECT; break; } const CPythonSystem & rkSystem = CPythonSystem::Instance(); return rkSystem.GetGraphicMaskPart(bPropertyType); } bool CPythonGraphicMask::GetObjectByCRC(const BYTE bPropertyType, const DWORD dwCRC) const { if (bPropertyType >= PROPERTY_TYPE_MAX_NUM) return false; return std::find(m_vecMaskObjectCRC[bPropertyType].begin(), m_vecMaskObjectCRC[bPropertyType].end(), dwCRC) != m_vecMaskObjectCRC[bPropertyType].end());; } #endif PythonGraphicMask.h Reveal hidden contents #pragma once class CPythonGraphicMask : public CSingleton<CPythonGraphicMask> { public: CPythonGraphicMask(); virtual ~CPythonGraphicMask(); void Initialize(const BYTE bPropertyType, const char * c_pszFileName); void Destroy(); bool IsEnabled(const BYTE bPropertyType) const; bool GetObjectByCRC(const BYTE bPropertyType, const DWORD dwCRC) const; enum { PROPERTY_TYPE_NONE, PROPERTY_TYPE_TREE, PROPERTY_TYPE_BUILDING, PROPERTY_TYPE_EFFECT, PROPERTY_TYPE_MAX_NUM, }; protected: std::vector<DWORD> m_vecMaskObjectCRC[PROPERTY_TYPE_MAX_NUM]; }; This release have bugs? 1 Link to comment Share on other sites More sharing options...
LordRenoX 3 Posted January 9, 2021 Share Posted January 9, 2021 work? Link to comment Share on other sites More sharing options...
selim9550 0 Posted January 7, 2023 Share Posted January 7, 2023 Hello, links dead. I need help. Thx. Link to comment Share on other sites More sharing options...
Honorable Member Mali 41813 Posted February 5, 2023 Honorable Member Share Posted February 5, 2023 3 Link to comment Share on other sites More sharing options...
Recommended Posts