Jump to content
  • 0

How to have pre-re stat formula in re server?


Question

Posted

Hi, I found this post

 that's exactly the same problem I have, but when I enter to the src folder, I can't find the pc.c file, only found pc.cpp and pc.hpp

I found this piece of code in that file:

#ifdef RENEWAL_STAT
/// Renewal status point cost formula
#define PC_STATUS_POINT_COST(low) (((low) < 100) ? (2 + ((low) - 1) / 10) : (16 + 4 * (((low) - 100) / 5)))
#else
/// Pre-Renewal status point cost formula
#define PC_STATUS_POINT_COST(low) (( 1 + ((low) + 9) / 10 ))
#endif

/// Returns the number of stat points needed to change the specified stat by val.
/// If val is negative, returns the number of stat points that would be needed to
/// raise the specified stat from (current value - val) to current value.
int pc_need_status_point(struct map_session_data* sd, int type, int val)
{
	int low, high, sp = 0, max = 0;

	if ( val == 0 )
		return 0;

	low = pc_getstat(sd,type);
	max = pc_maxparameter(sd,(enum e_params)(type-SP_STR));

	if ( low >= max && val > 0 )
		return 0; // Official servers show '0' when max is reached

	high = low + val;

	if ( val < 0 )
		SWAP(low, high);

	for ( ; low < high; low++ )
		sp += PC_STATUS_POINT_COST(low);

	return sp;
}

should I just replace the 

#define PC_STATUS_POINT_COST(low) (((low) < 100) ? (2 + ((low) - 1) / 10) : (16 + 4 * (((low) - 100) / 5)))

for

#define PC_STATUS_POINT_COST(low) (( 1 + ((low) + 9) / 10 ))

to get it like this?

#ifdef RENEWAL_STAT
/// Renewal status point cost formula
#define PC_STATUS_POINT_COST(low) (( 1 + ((low) + 9) / 10 ))
#else
/// Pre-Renewal status point cost formula
#define PC_STATUS_POINT_COST(low) (( 1 + ((low) + 9) / 10 ))
#endif

/// Returns the number of stat points needed to change the specified stat by val.
/// If val is negative, returns the number of stat points that would be needed to
/// raise the specified stat from (current value - val) to current value.
int pc_need_status_point(struct map_session_data* sd, int type, int val)
{
	int low, high, sp = 0, max = 0;

	if ( val == 0 )
		return 0;

	low = pc_getstat(sd,type);
	max = pc_maxparameter(sd,(enum e_params)(type-SP_STR));

	if ( low >= max && val > 0 )
		return 0; // Official servers show '0' when max is reached

	high = low + val;

	if ( val < 0 )
		SWAP(low, high);

	for ( ; low < high; low++ )
		sp += PC_STATUS_POINT_COST(low);

	return sp;
}

 

and then recompile? 

thanks in advance < 3 kissu

6 answers to this question

Recommended Posts

  • 1
Posted
On 7/10/2019 at 5:08 PM, Haruka Mayumi said:

Try to comment the RENEWAL_ASPD on renewal.hpp ?

Hello sorry for commenting on old post, I have a same issue about statpoints and I follow your advice about commenting on RENEWAL_STATS but on RENEWAL_ASPD even I already comment it still I have MAX ASPD even i dont have stats (1agi = max aspd).

  • Like 1
  • 0
Posted

You can do that however it's best solution to use the config folder in src.

under src/config/renewal.hpp

comment the #define RENEWAL_STAT

/// Renewal stat calculations
/// (disable by commenting the line)
///
/// Leave this line to enable renewal calculation for increasing status/parameter points
//#define RENEWAL_STAT

Up Vote and Answer if it helps.

  • Upvote 1
  • 0
Posted

Uh I'm not sure why, but I tried to comment some renewl stuff and for some reason, all characters got the aspd always maxed, even a novice 1/1 got maxed its aspd with 1 agi -_- i'm not sure what i'm doing x_x uhh another dev did comment some renewal stuff to prevent it from happening, like the cast time to be 150 dex = free cast, that went well, but now I got this issue about the aspd always getting maxed for all players, even with 1 agi x_x

 

ty for your response, i'lmm mess around a bit to see if I can fix that... any ideas why the aspd thing happened?

  • 0
Posted

Solved, not sure how, all I did was leave the stats part alone and disable renewall features, now I have problems with the damage -__- but that's for another post... thank you both ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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