Active Member Volvox 1510 Posted August 5, 2019 Author Active Member Share Posted August 5, 2019 vor 56 Minuten schrieb CxL'Mufuku: Why the fuck is every1 using it so fucking complicated? - Why do you use the renderTarget-module in the parent class? Just because I did it in the example?! #untested ##ui.py import renderTarget class RenderTarget(Window): def __init__(self, layer = "UI"): Window.__init__(self, layer) self.renderIdx = -1 def __del__(self): Window.__del__(self) def RegisterWindow(self, layer): self.hWnd = wndMgr.RegisterRenderTarget(self, layer) def SetRenderTarget(self, renderIdx): self.renderIdx = renderIdx wndMgr.SetRenderTarget(self.hWnd, self.renderIdx) def SetBackground(self, image): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetBackground(self.renderIdx, image) def SelectModel(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SelectModel(self.renderIdx, index) def SetVisibility(self, vis): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetVisibility(self.renderIdx, vis) def SetHair(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetHair(self.renderIdx, index) def SetArmor(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetArmor(self.renderIdx, index) def SetWeapon(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetWeapon(self.renderIdx, index) def SetAcce(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetAcce(self.renderIdx, index) ##somewhere in init/load/create self.ModelPreview = ui.RenderTarget() self.ModelPreview.SetParent(self.ModelPreviewBoard) self.ModelPreview.SetSize(190, 210) self.ModelPreview.SetPosition(5, 22) self.ModelPreview.SetRenderTarget(2) # Der index hat eindeutig zu sein -> sonst kann man nicht 2 rendertargets gleichzeitig sehen, logisch oder? self.ModelPreview.SetBackground("d:/ymir work/ui/game/myshop_deco/model_view_bg.sub") self.ModelPreview.SetVisibility(True) self.ModelPreview.SelectModel(model) self.ModelPreview.SetHair(Vnum) self.ModelPreview.SetArmor(Vnum) self.ModelPreview.SetWeapon(Vnum) self.ModelPreview.SetAcce(Vnum) self.ModelPreview.Show() ##somewhere in hide/close/whatever: self.ModelPreview.SetVisibility(False) ##somewhere in some fucking method, who cares? self.ModelPreview.SetWeapon(Vnum) Why i should define an extra function on RenderTarget class, when ich can use it directly ? e.g. from UiToolTip i call direkt the BInary. So why i should go the extra way over the RenderTarget class ? Link to comment Share on other sites More sharing options...
Thundernatsu 36 Posted August 5, 2019 Share Posted August 5, 2019 On 8/4/2019 at 1:37 PM, Thundernatsu said: @V0lvox http://cpaste.info/la5/ solution? @CxL'Mufuku 2 1 3 Link to comment Share on other sites More sharing options...
Active Member Volvox 1510 Posted August 5, 2019 Author Active Member Share Posted August 5, 2019 vor 38 Minuten schrieb Thundernatsu: solution? @CxL'Mufuku Please write an error, thats based on RenderTarget and not you whole log file. 1 Link to comment Share on other sites More sharing options...
CxL'Mufuku 798 Posted August 5, 2019 Share Posted August 5, 2019 vor einer Stunde schrieb V0lvox: Why i should define an extra function on RenderTarget class, when ich can use it directly ? e.g. from UiToolTip i call direkt the BInary. So why i should go the extra way over the RenderTarget class ? Ahh yeah, lets call every thing directly id = wndMgr.RegisterTextLine(self, "UI") wndMgr.SetFontName(id, "Arial:12") wndMgr.SetText(id, "TEXT TEXT TEXT") wndMgr.SetSize(id, 10, 100) __________________________________________________________________________________________Never trade with an alleged "CxL'"-Member on this board. You can see a list of all verified members *here*. I don't care what they all say I'ma do this thing my way Been grinding hard on it all day We work hard then we all play Link to comment Share on other sites More sharing options...
Thundernatsu 36 Posted August 5, 2019 Share Posted August 5, 2019 22 minutes ago, V0lvox said: Scrivi un errore, basato su RenderTarget e non sull'intero file di registro. CPythonTextTail::DeleteCharacterTextTail - Find VID[0] Error CPythonTextTail::DeleteCharacterTextTail - Find VID[0] Error when I go to the armor hair weapon etc ... Link to comment Share on other sites More sharing options...
Active Member Volvox 1510 Posted August 5, 2019 Author Active Member Share Posted August 5, 2019 vor 33 Minuten schrieb CxL'Mufuku: Ahh yeah, lets call every thing directly id = wndMgr.RegisterTextLine(self, "UI") wndMgr.SetFontName(id, "Arial:12") wndMgr.SetText(id, "TEXT TEXT TEXT") wndMgr.SetSize(id, 10, 100) Where is this code from ? vor 22 Minuten schrieb Thundernatsu: CPythonTextTail::DeleteCharacterTextTail - Find VID[0] Error CPythonTextTail::DeleteCharacterTextTail - Find VID[0] Error when I go to the armor hair weapon etc ... You call SetArmor/ SetWeapon /SetHair with 0 somewhere. Contact me Discord and i will have a look Link to comment Share on other sites More sharing options...
Thundernatsu 36 Posted August 5, 2019 Share Posted August 5, 2019 edit Link to comment Share on other sites More sharing options...
Thundernatsu 36 Posted August 6, 2019 Share Posted August 6, 2019 (edited) does not find the image. dds the paths are right and coicid but the image does not appear without giving an error do you know how to do it? Spoiler Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 2 1 3 Link to comment Share on other sites More sharing options...
bastian7773 0 Posted August 11, 2019 Share Posted August 11, 2019 Hello, I do not speak English well. Could you help me with this problem? I try to put the target render to my source but I have this problem if someone who has knowledge of the subject could help me please Link to comment Share on other sites More sharing options...
louxor 0 Posted August 16, 2019 Share Posted August 16, 2019 Hello, Thanks for share this system, But i have multiple error, 0816 14:07:34639 :: AttributeError 0816 14:07:34639 :: : 0816 14:07:34639 :: 'module' object has no attribute 'SetWeapon' 0816 14:07:34639 :: 0816 14:07:34639 :: AttributeError 0816 14:07:34639 :: : 0816 14:07:34639 :: 'module' object has no attribute 'SetHair' 0816 14:07:34639 :: Can you help me ? thx Link to comment Share on other sites More sharing options...
Active Member Volvox 1510 Posted August 17, 2019 Author Active Member Share Posted August 17, 2019 (edited) On 8/16/2019 at 10:14 PM, louxor said: Hello, Thanks for share this system, But i have multiple error, 0816 14:07:34639 :: AttributeError 0816 14:07:34639 :: : 0816 14:07:34639 :: 'module' object has no attribute 'SetWeapon' 0816 14:07:34639 :: 0816 14:07:34639 :: AttributeError 0816 14:07:34639 :: : 0816 14:07:34639 :: 'module' object has no attribute 'SetHair' 0816 14:07:34639 :: Can you help me ? thx Add me Discord: Edited February 13, 2021 by VegaS™ Link to comment Share on other sites More sharing options...
Active+ Member enisina 171 Posted August 26, 2019 Active+ Member Share Posted August 26, 2019 incompatible with weapon evolution system. Can you help? thanks @V0lvox Link to comment Share on other sites More sharing options...
Active Member Volvox 1510 Posted August 27, 2019 Author Active Member Share Posted August 27, 2019 vor 7 Stunden schrieb enisina: incompatible with weapon evolution system. Can you help? thanks @V0lvox never heard of it, but i can have a look. Contact me on DC Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10273 Posted August 29, 2019 Forum Moderator Share Posted August 29, 2019 On 8/5/2019 at 3:20 PM, CxL'Mufuku said: Spoiler #untested ##ui.py import renderTarget class RenderTarget(Window): def __init__(self, layer = "UI"): Window.__init__(self, layer) self.renderIdx = -1 def __del__(self): Window.__del__(self) def RegisterWindow(self, layer): self.hWnd = wndMgr.RegisterRenderTarget(self, layer) def SetRenderTarget(self, renderIdx): self.renderIdx = renderIdx wndMgr.SetRenderTarget(self.hWnd, self.renderIdx) def SetBackground(self, image): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetBackground(self.renderIdx, image) def SelectModel(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SelectModel(self.renderIdx, index) def SetVisibility(self, vis): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetVisibility(self.renderIdx, vis) def SetHair(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetHair(self.renderIdx, index) def SetArmor(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetArmor(self.renderIdx, index) def SetWeapon(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetWeapon(self.renderIdx, index) def SetAcce(self, index): if self.renderIdx == -1: dbg.TraceError("RenderTarget: You have to set the RenderTarget first!") return renderTarget.SetAcce(self.renderIdx, index) ##somewhere in init/load/create self.ModelPreview = ui.RenderTarget() self.ModelPreview.SetParent(self.ModelPreviewBoard) self.ModelPreview.SetSize(190, 210) self.ModelPreview.SetPosition(5, 22) self.ModelPreview.SetRenderTarget(2) # Der index hat eindeutig zu sein -> sonst kann man nicht 2 rendertargets gleichzeitig sehen, logisch oder? self.ModelPreview.SetBackground("d:/ymir work/ui/game/myshop_deco/model_view_bg.sub") self.ModelPreview.SetVisibility(True) self.ModelPreview.SelectModel(model) self.ModelPreview.SetHair(Vnum) self.ModelPreview.SetArmor(Vnum) self.ModelPreview.SetWeapon(Vnum) self.ModelPreview.SetAcce(Vnum) self.ModelPreview.Show() ##somewhere in hide/close/whatever: self.ModelPreview.SetVisibility(False) ##somewhere in some fucking method, who cares? self.ModelPreview.SetWeapon(Vnum) On 8/5/2019 at 4:18 PM, V0lvox said: Why i should define an extra function on RenderTarget class, when ich can use it directly ? e.g. from UiToolTip i call direkt the BInary. So why i should go the extra way over the RenderTarget class ? You're right, but if you really want to use something like this, you should do a customizable class, like: This is the hidden content, please Sign In or Sign Up 60 1 1 1 1 12 61 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...
Cripplez 40 Posted August 29, 2019 Share Posted August 29, 2019 (edited) When I try to compile I get this errors Do you know how I could fix it? Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium filipw1 1930 Posted August 29, 2019 Premium Share Posted August 29, 2019 (edited) 2 godziny temu, Cripplez napisał: When I try to compile I get this errors Do you know how I could fix it? Make sure you did PythonApplication.h part Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Cripplez 40 Posted August 29, 2019 Share Posted August 29, 2019 1 hour ago, filipw1 said: Make sure you did PythonApplication.h part Yes I did both of these: //1.1 Search: #include "MovieMan.h" //1.2 add after: #include "../eterLib/CRenderTarget.h" #include "../eterLib/CRenderTargetManager.h" //2.1 Search: CPythonSystem m_pySystem; //2.2 Add after: CRenderTargetManager m_kRenderTargetManager; Link to comment Share on other sites More sharing options...
Premium filipw1 1930 Posted August 29, 2019 Premium Share Posted August 29, 2019 14 minut temu, Cripplez napisał: Yes I did both of these: //1.1 Search: #include "MovieMan.h" //1.2 add after: #include "../eterLib/CRenderTarget.h" #include "../eterLib/CRenderTargetManager.h" //2.1 Search: CPythonSystem m_pySystem; //2.2 Add after: CRenderTargetManager m_kRenderTargetManager; OK. Then you didn't add new files to project Link to comment Share on other sites More sharing options...
Cripplez 40 Posted August 29, 2019 Share Posted August 29, 2019 4 minutes ago, filipw1 said: OK. Then you didn't add new files to project Yes i added the new files, I copy/pasted the files in the right folder, do I have to do something else too other than add them in the folder? Link to comment Share on other sites More sharing options...
Premium filipw1 1930 Posted August 29, 2019 Premium Share Posted August 29, 2019 37 minut temu, Cripplez napisał: Yes i added the new files, I copy/pasted the files in the right folder, do I have to do something else too other than add them in the folder? Yes, in Visual Studio right click on User Interface solution, then Add, Existing file and select those new files Link to comment Share on other sites More sharing options...
Balveder 1 Posted August 29, 2019 Share Posted August 29, 2019 Someone can help? sys: uitooltip: Link to comment Share on other sites More sharing options...
Cripplez 40 Posted August 29, 2019 Share Posted August 29, 2019 58 minutes ago, Balveder said: Someone can help? sys: uitooltip: delete 1 [tab] from "if test == 1" and the other 7 lines below too renderTarget renderTarget rendertarget.SelectMode1(RENDER_ if test == 1 renderTarget.SetHair elif 1 Link to comment Share on other sites More sharing options...
Cripplez 40 Posted August 30, 2019 Share Posted August 30, 2019 How can i make this system to show ONLY if i press a key (CTRL or ALT), because if it is always active it is kinda annoying And I have a small problem too, if I am a male Ninja or female Warrior for example in the preview of a Sword I see a Male Ninja or a Female Warrior with the Sword, but if want to see a Bow, Dagger or Armors it will show me a Female Ninja or Male Warrior, how can i fix this? Maybe the problem is here? Spoiler def __ItemGetRace(self): race = 0 if item.IsAntiFlag(item.ITEM_ANTIFLAG_ASSASSIN) and item.IsAntiFlag(item.ITEM_ANTIFLAG_SURA) and item.IsAntiFlag(item.ITEM_ANTIFLAG_SHAMAN): race = 9 elif item.IsAntiFlag(item.ITEM_ANTIFLAG_WARRIOR) and item.IsAntiFlag(item.ITEM_ANTIFLAG_SURA) and item.IsAntiFlag(item.ITEM_ANTIFLAG_SHAMAN): race = 1 elif item.IsAntiFlag(item.ITEM_ANTIFLAG_WARRIOR) and item.IsAntiFlag(item.ITEM_ANTIFLAG_ASSASSIN) and item.IsAntiFlag(item.ITEM_ANTIFLAG_SHAMAN): race = 2 elif item.IsAntiFlag(item.ITEM_ANTIFLAG_WARRIOR) and item.IsAntiFlag(item.ITEM_ANTIFLAG_ASSASSIN) and item.IsAntiFlag(item.ITEM_ANTIFLAG_SURA): race = 3 sex = chr.RaceToSex(player.GetRace()) MALE = 1 FEMALE = 0 if item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE) and sex == MALE: race = player.GetRace() + 4 if item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE) and sex == FEMALE: race = player.GetRace() if race == 0: race = player.GetRace() if race == 9: race = 0 return race **************************************** def CanViewRendering(self): race = player.GetRace() job = chr.RaceToJob(race) if not self.ANTI_FLAG_DICT.has_key(job): return False if item.IsAntiFlag(self.ANTI_FLAG_DICT[job]): return False sex = chr.RaceToSex(race) MALE = 1 FEMALE = 0 if item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE) and sex == MALE: return False if item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE) and sex == FEMALE: return False return True def CanViewRenderingSex(self): race = player.GetRace() sex = chr.RaceToSex(race) MALE = 1 FEMALE = 0 if item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE) and sex == MALE: return False if item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE) and sex == FEMALE: return False return True Link to comment Share on other sites More sharing options...
Active+ Member enisina 171 Posted September 1, 2019 Active+ Member Share Posted September 1, 2019 (edited) Quote NextUpdate will include Hair https://metin2.download/picture/bFm48CE3T4YF2k5I36YO6n1I9UMJUR6O/.gif UiToolTip-Fix_2.0.txt UiToolTip-Fix_3.0.txt 2.0 -> Rüstung Costüme/Waffen 3.0 -> Hair bug Fix + On/Off Render Target on Gameoptions such a problem occurred when I made these arrangements. also the background is black? @V0lvox Edited September 3, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Active Member Volvox 1510 Posted September 2, 2019 Author Active Member Share Posted September 2, 2019 (edited) vor 15 Stunden schrieb enisina: such a problem occurred when I made these arrangements. also the background is black? @V0lvox What the syserr say ? Debug Binary? Edited August 21, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Recommended Posts