Can you make a skill that does more damage the fewer party members there are in battle?

FarOutFighter

Veteran
Veteran
Joined
Sep 20, 2021
Messages
138
Reaction score
88
First Language
English
Primarily Uses
RMMZ
I am making a "Solitarian" class that is made to be self-sufficient / better alone in battle. But I am having trouble making its skills reflect that. Is it possible to make a skill like in the title? What I was thinking is - skill runs a common even that sets var x to the number of alive party members there are currently in the battle, then the skill damage is divided by that number (so either 3, 2, or 1 - my game has 3 characters in battle). But Idk how to do that exactly. Especially since I am using Visustella's party change plugin that lets me swap allies mid battle.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,171
Reaction score
4,142
First Language
English
Primarily Uses
RMMV
Amusingly, as you linked in the other thread, this can easily be done in the damage formula :wink:

In fact, your idea of using a common event can't help because common events are run after the skill is completely performed...so nothing you do in there can impact the damage dealt.

Simply put:
Code:
your damage formula / $gameParty.aliveMembers().length
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
543
Reaction score
460
First Language
German
Primarily Uses
RMMV
You can use $gameParty.battleMembers().length in the damage formula as the number of party members in battle.

Side note: "Game Mechanics" is mor for discussion like "What skills could a solitarian class have?". For "How do I omplement this?" the more appropriate sub-forum would be the maker's support forum.
 

FarOutFighter

Veteran
Veteran
Joined
Sep 20, 2021
Messages
138
Reaction score
88
First Language
English
Primarily Uses
RMMZ
Amusingly, as you linked in the other thread, this can easily be done in the damage formula :wink:

In fact, your idea of using a common event can't help because common events are run after the skill is completely performed...so nothing you do in there can impact the damage dealt.

Simply put:
Code:
your damage formula / $gameParty.aliveMembers().length
Lol, i have a stalker! Jk. Thats awesome, i had no idea of that specific .aliveMembers code. Maybe i should have read the page more thoroughly lol
 

FarOutFighter

Veteran
Veteran
Joined
Sep 20, 2021
Messages
138
Reaction score
88
First Language
English
Primarily Uses
RMMZ
Amusingly, as you linked in the other thread, this can easily be done in the damage formula :wink:

In fact, your idea of using a common event can't help because common events are run after the skill is completely performed...so nothing you do in there can impact the damage dealt.

Simply put:
Code:
your damage formula / $gameParty.aliveMembers().length
Though... would that code you mentioned reference the total number of alive members, or just the ones currently in battle? I guess there might be no way to know aside from testing.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,171
Reaction score
4,142
First Language
English
Primarily Uses
RMMV
Though... would that code you mentioned reference the total number of alive members, or just the ones currently in battle? I guess there might be no way to know aside from testing.
Well, the way to know might be to look up the list of script calls pinned in the JavaScript forum and see what it means :wink:

But the answer to your question is that if you use it in battle, members and aliveMembers automatically refer to the battle party. So it doesn't hurt anything, but specifically referring to battleMembers is actually only useful outside of battle.
 

JohnDoeNews

Steam mod (MV/MZ)
Veteran
Joined
Apr 25, 2017
Messages
1,357
Reaction score
1,033
First Language
Dutch
Primarily Uses
RMMV
There is nothing wrong with testing and just trying things out. That is how I learned pretty much everything I know about RPG maker. :p

The code ATT_Turan gave will only count the alive members currently in battle. So if you have 12 battlers, of which 3 in battle and of those 1 is KO, then it will divide by 2.

I want to suggest a slight alternative, though:

Code:
your damage formula / $gameParty.aliveMembers().length * 3

The way I did it:
the full party (of 3) will do normal damage,
a party of 1 will do 3× damage.

The way ATT did it:
the full party (of 3) will do 1/3 damage,
a party of 1 will do normal damage.

The effect is the same: Party of 1 does 3× as much damage as a full party. The difference is that I assume a full party is the default, while with ATT's code you might assume a party of 1 is the default.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,171
Reaction score
4,142
First Language
English
Primarily Uses
RMMV
The difference is that I assume a full party is the default, while with ATT's code you might assume a party of 1 is the default.
To be fair, I assumed that because that's how the OP said they wanted the formula to work :wink: Which, yes, is opposite from how they worded the thread subject.

But I agree that working it the other way could be easier for sanity checks/troubleshooting. :smile:
 

JohnDoeNews

