Jump to content

Maximum FPS to 250


Recommended Posts

  • Premium

M2 Download Center

This is the hidden content, please
( Internal )

Hey,

 

I don't want to waste your time, so let's start, it's gonna be short.

 

src\Client

EterBase\Timer.cpp | Find function:

CTimer::GetElapsedMillisecond()

Find this inside the function above:

return 16 + (m_index & 1);

Make it look like this:

return 3 + (m_index & 3);


EterBase\Timer.cpp | Find function:

CTimer::Advance()

Find this inside the function above:

m_dwCurrentTime += 16 + (m_index & 1);

Make it look like this:

m_dwCurrentTime += 3 + (m_index & 3);


GameLib\GameType.cpp | Find this (top of the file):

extern float g_fGameFPS = 60.0f;

Make it look like this:

extern float g_fGameFPS = 250.0f;


EterPythonLib\PythonWindow.cpp | Find function:

CAniImageBox::CAniImageBox(PyObject * ppyObject)

Find this inside the function above:

m_byDelay(4),

Make it look like this:

m_byDelay(13),


GameLib\MapOutdoorWater.cpp | Find function:

CMapOutdoor::RenderWater()

Find this inside the function above:

STATEMANAGER.SetTexture(0, m_WaterInstances[((ELTimer_GetMSec() / 70) % 30)].GetTexturePointer()->GetD3DTexture());

Make it look like this:

STATEMANAGER.SetTexture(0, m_WaterInstances[((ELTimer_GetMSec() / 30) % 30)].GetTexturePointer()->GetD3DTexture());


Since we don't want E/Q/R/F/T/G keys to be messed up,

UserInterface\PythonApplication.cpp | Find these variables at the top of the file:

float c_fDefaultCameraRotateSpeed = 1.5f;
float c_fDefaultCameraPitchSpeed = 1.5f;
float c_fDefaultCameraZoomSpeed = 0.05f;

