Follower Control Plugin by Tyruswoo

Discussion in 'JS Plugin Releases (RMMV)' started by Tyruswoo, Jan 19, 2016.

  1. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Follower Control
    Plugin by Tyruswoo
    For RPG Maker MV


    Download Link (DropBox):
    TYR_FollowerControl.js

    Be sure to keep the filename as shown above, in order for it to work.

    Save it in your project's js/plugins folder. Then, open your project and load the plugin with the Plugin Manager.

    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. This works on up to an infinite number of followers! 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
    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.
    Description:
    Follower Control allows you to control the movement of party followers using the Set Move Route command! Simply use the plugin command "Follower 1" or "Follower 2", etc., and then use Set Move Route on the player, and the desired follower will move instead of the leader! Use the plugin command "Follower 0" to make Set Move Route work as default, affecting the party leader.
    You can also use "Follower StopChase" so that leader movement no longer makes followers chase after the leader; this allows you to move the leader and followers around independently for making cool cutscenes! You can then use "Follower Chase" to make the followers chase the leader again.

    v 1.00: 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: Added the following options for followers:
    • Show Balloon Icon
    • Show Animation
    • Transfer Player
    v 1.02 and v 1.03: 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: 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.
    Please let me know if you have any suggestions to improve the plugin!

    Your Adventuring Companion,
    Tyruswoo

    Full Text of Plugin:
    //=============================================================================
    // Follower Control
    // by Tyruswoo
    //
    // Be sure to save as:
    // TYR_FollowerControl.js
    //=============================================================================

    var Imported = Imported || {};
    Imported.Tyruswoo_FollowerControl = true;

    var Tyruswoo = Tyruswoo || {};
    Tyruswoo.FollowerControl = Tyruswoo.FollowerControl || {};

    /*:
    * @plugindesc v1.04 Allows greater control of party follower movement, balloon icons, animations, and transfers.
    * @author Tyruswoo
    *
    * @Help
    * Follower Control
    * by Tyruswoo
    * Last Update: 20 Jan. 2016
    * ===========================================================================
    * Terms of Use:
    * This plugin is free to use in both commercial and non-commercial games.
    * However, in your credits, include "Tyruswoo", and please also send me
    * a free copy of your game! :)
    * ~Tyruswoo
    * ===========================================================================
    * Follow me for more RPG Maker MV content and tutorials!
    *
    * Tyruswoo RPG Maker on YouTube:
    * https://www.youtube.com/channel/UCEJBC5FIHEe2a81yk6KEA1g
    * ===========================================================================
    * Tyruswoo's Follower Control plugin allows greater control of party
    * follower movement. It allows using these commands on any follower:
    * - Set Move Route
    * - Show Balloon Icon
    * - Show Animation
    * - Transfer Player
    * Now you can easily make cool cutscenes involving the party's followers
    * and leader!
    * ===========================================================================
    * Plugin commands in brief:
    * Follower 0 // * Target the leader (for Set Move Route of player).
    * Follower 1 // * Target follower 1 (for Set Move Route of player).
    * Follower 2 // * Etc. Works for any number of followers.
    * Follower StopChase // * Followers stop chasing the leader.
    * Follower Chase // * Followers chase the leader again.
    *
    * For best results, use the above Plugin Commands in combination with the
    * Set Move Route command. Make cool cutscenes! :)
    * ===========================================================================
    * Example of how to use this plugin:
    *
    * Here is an example of using the Plugin Commands,
    * combined with the Set Move Route command.
    * Use the following commands within an event:
    *
    * Plugin Command: Follower StopChase // * This changes follower behavior.
    * // They no longer follow the leader.
    * Plugin Command: Follower 1 // * This makes the Set Move Route command
    * // target Follower 1 instead of the leader.
    * (Now Set Move Route of player.) // * Instead of the party leader, follower 1
    * // will move independently.
    * Plugin Command: Follower 0 // * This resets how Set Move Route works.
    * // Now it will target the leader again.
    * (Now Set Move Route of player.) // * The party leader will move, but the
    * // followers will not chase the leader,
    * // since we used "Follower StopChase".
    * Plugin Command: Follower Chase // * Resets follower behavior, so they
    * // chase the leader again.
    * ===========================================================================
    * Details of Plugin Commands to target a follower instead of the leader
    * for Set Move Route, Show Balloon Icon, Show Animation, or Transfer Player
    * commands.
    *
    * Example:
    * Follower 1
    * The plugin command "Follower 1" will make all future Set Move Route commands
    * affect the first follower, i.e. the character following the party leader.
    * This effect will continue until resetting by using the following
    * plugin command:
    * Follower 0
    * The plugin command "Follower 0" causes default behavior of all Move Route
    * event commands affecting the party leader.
    *
    * Important: Make sure you use plugin command "Follower 0" to reset, so
    * that future Set Move Route commands will affect the party leader!
    *
    * Number Codes:
    *
    * 0 = Leader
    * 1 = First Follower
    * 2 = Second Follower
    * 3 = Third Follower
    * 4 = Fourth Follower
    * 5 = Fifth Follower
    * And so on for an infinite number of followers, if present.
    *
    * If the selected follower is not present (i.e. the party is too small, and
    * that follower spot is not filled), then commands sent to that follower number
    * will have no effect.
    *
    * Notes on Transfer Player:
    * - No matter the follower/leader targeted, using a Transfer Player to go to
    * a new map will always rejoin the party, making the followers chase the
    * leader again, and setting the leader as the target (same as using
    * Plugin Command "Follower 0").
    * - If transferring to the current map, then the targetted follower determines
    * the effect of Transfer Player:
    * > If the leader is targeted (Follower 0), then we check whether
    * followers are chasing.
    * >> If they are chasing, then we perform a Transfer Player type
    * function, bringing the party together and performing the
    * chosen fade.
    * >> If the followers are not chasing, then the leader is
    * teleported without affecting the followers' positions.
    * > If a follower is targeted, then the follower is teleported
    * without affecting the other followers' or leader's position.
    *
    * Tip: If you want to transfer the followers and leader all independently
    * during a cutscene, then be sure to use Plugin Command "Follower
    * StopChase". That way, transfers of the leader within the same map
    * will no longer affect the followers, allowing for better cutscenes.
    * (Note that this also works with TYR_CameraControl, allowing for
    * the camera to stay focused on the correct camera target.)
    * ===========================================================================
    * Details of Plugin Commands to make followers stop and start following:
    *
    * Follower Chase
    * Makes all followers chase the leader and each other. This is the
    * default behavior of followers.
    *
    * Follower StopChase
    * Makes all followers stop chasing the leader and each other. This
    * is useful for cutscenes in which the party leader moves around
    * alone, allowing followers and leader to all move independently.
    * ===========================================================================
    * Synonyms: Here are a few alternate ways to write the same plugin command:
    *
    * For the term "Follower", you may type any of these:
    * Follower follower FOLLOWER
    * Follow follow Follow
    *
    * For the term "Chase", you may type any of these:
    * Chase chase CHASE
    * Chase True chase true CHASE TRUE
    * Chase Start chase start CHASE START
    *
    * For the term "StopChase", you may type any of these:
    * StopChase stopchase STOPCHASE
    * stopChase Stopchase
    * Chase False chase false CHASE FALSE
    * Chase Stop chase stop CHASE STOP
    * ===========================================================================
    * v1.00 January 17, 2016:
    * Created the plugin and added the following features:
    * - Plugin command "Follower" to select followers.
    * - Set Move Route effect on followers.
    * - Plugin commands "StopChase" and "Chase" to control followers
    * chasing the leader.
    *
    * v1.01 January 19, 2016:
    * Added the following features:
    * - Show Balloon Icon for followers.
    * - Show Animation for followers.
    * - Transfer Player for followers.
    *
    * v1.02 January 19, 2016:
    * Worked on fixing a bug. However, errors still occured. See below.
    *
    * v1.03 January 20, 2016:
    * Fixed the bug found on January 19th.
    * - Previously, the "Follower" plugin command had to be used prior to
    * ever using Set Move Route or other featured commands in your game;
    * If the "Follower" plugin command was not used first, the game would
    * freeze. Now, the plugin no longer requires this! If you never
    * use a "Follower" plugin command, your game will function as it
    * would by default, without errors.
    *
    * v1.04 January 20, 2016:
    * Added feature:
    * - If a follower is on the same tile as the leader, and then
    * Set Move Route is used to "Turn toward Player", then the
    * follower will now turn to face the same direction as the leader!
    * So, by using the Gather Followers event command, then using
    * Set Move Route "Turn toward Player", it is possible to make
    * followers be in a predictable position (right where the leader is),
    * from whence the followers can then be sent out in a pre-prepared
    * formation. This allows for ease of creating Common Events for
    * for your various formations of follower movement!
    *
    */

    //=============================================================================
    // Game_Interpreter
    //=============================================================================

    // Alias method.
    Tyruswoo.FollowerControl.Game_interpreter_clear = Game_Interpreter.prototype.clear
    Game_Interpreter.prototype.clear = function() {
    Tyruswoo.FollowerControl.Game_interpreter_clear.call(this);
    this._follower = $gamePlayer;
    };

    // Replacement method
    // Transfer Player
    Game_Interpreter.prototype.command201 = function() {
    if (!$gameParty.inBattle() && !$gameMessage.isBusy()) {
    var mapId, x, y;
    if (this._params[0] === 0) { // Direct designation
    mapId = this._params[1];
    x = this._params[2];
    y = this._params[3];
    } else { // Designation with variables
    mapId = $gameVariables.value(this._params[1]);
    x = $gameVariables.value(this._params[2]);
    y = $gameVariables.value(this._params[3]);
    }
    if (mapId !== $gameMap._mapId) { //Transfer the leader, with followers.
    $gamePlayer._followers._stopChase = false; //If player goes to a new map, followers will resume chase.
    this._follower = $gamePlayer; //If player goes to a new map, reset target follower to the leader.
    $gamePlayer.reserveTransfer(mapId, x, y, this._params[4], this._params[5]);
    this.setWaitMode('transfer');
    } else if (this._follower === $gamePlayer) {
    if (!$gamePlayer._followers._stopChase) { //Followers are chasing the leader, so transfer leader with followers.
    $gamePlayer.reserveTransfer(mapId, x, y, this._params[4], this._params[5]);
    this.setWaitMode('transfer');
    } else { //Followers are not chasing the leader, so simply teleport the leader within the map, like any other follower.
    Game_Character.prototype.locate.call($gamePlayer, x, y);
    if (Imported.TYR_CameraControl) {
    if ($gameMap._camFollow === 'player') {
    $gamePlayer.center(x, y);
    }
    } else {
    $gamePlayer.center(x, y);
    }
    $gamePlayer.makeEncounterCount();
    if ($gamePlayer.isInVehicle()) {
    $gamePlayer.vehicle().refresh();
    }
    }
    } else { //Transfer a follower.
    this._follower.locate(x, y);
    if (this._params[4] > 0) { // Set follower direction
    var d = this._params[4];
    if (!this._follower.isDirectionFixed() && d) {
    this._follower._direction = d;
    }
    }
    }
    this._index++;
    }
    return false;
    };

    // Replacement method
    // Set Movement Route
    Game_Interpreter.prototype.command205 = function() {
    $gameMap.refreshIfNeeded();
    this._character = this.character(this._params[0]);
    if (this._character === $gamePlayer) {
    this._character = this._follower;
    }
    if (this._character) {
    this._character.forceMoveRoute(this._params[1]);
    if (this._params[1].wait) {
    this.setWaitMode('route');
    }
    }
    return true;
    };

    // Replacement method
    // Show Balloon Icon
    Game_Interpreter.prototype.command213 = function() {
    this._character = this.character(this._params[0]);
    if (this._character === $gamePlayer) {
    this._character = this._follower;
    }
    if (this._character) {
    this._character.requestBalloon(this._params[1]);
    if (this._params[2]) {
    this.setWaitMode('balloon');
    }
    }
    return true;
    };

    // Replacement method
    // Show Animation
    Game_Interpreter.prototype.command212 = function() {
    this._character = this.character(this._params[0]);
    if (this._character === $gamePlayer) {
    this._character = this._follower;
    }
    if (this._character) {
    this._character.requestAnimation(this._params[1]);
    if (this._params[2]) {
    this.setWaitMode('animation');
    }
    }
    return true;
    };

    // Alias method
    Tyruswoo.FollowerControl.Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
    Game_Interpreter.prototype.pluginCommand = function(command, args) {
    Tyruswoo.FollowerControl.Game_Interpreter_pluginCommand.call(this, command, args);
    if (command === 'Follower' || command === 'follower' || command === 'FOLLOWER' ||
    command === 'Follow' || command === 'follow' || command === 'FOLLOW') {
    switch (args[0]) {
    case 'Chase':
    case 'chase':
    case 'CHASE':
    if (args[1] === 'false' || args[1] === 'False' || args[1] === 'FALSE' ||
    args[1] === 'stop' || args[1] === 'Stop' || args[1] === 'STOP') {
    $gamePlayer._followers._stopChase = true;
    console.log("Follower Chase false: Followers no longer chase the leader.");
    } else {
    $gamePlayer._followers._stopChase = false;
    console.log("Follower Chase: Followers now chase the leader.");
    }
    break;
    case 'StopChase':
    case 'stopChase':
    case 'Stopchase':
    case 'stopchase':
    case 'STOPCHASE':
    $gamePlayer._followers._stopChase = true;
    console.log("Follower StopChase: Followers no longer chase the leader.");
    break;
    default:
    var follower_position = parseInt(args[0]);
    if (follower_position > 0) {
    this._follower = $gamePlayer.followers().follower(follower_position - 1);
    console.log("Follower: Move Route commands now affect Follower", follower_position);
    } else {
    this._follower = $gamePlayer;
    console.log("Follower: Move Route commands now affect the party Leader.");
    }
    }
    }
    };

    //=============================================================================
    // Game_Followers
    //=============================================================================

    // Alias method
    Tyruswoo.FollowerControl.Game_Followers_initialize = Game_Followers.prototype.initialize;
    Game_Followers.prototype.initialize = function() {
    Tyruswoo.FollowerControl.Game_Followers_initialize.call(this);
    this._stopChase = false;
    this._follower = $gamePlayer;
    };

    // Replacement method
    Game_Followers.prototype.updateMove = function() {
    if (!this._stopChase) {
    for (var i = this._data.length - 1; i >= 0; i--) {
    var precedingCharacter = (i > 0 ? this._data[i - 1] : $gamePlayer);
    this._data.chaseCharacter(precedingCharacter);
    }
    }
    };

    //=============================================================================
    // Game_Character
    //=============================================================================

    // Replacement method
    Game_Character.prototype.turnTowardCharacter = function(character) {
    var sx = this.deltaXFrom(character.x);
    var sy = this.deltaYFrom(character.y);
    if (sx === 0 && sy === 0) {
    this.setDirection($gamePlayer.direction());
    } else if (Math.abs(sx) > Math.abs(sy)) {
    this.setDirection(sx > 0 ? 4 : 6);
    } else if (sy !== 0) {
    this.setDirection(sy > 0 ? 8 : 2);
    }
    };



    Plugin Help:
    The plugin's help content describes how to use the plugin commands, and is as follows:
    Follower Control
    by Tyruswoo
    Last Update: 20 Jan. 2016
    ===========================================================================
    Terms of Use:
    This plugin is free to use in both commercial and non-commercial games.
    However, in your credits, include "Tyruswoo", and please also send me
    a free copy of your game! :)
    ~Tyruswoo
    ===========================================================================
    Follow me for more RPG Maker MV content and tutorials!


    Tyruswoo RPG Maker on YouTube:
    https://www.youtube.com/channel/UCEJBC5FIHEe2a81yk6KEA1g
    ===========================================================================
    Tyruswoo's Follower Control plugin allows greater control of party
    follower movement. It allows using these commands on any follower:
    - Set Move Route
    - Show Balloon Icon
    - Show Animation
    - Transfer Player
    Now you can easily make cool cutscenes involving the party's followers
    and leader!
    ===========================================================================
    Plugin commands in brief:
    Follower 0 // * Target the leader (for Set Move Route of player).
    Follower 1 // * Target follower 1 (for Set Move Route of player).
    Follower 2 // * Etc. Works for any number of followers.
    Follower StopChase // * Followers stop chasing the leader.
    Follower Chase // * Followers chase the leader again.


    For best results, use the above Plugin Commands in combination with the
    Set Move Route command. Make cool cutscenes! :)
    ===========================================================================
    Example of how to use this plugin:


    Here is an example of using the Plugin Commands,
    combined with the Set Move Route command.
    Use the following commands within an event:


    Plugin Command: Follower StopChase // * This changes follower behavior.
    // They no longer follow the leader.
    Plugin Command: Follower 1 // * This makes the Set Move Route command
    // target Follower 1 instead of the leader.
    (Now Set Move Route of player.) // * Instead of the party leader, follower 1
    // will move independently.
    Plugin Command: Follower 0 // * This resets how Set Move Route works.
    // Now it will target the leader again.
    (Now Set Move Route of player.) // * The party leader will move, but the
    // followers will not chase the leader,
    // since we used "Follower StopChase".
    Plugin Command: Follower Chase // * Resets follower behavior, so they
    // chase the leader again.
    ===========================================================================
    Details of Plugin Commands to target a follower instead of the leader
    for Set Move Route, Show Balloon Icon, Show Animation, or Transfer Player
    commands.


    Example:
    Follower 1
    The plugin command "Follower 1" will make all future Set Move Route commands
    affect the first follower, i.e. the character following the party leader.
    This effect will continue until resetting by using the following
    plugin command:
    Follower 0
    The plugin command "Follower 0" causes default behavior of all Move Route
    event commands affecting the party leader.


    Important: Make sure you use plugin command "Follower 0" to reset, so
    that future Set Move Route commands will affect the party leader!


    Number Codes:


    0 = Leader
    1 = First Follower
    2 = Second Follower
    3 = Third Follower
    4 = Fourth Follower
    5 = Fifth Follower
    And so on for an infinite number of followers, if present.


    If the selected follower is not present (i.e. the party is too small, and
    that follower spot is not filled), then commands sent to that follower number
    will have no effect.


    Notes on Transfer Player:
    - No matter the follower/leader targeted, using a Transfer Player to go to
    a new map will always rejoin the party, making the followers chase the
    leader again, and setting the leader as the target (same as using
    Plugin Command "Follower 0").
    - If transferring to the current map, then the targetted follower determines
    the effect of Transfer Player:
    > If the leader is targeted (Follower 0), then we check whether
    followers are chasing.
    >> If they are chasing, then we perform a Transfer Player type
    function, bringing the party together and performing the
    chosen fade.
    >> If the followers are not chasing, then the leader is
    teleported without affecting the followers' positions.
    > If a follower is targeted, then the follower is teleported
    without affecting the other followers' or leader's position.


    Tip: If you want to transfer the followers and leader all independently
    during a cutscene, then be sure to use Plugin Command "Follower
    StopChase". That way, transfers of the leader within the same map
    will no longer affect the followers, allowing for better cutscenes.
    (Note that this also works with TYR_CameraControl, allowing for
    the camera to stay focused on the correct camera target.)
    ===========================================================================
    Details of Plugin Commands to make followers stop and start following:


    Follower Chase
    Makes all followers chase the leader and each other. This is the
    default behavior of followers.


    Follower StopChase
    Makes all followers stop chasing the leader and each other. This
    is useful for cutscenes in which the party leader moves around
    alone, allowing followers and leader to all move independently.
    ===========================================================================
    Synonyms: Here are a few alternate ways to write the same plugin command:


    For the term "Follower", you may type any of these:
    Follower follower FOLLOWER
    Follow follow Follow


    For the term "Chase", you may type any of these:
    Chase chase CHASE
    Chase True chase true CHASE TRUE
    Chase Start chase start CHASE START


    For the term "StopChase", you may type any of these:
    StopChase stopchase STOPCHASE
    stopChase Stopchase
    Chase False chase false CHASE FALSE
    Chase Stop chase stop CHASE STOP
    ===========================================================================
    v1.00 January 17, 2016:
    Created the plugin and added the following features:
    - Plugin command "Follower" to select followers.
    - Set Move Route effect on followers.
    - Plugin commands "StopChase" and "Chase" to control followers
    chasing the leader.


    v1.01 January 19, 2016:
    Added the following features:
    - Show Balloon Icon for followers.
    - Show Animation for followers.
    - Transfer Player for followers.


    v1.02 January 19, 2016:
    Worked on fixing a bug. However, errors still occured. See below.


    v1.03 January 20, 2016:
    Fixed the bug found on January 19th.
    - Previously, the "Follower" plugin command had to be used prior to
    ever using Set Move Route or other featured commands in your game;
    If the "Follower" plugin command was not used first, the game would
    freeze. Now, the plugin no longer requires this! If you never
    use a "Follower" plugin command, your game will function as it
    would by default, without errors.


    v1.04 January 20, 2016:
    Added feature:
    - If a follower is on the same tile as the leader, and then
    Set Move Route is used to "Turn toward Player", then the
    follower will now turn to face the same direction as the leader!
    So, by using the Gather Followers event command, then using
    Set Move Route "Turn toward Player", it is possible to make
    followers be in a predictable position (right where the leader is),
    from whence the followers can then be sent out in a pre-prepared
    formation. This allows for ease of creating Common Events for
    for your various formations of follower movement!
     
    Last edited: Jan 12, 2018
    #1
  2. ArkDG

    ArkDG Veteran Veteran

    Messages:
    141
    Likes Received:
    42
    First Language:
    portuguese
    Finally a really good follower control plugin! this works for balooms too?
    Thank you! ^^
     
    #2
    Tyruswoo likes this.
  3. McKathlin

    McKathlin Plugin dev, composer, artist Veteran

    Messages:
    49
    Likes Received:
    35
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    N/A
    Having a follower stand in for the player in Set Move Route is a really brilliant way to give them the full range of move route commands. Good thinking!  I've tried this out in my project, and I like how it's looking.
     
    #3
    Tyruswoo likes this.
  4. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV


    Hi ArkDG!


    I just added several more features:  You can now use these commands on your followers:

    • Set Move Route
    • Show Balloon Icon
    • Show Animation
    • Transfer Player

    Enjoy and share with your friends!


    ~Tyruswoo
     
    #4
    phamtruong1992 and ArkDG like this.
  5. signaltome

    signaltome Veteran Veteran

    Messages:
    37
    Likes Received:
    3
    Location:
    Norway
    First Language:
    English
    Man, I skipped over this for quite a while, it seemed way to complex for me back in the day (all of, what, three months ago? Whenever MV came out :) ) But I have had some events where the follower is supposed to do things and I have ha to mess with "remove from party" and creating an event with the followers image and argh! It has been a nightmare and never worked properly!


    And then I remembered THIS! And it is not complicated at all, once I got back into RPG maker again. So thank. Really. From the bottom of my heart. I see so much use out of this.


    Edit: Tested it out, worked like a charm! Makes my life so much easier. At least in RPG maker... :)
     
    Last edited by a moderator: Jan 26, 2016
    #5
    Tyruswoo likes this.
  6. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV


    Awesome!  I'm glad that it's working well for you!  Let me know if you have ideas for features that you'd like to see added in the future!
     
    #6
  7. signaltome

    signaltome Veteran Veteran

    Messages:
    37
    Likes Received:
    3
    Location:
    Norway
    First Language:
    English
    Any way of making them solid when StopChase? It is fine when I use it in cutscenes, but if I want to leave followers idling while exploring the room I keep walking through them... I know this is primarily for cutscenes and I can do that with events obviously so no worries. I am amazed you even did this! I don't doubt you skill, it is that it is possible at all. Which shows my ignorance I am sure.


    Random movement when not following and cutscened? Also, I can do that with events, just prodding the limit of the controls one have over the followers.
     
    Last edited by a moderator: Jan 29, 2016
    #7
  8. Tuomo L

    Tuomo L Oldbie Veteran

    Messages:
    2,056
    Likes Received:
    1,031
    Location:
    Finland!
    First Language:
    Finnish
    Primarily Uses:
    RMMV
    This is pretty gold. Is there a way to have the player turn towards a follower? For cutscene purposes, if the player turns and replies to a comment they made.
     
    #8
  9. signaltome

    signaltome Veteran Veteran

    Messages:
    37
    Likes Received:
    3
    Location:
    Norway
    First Language:
    English


    Sorry for barging in, but if I understood your question correctly, isn't that just a matter of shifting between Follower 1 and Follower 0 and a Player move route?


    Like, Plugin command:  Follower 1, Move player event Step left Turn- right, Show speech: "Hey boss, if..." | Plugin command: Follower 0, Move Player event Turn left, Show speech: "Yes, what is it my humble follower?"


    Auto event, step over event or whatever. :) Or I failed to grasp the question correctly and if so I am sorry. BD
     
    #9
  10. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV


    Hi signaltome,


    Having followers able to act like events is an intriguing idea!  However, events have so many capabilities that adding all those capabilities to followers would be difficult, and in the end would yield a result more difficult to use than events.  For this reason, it is recommended that once you have followers separated out into a room, you use one of the following event commands:

    • Change Party Member:  Remove the follower from the party if you want that follower to no longer appear in the party menu or battles.  If you want to add the actor again, use Change Party Member to add (and leave initialize box unchecked to keep stats).
    • Change Player Followers:  By using this and selecting Off, the followers' images will disappear from the map, but they will still appear in the party menu and in battles.  (Note that if you use Change Player Followers, you will probably also want to use Change Formation Access to remove the ability to change formation.)

    Events have so many advantages, so it is best to use one of the above commands to turn your followers into events as soon as possible, any time you want to interact with the followers.
     
    Last edited by a moderator: Jan 30, 2016
    #10
  11. signaltome

    signaltome Veteran Veteran

    Messages:
    37
    Likes Received:
    3
    Location:
    Norway
    First Language:
    English
    Yeah, that was what I did before your plugin, so I will continue to do so when the occasion calls for it. Though I did make the follower walk into and event that got triggered wit a walkover event, so that I could walk around the room and then go up and "pick up" my follower again, the event he was standing over being a action button event containing your FollowerChase command as well as to once again remove the event so that it was not there.


    Endless possibilities even with what you have given us. I still love this plugin. Though I keep kalling them mods, becuse that is what they really are, right? modifications to the base game. ;) Anyway, just seeing if some of that could be done. Thanks anyway!
     
    #11
    Tyruswoo likes this.
  12. Nev

    Nev Veteran Veteran

    Messages:
    33
    Likes Received:
    3
    First Language:
    English
    Hi, really useful plugin but I notice that when I stop the follower from chasing the player he still "jumps" when I command the player to jump in one of my cutscenes. Is this an oversight or am I doing something wrong? I'm using the Follower 0 plugin command.
     
    #12
  13. signaltome

    signaltome Veteran Veteran

    Messages:
    37
    Likes Received:
    3
    Location:
    Norway
    First Language:
    English


    I met with this a few times as well, but just fiddle with the plugin command a few times and it seems to sort it out. Also, remember to have no spaces before "Follower 0" in the line. Learned that from other plugins! BD
     
    #13
  14. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV



    Hi Nev,


    If you are still having this problem after checking it over again, let me know.  If so, be sure to include a detailed breakdown of the order of the event's commands and what happens to which character/follower/leader.  Also, you could consider making a short video in which you show your event's commands, then what happens when you playtest, as that would give me the best understanding of what is happening.


    Thank you!  I hope the plugin is proving useful!
     
    #14
  15. gilgamar

    gilgamar Veteran Veteran

    Messages:
    132
    Likes Received:
    53
    Location:
    Alberta, Canada
    First Language:
    English
    Very cool script.


    One thing I found is the script does not work for changing follower transparency or opacity. It seems bound to $gamePlayer. It would be really cool to independently control this setting without having to event each follower, not sure if that is possible or not though. It seems like it should be since each follower has an _opacity property and a setOpacity method. Perhaps it would be possible to clone the follower into a new event to temporarily apply more settings to it and then have it rejoin with $gamePlayer when finished.


    Update


    I wonder if we can extend this script with Hudell's Orange Custom Event to break off a follower as a custom event. I think I'll add a new plugin command to make this easy if it works.

     
    Last edited by a moderator: Mar 8, 2016
    #15
  16. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    76
    Likes Received:
    55
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV


    Those are all great ideas!  I appreciate the feedback, and I'll look into adding transparency and opacity into the base plugin when I can!
     
    #16
  17. gilgamar

    gilgamar Veteran Veteran

    Messages:
    132
    Likes Received:
    53
    Location:
    Alberta, Canada
    First Language:
    English
    I looked into the Orange Custom Event and it was overly complicated way to go about it. I think the visibility issue might just be something as simple as a missing this._followers.refresh(); to update the sprite. I'll give it a try and see if it works.
     
    Last edited by a moderator: Mar 8, 2016
    #17
    Tyruswoo likes this.
  18. gilgamar

    gilgamar Veteran Veteran

    Messages:
    132
    Likes Received:
    53
    Location:
    Alberta, Canada
    First Language:
    English
    I think this is the culprit

    Code:
    
    Game_Follower.prototype.update = function() {
        Game_Character.prototype.update.call(this);
        this.setMoveSpeed($gamePlayer.realMoveSpeed());
        this.setOpacity($gamePlayer.opacity());
        this.setBlendMode($gamePlayer.blendMode());
        this.setWalkAnime($gamePlayer.hasWalkAnime());
        this.setStepAnime($gamePlayer.hasStepAnime());
        this.setDirectionFix($gamePlayer.isDirectionFixed());
        this.setTransparent($gamePlayer.isTransparent());
    };
     
    #18
    Tyruswoo likes this.
  19. gilgamar

    gilgamar Veteran Veteran

    Messages:
    132
    Likes Received:
    53
    Location:
    Alberta, Canada
    First Language:
    English
    Have not tested extensively but I think this does the trick and possibly fixes a few other issues as well. Whether or not it introduces new issues is yet to be discovered.

    //=============================================================================
    // Game_Follower
    //=============================================================================

    // Replacement method (Added by Gilgamar 2016.03.07)
    Game_Follower.prototype.update = function() {
    Game_Character.prototype.update.call(this);
    if (!$gamePlayer._followers._stopChase && !$gamePlayer._followers._stopCopy) {
    this.setMoveSpeed($gamePlayer.realMoveSpeed());
    this.setOpacity($gamePlayer.opacity());
    this.setBlendMode($gamePlayer.blendMode());
    this.setWalkAnime($gamePlayer.hasWalkAnime());
    this.setStepAnime($gamePlayer.hasStepAnime());
    this.setDirectionFix($gamePlayer.isDirectionFixed());
    this.setTransparent($gamePlayer.isTransparent());
    }
    };



    This will separate the follower and leader properties shown above if stopChase is set.


    It should fix independent move speed, blend modes, opacity, transparency, walk and stepping anime modes and also direction fix issues.


    Feel free to add this to your script. If you'd like to credit me you can do so in the script itself above the given function. Then you can also blame me if things go wrong =P


    Update


    Added new check for followers._stopCopy so that you can set opacity independently while still following leader. I used this to set the opacity of the followers one at a time while they pass behind a waterfall.
     
    Last edited by a moderator: Mar 8, 2016
    #19
    Tyruswoo likes this.
  20. gilgamar

    gilgamar Veteran Veteran

    Messages:
    132
    Likes Received:
    53
    Location:
    Alberta, Canada
    First Language:
    English
    I noticed there are more controls in Game_Character.prototype.update.call(this) having to do with jumping. I believe this is the issue @Nev was having. If I wrap that call inside the chase/copy check it should fix that issue also. I've wrapped it all up plus an alias for better compatibility.

    // Alias method (Added by Gilgamar 2016.03.07)
    Tyruswoo.FollowerControl.Game_Follower_update = Game_Follower.prototype.update;
    Game_Follower.prototype.update = function() {
    if (!$gamePlayer._followers._stopChase && !$gamePlayer._followers._stopCopy) {
    Tyruswoo.FollowerControl.Game_Follower_update.call(this);
    }
    };



    Update


    Welp, that was a bad idea wrapping up the  Game_Character.prototype.update.call(this). At least for stopCopy it is a bad idea since the followers wont update the walk animation and just snap to the player. It might work fine for stopChase. Need to dissect this function further.
     
    Last edited by a moderator: Mar 8, 2016
    #20
    Tyruswoo likes this.

Share This Page