Steam mod (MV/MZ)
Veteran
Joined
Apr 25, 2017
Messages
1,357
Reaction score
1,033
First Language
Dutch
Primarily Uses
RMMV
To be fair, I assumed that because that's how the OP said they wanted the formula to work :wink: Which, yes, is opposite from how they worded the thread subject.

But I agree that working it the other way could be easier for sanity checks/troubleshooting. :smile:
I don't think your approach is wrong. In many modern RPG's a party of 1 is the default.

In Skyrim and Fallout. Where you roam the maps alone, but you can gather 1 follower and/or 1 pet, extending your party to 2 or 3. Your approach would work better in those games.

In other games, like Dragon Age and Final Fantasy X, you play pretty much all the time with a full party. The only way you play with a party of 1 then, is when the rest of your party is KO. My approach would work better in those games.

Which of the 2 approaches is better for @FarOutFighter depends on the party system of their game. Is a party of 1 the default like skyrim, or is a full party the default like FFX?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,401
Reaction score
5,090
First Language
English
Primarily Uses
RMMZ
I don't think your approach is wrong. In many modern RPG's a party of 1 is the default.

In Skyrim and Fallout. Where you roam the maps alone, but you can gather 1 follower and/or 1 pet, extending your party to 2 or 3. Your approach would work better in those games.

In other games, like Dragon Age and Final Fantasy X, you play pretty much all the time with a full party. The only way you play with a party of 1 then, is when the rest of your party is KO. My approach would work better in those games.

Which of the 2 approaches is better for @FarOutFighter depends on the party system of their game. Is a party of 1 the default like skyrim, or is a full party the default like FFX?
Presumably if this is the design of the class, the use of the party system suggests that there isn't really a *default* per se, and that as soon as you have Solitarian as an option, you're basically faced with a trade-off between better damage while being solo, or having allies but dealing less. I would posit that the *most likely* intent from this is the "3 members deals normal damage, 1 member deals triple" that John suggested since doing it the other way wouldn't really make soloing more powerful, it would just make a bigger party less so.
 

JohnDoeNews

Steam mod (MV/MZ)
Veteran
Joined
Apr 25, 2017
Messages
1,357
Reaction score
1,033
First Language
Dutch
Primarily Uses
RMMV
Presumably if this is the design of the class, the use of the party system suggests that there isn't really a *default* per se, and that as soon as you have Solitarian as an option, you're basically faced with a trade-off between better damage while being solo, or having allies but dealing less. I would posit that the *most likely* intent from this is the "3 members deals normal damage, 1 member deals triple" that John suggested since doing it the other way wouldn't really make soloing more powerful, it would just make a bigger party less so.
If I look at fallout, there is a "Lone Wanderer" perk, which makes you more powerful and your inventory a lot bigger if you travel alone, even though a party of 1 is the default if those games. And I think that is kind of the fallout equivalent of a solitarian class.

Just saying: Bonuses for playing alone can work in games that focus on 1 character parties.

I just wouldn't rely ALL skills on that perk, though. If all skills would work like that, then your character is either useless in a full party like you say, or over powerful in a single-character party.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,966
Reaction score
16,019
First Language
English
Primarily Uses
RMMV

I've moved this thread to MZ Support. Thank you.

 

fishdogcat

Villager
Member
Joined
Aug 7, 2022
Messages
16
Reaction score
8
First Language
English
Primarily Uses
RMMZ
Thanks! i was looking for this too as well.
Well, the way to know might be to look up the list of script calls pinned in the JavaScript forum and see what it means :wink:

But the answer to your question is that if you use it in battle, members and aliveMembers automatically refer to the battle party. So it doesn't hurt anything, but specifically referring to battleMembers is actually only useful outside of battle.
 

Latest Threads

Latest Profile Posts

working on an A/V sync system for my game! was NOT expecting the first roadblock to be accessing a variable from a public class!! Computers are so finicky sometimes :kaosigh:
For the first real time since my game's inception I found myself actually having fun playing around with my party's skills while testing out some battles! So much so, that I actually forgot what I was doing for a minute and had to force myself to move on to the next thing! :guffaw:

That's got to be a good sign considering it only has place holder animations, enemy skills, troop comps, etc. right now. Feels good!
Bex
Finally upgraded to RMMZ.
ScreenShot_11_28_2022_7_52_34.png
FINALLY, I figured out how to get the "tail" to appear IN the window and not directly below it lol. now it looks like it's part of the window and not hanging from the bottom of it.
Twitch! Stream is about to go live with some Dark Souls 2! Feel free to drop by!

Forum statistics

Threads
126,923
Messages
1,182,389
Members
166,755
Latest member
Hahah520
Top