Promise

battle Conf - party_size

Recommended Posts

Hey guys, i was looking in the forum that some people was asking for this mod, and i have done it long time ago.

Im not giving a patch cuz im to lazy to do it. :3

 

What's this mod?

This mod allows you to change the max party size in conf/battle/party.c

 

Requirements:

  • rAthena updated version or rAmod updated version
  • min scripting knowledge (compile and follow a guide)
  • A server (?

 

 

How to install?

 

1.- First of all i recommend to backup the files you will touch on this guide (battle.c battle.h party.c)

 

2.- After that go to src/map/battle.c and find:

	{ "multihit_delay",                     &battle_config.multihit_delay,                  80,     0,      INT_MAX,        },

add below:

// PromisE Mod
	{ "party_size",                     	&battle_config.party_size,                 	20,     0,      INT_MAX,        },
// Mod

3.- Go to src/map/battle.h and find:

	int pc_invincible_time;

add below

	int party_size;

4.- Go to src/map/party.c

 

In this file you have to replace all

MAX_PARTY

with

battle_config.party_size

Example:

int party_getmemberid(struct party_data* p, struct map_session_data* sd)
{
	int member_id;
	nullpo_retr(-1, p);
	if( sd == NULL )
		return -1;// no player
	ARR_FIND(0, MAX_PARTY, member_id,
		p->party.member[member_id].account_id == sd->status.account_id &&
		p->party.member[member_id].char_id == sd->status.char_id);
	if( member_id == MAX_PARTY )
		return -1;// not found
	return member_id;
}

to

int party_getmemberid(struct party_data* p, struct map_session_data* sd)
{
	int member_id;
	nullpo_retr(-1, p);
	if( sd == NULL )
		return -1;// no player
	ARR_FIND(0, battle_config.party_size, member_id,
		p->party.member[member_id].account_id == sd->status.account_id &&
		p->party.member[member_id].char_id == sd->status.char_id);
	if( member_id == battle_config.party_size )
		return -1;// not found
	return member_id;
}

5.- conf/battle/party.conf

 

 

Find

// Display party name regardless if player is in a guild.
// Official servers do not display party name unless the user is in a guild. (Note 1)
display_party_name: no

Add below

// Party size [PromisE]
// Max party size on Battle conf system.
party_size: 5

Recompile and restart your server.

 

 

 

* To edit the max party members you have to change only this line 

party_size: 5

Share this post


Link to post
Share on other sites

I'll test this and if it works make a branch for more testing

Share this post


Link to post
Share on other sites

It works perfect for me, but for some user didn't.

Lets try.

Share this post


Link to post
Share on other sites

mostly it doesn't work on array as array initializer requires constant value.

Share this post


Link to post
Share on other sites

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