• 0
Sign in to follow this  
Kido

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

Question

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

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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?

Share this post


Link to post
Share on other sites
  • 0

and those files are the same just some are moved around and stuff if your looking at old tutorials 

Share this post


Link to post
Share on other sites
  • 0

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 🙂

Share this post


Link to post
Share on other sites

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.

Loading...
Sign in to follow this