[RMMZ] (Help) Affinity System and Status Menu

I'm trying to implement a Affinity System for my project, using Visustella plugins.

There are a few, important steps that I'm following:

There are 8 playable characters in my game, each of them excels in a specific parameter:

- Brenda (HP)
- Cedric (MP)
- Yvanna (Physical Defense)
- Argus (Magic Defense)
- Makuro (Physical Attack)
- Mahara (Magic Attack)
- Flora (Agility)
- Corvo (Luck)

Then, i've created 28 Affinity Variables:
Affinity.jpg

Thanks to Visustella Plugins, I was capable to run a Common Event at the end of each battle. This common event checks if each pair of characters is in the group, and then raises the Affinity of this pair in 1 point.

My idea is to use these variable values to determine the bonus of a passive state that raises the actor's parameters based on their ally's best parameter.

E.G: Brenda and Cedric have an Affinity value of 15. When they are fighting together, Brenda gains a bonus to her Max MP based on 15% Cedric's Max MP, while Cedric gains a bonus tohis Max HP based on 15% of Brenda's Max HP.

Here are my questions:
- How do I set these states for them to behave like this?
- How could I make a Status Window that shows each character's Affinity (maybe using Visustella's Main Menu Core?)

I know there's a lot to be answered here, and I thank you guys for the attention.
I would recommend checking out the VisuStella Elements and Status Menu Core plugin. This allows you to customize the Status screen with various elements, properties, and parameters, which could work really well for your Affinities. If you dive into some of the JavaScript code in the plugin, you can set certain variables to show up on the screen as well.

In terms of making the states behave, I'm not entirely sure which part of the states you're looking for advice on how to create, though I have an idea based on my understanding of a part of this system. My first thought is that you create a series of conditional branches, or a loop perhaps, that checks each variable against each other (i.e. if Max MP > Max HP, then set the affinity variable to Max MP). Then, depending on which stat that is, it'll take that variable number and add it to their stats before the battle (and potentially remove this at the end of the battle, if it's only meant to be for that battle).

Hopefully this helps with what you're trying to do!

Original thread: https://forums.rpgmakerweb.com/threads/rmmz-help-affinity-system-and-status-menu.125985/