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,144
Reaction score
15,535
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,780
Reaction score
1,631
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
965
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,780
Reaction score
1,631
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,144
Reaction score
15,535
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 Posts

Latest Profile Posts

I'm just so close to replacing LUK with a different stat, maybe DEX but we'll see.
Slapped together a title screen and working on some dungeon clutter + portraits for Dubhghaill and Einar. Usual CW for minor body horror wrt Einar
QVLJIgD.png

OaPcYUy.png

r55FiUJ.png

EIgO94y.png
cT1V4nb.png
>studying for months for an exam
>does exam
>waits 3 months for the results to come out
>me trying to login, incorrect password
>I get recovery password
>me trying to login, incorrect password

What the heck. As a son of a Karen, I'm going to file a few complaints.
Apparently Amazon Prime users get free Genshin Impact stuff like primogems and whatnot every month, but I'm not sure I ever want to fall into the abyss of F2P ever again.

Forum statistics

Threads
117,148
Messages
1,104,948
Members
153,221
Latest member
Kostec
Top