Status
Not open for further replies.

MayorPeach

Warper
Member
Joined
Jul 11, 2021
Messages
2
Reaction score
1
First Language
English
Primarily Uses
Other
I know the MV standard is to change the party name by displaying the name of the actor in the leader position (Harold's party becoming Therese's party if Therese is the party leader, etc), but is there any way to have a completely unique party name based on who's leading?

For example, Harold being the party leader sets the party name as "Bat Busters", Therese being the party leader changes it to "Therese's Team", Marsha being the leader changes it to "Marsha and Friends", etc.

Any help would be appreciated!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,206
Reaction score
15,548
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Thank you.

 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,849
Reaction score
1,667
First Language
English
Primarily Uses
RMMV
You'll have to write a little plugin, and I think the easiest way to do it is using a switch statement. So take this:
Code:
Game_Party.prototype.name = function() {
    var numBattleMembers = this.battleMembers().length;
    if (numBattleMembers === 0) {
        return '';
    } else if (numBattleMembers === 1) {
        return this.leader().name();
    }
   var name;
    switch ($gameParty.leader().actorId())
    {
        case 1:
            name="Bat Busters";
            break;
        case 2:
            name="Therese's Team";
            break;
        case 3:
            name="Marsha and Friends";
            break;
        default:
            name=TextManager.partyName.format(this.leader().name());
            break;
    }
    return name;
};
You'll copy and paste that into a text editor, save it as a *.js file in your plugins folder, and add it in the plugin manager.

For each case, you'll put the number of the actor ID, then set the name equal to whatever their party name should be. You can add as many as you like. Anything you don't specify will default to...the default.
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
966
Reaction score
470
First Language
PT-BR
Primarily Uses
RM2k3
Hello welcome!

Try this:
JavaScript:
/*:
 * @plugindesc Custom PartyName (On Battle)
 * @author DevWithCoffee
 *
 * @help To customize the team name according to the leader
 * include the meta tag "partyname" in the note field.
 * If an actor becomes the leader and no team name is
 * defined, the default will be displayed.
 *
 * Example:
 * <partyname: %1' team>
 * <partyname: %1's best friend>
 */

Game_Party.prototype.name = function() {
	var numBattleMembers = this.battleMembers().length;
	if (numBattleMembers === 0) {
		return '';
	} else if (numBattleMembers === 1) {
		return this.leader().name();
	} else {
		var partyname = $gameParty.leader().actor().meta.partyname;
		console.log(typeof(partyname));
		if (partyname && typeof(partyname) == "string") {
			/*Meta Tag*/
			return partyname.format(this.leader().name());
		} else {
			/*Default*/
			return TextManager.partyName.format(this.leader().name());
		}
	}
};

Meta Tag - Reference:
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,849
Reaction score
1,667
First Language
English
Primarily Uses
RMMV
Sure, you could do that, too! :stickytongue:
 

MayorPeach

Warper
Member
Joined
Jul 11, 2021
Messages
2
Reaction score
1
First Language
English
Primarily Uses
Other
Both of these work, thank you both!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,206
Reaction score
15,548
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

I keep thinking up of new changes or improvements... Edit: Forgot to add the image Gimpwork.JPG
Hello, my nickname is Rigomor, but I am also known as Mopsikus. I work on RPG Maker games, and are currently working on a game called Peony of War.
If the world treats you like an enemy... Then the world must be your enemy...
What started as 1 RPG in development on the Nintendo DS, turned into 4 RPGs in development (1 on VX and 3 on VX Ace). Wish me luck.

Forum statistics

Threads
117,293
Messages
1,106,251
Members
153,480
Latest member
Varlen
Top