[VXA] Smarter Followers + Followers Move Route

I'm using this script by Neon Black for better looking followers, however I also want to be able to control my followers but every script I've found that does that doesn't work with Smarter Followers. Smarter Followers seems to just not let any other script mess with followers.

Spoiler: Smart(er) Followers by Neon Black
Ruby:
##-----------------------------------------------------------------------------
#  Smart(er) Followers v1.0a
#  Created by Neon Black
#  v1.0 - 1.24.14 - Main script completed
#  For both commercial and non-commercial use as long as credit is given to
#  Neon Black and any additional authors.  Licensed under Creative Commons
#  CC BY 4.0 - http://creativecommons.org/licenses/by/4.0/
##-----------------------------------------------------------------------------


module CPSmartFollowers
  ## The minimum delay between each character in the party in frames.
  ## What this means is the followers will appear a few spaces behind each
  ## other rather than being right on each others' backs.
  MoveDelay = 8
end




##-----------------------------------------------------------------------------
## The following lines are the actual core code of the script.  While you are
## certainly invited to look, modifying it may result in undesirable results.
## Modify at your own risk!
###----------------------------------------------------------------------------




$imported ||= {}
$imported["CP_SMART_FOLLOWERS"] = 1.0


class Game_Player < Game_Character
  ## Adds the latest player movement to the follower queue.
  def move_straight(d, turn_ok = true)
    forefront = passable?(@x, @y, d)
    super
    return unless forefront
    @followers.move(d, nil, self.direction, :str)
  end
 
  def move_diagonal(horz, vert)
    forefront = diagonal_passable?(@x, @y, horz, vert)
    super
    return unless forefront
    @followers.move(horz, vert, self.direction, :dia)
  end
 
  def jump(x_plus, y_plus)
    super
    @followers.move(x_plus, y_plus, self.direction, :jum)
  end
 
  ## Re-orders the order methods are performed in the update method.  May be
  ## problomatic if another script expects the original ordering.  If there are
  ## issues, try commenting out lines 52 to 63 using CTRL+Q.
  def update
    last_real_x = @real_x
    last_real_y = @real_y
    last_moving = moving?
    ## Original location of "move_by_input".
    super
    update_scroll(last_real_x, last_real_y)
    update_vehicle
    update_nonmoving(last_moving) unless moving?
    move_by_input
    @followers.update
  end
 
  ## Size of the queue for proper following.
  def movement_index
    @followers.follower_queue.size
  end
end


class Game_Followers
  attr_reader :follower_queue
  alias_method "cp_092013_move", "move"
  alias_method "cp_092013_initialize", "initialize"
  alias_method "cp_092213_synchronize", "synchronize"
 
  def initialize(*args)
    cp_092013_initialize(*args)
    @follower_queue = []
  end
 
  def update
    update_movement(gathering?)
    @gathering = false if gathering? && gather?
    each { |follower| follower.update }
  end
 
  ## Long method that checks numerous conditions to ensure that the follower is
  ## allowed to move forward.  Has a forced method to allow followers to
  ## gather.
  def update_movement(force = false)
    @last_follow = nil
    @data.each_with_index do |f,i|
      unless force
        last = @last_follow.nil? ? $game_player : @last_follow
        last = f if last.movement_index <= 1
        @last_follow = f if @last_follow.nil? && @follower_queue[f.movement_index+1].nil?
        @last_follow = f if @last_follow && f.movement_index+1 >= @last_follow.movement_index
        f.increase_displacement_count(last != f && last.moving?)
        if last.moving? || f.movement_index + 1 >= last.movement_index
          @last_follow = f unless f.check_displacement_count
        end ## The lines above are used for follower displacement.
      end
      @last_follow = f if f.moving?
      comm = @follower_queue[f.movement_index]
      @last_follow = f unless comm
      next if @last_follow == f
      f.direction = comm[2]
      case comm[3] ## Perform a specific kind of motion when following.
      when :str
        f.move_straight(comm[0])
      when :dia
        f.move_diagonal(*comm[0..1])
      when :jum
        f.jump(*comm[0..1])
      end
      f.movement_index += 1
      @last_follow = f
    end
    if @data[-1].movement_index > 1
      each { |follower| follower.movement_index -= 1 }
      @follower_queue.shift
    end
  end
 
  ## Ironically, I kept the original methods in for random errors.
  def move(*args)
    if args.empty?
      cp_092013_move()
    else
      @follower_queue.push(args)
    end
  end
 
  def synchronize(*args)
    cp_092213_synchronize(*args)
    clear_queue
  end
 
  def clear_queue
    each do |follower|
      follower.movement_index = 0
      follower.jump_count = 0
    end
    @follower_queue = []
  end
end


