• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Following Pokemon EX

Resource Following Pokemon EX 2.2.3

I would try it out, thanks. This confuse me.

This step is different depending on whether you use Elite Battle: DX or no:
If you don't use Elite Battle: DX, or don't know what it is, then delete the folder called EBDX in the Graphics/ and PBS/ folders of your game.
If you do use Elite Battle: DX, then open the Graphics/Pokemon/ folder in your game and delete the Front/, Front Shiny/, Back/, Back shiny/ folders in there.

Because I don't have Elite Battle DX and there's no EBDX folder in my Graphics folder. I don't think so. Do I need to do the second part and not the first bits. To install this files? Like I said I'm confused on this part.
If you don’t have EBDX, you’ll be following the step that says “if you don’t use EBDX”. Note that this step is after extracting all the files- if you don’t see an EBDX folder to delete, it’s probably because you didn’t extract the files yet.
 

jacen82

Novice
Member
Joined
Jan 4, 2023
Posts
16
If you don’t have EBDX, you’ll be following the step that says “if you don’t use EBDX”. Note that this step is after extracting all the files- if you don’t see an EBDX folder to delete, it’s probably because you didn’t extract the files yet.
Thanks, for clearing it up for me
 

TeraPulse

Silver Pinap Collector
Member
Joined
Nov 13, 2022
Posts
26

BlakBird45

Rookie
Member
Joined
Feb 2, 2023
Posts
1
I have a question about the script is there a way to make the follower pokemon be only one specific pokemon even if its not in your party.
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
Alright. So this is hilarious but also allowing people to get out of bounds :') please help
Anyway to prevent the pokemon from appearing behind you if the tile behind you is not passible?

Now that I think about it, it might cause issues if using a field move and the pokemon is not direct behind you but tries switches places with the player

Regardless, pokemon should not appear directly behind the player if the tile is impassable by the player

Hmmm I'll see if I can do some tweaking
 

Attachments

  • project-untamed_2023-02-20_19-15-06.mp4
    7.7 MB
  • image.png
    image.png
    155.6 KB · Views: 92

heroofthewild

Rookie
Member
Joined
Feb 26, 2023
Posts
1
Hi there! I've encountered this error when trying to launch the game, and I'm not sure how to fix it. I've been using Following Pokemon for months now, and this is the first error I've gotten.

I believe it is because I'm indoors with a Pokemon that is too tall, but I cannot launch the game to switch it out. Any help would be much appreciated.
 

Attachments

  • Following EX Error.jpg
    Following EX Error.jpg
    248.1 KB · Views: 99

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
Yeah, it is definitely related to your follower being too tall. Did anything change with your plugins since this last worked correctly? I would start by removing all your plugins temporarily except for Followers EX and see if the error is still there. Don't forget to compile though.

Hi there! I've encountered this error when trying to launch the game, and I'm not sure how to fix it. I've been using Following Pokemon for months now, and this is the first error I've gotten.

I believe it is because I'm indoors with a Pokemon that is too tall, but I cannot launch the game to switch it out. Any help would be much appreciated.

