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
45,510
Reaction score
16,405
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
7,629
Reaction score
5,395
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
1,013
Reaction score
501
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
7,629
Reaction score
5,395
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
45,510
Reaction score
16,405
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've got good news and bad news. The good news is, there aren't any bad news to report. The bad news is, there aren't any good news to report.

Or as others say, yesterday was uneventful.


I am curious that can you "understand/get the point" about what does this place do generally?
(ARPG game)
If anyone knows any C# programmers, please send them my way.
Chilling at night in a tavern.
ChillingAtTavern.png

After 'multiple breakdowns', it's finally over. 10/10 will do this again.
Ever notice that villains can reform and become better people, but heroes can only ever die... or live long enough to see themselves become villains?

Isn't that interesting?

Forum statistics

Threads
129,844
Messages
1,205,657
Members
171,001
Latest member
OliguS
Top