Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×

Metin2 Environmental Login Background


TMP4

Recommended Posts

  • Distinguished Member

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
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
 (
This is the hidden content, please
)

Original idea by DaRealFreak in 2012.

Sincerly,
TMP4

Edited by TMP4
background.Destroy() was missing
Link to comment
Share on other sites

  • Premium

@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

  • Distinguished Member
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 by TMP4
Link to comment
Share on other sites

  • Distinguished Member
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 by TMP4
Link to comment
Share on other sites

  • Premium

@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 by ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

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 by Summex
Link to comment
Share on other sites

  • Distinguished Member
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 by TMP4
Link to comment
Share on other sites

  • Premium
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.

PeriodWars

release kraken GIF

Link to comment
Share on other sites

  • Distinguished Member
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 😂

Link to comment
Share on other sites

 

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.

.png

Link to comment
Share on other sites

  • Distinguished Member
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.

Link to comment
Share on other sites

  • Moderator

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 by Metin2 Dev
Core X - External 2 Internal

Gurgarath
coming soon

Link to comment
Share on other sites

  • Honorable Member

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 },

 

.png

Link to comment
Share on other sites

  • Distinguished Member
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)

Link to comment
Share on other sites

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

  • Distinguished Member
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 by TMP4
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
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

  • 8 months later...

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

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



  • Similar Content

  • Activity

    1. 2

      Where are those maps/dungeons coming from?

    2. 3

      Press F10 to close the client immediately

    3. 2

      Where are those maps/dungeons coming from?

    4. 2

      Where are those maps/dungeons coming from?

    5. 4

      Visual studio 2022 compiling issue

    6. 1

      Count players function

    7. 64
    8. 1

      Costume shining/costume effect system

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.