RPG Maker MV

Plugins and Tutorials by the Tyruswoo Team
TYR_FollowerControl.js

Plugin for RPG Maker MV
Terms:  For just a $1/month membership on Patreon, you gain access to all my downloadable content!  Patrons and former patrons may use my plugins for any purpose, commercial or non-commercial.  Please also credit me as Tyruswoo in your credits.  Sending me a free copy of your game is appreciated, but not required.

How to Use:
Follower Control allows you to use the following event commands on the party followers:
  • Set Move Route   
  • Show Balloon Icon
  • Show Animation
  • Transfer Player

This is great for cutscenes!  In order to use the above on followers, you will need to target the follower using a plugin command.  For example:
  • Plugin Command:  Follower 1
The above targets the first follower.  To reset the target to the leader, use the following:
  • Plugin Command:  Follower 0

To indicate whether the followers chase the leader, you can use one of the following:
  • Plugin Command:  Follower StopChase
  • Plugin Command:  Follower Chase

You can also target a follower based on the value of a variable:
  • Plugin Command:  Follower Variable
Where is the variable ID of desired variable. For example, Follower Variable 27 will use the value of variable 27.  If variable 27's value is 3, the third follower will be targeted. If variable 27's value is 0 or has not been set, then the party leader will be targeted.

Or, you can target a follower based on the associated actor's ID:
  • Plugin Command:  Follower Actor
Where is the actor ID. For example, Follower Actor 39 will find the follower associated with actor 39.  If the formation of the party changes, this still targets the correct follower, based on the actor ID.

Or, you can target a follower based on the associated actor's name:
  • Plugin Command:  Follower
Where is the actor's name. For example, Follower Harold will find the follower associated with the actor named "Harold".  If the formation of the party changes, this still targets the correct follower, based on the actor's name. This is convenient, but if you allow players to change actors' names, you may wish to use the Follower Actor plugin command instead.

That's all there is to it!

Tip:  You can use Common Events (in the Database) to set up your favorite move route sequences for the followers and leader!  Then use the "Common Event..." command in an event to call the same move route sequences from various places in your game!  This way, you can have a collection of cutscene-style sequences that occur during certain events, such as entering or leaving a map, or talking with special NPCs as you prepare for cutscenes, or for sleeping at an inn, etc!


Note:  Using Set Move Route to turn by degrees, you can have the same move route sequence be used when the player is facing various directions!

Note:  You may consider using the Gather Followers event command to bring followers to one location, then use Set Move Route "Turn toward Player" for each follower to make them face the same direction as the party leader.  Doing this allows you to have your followers in a predictable location and direction, from which you can then send them out into the desired move route sequence.


Version History:

v 1.00, Jan. 17, 2016:  Added the following features:
  • Plugin command "Follower" to select a follower or re-select the leader.
  • Set Move Route effect on followers.
  • Plugin commands "Follower StopChase" and "Follower Chase" to determine whether followers chase the leader.

v 1.01, Jan. 19, 2016:  Added the following options for followers:
  • Show Balloon Icon
  • Show Animation
  • Transfer Player

v 1.02, Jan. 19, 2016; and v 1.03, Jan. 20, 2016:
  • Corrected a bug that made "Follower 0" have to be called at least once in your game prior to "Set Move Route" working.

v 1.04, Jan. 20, 2016:  Added a small but useful feature:
  • Now if a follower is on the same tile as the leader, and Set Move Route is used on the follower to make it "Turn toward Player", the follower will then turn to face the same direction as the leader.

v 1.05, Sept. 4, 2018:  Added the following:
  • Now, when StopChase is on, and the leader's MoveRoute is caused to jump, the followers will not jump.

v 1.06, Dec. 22, 2018:  Added the following:
  • Now it is possible to select a follower based on a variable's value, using the plugin command "Follower Variable " where is the ID of the variable.  Example: "Follower Variable 17" will use the value of variable 17 to select a follower. If Variable 17 is zero or has not yet been set using a Control Variables event command, then the party leader will be selected.
  • Now it is possible to select a follower based on an associated actor's name, using the plugin command "Follower " where is the name of the actor.  Example: "Follower Harold" to select the follower associated with Harold.

v 1.07, Dec. 31, 2018:  Added the following:
  • Now it is possible to select a follower based on an associated actor's ID, using the plugin command "Follower Actor " where is the ID of the actor.  Example: "Follower Actor 39" to select the follower associated with actor 39.

v 1.08, Feb. 27, 2019: Added the following:
Followers can be set to have unique qualities of the following, using Set Move Route:
  • Opacity (great for "ghost" followers!)
  • Blend Mode
  • Walk Animation On/Off
  • Step Animation On/Off (great for cutscenes!)
  • Direction Fix On/Off
  • Transparency On/Off
Note: For these qualities, followers will retain their individual qualities. However, if StopChase is Off, and one of these qualities is applied to the player, then the same quality will be applied to all followers, as well. Therefore, if you want to apply any of the above qualities to only the leader, StopChase must be On.
Also Note: Followers will now retain their own Move Speed as long as StopChase is On, even if the followers are moving and the player is moving at the same time. (However, unlike the above qualities, if StopChase is turned back Off, followers will immediately be reset to the player's Move Speed.)


v 1.09, March 9, 2019: A new script call was added, which can be used within the Set Move Route command to make any follower pathfind to any coordinates on the map, to any of the current map's events, or to any follower.
How to Use: First, select the desired Follower.  Then, within the Set Move Route command, use one of these scripts:
  • this.path(x, y) where x is the target x coordinate, and y is the desired y coordinate.
  • this.path("event", eventID) where eventID is replaced with the desired event's ID number. The first argument, "event", causes the script to seek an event, so "event" should be left as is, in quotes.
  • this.path("follower", F) where F is replaced with the number for the desired follower: 0 for the party leader, 1 for the first follower, 2 for the second follower, 3 for the third follower, etc.  The first argument, "follower", causes the script to seek a target follower, so "follower" should be left as is, in quotes.
For whichever of the above pathing arguments you use, the player or follower will only move one step each time you call the script.  You can use the script as many times as you need, in order to make the player or follower step toward the target for that many steps.
Note: This script call also works for events.  Just use the script call within Set Move Route.
Also Note: This script call has no variability, so it always finds the straightest path, and will always yield the same result every time.  (This is different from the "Approach" movement type, which has randomness, producing variability.)

Please let me know if you have any suggestions to improve the plugin!

Your Adventuring Companion,

Tyruswoo