Alright. So this is hilarious but also allowing people to get out of bounds :') please help
Anyway to prevent the pokemon from appearing behind you if the tile behind you is not passible?
Since Golisopod User has left the community from what I've heard, I have taken another shot at solving this.
I think I've done it here. I will post just the code that should be necessary to add onto the script. As long as this is below the original script, it should work.
Followers No Longer Pop up in Walls:
class Game_FollowingPkmn < Game_Follower
  def self.justCameOut
    @@justCameOut = true
  end

  def follow_leader(leader, instant = false, leaderIsTrueLeader = true)
    maps_connected = $map_factory.areConnected?(leader.map.map_id, self.map.map_id)
    target = nil
    
    if !defined?(@@justCameOut)
      @@justCameOut = false
    end
    
    # Get the target tile that self wants to move to
    if maps_connected
      behind_direction = 10 - leader.direction
      target = $map_factory.getFacingTile(behind_direction, leader)
      
      if !passable?(target[1],target[2], behind_direction) && @@justCameOut == true
        4.times do |i|
          target = $map_factory.getFacingTile(i*2, leader)
          if passable?(target[1],target[2], leader.direction)
            #if the direction is passable, don't bother checking other directions
            break
          end
        end #4.times do
      end #if !passable?
        
      @@justCameOut = false
      
      if target && $map_factory.getTerrainTag(target[0], target[1], target[2]).ledge
        # Get the tile above the ledge (where the leader jumped from)
        target = $map_factory.getFacingTileFromPos(target[0], target[1], target[2], behind_direction)
      end
      target = [leader.map.map_id, leader.x, leader.y] if !target
      if GameData::TerrainTag.exists?(:StairLeft)
        currentTag = $map_factory.getTerrainTag(self.map.map_id, self.x, self.y)
        if currentTag == :StairLeft
          target[2] += (target[1] > $game_player.x ? -1 : 1)
        elsif currentTag == :StairRight
          target[2] += (target[1] < $game_player.x ? -1 : 1)
        end
      end
      # Added
      if defined?(on_stair?) && on_stair?
        if leader.on_stair?
          if leader.stair_start_x != self.stair_start_x
            # Leader stepped on other side so start/end swapped, but not for follower yet
            target[2] = self.y
          elsif leader.stair_start_x < leader.stair_end_x
            # Left to Right
            if leader.x < leader.stair_start_x && self.x != self.stair_start_x
              # Leader stepped off
              target[2] = self.y
            end
          elsif leader.stair_end_x < leader.stair_start_x
            # Right to Left
            if leader.x > leader.stair_start_x && self.x != self.stair_start_x
              # Leader stepped off
              target[2] = self.y
            end
          end
        elsif self.on_middle_of_stair?
          # Leader is no longer on stair but follower is, so player moved up or down at the start or end of the stair
          if leader.y < self.stair_end_y - self.stair_y_height + 1 || leader.y > self.stair_end_y
            target[2] = self.y
          end
        end
      end
    else
      # Map transfer to an unconnected map
      target = [leader.map.map_id, leader.x, leader.y]
    end
    # Move self to the target
    if self.map.map_id != target[0]
      vector = $map_factory.getRelativePos(target[0], 0, 0, self.map.map_id, @x, @y)
      @map = $map_factory.getMap(target[0])
      # NOTE: Can't use moveto because vector is outside the boundaries of the
      #       map, and moveto doesn't allow setting invalid coordinates.
      @x = vector[0]
      @y = vector[1]
      @real_x = @x * Game_Map::REAL_RES_X
      @real_y = @y * Game_Map::REAL_RES_Y
    end
    if instant || !maps_connected
      moveto(target[1], target[2])
    else
      fancy_moveto(target[1], target[2], leader)
    end
  end
  #-----------------------------------------------------------------------------
end





module FollowingPkmn
  def self.toggle(forced = nil, anim = nil)
    return if !FollowingPkmn.can_check? || !FollowingPkmn.get
    return if !FollowingPkmn.get_pokemon
    anim_1 = FollowingPkmn.active?
    if !forced.nil?
      # This may seem redundant but it keeps follower_toggled a boolean always
      $PokemonGlobal.follower_toggled = !(!forced)
    else
      $PokemonGlobal.follower_toggled = !($PokemonGlobal.follower_toggled)
    end
    
    #added by Gardenette
    Game_FollowingPkmn.justCameOut
    
    anim_2 = FollowingPkmn.active?
    anim = anim_1 != anim_2 if anim.nil?
    FollowingPkmn.refresh(anim)
    $game_temp.followers.move_followers
    $game_temp.followers.turn_followers
  end
end

Yes, there is a way to make it one specific pokemon only even if you don't have it in your party. That would just require turning off a large portion of the code that takes your party pokemon and instead setting it as a specific species. Is this still needed? If so, I could probably whip something up.
I have a question about the script is there a way to make the follower pokemon be only one specific pokemon even if its not in your party.
 

leo_ranger