class Game_Follower < Game_Character
  attr_accessor :direction, :movement_index
  attr_writer :jump_count
  alias_method "cp_092213_initialize", "initialize"
 
  def initialize(*args)
    cp_092213_initialize(*args)
    @movement_index = 0
    @displ_count = 0
  end
 
  ## Needed @direction_fix to be free from the player.
  def update
    @direction_fix  = true
    @move_speed     = $game_player.real_move_speed
    @transparent    = $game_player.transparent
    @walk_anime     = $game_player.walk_anime
    @step_anime     = $game_player.step_anime
    @opacity        = $game_player.opacity
    @blend_type     = $game_player.blend_type
    super
  end
 
  ## Counts and uncounts displacement for better following.
  def increase_displacement_count(count = false)
    if count
      @displ_count += 1 unless moving? || @displ_count >= CPSmartFollowers::MoveDelay
    else
      @displ_count -= 1 unless @displ_count <= 0
    end
  end
 
  def check_displacement_count
    @displ_count >= CPSmartFollowers::MoveDelay
  end
 
  def no_displacement
    @displ_count == 0
  end
end




##-----------------------------------------------------------------------------
## End of script.
##-----------------------------------------------------------------------------

For the Follower Move Route script, Hime's seems nice so I would like to make Smarter Followers work with that. If that isn't doable then Nelderson's version also seems like it would be fine for my purposes.

Spoiler: Nelderson's Follower Move Route
Ruby:
#===============================================================================
# N.A.S.T.Y. Follower Move Route
# Nelderson's Awesome Scripts To You
#
# By: Nelderson
# Last Updated: 3/21/2012
#
# Version 1.0 - 3/21/2012
#===============================================================================
# Update History:
# - Version 1.0 - Initial release, made for BulletPlus
#===============================================================================
# This script allows you to use the move custom route command that you
# can use for all your other events, just now includes Followers!
#
# -Usage
# When you select a new move route command in your event, make sure to
# put this script call in the FIRST SLOT:
#
# force_move_followers(id)
# - Where id is the follower id of the player(Starts with 0)
# and anything after that will affect the follower instead of the event!
#===============================================================================
class Game_Interpreter
def command_205
$game_map.refresh if $game_map.need_refresh
temp = @params[1].list[0].parameters
if temp[0] =~ /force_move_followers[(](\d+)[)]/i
character = $game_player.followers[$1.to_i]
else
character = get_character(@params[0])
end
if character
character.force_move_route(@params[1])
Fiber.yield while character.move_route_forcing if @params[1].wait
end
end
end

class Game_Character < Game_CharacterBase
def force_move_followers(id = nil)
end
end

Any help would be appreciated!
Just tested the smart followers with Hime's Follower move routes and they work fine.
How are you doing the move route commands for the follower?
Just tested the smart followers with Hime's Follower move routes and they work fine.
How are you doing the move route commands for the follower?
This confused me because I tested it on a fresh project with no other scripts and it still didn't work. I tried again on a different new project and it still doesn't work regardless of script order. It's almost completely broken, however, after testing a bit more, I see that some movement commands do partially work. What I'm trying to do specifically though is make the follower turn and that isn't working at all.

Here's the entire event page (the relevant portion I'm using for testing, anyway).
1716784489385.png

It works perfectly fine if you remove Smarter Followers but the follower won't turn down with it on. I added some move rights after the turn down and those worked but the turn down did not, they also did not face right when they moved right they stayed facing left the whole time.

From my testing, only the regular movement commands work (move right/left/up/down), however the follower will not actually turn at all as if they had their direction fixed. All of the turning commands do nothing, and things like changing opacity, blending mode, or toggling step/walk animations for followers also don't work at all on followers, they just blink black for a moment before resetting to normal with the Smarter Followers script on.

EDIT:
Just
to be safe I put in a fresh version of Hime's script (I don't think I edited it in anyway but just making sure I didn't mess something up somehow), and actually putting Hime's script below Smarter Followers makes things like changing blending and opacity work, however Turning and Step Anim toggles still seem to not work regrardless of script order. edit2 Step anim does actually change correct, I just accidentally selected off instead of on the first time lol
This confused me because I tested it on a fresh project with no other scripts and it still didn't work. I tried again on a different new project and it still doesn't work regardless of script order. It's almost completely broken, however, after testing a bit more, I see that some movement commands do partially work. What I'm trying to do specifically though is make the follower turn and that isn't working at all.
I tried to do the turn and yes you are right it doesn't seem to work. I was using a move command and it worked, you are using a turn command.

I played around with a few options and I found for the turn you need to do this.
1716810585844.png
I tried to do the turn and yes you are right it doesn't seem to work. I was using a move command and it worked, you are using a turn command.

I played around with a few options and I found for the turn you need to do this.
View attachment 306520
That's so strange! You're right though, that does make turning work. It's weird that you need to add those extra steps when smarter followers is on, I wonder why...too bad I'm too novice at Ruby to know lol. Thank you that definitely solves the problem.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/vxa-smarter-followers-followers-move-route.169013/