Follower Control Plugin by Tyruswoo

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

Thread Status:
Not open for further replies.
  1. Raol

    Raol Cat Magic Wizard Veteran

    Messages:
    50
    Likes Received:
    97
    Location:
    Italy
    First Language:
    Italian
    Primarily Uses:
    RMMV
    Awesome! Is this compatible with Yanfly Party Core?
     
    #61
  2. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    96
    Likes Received:
    67
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I haven't tried this with Yanfly's Party Core plugin. I suspect that you'll want to place Yanfly's plugin higher in the list, and my plugin lower in the list. If you find a bug, let me know, so I can put it on my list of things to look into!
     
    #62
  3. BloodMists

    BloodMists Villager Member

    Messages:
    7
    Likes Received:
    2
    First Language:
    English
    Primarily Uses:
    Other
    It kind feels like I'm necroing here but since the thread is open, I have both a question and possible suggestion. Question: Is it possible to get a followers coords, and how would one do so? Suggestion: If possible, and if no simpler way exists, add to the plugin a command to get a followers coords.
     
    #63
  4. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,057
    Likes Received:
    10,702
    First Language:
    English
    Primarily Uses:
    RMVXA
    @BloodMists No need to worry about necroposting a plugin thread, as that rule does not apply to this type of thread. We know that queries from users can emerge long after the 30 days since the last post.
     
    #64
  5. Wildy333

    Wildy333 Veteran Veteran

    Messages:
    16
    Likes Received:
    5
    First Language:
    English
    This plugin saved my life, thank you so much.
     
    #65
    Tyruswoo likes this.
  6. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    96
    Likes Received:
    67
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    It is definitely possible to get a follower's coords. Here is an example in which I created an event that tells me where a follower is located.

    Event commands:
    Code:
    Control Variables : #0119 = $gamePlayer._followers.follower(0).x
    Control Variables : #0120 = $gamePlayer._followers.follower(0).y
    Text : None, Window, Bottom
    :    : Follower 1 is at \V[119], \V[120].
    In the above example, I created an event, and then used the Control Variables command twice (using the Control Variables script option), and the Show Text command once. I assign values to variables (I use variable IDs 119 and 120, but you can use any variables you want), and then use a ShowText command to make the event tell me the contents of the variables.
    • In this case I want to know where the first follower is located, so I use follower(0).x and follower(0).y
    • If I wanted to know where the second follower is located, I would use follower(1).x and follower(1).y
    I hope that helps!

    This is a good suggestion. I think the above event commands are simple enough, though. Let me know if you have difficulty getting it to work. I might make a video on how to do this in the future.
     
    #66
  7. roguewolf

    roguewolf Villager Member

    Messages:
    6
    Likes Received:
    0
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    This plugin looks great.
    But i'm having this error: this._data.chaseCharacter is not a function
    Why is that?
     
    #67
  8. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    96
    Likes Received:
    67
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Could you provide some more information about how you used the plugin, what other plugins you have installed, etc? Usually the best way to go about debugging plugins is to figure out which other plugin(s) are conflicting, which can be done by seeing if disabling one of the other plugins makes this plugin run. If two plugins are found to be conflicting, then it is most likely a compatibility problem between the two.

    Another way to check is to see if you can install my FollowerControl plugin on a new project, and test it like that. If it works there, then you know you have installed it correctly, and there must be a different plugin conflicting that makes it not work with another project.
     
    #68
    roguewolf likes this.
  9. Champstead

    Champstead Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    Is there any way to prevent party members from following 'jump' commands? Even when set to 'StopChase', followers still seem to jump when the leader does. Ideally I'd like to set it up so that it works something like:
    Leader jumps to platform, followers all move forward one space.
    Leader jumps to next platform, follower 1 jumps to preceding platform, followers 2 and 3 move forward, etc. until eventually all party members cross and regroup on the other side.
    This might be an overly complex method, but it would look better than the standard RM style of all party members jumping simultaneously and landing on the same spot.
    Thanks for your help!
     
    #69
  10. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    96
    Likes Received:
    67
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Updated the plugin to fix this issue. Please re-download to obtain the new code.

    The following code was added:
    Code:
    //==============================================================
    // Game_Player
    //==============================================================
    
    // Replacement method
    Game_Player.prototype.jump = function(xPlus, yPlus) {
        Game_Character.prototype.jump.call(this, xPlus, yPlus);
        if (!this._followers._stopChase) {
            this._followers.jumpAll();
        }
    };
    
    Thanks for reminding me of this issue. I experienced this in my team's project, as well. I have updated this plugin so that when StopChase is active, making the leader jump does not make followers jump.

    Note that when StopChase is on, you will need to event each follower's jump individually; it does not automatically make them jump when the leader walks.

    Let me know if you encounter any issues with the updated code.
     
    #70
  11. Champstead

    Champstead Villager Member

    Messages:
    6
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    Great job, it seems to work exactly as intended. This certainly opens up a lot more opportunities.

    Thanks for your help!
     
    #71
    Tyruswoo likes this.
  12. BloodMists

    BloodMists Villager Member

    Messages:
    7
    Likes Received:
    2
    First Language:
    English
    Primarily Uses:
    Other
    Hi, it's me again. First, really liking the update, now I'm not sticking my followers in walls by accident any more. Second, is there a way to use variables to set the selected follower? It's not a big issue tbh, but it would be nice to be able to make a simple loop for the followers to make the same action, just one at a time, without repeating the move set a bunch of times or having an array of conditionals to select the follower.

    For example
    Code:
    loopCount == 0
    Loop
     If loopCount = 3
     {
       Break Loop
     }
      Else
      {
       Follower $gameVariable.value(loopCount)
       Move Route Here
       loopCount += 1
      }
    Repeat
    as opposed to this
    Code:
    loopCount == 0
    Loop
     If loopCount = 3
      {
       Break Loop
      }
      Else
       {
        If loopCount = 1
         {
          Follower 1
         }
         Else
          {
            If loopCount = 2
            {
              Follower 2
            }
            Else (Bla bla bla...)
          }
        Move Route Here
        loopCount += 1
       }
    Like the examples show, I know ways to do what I want, but I don't like having the large arrays of conditionals.

    Thank you kindly,
    -Blood
     
    #72
  13. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    96
    Likes Received:
    67
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    TYR_FollowerControl.js has been updated to version 1.06. The following features have been added:
    - It is now possible to select a follower based on a variable's value.
    - It is now possible to select a follower based on the associated actor's name.

    Example:
    Let's cycle through our player's party of four members, and have each do a jump, in turn.
    Code:
    Control Variables : #0017 Follower ID = 0
    Plugin Command : Follower StopChase
    Loop
         Plugin Command : Follower Variable 17
         Set Movement Route : Player (Wait)
                            : Jump : +0, +0
         Control Variables : #0017 Follower ID += 1
         If : Follower ID > 3
              Break Loop
         End
    Repeat Above
    Plugin Command : Follower chase
    Plugin Command : Follower 0
    Example:
    Let's have Harold jump.
    Code:
    Plugin Command : Follower Harold
    Set Movement Route : Player (Wait)
                       : Jump : +0, +0
    Plugin Command : Follower 0
    I've tested TYR_FollowerControl.js in its current state to eliminate any bugs, but please let me know if you experience any bugs in this update. The link at the top of this thread has been updated.
     
    #73
  14. BloodMists

    BloodMists Villager Member

    Messages:
    7
    Likes Received:
    2
    First Language:
    English
    Primarily Uses:
    Other
    Not what I expected but I am so happy! Thank you so much, it works wonderfully.
     
    #74
    Tyruswoo likes this.
  15. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    96
    Likes Received:
    67
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I recently made some new ways to target followers.

    You can target a follower based on the actor's ID, like this:
    Follower Actor 39
    to target the follower associated with actor 39.

    Or, target a follower based on the name of the actor:
    Follower Harold
    to target the follower associated with the actor named "Harold".
    Note: If you allow the player to change actors' names, it will read the current name of the actor, based on whatever the player named that actor. If this is an issue, then I suggest targeting the follower based on actorID, instead.

    Or, target a follower based on the value of a variable:
    Follower Variable 27
    to target a follower based on the value of variable 27. If variable 27's value is 3, then follower 3 will be targeted. If variable 27 is zero or has not been set, then the party leader will be targeted.

    It's been awhile since your post, but I thought I'd let you know about this update.

    The plugin update is now available via the main download link at the beginning of this thread.
     
    #75
  16. Espilonarge

    Espilonarge Veteran Veteran

    Messages:
    117
    Likes Received:
    51
    Location:
    Australia
    First Language:
    English
    Thanks for the update. I'll get around soon to testing it out. :)
     
    #76
  17. deadyfinger

    deadyfinger Villager Member

    Messages:
    9
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    @Tyruswoo
    I have no idea that is a bug or not but this is now a blocker of my project.
    I'm using Moghunter's character pose plugin in which supports more frame with various character pose status as idle, dash, jump and more.
    This case happens as below as:
    1. Use follower stopChase
    2. During the leader character movement, the stopped follower is not animated
    3. But once the leader stops and the follower character re-animated.
    Basically, if the leader is moving and the follower doesn't animate.
    Do you have any solution or idea, could you teach me how to do it?
    Thank you
     
    #77
  18. Tyruswoo

    Tyruswoo Game Designer Veteran

    Messages:
    96
    Likes Received:
    67
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I suspect the difficulty is associated with whether the follower's _stepAnime not being read correctly (or possibly being set incorrectly). _stepAnime is read by the function
    Game_CharacterBase.prototype.hasStepAnime
    which is called by several functions, including
    Game_Follower.prototype.update
    which is called by
    Game_Followers.prototype.update
    which is called by
    Game_Player.prototype.update

    I am not sure, but I suspect the best way to fix this is within the Game_Follower.prototype.update method. The line of code I am most suspicious of is this one:
    this.setStepAnime($gamePlayer.hasStepAnime());
    which seems to be imparting the leader's _stepAnime to the followers, which may not be what we want,
    although I am not sure of this, yet.

    This follower control plugin may need to alter the Game_Follower.prototype.update method so that it correctly determines the _stepAnime of followers, even when the leader is doing something. I may try to experiment with this.
     
    #78
    deadyfinger likes this.
  19. deadyfinger

    deadyfinger Villager Member

    Messages:
    9
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Thanks you so much for the reply @Tyruswoo.
    Not yet tried but seems I found it already :)
    Thanks a lot
     
    #79
  20. pasunna

    pasunna Veteran Veteran

    Messages:
    135
    Likes Received:
    21
    First Language:
    thai
    Primarily Uses:
    RMMV
    hi
    I want to ask if this plugin can slove some other problem like
    space between follower
    I had search about that because I use huge sprite and try to make game like darkest dungeon that huge sprite party walk around
    can this plugin fixe distance between follower or not
    I will try this plugin my self
    but this is ask for. if some one had and idea about it
    thank you
     
    #80
Thread Status:
Not open for further replies.

Share This Page