How can I compare multiple variables at once?

First, let me elaborate. I am doing an event where when a specific dialogue appears based on the competition of multiple variables for the highest or a specific ranking. This is because my game is operated by a dating sim mechanic with an "affection point". For example, when cut scene plays to the certain point, one of the characters will say this to the hero.
I love you because...

For a sample context, there are five characters: Anny, Betty, Calsa, Daria, and Emy. Each character's affection point is dictated by the a variable "actor(x) Love Point". These five variables will be compared a moment before this message box appears. Whoever has the most (or second, or third, etc.) "actor(x) Love Point" will get to say the quote (ex. A = 10 > B, C, D, E). This message will be different based on the character who says it such as:
Anny: I love you because you're brave.
Betty: I love you because you're funny.
Calsa: I love you because you provides for me.
Daria: I love you because you are amusing me.
Emy: I love you because you reminds me of my brother.

My main issue is that I only know how to compare two variables at once. As such, trying to compare five at once can become very confusing. There is also a situation where I would like a character with the second/third most affection or even the least affection to get to say something.

Is comparison like this possible with the default RMMV editor? Or do I need a plugin for it? Thank you in advance.
No programmer ever has been able to compare more than one variable with one other. It always requires a sequence of two pair comparisons to compare more than one variable.
It is only that in some programming languages, this sequence is preprogrammed to use - but there is no technical way to have a Computer compare more than two variables in a single step.

Depending on what you want you'll need a sorting algorithm either implemented by a series of control variable and conditional branches or by script functions.
Like Andar says, you could do this with eventing and an awful lot of branches, but a sorted array is probably a better option. Perhaps a script call something like this?
Code:
var points = [], ids = [1,2,3,4,5];
ids.forEach(function(e) { points.push({ id: e, value: $gameVariables.value(e) }); });
points.sort(function(a, b) { return b.value - a.value; });
$gameVariables.setValue(6, points[0].id);
In English:
  • Let points be an empty array and ids be an array of the "lovePoint" variable IDs (in this case #1, #2, #3, #4, #5);
  • For each entry in ids, add a new entry into points containing the variable ID and the value of that variable;
  • Sort points descending by value, i.e. put the highest value at the start of the list;
  • Set variable #6 to the ID of the first entry in points, i.e. the ID of the highest-value variable.
You'll probably need to change the numbers for your situation, but I did a quick test and it worked for me! 🙏
I've tried caethyril's solution and it works. I'm quite new to coding, so I may need to look more into it. Thank you very much.

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-compare-multiple-variables-at-once.97606/