In my RPG that I am making I was wanting to have an affinity system like in Xenoblade Chronicles.For those who are unfamiliar with this system, in Xenoblade after battles the characters who fought in that battle would gain relations with each other.
I know how I could track all of these characters relations with one another with several variables (one for every combination of two characters in the party), however what I am many wanting to do 2 things:
1. Have a way to after a battle have the game find out which characters are in the battle, then trigger a common event based on the participants.
2. See when ever one characters use an item (or healing spell) on another, then trigger a common event based on the two charterers involved.
I've moved this thread to RPGMaker MV. Please be sure to post your threads in the correct forum next time. Thank you.
It may be that you can only do this using a plugin, in which case it will have to be moved again, but it's at least worth seeing if there is another way.
How are you thinking of triggering a common event based on what characters are in a battle?
If your party consist of two, that's three potential combinations - actor 1 only, actor 2 only, actors 1 and 2.
If your party consists of three, that's seven potential combinations, actor 1, 2 or 3 only, 1&2, 1&3, 2&3, 1&2&3.
You can see how it gets much more complex with each additional actor. Are you saying you'll have that many common events and will trigger one of them depending on the combination? Or that you'll have one common event and use conditional branches to determine how it should behave?
Same with the common events using a spell - if you have 4 actors, the number of combinations is 8: 1->2, 1->3, 1->4, 2->1, 2->3, 2->4, 3->1, 3->2, 3->4, 4->1, 4->2, 4->3 - and that's assuming they can't use the spell on themselves.
You could do it with a common event (or a number of common events) using variables and lots of conditional branches. If you use random battles rather than on-map enemies, it gets a little harder - in that case I wrote a plugin that turns on a switch depending on the battle outcome, that might come in handy. Then you'd just need to look at who's in the battle party (which I think you can get using Control Variables). For the skills, you could put the user's and target's ids into two variables in the damage formula, then associate a common event with the skill, and use those variables in the common event.
I think it would be far less work for you if you had a plugin to do it, but you would need to define what's meant to happen (what WOULD you have put into the common events?) I think you SHOULD try and create a common event to do this stuff, so you can get the logic right in your head, and make note of all the details that need to be provided. Then you'll be able to pass along that information to someone else who can put it into a plugin.