"Manpower" variable adjusting based on individual party members "fitness" score?

gizmo214

Villager
Member
Joined
Apr 5, 2021
Messages
17
Reaction score
0
First Language
english
Primarily Uses
RMMV
Hey all,

How can I give a single class a random range of "fitness" scores and how can I have it adjust my overall party's "manpower" score when they are in or out of the party? I really just need the manpower score to add or subtract based on my party members' individual and random fitness scores?

This is what I have so far,

In the event of an NPC I'm trying to recruit, I have a variable called "fitness" that gives a random ranged number to the event. I just need to know how to make the individual "fitness" variable contribute to an overall "manpower" variable based on if said event is in my party or not. essentially, I need a variable to add party members 1's fitness, party member 2's fitness, and party member 3's fitness to contribute to an overall manpower variable.

I hope that makes sense! Thanks all.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,503
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
that is all in control variable. you can simply add variables together by selecting another variable as the source in the bottom section.
you'll need to reserve a number of variables for temporary use however because each control variable command can handle only one additional variable, so you'll need a sequence of commands.

however there are two different ways depending on how you defined fitness. If you renamed one of the default parameters to fitness and used that to store numbers, you can access that through the game data option of control variable.
if the fitness is externally stored in other variables, you just need to add the other variables without changing them - good naming of the variables and carefull handling helps here.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,353
Reaction score
1,382
First Language
Spanish
Primarily Uses
RMVXA
party members 1's fitness, party member 2's fitness, and party member 3's fitness
in, or out of the party?

because, *in*, they're party member 1, party member 2, or party member 3.
but *out*, they're still actor X, actor Y and actor Z.

refer to them as Actor rather than Party Member, and you would solve half the problem across the board, because Actors are still Actors even when they're not in the party, and any modifications done to them are kept.

it's not a solution per se, just a change in perspective.
 

gizmo214

Villager
Member
Joined
Apr 5, 2021
Messages
17
Reaction score
0
First Language
english
Primarily Uses
RMMV
that is all in control variable. you can simply add variables together by selecting another variable as the source in the bottom section.
you'll need to reserve a number of variables for temporary use however because each control variable command can handle only one additional variable, so you'll need a sequence of commands.

however there are two different ways depending on how you defined fitness. If you renamed one of the default parameters to fitness and used that to store numbers, you can access that through the game data option of control variable.
if the fitness is externally stored in other variables, you just need to add the other variables without changing them - good naming of the variables and carefull handling helps here.

Andar,
I'm probably misunderstanding this. But, when I try to do a control variable "manpower", I want it to equal an actor's custom variable of "fitness". and then I want the custom "manpower" variable to equal the multiple "fitness" variables of my individual party members. But I'm getting lost where you say "you just need to add another variable without changing them". I know this might be asking a lot but can you do screenshots? I learn a lot better by seeing than reading.

Thank you for responding!
 

gizmo214

Villager
Member
Joined
Apr 5, 2021
Messages
17
Reaction score
0
First Language
english
Primarily Uses
RMMV
in, or out of the party?

because, *in*, they're party member 1, party member 2, or party member 3.
but *out*, they're still actor X, actor Y and actor Z.

refer to them as Actor rather than Party Member, and you would solve half the problem across the board, because Actors are still Actors even when they're not in the party, and any modifications done to them are kept.

it's not a solution per se, just a change in perspective.
Hey gstv87,

Thanks for the reply. Is there a way to control a variable based on the actor though? Not through the event itself but the database? Because if I could give each "actor" a variable that calls a random number to identify "fitness" That might solve my problem. The only way I see that though is repurposing a parameter... Is there any way you know of to add more parameters?
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,353
Reaction score
1,382
First Language
Spanish
Primarily Uses
RMVXA
*giving* attributes to the actor, is essentially redefining the object.
for that, you need a plugin.

you can't add fields to the database editor, you either have to redirect the existing controls to serve another purpose, or use the note block to add values.
but yes, that'd solve the problem right out.... you can control those variables directly after that, through a script call (always from the event window, though, not the database, unless you use the skills to trigger a common event, which are the link from the database to the game)
 

AeroPergold

Veteran
Veteran
Joined
Feb 3, 2014
Messages
155
Reaction score
168
First Language
English
Primarily Uses
RMMZ
Thinking about Manpower reminds me of Hearts of Iron 4.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,503
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
But I'm getting lost where you say "you just need to add another variable without changing them". I know this might be asking a lot but can you do screenshots? I learn a lot better by seeing than reading.
the exact process depends on what your variables are, but in the following example the variable "sum manpower" will get the sum of three other variables as a result
controlvar.png

please take note of one = and two += in the screenshot
 

gizmo214

Villager
Member
Joined
Apr 5, 2021
Messages
17
Reaction score
0
First Language
english
Primarily Uses
RMMV
the exact process depends on what your variables are, but in the following example the variable "sum manpower" will get the sum of three other variables as a result
View attachment 185492

please take note of one = and two += in the screenshot
Hey Ander,

How would I make this variable reference a specific troop though?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,503
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
define "troop".
I strongly suspect that you are not talking about the troop definition of the database.

that said, this is something you as the developer needs to keep track of, same as when you add values by variables to actors or anything like that. In all those cases you'll need to keep a list of what variable contains what information (a good naming convention for your variables really helps here) and then decide when to add what variable.
 

gizmo214

Villager
Member
Joined
Apr 5, 2021
Messages
17
Reaction score
0
First Language
english
Primarily Uses
RMMV
I mean troop as in the troop in the database. I'm changing my process by repurposing the agility parameter. So I've done that and the execution is working. But the problem I'm experiencing now is that I can't seem to get the manpower variable to restore based on the members of my party. It just simply doesn't work this is my formula. LMK what you think if you can:

I made a common event get called when the player selects a "rest zone" the common event is below:

Issue 2.PNG
 

Attachments

  • Issue 2.PNG
    Issue 2.PNG
    139 KB · Views: 1
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,503
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
How would I make this variable reference a specific troop though

I mean troop as in the troop in the database.

You can't, because troops do not exist outside battle - and inside battle there is no parallel process.
I strongly suggest that you take the time to completely explain what you're doing in your game instead of asking questions based on what you assume the engine does.

because in your posts so far you mixed things up that cannot be handled the way you describe them.
 

Latest Threads

Latest Posts

Latest Profile Posts

Alien Worlds, Minecraft Blocks, Extend Options, Fine Speed Control, Art by Muggu | RPG Maker News #33

Rest in Peace vlog gun...
vloggunsmallface.png
Another unnamed character, and probably last one for now.
She's a dragon girl inspired by fafnir dragon. as always, name suggestion is welcomed.
Dragon_Girl.jpg

Dragon_Girl_1.png
Hmm.... So I can use my quick ports of QPlugins, but QMovement breaks MZ's save system. Or I can use the Luna port of the QPlugins whose QMap breaks MZ's save system. I can't decide I want to fix one of those, or just make a new save system. The new one would look so much better.. I'm kind of tempted. :LZSexcite:
I'm very happy and I want everyone to be happy too, so I decided to share this song about the end of the world! :biggrin:

Forum statistics

Threads
111,164
Messages
1,058,859
Members
144,405
Latest member
Siegharthh
Top