RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RM2K/3] Breath of Fire III "Influence" Skill

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 84
puking up frothing vitriolic sarcastic spittle
RM2K3 only.

1. Switches

You need to make quite a few switches in order for this to work.

- Influence
-  Attack (you need one for each hero in your game)
-  Trigger (you need one for each hero in your game)
-  In Party (you need one for each hero in your game)

2. Variable

You only need two variables for this skill to be coded.

- Influence Chance
-  HP (you need one for each hero in your game)

3. The Skills

You 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 "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 "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 Coding

The 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.

Code: [Select]
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 "Attack" switch being on.
The code for the event should be as below. Remember to make the event for each hero in your game.

Code: [Select]
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 Coding

Obviously, 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".

Code: [Select]
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 " In Party" accordingly. Set this Common Event to be a Parallel Process and set it up like this.

Code: [Select]
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.

Code: [Select]
Switch Operation: (Influence) Turn Off
Switch Operation: ( Attack) Turn Off
Switch Operation: ( 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.