Jump to content

Loading TIP Info System


Recommended Posts

M2 Download Center

Download Here ( Internal )

Download Here ( GitHub )

 

20184568747470733a2f2f7075752e73682f464a

 

It's giving random informations about game at loading window. Edit LTipList for special map's informations.

Group "Normal" has global informations. If you don't add any special map index at LTipList, you will see global informations.

One thing you need to know, special informations not working at "First Login", because warpmapindex is zero at login. So you will see global informations.

  • Love 22
  • Party 1
  • Scream 1

no paid service

use at least c++11 and VS19, otherwise I won't help.

Link to post
  • VIP

Something other games got for years now but didnt saw before at metin2 before your topic.

Details like this is what truly make servers distinguish themselfs from others

Link to post
import uiScriptLocale
import app

window = {

	"x" : 0,
	"y" : 0,

	"width" : SCREEN_WIDTH,
	"height" : SCREEN_HEIGHT,

	"children" :
	[
		## Board
		{
			"name" : "BackGround",
			"type" : "expanded_image",

			"x" : 0,
			"y" : 0,

			"image" : "d:/ymir work/ui/intro/pattern/Line_Pattern.tga",

			"x_scale" : float(SCREEN_WIDTH) / 800.0,
			"y_scale" : float(SCREEN_HEIGHT) / 600.0,
		},
		{ 
			"name":"ErrorMessage", 
			"type":"text", "x":10, "y":10, 
			"text": uiScriptLocale.LOAD_ERROR, 
		},
		
		{
			"name" : "GageBoard",
			"type" : "window",
			"style" : ("ltr",),
			"x" : float(SCREEN_WIDTH) * 400 / 800.0 - 200,
			"y" : float(SCREEN_HEIGHT) * 500 / 600.0 ,
			"width" : 400, 
			"height": 80,

			"children" :
			(
			
				{
					"name" : "BackGage",
					"type" : "expanded_image",

					"x" : 40,
					"y" : 25,

					"image" : uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/gauge_empty.dds",
				},
				{
					"name" : "FullGage",
					"type" : "expanded_image",

					"x" : 40,
					"y" : 25,

					"image" : uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/gauge_full.dds",
				},
			),
		},
	],
}

window["children"] = window["children"] + [
{
	"name" : "TipBackground",
	"type" : "middleboard",
	
	"x"	: 0,
	"y" : float(SCREEN_HEIGHT) * 500 / 600.0 - 100,
	
	"width" : SCREEN_WIDTH,
	"height" : 100,
	
	"children" :
	(
		{
			"name" : "LoadingTip",
			"type" : "text",
			
			"x"	: float(SCREEN_WIDTH) / 2,
			"y" : 40,				
			
			"text" : " ",
			"text_horizontal_align" : "center",
			"fontsize" : "LARGE",
		},
	),		
},]

Official one, still same error

Link to post

Don't use official, we don't have middleboard. Use mine one

no paid service

use at least c++11 and VS19, otherwise I won't help.

Link to post
  • 2 weeks later...

NOTE: THIS ISN'T NEEDED BY THE TUTORIAL!
For everyone to use, class MiddleBoard. With this you can use the offical loadingwindow.py

Open UI.py and search for "class ThinBoard(Window):" and add below the WHOLE class:

class MiddleBoard(Window):
	CORNER_WIDTH = 16
	CORNER_HEIGHT = 16
	LINE_WIDTH = 16
	LINE_HEIGHT = 16

	LT = 0
	LB = 1
	RT = 2
	RB = 3
	L = 0
	R = 1
	T = 2
	B = 3

	def __init__(self, layer = "UI"):
		Window.__init__(self, layer)

		CornerFileNames = [ "d:/ymir work/ui/pattern/thinboardb_corner_"+dir+".tga" for dir in ["LeftTop","LeftBottom","RightTop","RightBottom"] ]
		LineFileNames = [ "d:/ymir work/ui/pattern/thinboardb_line_"+dir+".tga" for dir in ["Left","Right","Top","Bottom"] ]

		Base = ExpandedImageBox()
		Base.AddFlag("not_pick")
		Base.LoadImage("d:/ymir work/ui/pattern/thinboardb_center.tga")
		Base.SetParent(self)
		Base.SetPosition(self.CORNER_WIDTH, self.CORNER_HEIGHT)
		Base.Show()
		self.Base = Base

		self.Corners = []
		for fileName in CornerFileNames:
			Corner = ExpandedImageBox()
			Corner.AddFlag("attach")
			Corner.AddFlag("not_pick")
			Corner.LoadImage(fileName)
			Corner.SetParent(self)
			Corner.SetPosition(0, 0)
			Corner.Show()
			self.Corners.append(Corner)

		self.Lines = []
		for fileName in LineFileNames:
			Line = ExpandedImageBox()
			Line.AddFlag("attach")
			Line.AddFlag("not_pick")
			Line.LoadImage(fileName)
			Line.SetParent(self)
			Line.SetPosition(0, 0)
			Line.Show()
			self.Lines.append(Line)

		self.Lines[self.L].SetPosition(0, self.CORNER_HEIGHT)
		self.Lines[self.T].SetPosition(self.CORNER_WIDTH, 0)

	def __del__(self):
		Window.__del__(self)

	def SetSize(self, width, height):

		width = max(self.CORNER_WIDTH*2, width)
		height = max(self.CORNER_HEIGHT*2, height)
		Window.SetSize(self, width, height)

		self.Corners[self.LB].SetPosition(0, height - self.CORNER_HEIGHT)
		self.Corners[self.RT].SetPosition(width - self.CORNER_WIDTH, 0)
		self.Corners[self.RB].SetPosition(width - self.CORNER_WIDTH, height - self.CORNER_HEIGHT)
		self.Lines[self.R].SetPosition(width - self.CORNER_WIDTH, self.CORNER_HEIGHT)
		self.Lines[self.B].SetPosition(self.CORNER_HEIGHT, height - self.CORNER_HEIGHT)

		verticalShowingPercentage = float((height - self.CORNER_HEIGHT*2) - self.LINE_HEIGHT) / self.LINE_HEIGHT
		horizontalShowingPercentage = float((width - self.CORNER_WIDTH*2) - self.LINE_WIDTH) / self.LINE_WIDTH

		self.Lines[self.L].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
		self.Lines[self.R].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
		self.Lines[self.T].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
		self.Lines[self.B].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)

		if self.Base:
			self.Base.SetRenderingRect(0, 0, (float(width)-32)/float(self.Base.GetWidth()) - 1.0, (float(height)-32)/float(self.Base.GetHeight()) - 1.0)

	def ShowInternal(self):
		self.Base.Show()
		for wnd in self.Lines:
			wnd.Show()
		for wnd in self.Corners:
			wnd.Show()

	def HideInternal(self):
		self.Base.Hide()
		for wnd in self.Lines:
			wnd.Hide()
		for wnd in self.Corners:
			wnd.Hide()