Make them look like this (you can tweak them more, these values aren't strict, just seems about right to me):

float c_fDefaultCameraRotateSpeed = 0.5f;
float c_fDefaultCameraPitchSpeed = 0.2f;
float c_fDefaultCameraZoomSpeed = 0.007f;

Client\pack\root\uitaskbar.py

Find:

if.constInfo.IN_GAME_SHOP_ENABLE:

After:

self.rampageGauge1.OnMouseOverIn = ui.__mem_func__(self.__RampageGauge_OverIn)

Add:

self.rampageGauge1.SetDelay(13)

After:

self.rampageGauge2.OnMouseLeftButtonUp = ui.__mem_func__(self.__RampageGauge_Click)

Add:

self.rampageGauge2.SetDelay(13)

Scroll a little bit down, and then..

After:

self.hpGauge = self.GetChild("HPGauge")

Add:

self.hpGauge.SetDelay(13)

After:

self.mpGauge = self.GetChild("SPGauge")

Add:

self.mpGauge.SetDelay(13)

After:

self.stGauge = self.GetChild("STGauge")

Add:

self.stGauge.SetDelay(13)

 

Fast armor shining fix / UserInterface\PythonApplication.cpp (thanks @Nirray)

Search on top of the file:

double g_specularSpd=0.007f;

Replace it with:

double g_specularSpd=0.0017f;

 

Python part simpler version by @VegaS™


That's all, compile your binary, pack your root and you are done.

If you have any questions, feel free to ask it, or if you find an error, typo, anything inside this tutorial, don't hesitate to tell me, and I'll fix it ASAP.

Credits goes to kespımuro and me for ghetto-fixing the rotation buttons.

 

Cheers,

xHeaven

  • Metin2 Dev 67
  • kekw 1
  • Eyes 1
  • Facepalm 1
  • Dislove 1
  • Sad 1
  • Confused 1
  • Scream 2
  • Good 16
  • Love 7
  • Love 74
Link to comment
Share on other sites

  • Premium
37 minutes ago, hachiwari said:

Maybe better add default value 13 in constructor of this object?

 

Thanks for your contribution.

 

Anyone who wants this,

 

Method1

Spoiler

Client\pack\root\ui.py

 

Find:


def SetDelay(self, delay):

 

Replace with:


def SetDelay(self, delay = 13):

 

If you did this tutorial before, then in Client\pack\root\uitaskbar.py replace all .SetDelay(13) with .SetDelay().

If you did not, then simply write .SetDelay() instead of .SetDelay(13).

 

OR

 

Method2

Spoiler

Client\pack\root\uitaskbar.py

 

Find:


self.mouseModeButtonList = [ ui.ScriptWindow("TOP_MOST"), ui.ScriptWindow("TOP_MOST") ]

 

Put above:


self.maxFpsDelay = 13

 

If you did this tutorial before, then in Client\pack\root\uitaskbar.py replace all .SetDelay(13) with .SetDelay(self.maxFpsDelay).

If you did not, then simply write .SetDelay(self.maxFpsDelay) instead of .SetDelay(13).

 

Can you share video with comparation(before/after)?

Unfortunately, I haven't made any video with/without this.

Edited by xHeaven
added another method, formatting
  • Metin2 Dev 1
Link to comment
Share on other sites

  • Forum Moderator
On 4/9/2020 at 2:40 AM, xHeaven said:
Spoiler

Client\pack\root\ui.py

 

Find:

def SetDelay(self, delay):



def SetDelay(self, delay):

 

Replace with:

def SetDelay(self, delay = 13):



def SetDelay(self, delay = 13):

 

If you did this tutorial before, then in Client\pack\root\uitaskbar.py replace all .SetDelay(13) with .SetDelay().

If you did not, then simply write .SetDelay() instead of .SetDelay(13).

 

Btw, instead of adding a .SetDelay() to all objects, you could do do a simple change. for all visual ani_image from screen.

  • root/ui.py

Search for:

		if True == value.has_key("delay"):
			window.SetDelay(value["delay"])

Replace with:

This is the hidden content, please

So, you don't have to any part of python from tutorial, just this.

 

Edited by VegaS™
  • Metin2 Dev 100
  • Eyes 2
  • Angry 3
  • Sad 1
  • Smile Tear 2
  • Think 1
  • Confused 1
  • Scream 2
  • Good 33
  • Love 4
  • Love 85
Link to comment
Share on other sites

  • Premium
2 minutes ago, VegaS™ said:
Spoiler

Btw, instead of adding a .SetDelay() to all objects, you could do do a simple change. for all visual ani_image from screen.

  • root/ui.py

Search for:

if True == value.has_key("delay"): window.SetDelay(value["delay"])



		if True == value.has_key("delay"):
			window.SetDelay(value["delay"])

Replace with:

ANI_IMAGE_NAME_LIST = ('RampageGauge', 'RampageGauge2', 'HPGauge', 'SPGauge', 'STGauge' 'PartyMatchEffect', 'MailBoxEffect') ANI_IMAGE_MAX_FPS_DELAY = 13 if 'delay' in value: window.SetDelay(ANI_IMAGE_MAX_FPS_DELAY if value['name'] in ANI_IMAGE_NAME_LIST else value["delay"])



		ANI_IMAGE_NAME_LIST = ('RampageGauge', 'RampageGauge2', 'HPGauge', 'SPGauge', 'STGauge' 'PartyMatchEffect', 'MailBoxEffect')
		ANI_IMAGE_MAX_FPS_DELAY = 13
		
		if 'delay' in value:
			window.SetDelay(ANI_IMAGE_MAX_FPS_DELAY if value['name'] in ANI_IMAGE_NAME_LIST else value["delay"])

So, you don't have to any part of python from tutorial, just this.

 

 

That's a pretty neat practice, thanks for the heads-up!

Link to comment
Share on other sites

Thanks for the release, but how do i change the speed from the Effects? (Armor +7 +8 +9 need to edit the mse?) and the Clouds Speed?

 

About the Clouds i found it:

 

For those who using @Nirray cloud clipping FIX.

	From:
	m_fCloudPositionU += m_fCloudScrollSpeedU * 0.030f;
	m_fCloudPositionV += m_fCloudScrollSpeedV * 0.030f

	To:
	m_fCloudPositionU += m_fCloudScrollSpeedU * 0.007f;
	m_fCloudPositionV += m_fCloudScrollSpeedV * 0.007f;

 

Edited by HITRON
  • Love 2
Link to comment
Share on other sites

  • Premium
5 hours ago, HITRON said:

Thanks for the release, but how do i change the speed from the Effects? (Armor +7 +8 +9 need to edit the mse?) and the Clouds Speed?

 

About the Clouds i found it:

From: m_fCloudPositionU += m_fCloudScrollSpeedU * 0.030f; m_fCloudPositionV += m_fCloudScrollSpeedV * 0.030f To: m_fCloudPositionU += m_fCloudScrollSpeedU * 0.007f; m_fCloudPositionV += m_fCloudScrollSpeedV * 0.007f;


	From:
	m_fCloudPositionU += m_fCloudScrollSpeedU * 0.030f;
	m_fCloudPositionV += m_fCloudScrollSpeedV * 0.030f

	To:
	m_fCloudPositionU += m_fCloudScrollSpeedU * 0.007f;
	m_fCloudPositionV += m_fCloudScrollSpeedV * 0.007f;

 

 

Thanks, added it to the main post.

Edited by xHeaven
removed my code due to bugs (cloud clipping)
Link to comment
Share on other sites

15 minutes ago, xHeaven said:

 

This is my code for the clouds.

DWORD dwCurTime = CTimer::Instance().GetCurrentMillisecond(); m_fCloudPositionU += m_fCloudScrollSpeedU * (float)( dwCurTime - m_dwlastTime ) * 0.001f; if (m_fCloudPositionU >= 1.0f) m_fCloudPositionU = 0.0f; m_fCloudPositionV += m_fCloudScrollSpeedV * (float)( dwCurTime - m_dwlastTime ) * 0.001f; if (m_fCloudPositionV >= 1.0f) m_fCloudPositionV = 0.0f; m_dwlastTime = dwCurTime;


DWORD dwCurTime = CTimer::Instance().GetCurrentMillisecond();

m_fCloudPositionU += m_fCloudScrollSpeedU * (float)( dwCurTime - m_dwlastTime ) * 0.001f;
if (m_fCloudPositionU >= 1.0f)
	m_fCloudPositionU = 0.0f;

m_fCloudPositionV += m_fCloudScrollSpeedV * (float)( dwCurTime - m_dwlastTime ) * 0.001f;
if (m_fCloudPositionV >= 1.0f)
	m_fCloudPositionV = 0.0f;

m_dwlastTime = dwCurTime;

 

 

  • Love 3

I completely abandoned working on the files for this game. I do not respond to private messages.

.png

Link to comment
Share on other sites

  • Forum Moderator
Quote

Edited 1 hour ago by xHeaven
fixed speed hack detection, added simpler python solution and fast cloud fix (see edit history)

There's no 'fast cloud' related about increasing fps.

So, are useless those modifications and if we talk about fix clipping what @Nirray release, that's another subject.

About speed hack fix detection you didn't mentioned the source of fix. ?

Edited by VegaS™
  • Love 2
Link to comment
Share on other sites

27 minutes ago, North43 said:

is the change visible? can somebody show us a side-by-side comparison?

 

With FPS increased..

- Without dogs, the lag is less.. it move better, i reached 250 fps

- Spawned 500 wild dogs, after few seconds 5 seconds or fps drops to 7-8.. and start to lag a bit

 

Wihtout FPS increased..

- Without dogs, the lag is okay.. but better with fps increased.. fps exactly 60

- Spawned 500 wild dogs, after few 5 seconds fps drops to 10-12, and don't make any lag

 

So, with FPS increasted i guess is better when there are no soo many entitys around you.. i don't think is worth enough, it's good but  it needs more adjustments.. Like effects, trees.. etc

  • Good 1
  • Love 4
Link to comment
Share on other sites

  • Premium
1 hour ago, WeedHex said:

Not all pc can reach these FPS, I think is better to set a new impostation on config.exe, like most famous games.

 

That's definitely an option, anyway, there will be no consequences if a user doesn't reach the maximum FPS. It's just a maximum value.

Being able to set the maximum FPS via config, so the VGA won't work too much (rofl), would be a good addition, though.

Link to comment
Share on other sites

16 minutes ago, Mafuyu said:

is it just for me or does armor shining is now very fast? like 11299 the normal shining effect is very fast.

here is what i mean

spacer.png


UserInterface\PythonApplication.cpp
Search

double g_specularSpd=0.007f;

Change to:

double g_specularSpd=0.00017f;

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1

I completely abandoned working on the files for this game. I do not respond to private messages.

.png

Link to comment
Share on other sites

  • Premium
1 hour ago, Mafuyu said:

a friend of mine tested it on his public server now for about 12 hours, every user told him they got hardcore lags after few time.

Some of them cant even play with 2 windows, because they got random error message boxes for about 1 second and then client crashes

 

Well, the client now eats more CPU and GPU, maybe that's the reason.

You might need to set an FPS cap via the config file, so the 250 FPS is available, but only for those who actually want it.

Link to comment
Share on other sites

1 hour ago, xHeaven said:

 

Well, the client now eats more CPU and GPU, maybe that's the reason.

You might need to set an FPS cap via the config file, so the 250 FPS is available, but only for those who actually want it.

I dont have the file EterBase.cpp. Any idea?

Also, it could be usefull to create this cap (i mean a guide) so we can use it. Maybe on python..

Link to comment
Share on other sites

  • Premium
2 hours ago, zeimpekis9 said:

I dont have the file EterBase.cpp. Any idea?

Also, it could be usefull to create this cap (i mean a guide) so we can use it. Maybe on python..

Use the file search on Windows, I'm pretty sure you have it.

Btw, take a look on the bool CPythonSystem::LoadConfig() function in UserInterface\PythonSystem.cpp. It's pretty easy to make an FPS cap, just read the value of the key from the config file, and convert it to float via the atof() function.

Example:

else if (!stricmp(command, "FPS_LIMIT"))
	g_fGameFPS = atof(value);

 

Edited by xHeaven
  • Love 1
Link to comment
Share on other sites

17 minutes ago, xHeaven said:

Use the file search on Windows, I'm pretty sure you have it.

Btw, take a look on the bool CPythonSystem::LoadConfig() function in UserInterface\PythonSystem.cpp. It's pretty easy to make an FPS cap, just read the value of the key from the config file, and convert it to float via the atof() function.

Example:

else if (!stricmp(command, "FPS_LIMIT")) g_fGameFPS = atof(value);


else if (!stricmp(command, "FPS_LIMIT"))
	g_fGameFPS = atof(value);

 

I really dont have it...

maybe you could share it? (btw im compiling without problems and use martysama source)

 

 

Edited by zeimpekis9
Link to comment
Share on other sites

  • Premium
9 minutes ago, zeimpekis9 said:

I really dont have it...

maybe you could share it? (btw im compiling without problems and use martysama source)

 

<snip>

Whoops, sorry, you were right, that was a typo in the guide. Actually, you have to find Timer.cpp in the Eterbase library, not the EterBase.cpp.

Fixed the guide already.

Edited by xHeaven
Link to comment
Share on other sites

39 minutes ago, xHeaven said:

Use the file search on Windows, I'm pretty sure you have it.

Btw, take a look on the bool CPythonSystem::LoadConfig() function in UserInterface\PythonSystem.cpp. It's pretty easy to make an FPS cap, just read the value of the key from the config file, and convert it to float via the atof() function.

Example:

else if (!stricmp(command, "FPS_LIMIT")) g_fGameFPS = atof(value);


else if (!stricmp(command, "FPS_LIMIT"))
	g_fGameFPS = atof(value);

 

u may have a tutorial to use the default config function from "frequency" for your FPS limit? i mean, frequency should be the default fps limit setting from ymir, but it never worked, you may have the code to use this useless function from config for your system? would be nice

Link to comment
Share on other sites

21 hours ago, T4UMP said:

Double sound of steps, maybe has this thread more problems.

 

not only this, skills bugged out too. Shaman skill effects are to fast, the sura dispel skill is to fast, the dispel effect hits the enemy even before the sura jumped. there are a lot of bugs.

Switchbot, if you have one, bugged too, the switch speed is extremly high, you have to set delays there and im sure there are way more such things.

Link to comment
Share on other sites

Announcements



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