Keeper of Secrets
Member
Joined
Nov 16, 2022
Posts
9
I wanted to use a specific message if a tag was specified on the Pokemon's species.
i used: EventHandlers.add(:following_pkmn_talk, :pokemon_plant, proc { |pkmn, _random_val| if has_flag?("Volcanic")
and after a few tries I had it work for like two test and then when i tried to repeat it for another tag I broke both.
Was wondering any anyone could help me as I cant figure out what i did, haha.
 

REALMUGEN

Trainer
Member
Joined
Jan 23, 2020
Posts
69
Since Golisopod User has left the community from what I've heard, I have taken another shot at solving this.
I think I've done it here. I will post just the code that should be necessary to add onto the script. As long as this is below the original script, it should work.
Followers No Longer Pop up in Walls:
class Game_FollowingPkmn < Game_Follower
  def self.justCameOut
    @@justCameOut = true
  end

  def follow_leader(leader, instant = false, leaderIsTrueLeader = true)
    maps_connected = $map_factory.areConnected?(leader.map.map_id, self.map.map_id)
    target = nil
   
    if !defined?(@@justCameOut)
      @@justCameOut = false
    end
   
    # Get the target tile that self wants to move to
    if maps_connected
      behind_direction = 10 - leader.direction
      target = $map_factory.getFacingTile(behind_direction, leader)
     
      if !passable?(target[1],target[2], behind_direction) && @@justCameOut == true
        4.times do |i|
          target = $map_factory.getFacingTile(i*2, leader)
          if passable?(target[1],target[2], leader.direction)
            #if the direction is passable, don't bother checking other directions
            break
          end
        end #4.times do
      end #if !passable?
       
      @@justCameOut = false
     
      if target && $map_factory.getTerrainTag(target[0], target[1], target[2]).ledge
        # Get the tile above the ledge (where the leader jumped from)
        target = $map_factory.getFacingTileFromPos(target[0], target[1], target[2], behind_direction)
      end
      target = [leader.map.map_id, leader.x, leader.y] if !target
      if GameData::TerrainTag.exists?(:StairLeft)
        currentTag = $map_factory.getTerrainTag(self.map.map_id, self.x, self.y)
        if currentTag == :StairLeft
          target[2] += (target[1] > $game_player.x ? -1 : 1)
        elsif currentTag == :StairRight
          target[2] += (target[1] < $game_player.x ? -1 : 1)
        end
      end
      # Added
      if defined?(on_stair?) && on_stair?
        if leader.on_stair?
          if leader.stair_start_x != self.stair_start_x
            # Leader stepped on other side so start/end swapped, but not for follower yet
            target[2] = self.y
          elsif leader.stair_start_x < leader.stair_end_x
            # Left to Right
            if leader.x < leader.stair_start_x && self.x != self.stair_start_x
              # Leader stepped off
              target[2] = self.y
            end
          elsif leader.stair_end_x < leader.stair_start_x
            # Right to Left
            if leader.x > leader.stair_start_x && self.x != self.stair_start_x
              # Leader stepped off
              target[2] = self.y
            end
          end
        elsif self.on_middle_of_stair?
          # Leader is no longer on stair but follower is, so player moved up or down at the start or end of the stair
          if leader.y < self.stair_end_y - self.stair_y_height + 1 || leader.y > self.stair_end_y
            target[2] = self.y
          end
        end
      end
    else
      # Map transfer to an unconnected map
      target = [leader.map.map_id, leader.x, leader.y]
    end
    # Move self to the target
    if self.map.map_id != target[0]
      vector = $map_factory.getRelativePos(target[0], 0, 0, self.map.map_id, @x, @y)
      @map = $map_factory.getMap(target[0])
      # NOTE: Can't use moveto because vector is outside the boundaries of the
      #       map, and moveto doesn't allow setting invalid coordinates.
      @x = vector[0]
      @y = vector[1]
      @real_x = @x * Game_Map::REAL_RES_X
      @real_y = @y * Game_Map::REAL_RES_Y
    end
    if instant || !maps_connected
      moveto(target[1], target[2])
    else
      fancy_moveto(target[1], target[2], leader)
    end
  end
  #-----------------------------------------------------------------------------
end





module FollowingPkmn
  def self.toggle(forced = nil, anim = nil)
    return if !FollowingPkmn.can_check? || !FollowingPkmn.get
    return if !FollowingPkmn.get_pokemon
    anim_1 = FollowingPkmn.active?
    if !forced.nil?
      # This may seem redundant but it keeps follower_toggled a boolean always
      $PokemonGlobal.follower_toggled = !(!forced)
    else
      $PokemonGlobal.follower_toggled = !($PokemonGlobal.follower_toggled)
    end
   
    #added by Gardenette
    Game_FollowingPkmn.justCameOut
   
    anim_2 = FollowingPkmn.active?
    anim = anim_1 != anim_2 if anim.nil?
    FollowingPkmn.refresh(anim)
    $game_temp.followers.move_followers
    $game_temp.followers.turn_followers
  end
end

Hi, how did you manage to fix it? I mean, where do you put the fix to make it work? I have tried to install it in several places, but apparently it still does not work for me. :B
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
Hi, how did you manage to fix it? I mean, where do you put the fix to make it work? I have tried to install it in several places, but apparently it still does not work for me. :B
Did you paste the code I put somewhere below the following pokemon ex script?

It might get a bit more complicated if using a following pokemon ex as a plugin
 

REALMUGEN

Trainer
Member
Joined
Jan 23, 2020
Posts
69
Did you paste the code I put somewhere below the following pokemon ex script?

It might get a bit more complicated if using a following pokemon ex as a plugin
Thanks for replying. Ohh yes :C My version is the Plug In version, I thought the fix works for both.
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
Thanks for replying. Ohh yes :C My version is the Plug In version, I thought the fix works for both.
It will work either way. But the code I have above isn't formatted to be included as a plugin. You would have to put that code in a script section. If you have the followers ex as a plugin then it will override that code. So I suppose I can just take the original plugin and add in the code then repost for ease of use. Will do that soon
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
Alright here is version 2.2.3 with the fix that prevents followers from popping out of their pokeball onto impassible tiles.
Just merge the Plugins\Following Pokemon Ex folder with your existing one in the plugins folder. If you have modified these files in the plugin yourself, I would advise just putting the code I mentioned a few posts above into the plugin yourself.



Please let me know if you have any issues with the updated version. For installation instructions, please see GolisopodUser's instructions on the Overview page of this resource.
 

REALMUGEN

Trainer
Member
Joined
Jan 23, 2020
Posts
69
Alright here is version 2.2.3 with the fix that prevents followers from popping out of their pokeball onto impassible tiles.
Just merge the Plugins\Following Pokemon Ex folder with your existing one in the plugins folder. If you have modified these files in the plugin yourself, I would advise just putting the code I mentioned a few posts above into the plugin yourself.



Please let me know if you have any issues with the updated version. For installation instructions, please see GolisopodUser's instructions on the Overview page of this resource.


Thanks for sharing.

I just installed it and for some reason I keep having the same problem.


ERROR.png


If my character is between an event and an impassable tile, when I take the Pokemon out of the Pokeball or I rotate it with the others, it still appears there :C

I don't know if I'm doing something wrong?
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
Thanks for sharing.

I just installed it and for some reason I keep having the same problem.


View attachment 17195

If my character is between an event and an impassable tile, when I take the Pokemon out of the Pokeball or I rotate it with the others, it still appears there :C

I don't know if I'm doing something wrong?
Did you make sure to compile by holding control as the game loads after installing the new version?
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
Thanks for sharing.

I just installed it and for some reason I keep having the same problem.


View attachment 17195

If my character is between an event and an impassable tile, when I take the Pokemon out of the Pokeball or I rotate it with the others, it still appears there :C

I don't know if I'm doing something wrong?
Alright let's see if I embarrass myself twice in a row.



Version 2.2.4

Fixed:
  • Followers popping out on impassable tiles (sometimes they will still come out on an impassable tile but immediately move off of it? Not sure what the cause is here, but I'm tired and this seems like a small thing I can tackle some other time)
  • If the player is surrounded by tiles the follower cannot come out on, the pokemon just doesn't come out now
  • If follower is using a field move and the player cannot go on top of the tile the follower is currently on, the player now finds a different tile to go to
  • If a follower is using a field move, you can no longer talk to it while it is using the field move
Thanks to Vendily for helping troubleshoot. I added them to the credits in the meta.txt file
 

REALMUGEN

Trainer
Member
Joined
Jan 23, 2020
Posts
69
Alright let's see if I embarrass myself twice in a row.



Version 2.2.4

Fixed:
  • Followers popping out on impassable tiles (sometimes they will still come out on an impassable tile but immediately move off of it? Not sure what the cause is here, but I'm tired and this seems like a small thing I can tackle some other time)
  • If the player is surrounded by tiles the follower cannot come out on, the pokemon just doesn't come out now
  • If follower is using a field move and the player cannot go on top of the tile the follower is currently on, the player now finds a different tile to go to
  • If a follower is using a field move, you can no longer talk to it while it is using the field move
Thanks to Vendily for helping troubleshoot. I added them to the credits in the meta.txt file


First of all, whether it works or not does not embarrass you in any way. There is nothing more valuable than trying to deliver solutions that can serve the rest of the community. Thank you for that.

I installed the new version, compiled the whole project and the problem persists.

My initial position:

ERROR.png


If I remove the Pokemon and take it out of the Pokeball staying in that position it works fine (obviously).

If instead I make the character look in another direction and do the same thing... This happens...

ERROR2.png


And if after that I look in the direction of the Pokemon and try again, the following happens...

ERROR3.png


PD: If I surround myself with 3 impassable tiles and for example, an event, the Pokemon still appears on any of them.
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
First of all, whether it works or not does not embarrass you in any way. There is nothing more valuable than trying to deliver solutions that can serve the rest of the community. Thank you for that.

I installed the new version, compiled the whole project and the problem persists.

My initial position:

View attachment 17243

If I remove the Pokemon and take it out of the Pokeball staying in that position it works fine (obviously).

If instead I make the character look in another direction and do the same thing... This happens...

View attachment 17244

And if after that I look in the direction of the Pokemon and try again, the following happens...

View attachment 17245

PD: If I surround myself with 3 impassable tiles and for example, an event, the Pokemon still appears on any of them.
Hm okay, so you have an impassable tile to your left, right, and below you, yet the pokemon still appeared behind you onto an impassable tile. Man I thought I tested it a lot.

I'll try this more in a bit and see if I can figure something out. I appreciate the help
 
Back
Top