Jump to content

change limits


Go to solution Solved by Psycho,

Recommended Posts

Dear Devs,

I would like to change the limits for movement speed, attack speed, cast speed etc. I found some of these in char.cpp, but if I try to overwrite the BYTE, it always writes an error on that line. How do I solve it?

 

int CHARACTER::GetLimitPoint(BYTE type) const
{
	if (type >= POINT_MAX_NUM)
	{
		sys_err("Point type overflow (type %u)", type);
		return 0;
	}

	int val = m_pointsInstant.points[type];
	int max_val = INT_MAX;
	int limit = INT_MAX;
	int min_limit = -INT_MAX;

	switch (type)
	{
		case POINT_ATT_SPEED:
			min_limit = 0;

			if (IsPC())
				limit = 1700;//default 170
			else
				limit = 2500;//default 250
			break;

		case POINT_MOV_SPEED:
			min_limit = 0;

			if (IsPC())
				limit = 2000;//default 200
			else
				limit = 2500;//default 250
			break;

		case POINT_STEAL_HP:
		case POINT_STEAL_SP:
			limit = 500;//default 50
			max_val = 500;//default 50
			break;

		case POINT_MALL_ATTBONUS:
		case POINT_MALL_DEFBONUS:
			limit = 200;//default 20
			max_val = 500;//default 50
			break;
	}

I've already set a few values below by 10x, but will it work because of the BYTE above?

 

Thank you for your reply.

 

Sincerely, Crow

Link to comment
https://metin2.dev/topic/31396-change-limits/
Share on other sites

2 hours ago, Crow said:

Dear Devs,

I would like to change the limits for movement speed, attack speed, cast speed etc. I found some of these in char.cpp, but if I try to overwrite the BYTE, it always writes an error on that line. How do I solve it?

 

int CHARACTER::GetLimitPoint(BYTE type) const
{
	if (type >= POINT_MAX_NUM)
	{
		sys_err("Point type overflow (type %u)", type);
		return 0;
	}

	int val = m_pointsInstant.points[type];
	int max_val = INT_MAX;
	int limit = INT_MAX;
	int min_limit = -INT_MAX;

	switch (type)
	{
		case POINT_ATT_SPEED:
			min_limit = 0;

			if (IsPC())
				limit = 1700;//default 170
			else
				limit = 2500;//default 250
			break;

		case POINT_MOV_SPEED:
			min_limit = 0;

			if (IsPC())
				limit = 2000;//default 200
			else
				limit = 2500;//default 250
			break;

		case POINT_STEAL_HP:
		case POINT_STEAL_SP:
			limit = 500;//default 50
			max_val = 500;//default 50
			break;

		case POINT_MALL_ATTBONUS:
		case POINT_MALL_DEFBONUS:
			limit = 200;//default 20
			max_val = 500;//default 50
			break;
	}

I've already set a few values below by 10x, but will it work because of the BYTE above?

 

Thank you for your reply.

 

Sincerely, Crow

 

byte is a maximum of 256, so you'll see, it's a bad thing to edit in word.

Link to comment
https://metin2.dev/topic/31396-change-limits/#findComment-159885
Share on other sites

  • Solution
On 9/29/2023 at 10:34 PM, Crow said:

I know. But if I try to rewrite it to DWORD or int32_t, it will display an error when compileing.

obviously you don't have to change only there, but on all the functions that call it

  • Love 1
Link to comment
https://metin2.dev/topic/31396-change-limits/#findComment-159915
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.