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?
Frogboy Talent Core
● ARCHIVED · READ-ONLY
-
-
Probably be best asking this on the plugins Thread. Frogboy is great at answering quickly on his thread, but he won't get notified here.
shortcut for ya.
https://forums.rpgmakerweb.com/inde...ystem-and-or-character-building-system.92265/
or, if you do want your own thread for your question, always link the plugin in question so anyone helping you can find it and see what they can figure out. -
@Frogboy I think this one is for you, friend.
-
Ah man, I thought this was the right place, lol
I forum badly -
What do you mean by "more Party slots"?
-
Ah, my bad. More actors in battle....there is a name for that....forget what it is though
-
"Battle Members" is the term you are looking for.Ah, my bad. More actors in battle....there is a name for that....forget what it is though
-
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; } }; -
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.
-
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; } }; -
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. -
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; } }; -
Thanks all, really appreciate the help
EDIT: Dammit, just double posted. How do I delete it? -
@SirCumferance I've merged your posts for now. Please take care not to double post in the future.