RM2K3 only.
1. SwitchesYou need to make quite a few switches in order for this to work.
- Influence
- <Hero Name> Attack (you need one for each hero in your game)
- <Hero Name> Trigger (you need one for each hero in your game)
- <Hero Name> In Party (you need one for each hero in your game)
2. VariableYou only need two variables for this skill to be coded.
- Influence Chance
- <Hero Name> HP (you need one for each hero in your game)
3. The SkillsYou obviously need to make one skill called “Influence”. This should be a switch skill that triggers a switch called “Influence”. Set the MP cost to whatever you want etc. This skill should be given to the Monster Leader.
You also need to make a bunch of skills that trigger the enemies to attack the correct target once Influence is in effect. These should all be called “Attack” to maintain the right effect, but each will be linked to a different hero in your game so you need one for each hero in the game. Be sure to remember which one is which. Each “Attack” skill should be a switch skill and should trigger one of the “<Hero Name> Trigger” switches.
These “Attack” skills should be given to the Monsters who are going to be influenced and should be set up so that they can only be used when the appropriate “<Hero Name> Attack” switch is on. Make sure that these skills have their priority set to 100 so that they will ALWAYS be used when Influence comes into effect. Try and set the Monsters other skills to as low a priority as possible.
4. Battle Event CodingThe next step is to make the Battle Events themselves. First you need a page that is triggered by the "Influence" switch being on. The code should be something akin to the following (this example is coded as if the game only has two heroes; for your own game you’ll need to adjust the variables accordingly and repeat the “Branch If Variable” condition for however many heroes you have. Be careful to link the switches etc. properly.
Variable Operation: [Influence Chance] Set Random (1-2)
Branch If Variable [Influence Chance] = 1
Branch If Switch [Zack Is In Party] = On
Variable Operation: [Zack HP] Set Zack HP
Branch If Variable [Zack HP] >= 0
Message: The enemies were influenced to attack Zack!
Switch Operation: [Attack Zack!] Turn On
Switch Operation: [Attack Albert!] Turn Off
COMMENT: Make sure to turn off all the other Attack switches, and only turn on the correct one.
Else Handler
Variable Operation: [Influence Chance] +1
End Case
Else Handler
Variable Operation: [Influence Chance] +1
End Case
End Case
Branch If Variable [Influence Chance] = 2
Branch If Switch [Albert Is In Party] = On
Variable Operation: [Albert HP] Set Albert HP
Branch If Variable [Albert HP] >= 0
Message: The enemies were influenced to attack Albert!
Switch Operation: [Attack Albert!] Turn On
Switch Operation: [Attack Zack!] Turn Off
Else Handler
Variable Operation: [Influence Chance] Set = 1 #Set = 1 only on the LAST hero. All other heroes should have +1
End Case
Else Handler
Variable Operation: [Influence Chance] Set = 1
End Case
End Case
Switch Operation: [Influence] Turn Off
The above page of the event will set the enemies to attack only one of the possible heroes when the Monster Leader uses the Influence skill. The above page also checks if the hero targeted is alive and in the party and chooses another hero to be targeted if they are not. These are important steps to make sure the game doesn't crash later on.
The next step is to make the page for what happens when the enemies are under the influence of their Monster Leader.
You will need one event page per hero present in the game. I will show an example below for the case were Zack is the target the Monster Leader has influenced the Monsters to attack. Each page should be set so it is triggered by the appropriate “<Hero Name> Attack” switch being on.
The code for the event should be as below. Remember to make the event for each hero in your game.
Branch If Switch [Trigger Zack] Is On
Call Common Event: Attack Zack
End
Pretty simple, really, because the point is to make sure it links up properly.
5. Common Event CodingObviously, the Common Events are the next step to make. You need one Common Event for each hero. The code for these Common Events is very simple and is something like what’s shown below. The Common Event should be set to “Call”.
Simluated Attack: Zack with X power.
Switch Operation: [Trigger Zack] Turn Off
The X in the Simulated Attack above should be set to the attack level of the monster. I guess it's up to you how you set the Simulated Attack up though.
Another Common Event you need to set-up is one that checks which Heroes are in the party. This event will change "<Hero Name> In Party" accordingly. Set this Common Event to be a Parallel Process and set it up like this.
Branch If Zack Is In The Party
Switch Operation: [Zack Is In Party] Turn On
Else Handler
Switch Operation: [Zack Is In Party] Turn Off
End Case
Branch If Albert Is In The Party
Switch Operation: [Albert Is In Party] Turn On
Else Handler
Switch Operation: [Albert Is In Party] Turn Off
End Case
Obviously, you need to make sure you have this set up properly for each Hero that is going to be in your game.
The final Common Event you have to set up is one that resets all the Switches above so that they are reset by the time the next battle starts. This Common Event should be set to be a parallel process as well.
Switch Operation: [Influence] Turn Off
Switch Operation: [<Hero Name> Attack] Turn Off
Switch Operation: [<Hero Name> Trigger] Turn Off
Make sure you turn off all the “Attack” and all the “Trigger” switches or else the Influence skill will trigger as soon as a new battle begins.