Check for Highest Stat in First 4 Character Slots

xlucky_rat

They/Them
Veteran
Joined
May 16, 2022
Messages
77
Reaction score
83
First Language
English
Primarily Uses
RMMV
My game will have a D&D-style skill check system where, in the field, certain stats will be called on (STR to move a boulder, AGI to pick a lock, etc.) to determine whether or not an action is a success. I have found a way to set it up so that the FIRST party slot is checked, using that character's stats for the event, but I'd like to know how to set it up so that the first four party members are checked for the highest stat.

For example, maybe the low-INT warrior is leading the party, but the mage is in the fourth slot. Instead of using the fighter's dismal intellect to recall lore, the mage tries it instead, without being moved to the front of the party. I mainly want to avoid having to force the player to keep swapping around the formation.

Does that make sense? I hope it makes sense. Thank you in advance! I've found this to be a very helpful forum!:kaohi:
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,256
Reaction score
9,688
First Language
German
Primarily Uses
RMMV
You can check the first eight actors with the control variable command, game data section.

you just have to load all relevant data into several variables, and then use conditional branch to compare the variables and select the highest result.
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
89
Reaction score
21
First Language
br portuguese
Primarily Uses
RMMV
you could with a control variables event, then use a script to check what you want (or go total event to make the checks. i just find scripting faster).

set variables to get the members order, like v[1] is the leader, v[2] is the 2nd member,...

the perform your checks with conditionals or scripts.

heres a picture of what mine looks like, it was an old project where i used the pages up and down keys to change the party leader "on the fly" in the field map.
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    214.6 KB · Views: 2

Latest Threads

Latest Posts

Latest Profile Posts

Kes
Let me ask you this - when was the last time you backed up? Can you afford to lose all the progress you've made since the last backup?
Just asking.
Working on fun ways to get around the Midnight Circus level! Cannons were a given :LZSlol:

apolloblastoff.gif

Forum statistics

Threads
123,077
Messages
1,153,798
Members
161,407
Latest member
Tree_of_Topaz
Top