Now search for "elif Type == "thinboard":" and add below the elif:

elif Type == "middleboard":
	parent.Children[Index] = MiddleBoard()
	parent.Children[Index].SetParent(parent)
	self.LoadElementThinBoard(parent.Children[Index], ElementValue, parent)

Should look like: ec70fb83a0.png

Now just add the visuals (if you didn't already got them out of Patch 19.0) DOWNLOAD

Link to post
  • 2 weeks later...
On 5/13/2020 at 4:57 PM, Mali61 said:

https://github.com/blackdragonx61/Metin2-Loading-Tip-Info

68747470733a2f2f7075752e73682f464a555962

 

It's giving random informations about game at loading window. Edit LTipList for special map's informations.

Group "Normal" has global informations. If you don't add any special map index at LTipList, you will see global informations.

One thing you need to know, special informations not working at "First Login", because warpmapindex is zero at login. So you will see global informations.

For me dont work …. i cant compile the src later i add the codes….i use vc141 can u help me please?

 

 

15>\source\userinterface\LTiplist.h(149): error C2440: 'initialize': impossible convert from  'initializer-list' a 'std::vector<std::tuple<std::string,std::vector<int,std::allocator<_Ty>>,std::vector<_Ty,std::allocator<_Ty>>>,std::allocator<std::tuple<std::string,std::vector<_Ty,std::allocator<_Ty>>,std::vector<_Ty,std::allocator<_Ty>>>>>'15>        with15>        [15>            _Ty=int15>        ]15>        No constructor could accept the source type, or the constructor overload resolution was ambiguous

 

Edited by Razor88 (see edit history)
Link to post
2 hours ago, Razor88 said:

For me dont work …. i cant compile the src later i add the codes….i use vc141 can u help me please?

 

 

15>\source\userinterface\LTiplist.h(149): error C2440: 'initialize': impossible convert from  'initializer-list' a 'std::vector<std::tuple<std::string,std::vector<int,std::allocator<_Ty>>,std::vector<_Ty,std::allocator<_Ty>>>,std::allocator<std::tuple<std::string,std::vector<_Ty,std::allocator<_Ty>>,std::vector<_Ty,std::allocator<_Ty>>>>>'15>        with15>        [15>            _Ty=int15>        ]15>        No constructor could accept the source type, or the constructor overload resolution was ambiguous

 

seems like a C++ version issue, are you sure you're compiling the client using v141 toolset(instead of just having it available)?

  • Love 1
Link to post
3 minutes ago, boaspessoal said:

seems like a C++ version issue, are you sure you're compiling the client using v141 toolset(instead of just having it available)?

hi thank u , yes i compile vith v141 toolset but when i enable the define for compile this code when link give me this error if i disable this code all is ok and link the .exe

 

5 minutes ago, boaspessoal said:

seems like a C++ version issue, are you sure you're compiling the client using v141 toolset(instead of just having it available)?

can u help me to solve?

Link to post
5 minutes ago, Razor88 said:

hi thank u , yes i compile vith v141 toolset but when i enable the define for compile this code when link give me this error if i disable this code all is ok and link the .exe

 

if you're using a recent vs version, you should have this option when checking the properties of each project:

a66faa1bc8b317323bf2eaff0eb19499.png

 

use c++17 or above on UserInterface and try again

Edited by boaspessoal (see edit history)
Link to post
2 minutes ago, boaspessoal said:

if you're using a recent vs version, you should have this option when checking the properties of each project:

a66faa1bc8b317323bf2eaff0eb19499.png

 

use c++17 or above and try again

where is exactly? can u tell me the path please ?

i think yes i use vs 2017

 

Link to post
2 minutes ago, Razor88 said:

where is exactly? can u tell me the path please ?

i think yes i use vs 2017

 

right click on project(UserInterface), this pops up -> 9945420f8447ae04e9cc7a1f59597173.png -> Properties -> General

Link to post
  • ASIKOO changed the title to Loading TIP Info System

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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