Frogboy Talent Core

SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
51
Reaction score
11
First Language
English
Primarily Uses
RMMV
Love the script, but I am trying to have my skill "Leadership" to give more Party slots at certain ranks.
Anyone know a good way to make that happen?
 

Blue001

Veteran
Veteran
Joined
Jan 13, 2014
Messages
231
Reaction score
112
First Language
English
Primarily Uses
RMMV

SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
51
Reaction score
11
First Language
English
Primarily Uses
RMMV
Ah man, I thought this was the right place, lol
I forum badly
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
What do you mean by "more Party slots"?
 

SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
51
Reaction score
11
First Language
English
Primarily Uses
RMMV
Ah, my bad. More actors in battle....there is a name for that....forget what it is though
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
In that case, you would want to modify the "maxBattleMembers" function to use a formula instead of a constant number.

But some more questions -
Who's Leadership skill will be used? Is it the party leader? Is it the member with the highest level? Is it an average of every member's leadership level? Is it always specific actor?

Here is an example to get you started (install as a plugin):
Code:
// At Leadership lvl 10 and 20 the max battle members increases
// This checks the highest leadership level in the party
// Assuming the abbreviation for the talent is "lead"
Game_Party.prototype.maxBattleMembers = function() {
    const highest = Math.max(...$gameParty.members().map(actor => actor.lead).filter(lead => lead));
    if (highest >= 20) {
        return 6;
    } else if (highest >= 10) {
        return 5;
    } else {
        return 4;
    }
};
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,704
Reaction score
2,208
First Language
English
Primarily Uses
RMMV
There's currently no support within the plugin for adding additional battle members. Aloe's plugin or something like it will be needed to add this functionality to your game.
 

SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
51
Reaction score
11
First Language
English
Primarily Uses
RMMV
My numbers are low, so this is what I am rolling with. This look right?
BTW, thanks for all the help guys

Code:
Game_Party.prototype.maxBattleMembers = function() {
    const highest = Math.max(...$gameParty.members().map(actor => actor.ldrshp).filter(ldrshp => ldrshp));
    if (highest >= 16) {
        return 6;
    } else if (highest >= 8) {
        return 5;
    } else if (highest >= 2) {
        return 4;
    } else {
        return 3;
    }
};
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,704
Reaction score
2,208
First Language
English
Primarily Uses
RMMV
This look right?
The version of MV that you are using may make a difference. If you are on a 1.5.x or earlier version, this function will probably need to have a different syntax.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
I always forget about the syntax change haha, I'm too used to ES6+ at this point. Here's a different version that does the same thing but using a different method and is fine to use on older versions of MV.

Code:
Game_Party.prototype.maxBattleMembers = function() {
    var highest = $gameParty.members().reduce(function(acc, cur) {
        return (cur.ldrshp > acc ? cur.ldrshp : acc);
    }, 0);
    if (highest >= 16) {
        return 6;
    } else if (highest >= 8) {
        return 5;
    } else if (highest >= 2) {
        return 4;
    } else {
        return 3;
    }
};
 

SirCumferance

Veteran
Veteran
Joined
Jul 17, 2012
Messages
51
Reaction score
11
First Language
English
Primarily Uses
RMMV
upload_2018-9-10_5-47-26.png

Thanks all, really appreciate the help

EDIT: Dammit, just double posted. How do I delete it?
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top