Contributor TMP4 10998 Posted August 19, 2021 Contributor Share Posted August 19, 2021 (edited) With this guide you can render map(s) to your login screen. Some server back in 2012 used this kinda login (DaRealFreak) and I found it pretty cool, so I did this tutorial maybe people will use it again. At def LoadMap(self): there is a list called environments where I set 17 location for you. You can edit/extend it as you wish. The client choose a random location from that list. Somebody will surely comment that it's make the client opening slower. Yes it does, but as you can see in the video that's minimal. Also if you use a client with intro video logo then it doesn't matter because that's longer than it's 1-1,5 second loading time. But if you think it's not acceptable then either optimize it somehow or stay with image background This is the hidden content, please Sign In or Sign Up You can disable the environmental background by editing INTERACTIVE_LOGIN = 1 at the top to INTERACTIVE_LOGIN = 0. Here's a basic intrologin.py with this environmental background if you want to compare: This is the hidden content, please Sign In or Sign Up ( This is the hidden content, please Sign In or Sign Up ) Original idea by DaRealFreak in 2012. Sincerly, TMP4 Edited September 15, 2021 by TMP4 background.Destroy() was missing 234 2 2 5 2 1 1 1 1 3 2 71 16 156 Link to comment Share on other sites More sharing options...
Hik 108 Posted August 19, 2021 Share Posted August 19, 2021 Really useful, thanks! 1 1 Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted August 19, 2021 Author Contributor Share Posted August 19, 2021 Just now, Hik said: Really useful, thanks! It's more like interesting than useful but thanks 2 Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted August 19, 2021 Active Member Share Posted August 19, 2021 @TMP4 Tested and got an error: Spoiler 0819 17:45:01302 :: Traceback (most recent call last): 0819 17:45:01302 :: File "uiPhaseCurtain.py", line 59, in OnUpdate 0819 17:45:01302 :: File "networkModule.py", line 147, in __ChangePhaseWindow 0819 17:45:01302 :: File "introLogin.py", line 306, in Open 0819 17:45:01302 :: File "introLogin.py", line 346, in LoadMap 0819 17:45:01302 :: File "ui.py", line 2802, in GetChild 0819 17:45:01302 :: KeyError 0819 17:45:01302 :: : 0819 17:45:01302 :: 'bg1' 0819 17:45:01302 :: 0819 17:45:01302 :: CPythonBackground::GetFarClip m_eViewDistanceNum=0 I'll be always helpful! Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted August 19, 2021 Author Contributor Share Posted August 19, 2021 (edited) 31 minutes ago, ReFresh said: @TMP4 Tested and got an error: Reveal hidden contents 0819 17:45:01302 :: Traceback (most recent call last): 0819 17:45:01302 :: File "uiPhaseCurtain.py", line 59, in OnUpdate 0819 17:45:01302 :: File "networkModule.py", line 147, in __ChangePhaseWindow 0819 17:45:01302 :: File "introLogin.py", line 306, in Open 0819 17:45:01302 :: File "introLogin.py", line 346, in LoadMap 0819 17:45:01302 :: File "ui.py", line 2802, in GetChild 0819 17:45:01302 :: KeyError 0819 17:45:01302 :: : 0819 17:45:01302 :: 'bg1' 0819 17:45:01302 :: 0819 17:45:01302 :: CPythonBackground::GetFarClip m_eViewDistanceNum=0 In a default client bg1 is the name of the background/serverlist image. That's what we hide in this release because it would cover the rendered map. self.GetChild("bg1").Hide() Your client probably have other name for the image or something. Post your intrologin.py and locale/xy/ui/loginwindow.py and I'll help. Edited August 19, 2021 by TMP4 Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted August 19, 2021 Active Member Share Posted August 19, 2021 @TMP4 intrologin.py: Spoiler https://pastebin.com/vaDRun2X loginwindow.py: Spoiler https://pastebin.com/E00UDVrP I'll be always helpful! Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted August 19, 2021 Author Contributor Share Posted August 19, 2021 (edited) 7 minutes ago, ReFresh said: @TMP4 intrologin.py: Reveal hidden contents https://pastebin.com/vaDRun2X loginwindow.py: Reveal hidden contents https://pastebin.com/E00UDVrP bg1 is missing from your loginwindow.py, you only have bg2. So just simly not use bg1 in intrologin.py, remove self.GetChild("bg1").Hide() from my code. Edited August 19, 2021 by TMP4 1 1 Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted August 19, 2021 Active Member Share Posted August 19, 2021 (edited) @TMP4 And this problem? (it's disabling shadows in game, of course it's some error): Spoiler 0819 18:32:01149 :: CPythonBackground::GetFarClip m_eViewDistanceNum=0 Edited August 19, 2021 by ReFresh I'll be always helpful! Link to comment Share on other sites More sharing options...
Summex 69 Posted August 19, 2021 Share Posted August 19, 2021 (edited) I've had the idea for quite a while to use this rendered background not only at the login but also at the character (or empire) selection. There you could load in the map (or even position) where the character last logged out. Would be a pretty cool feature in my opinion Edited August 19, 2021 by Summex 2 Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted August 19, 2021 Author Contributor Share Posted August 19, 2021 (edited) 2 hours ago, ReFresh said: @TMP4 And this problem? (it's disabling shadows, of course it's some error): Reveal hidden contents 0819 18:32:01149 :: CPythonBackground::GetFarClip m_eViewDistanceNum=0 I'm on it, I need some time. Edit: Fixed the shadow bug. background.Destroy() was missing. Edit2: Fixed that harmless syserr too. I edited def LoadMap(self): If there are any more problem please let me know, I will try to fix it ASAP. Edited August 19, 2021 by TMP4 1 3 Link to comment Share on other sites More sharing options...
Honorable Member Mali 41874 Posted August 19, 2021 Honorable Member Share Posted August 19, 2021 I really liked it. thank you. 1 1 Link to comment Share on other sites More sharing options...
FBI 44 Posted August 19, 2021 Share Posted August 19, 2021 3 hours ago, TMP4 said: I'm on it, I need some time. Edit: Fixed the shadow bug. background.Destroy() was missing. Edit2: Fixed that harmless syserr too. I edited def LoadMap(self): If there are any more problem please let me know, I will try to fix it ASAP. My dear, nice system i like it! There is one "bug". You can zoom in & zoom out on login screen. 1 PeriodWars Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted August 19, 2021 Author Contributor Share Posted August 19, 2021 5 minutes ago, FBI said: My dear, nice system i like it! There is one "bug". You can zoom in & zoom out on login screen. Thank you ;D It is a default behavior of Metin2 but I may try to lock the zoom / mouse wheel in the future. (Or enable right click to rotate) Anyway at least users can see it's a live map, not a picture 1 1 Link to comment Share on other sites More sharing options...
Nirray 192 Posted August 19, 2021 Share Posted August 19, 2021 A slightly different idea than mine that I wrote a long time ago, but the effect is the same Remember to use along with this: https://metin2.dev/board/topic/22783-fix-skybox-cloud-clipping/ Otherwise, sky clouds clipping will be visible when logging in aaaand very annoying 4 hours ago, Summex said: I've had the idea for quite a while to use this rendered background not only at the login but also at the character (or empire) selection. There you could load in the map (or even position) where the character last logged out. Would be a pretty cool feature in my opinion 14 minutes ago, FBI said: My dear, nice system i like it! There is one "bug". You can zoom in & zoom out on login screen. To fix that, you need to do same thing what "Item Shop" window does - disable mouse scroll when window is opened. 2 3 I completely abandoned working on the files for this game. I do not respond to private messages. Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted August 19, 2021 Author Contributor Share Posted August 19, 2021 8 minutes ago, Nirray said: A slightly different idea than mine that I wrote a long time ago, but the effect is the same Remember to use along with this: https://metin2.dev/board/topic/22783-fix-skybox-cloud-clipping/ Otherwise, sky clouds clipping will be visible when logging in aaaand very annoying To fix that, you need to do same thing what "Item Shop" window does - disable mouse scroll when window is opened. Damn that's next level Amazing, epic. 1 Link to comment Share on other sites More sharing options...
Forum Moderator Gurgarath 2514 Posted August 19, 2021 Forum Moderator Share Posted August 19, 2021 (edited) Thanks for sharing! I've had this idea and done it for a project of mine. If you want to sacrifice a little bit of loading time you can also place monsters (note they will have no collision and will clip through objects) using the chr. methods. (chr.CreateInstance() and then specify the race and the motion). https://metin2.download/picture/Ii1b16u3cjD6Q1B2ti13xO4R5nLYJi9X/.gif 2 hours ago, Nirray said: A slightly different idea than mine that I wrote a long time ago, but the effect is the same Remember to use along with this: https://metin2.dev/board/topic/22783-fix-skybox-cloud-clipping/ Otherwise, sky clouds clipping will be visible when logging in aaaand very annoying To fix that, you need to do same thing what "Item Shop" window does - disable mouse scroll when window is opened. And this is fine AF, really good realisation and good use of it. I love the scenery and the dark-souls mood. Edited August 28, 2022 by Metin2 Dev Core X - External 2 Internal 9 1 1 1 Gurgarath coming soon Link to comment Share on other sites More sharing options...
Honorable Member Mali 41874 Posted August 20, 2021 Honorable Member Share Posted August 20, 2021 I directly lock the Wheel. There may be other short ways. At least it's working. #Intrologin.py: #Find app.SetCamera(map_random['dis'], map_random['pit'], map_random['rot'], map_random['height']) #Add app.LockMouseWheel(True) #Find background.Destroy() #Add app.LockMouseWheel(False) // PythonApplication.h //Find void SetMouseHandler(PyObject * poMouseHandler); ///Add void LockMouseWheel(bool bLock) { m_bLockMouseWheel = bLock; } //Find bool m_isFrameSkipDisable; ///Add bool m_bLockMouseWheel; // PythonApplication.cpp //Find m_isFrameSkipDisable(false), ///Add m_bLockMouseWheel(false), // PythonApplication.cpp ///Change : void CPythonApplication::OnMouseWheel(int nLen) void CPythonApplication::OnMouseWheel(int nLen) { if (m_bLockMouseWheel) return; CCameraManager& rkCmrMgr=CCameraManager::Instance(); CCamera* pkCmrCur=rkCmrMgr.GetCurrentCamera(); if (pkCmrCur) pkCmrCur->Wheel(nLen); } // PythonApplicationModule.cpp PyObject* appLockMouseWheel(PyObject* poSelf, PyObject* poArgs) { bool bLock; if (!PyTuple_GetBoolean(poArgs, 0, &bLock)) return Py_BuildException(); CPythonApplication::Instance().LockMouseWheel(bLock); return Py_BuildNone(); } { "LockMouseWheel", appLockMouseWheel, METH_VARARGS }, 1 5 Link to comment Share on other sites More sharing options...
blanco 181 Posted August 20, 2021 Share Posted August 20, 2021 How can this be done on the select character screen? I can't find out how to make it work Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted August 20, 2021 Author Contributor Share Posted August 20, 2021 5 minutes ago, blanco said: How can this be done on the select character screen? I can't find out how to make it work I'm pretty sure it's the same just the bg image name different there to hide. Later today i'll upload a default 40k client introselect-introcreate.py with this live background. (With comments # INTERACTIVE_LOGIN so you can see where the codes are) 2 Link to comment Share on other sites More sharing options...
blanco 181 Posted August 20, 2021 Share Posted August 20, 2021 7 minutes ago, TMP4 said: I'm pretty sure it's the same just the bg image name different there to hide. Later today i'll upload a default 40k client introselect-introcreate.py with this live background. (With comments # INTERACTIVE_LOGIN so you can see where the codes are) Yup, I got the background working, it is pretty much the same as you said. However I don't know how to spawn/position the character on the map Link to comment Share on other sites More sharing options...
Contributor TMP4 10998 Posted August 20, 2021 Author Contributor Share Posted August 20, 2021 (edited) 1 hour ago, blanco said: Yup, I got the background working, it is pretty much the same as you said. However I don't know how to spawn/position the character on the map Oh I see the problem. For now I don't have enough time to make a good release with the character+map render for the charselect window sorry. Edited August 20, 2021 by TMP4 2 Link to comment Share on other sites More sharing options...
narcisxb 26 Posted October 3, 2021 Share Posted October 3, 2021 (edited) How could I add a Metin2 logo image on top of this background at login? It s very nice but the login looks a bit bland without a nice logo over it. Edited October 3, 2021 by narcisxb Link to comment Share on other sites More sharing options...
fabicervera 0 Posted January 1, 2022 Share Posted January 1, 2022 On 10/3/2021 at 10:21 AM, narcisxb said: ¿Cómo podría agregar una imagen del logotipo de Metin2 encima de este fondo al iniciar sesión? Es muy agradable, pero el inicio de sesión se ve un poco soso sin un buen logotipo sobre él. x2 and mobs in maps Link to comment Share on other sites More sharing options...
LykosRuleZ 3 Posted September 14, 2022 Share Posted September 14, 2022 Missing warp on object, this works on old clients? 0915 00:42:02365 :: system.py(line:316) RunMainScript system.py(line:233) execfile prototype.py(line:70) <module> prototype.py(line:61) RunApp networkmodule.py(line:180) SetLoginPhase networkmodule.py(line:137) SetPhaseWindow networkmodule.py(line:149) __ChangePhaseWindow intrologin.py(line:195) Open intrologin.py(line:220) LoadMap Run - <type 'exceptions.AttributeError'>:'module' object has no attribute 'Warp' Link to comment Share on other sites More sharing options...
LykosRuleZ 3 Posted September 15, 2022 Share Posted September 15, 2022 6 hours ago, LykosRuleZ said: Missing warp on object, this works on old clients? 0915 00:42:02365 :: system.py(line:316) RunMainScript system.py(line:233) execfile prototype.py(line:70) <module> prototype.py(line:61) RunApp networkmodule.py(line:180) SetLoginPhase networkmodule.py(line:137) SetPhaseWindow networkmodule.py(line:149) __ChangePhaseWindow intrologin.py(line:195) Open intrologin.py(line:220) LoadMap Run - <type 'exceptions.AttributeError'>:'module' object has no attribute 'Warp' Resolved by search Warp in other Binary Link to comment Share on other sites More sharing options...
Recommended Posts