Male
Omnipresence
Seen 2 Days Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
This script adds following pokemon to your game (you have to provide your own OW sprites). It is an updated version from the current script tutorial, but modified so that if all goes in one script section.

Fixes in this version:
Spoiler:

# * Combined all into one script section for ease of installation
# * Added setting to allow/disallow cycling through pokemon in field
# * Added tone effect to following pokemon if statused (this is pretty neato. You can turn this off with a setting)
# * Fixed follower grass animations
# * NPCs won't walk over the follower
# * Fixed crash caused by toggling follower when loading a map sometimes
# * Fixed follower not talking in the rain
# * Added a few more specific file checks to the sprite changing
# * Prevent some HM usage when having a nonfollower dependent event
# so hopefully this will lead more towards support for regular dependent events
# * Your followers don't automatically turn when you do, so it looks more natural
# * There's a setting now to make pokemon always animate while you're standing still
# Note that flying, levitating, or any pokemon species specified will always animate
# regardless of this settings

Please follow these instructions closely.
Add this script in a new section above the main (and below the compiler).
Save your game, and close RPG Maker (important).
Download this file
Now download these graphics
Go into your game folder, and from that to your Data folder. Add the Animations.rxdata file you just downloaded. It will ask if you want to replace the current file, you will say yes.
Now, go back to the main folder, and go into the Graphics folder. From there, go into the Animations folder. Here you will extract the graphics you downloaded (emo.png, emo2,png, and Pokemon-Follow.png). Make sure to extract them, not just stick the .rar file in here.
Now the script is installed.
To use this script, we simply need to make two events.

The first one will simply be a blank event. This event will be turned into our dependent event when we trigger it.
It should look like this (can be any ID)


Our second event will be the one that triggers it. It can trigger in whatever way (touch, on a different page, a conditional, etc), but it must use the script you see here: pbPokemonFollow(X)
X refers to the ID of our first event.
Please note that these events should be on the same map.


And that should pretty much be it.
Remember, this is a standalone script and needs no other changes to your scripts to work. So if you mess something up, it's probably not due to this script.

Script Version: 1.4
Credits required: Help-14, zingzags, Rayd12smitty, Venom12, mej71

I've made a few important changes since I first posted, please update
Edit: One more update for following script. There were a lot of problems in the old version with switching and toggling, especially while surfing/biking. Those are fixed. Water pokemon always animate in the water. Added exception array for mons that fit always animating criteria but you don't want them to animate. Added a fix for event transfers
Edit 2: Fixed blacking out issue, and a couple other refreshing issues.

Edit 3: Updated to v17 only, reflection support removed due to conflicts

Also, mini tutorial time. The script to force the sprite to refresh is
$PokemonTemp.dependentEvents.refresh_sprite
To force the sprite to update it's position(call this after a transfer) add this script
$NeedFollowerUpdate=true

ItachiVolcanion

Male
Vietnam
Seen March 4th, 2016
Posted January 4th, 2016
43 posts
5.2 Years
I tried to follow these instructions closely, with a blank Dependent Event, and another event on the same map.
But when I tried to load the recent save file, it gave me an error: Before install the script, I can't go through impassable tiles , but after install the script, I can go through all impassable tiles ( not the character). Then after I tried to reinstall the script , I tried to load the recent save file and it gave me another error.
---------------------------
Pokemon Mystery Evolution
---------------------------
Script 'Following Pokemon' line 1421: NoMethodError occurred.

undefined method `realEvents' for #<DependentEvents:0x8923de0>
---------------------------
OK
---------------------------
Then I tried to start an new game,but when I call pbPokemonFollow(2), it gave me another error.
---------------------------
Pokemon Mystery Evolution
---------------------------
Script 'Interpreter' line 276: RuntimeError occurred.

Script error within event 9, map 351 (Red's house):

Exception: NoMethodError

Message: Section187:1421:in `old_update_wb'undefined method `realEvents' for #<DependentEvents:0x74f4d00>

***Full script:

pbPokemonFollow(2)


Interpreter:243:in `pbExecuteScript'

Following Pokemon:1418:in `each'

Following Pokemon:1418:in `old_update_wb'

Special Animation:533:in `old_update'

Special Animation:724:in `klein_mapcon_update'

Special Animation:858:in `water_old_update'

Water Bubbles:176:in `pheno_old_update'

Phenomenos:362:in `updateOldFL'

Simple HUD:41:in `update'

Scene_Map:51:in `updateSpritesets'


---------------------------
OK
---------------------------
Please help me... Thank you.
Male
Omnipresence
Seen 2 Days Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
I tried to follow these instructions closely, with a blank Dependent Event, and another event on the same map.
But when I tried to load the recent save file, it gave me an error: Before install the script, I can't go through impassable tiles , but after install the script, I can go through all impassable tiles ( not the character). Then after I tried to reinstall the script , I tried to load the recent save file and it gave me another error.

Then I tried to start an new game,but when I call pbPokemonFollow(2), it gave me another error.

Please help me... Thank you.
This has been fixed, please recopy the script, I have made a few changes. Also, please do not quote the initial post in a reply. It's assumed that's who you're replying to unless you say otherwise, and it makes for unnecessary clutter.
Non-binary
Seen November 19th, 2016
Posted February 5th, 2016
31 posts
6.6 Years
Gasp!! Reflection support?! My goodness! That's actually one of the best additions to this. Now it feels pretty complete (being plug n' play is a huge plus too!)

But uh... How come you have the def for Come_back but don't call it anywhere else like Ray's 1.3? Once you're done Surfing, your following Pokemon doesn't reappear.
Public Additions/Snippets:
Trainer Outfit: Acro/MachBike Fix
(Needs 15.1 update) Pokemon Summary Add-On: Improved Ribbons + Scroll!
I might release some of my private plug-n'-play scripts in the future.

Rot8er_ConeX

Male
The Dissa Region
Seen February 22nd, 2018
Posted May 8th, 2017
822 posts
5.5 Years
I'm kinda Frankenstein'ing this and 1.3 together because I had to do the same for v16 and my game. I managed to add in your status tones subroutine no problem. But I'm having trouble adding reflection support.

I tried copying this code into my game, but it throws an error as soon as I start up a file:
 
class Spriteset_Map
 
  alias follower_update update
  def update
    follower_update
    #add to reflected sprites if not already
    if $game_player.pbHasDependentEvents? && !$game_temp.player_transferring
      for i in [email protected]
        if @usersprites[i].is_a?(DependentEventSprites)
          @followersprite = @usersprites[i]
          event = $PokemonTemp.dependentEvents.realEvents[0]
          count = 0
          fsprite = nil
          for sprite in @reflectedSprites
            if sprite.event == event
              if count==1 #if there are multiple of this same event
                sprite.dispose
                @reflectedSprites.delete(sprite)
                @reflectedSprites.delete(fsprite) if fsprite
              else
                fsprite = sprite
                count = 1
              end
            end
          end
          if count==0 || fsprite.nil?
            @reflectedSprites.push(ReflectedSprite.new(@usersprites[i].sprites[0],event,@viewport1))
            follower_update
          elsif fsprite || fsprite.transfer
            @reflectedSprites.delete(fsprite)
            fsprite.dispose
            @reflectedSprites.push(ReflectedSprite.new(@usersprites[i].sprites[0],event,@viewport1))
            follower_update
          end
          break
        end
      end
    end
  end
 
end
 
class ReflectedSprite
 
  alias follow_update update
  def update
    return false if [email protected] || @rsprite.nil? || @rsprite.disposed?
    ret=follow_update
    return ret
  end
 
end
The line in red is giving the error because realEvents does not exist as a property of that class.
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Male
Italy
Seen December 18th, 2019
Posted February 14th, 2018
267 posts
6.1 Years
Say I want to keep my existing custom battle animations without replacing Animations.rpgxp and I really don't care about the pokemon emoticons.
What should I remove from the code?

That way!
I thought..uhm, ok.
-----------------------------------------------------------------------------------------------
Beta 50%
Male
Omnipresence
Seen 2 Days Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
Gasp!! Reflection support?! My goodness! That's actually one of the best additions to this. Now it feels pretty complete (being plug n' play is a huge plus too!)

But uh... How come you have the def for Come_back but don't call it anywhere else like Ray's 1.3? Once you're done Surfing, your following Pokemon doesn't reappear.
I've updated the script to include this, as well as added a small fix to their placement (when you stop surfing they should appear beside you instead of in the water)

I'm kinda Frankenstein'ing this and 1.3 together because I had to do the same for v16 and my game. I managed to add in your status tones subroutine no problem. But I'm having trouble adding reflection support.

I tried copying this code into my game, but it throws an error as soon as I start up a file:

The line in red is giving the error because realEvents does not exist as a property of that class.
The script was already updated to fix that, please recopy.
Non-binary
Seen November 19th, 2016
Posted February 5th, 2016
31 posts
6.6 Years
Huh... Sorry for bugging you, but I've found yet another quirk (on a clean project).

Say you're facing your Following Pokemon, you Save the game, you close it and Continue...
Your Pokemon is no longer facing you and could stand either behind you, facing another direction, or standing in a adjacent tile, sometimes even impassable ones. Sometimes, if the impassable tile is a water one, it'll stand right on top of the player after Continuing.

Of course, none of this happens if you're not facing your Pokemon when you Save/Continue.

Edit: Ha, I hadn't realized this had occurred with regular Dependent Events for the longest time, regardless of version or if I had a Pokemon Following script or not. I quickly found a fix to this, however.

You can fix this by editing pbMapChangeMoveDependentEvents in the original DependentEvent's script. Or you can comment out the last instance of it at the veeeery bottom. I just changed it so it doesn't try to reposition the Pokemon after a map change (or map refresh). Helps a lot with map transfers looking less ugly, actually. Not sure how you want to go about it though!
Public Additions/Snippets:
Trainer Outfit: Acro/MachBike Fix
(Needs 15.1 update) Pokemon Summary Add-On: Improved Ribbons + Scroll!
I might release some of my private plug-n'-play scripts in the future.

crispybacon1234

Pokémon IR/NG Dev

Male
United Kingdom
Seen 2 Days Ago
Posted November 24th, 2018
103 posts
6 Years
First off, thanks for bringing this script back to life. Previously it was very buggy and you've done a great job fixing some of those bugs.

I was wondering if this script works with versions of Essentials below v16. I'm currently using Kleinstudio's BW Essentials v3.1.1 which is essentially a modified v15.1. I'm aware that there were lots of script changes between v15.1 and v16, but whenever I talk to my Pokémon it asks if I would like to surf.

Is there a way around this, or would it involve editing a lot of the script? Any help or clarification would be greatly appreciated.
Male
Omnipresence
Seen 2 Days Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
Huh... Sorry for bugging you, but I've found yet another quirk (on a clean project).

Say you're facing your Following Pokemon, you Save the game, you close it and Continue...
Your Pokemon is no longer facing you and could stand either behind you, facing another direction, or standing in a adjacent tile, sometimes even impassable ones. Sometimes, if the impassable tile is a water one, it'll stand right on top of the player after Continuing.

Of course, none of this happens if you're not facing your Pokemon when you Save/Continue.

Edit: Ha, I hadn't realized this had occurred with regular Dependent Events for the longest time, regardless of version or if I had a Pokemon Following script or not. I quickly found a fix to this, however.

You can fix this by editing pbMapChangeMoveDependentEvents in the original DependentEvent's script. Or you can comment out the last instance of it at the veeeery bottom. I just changed it so it doesn't try to reposition the Pokemon after a map change (or map refresh). Helps a lot with map transfers looking less ugly, actually. Not sure how you want to go about it though!
I've applied that fix to the script, thanks. Doesn't seem to have an effect on map transfers honestly, but at least it fixes the save thing.

There weren't that many changes from v15, mostly just terrain tags and a few other methods. However, most of those are just things that would crash your game. Asking you to surf makes no sense, I don't see what would cause that.

crispybacon1234

Pokémon IR/NG Dev

Male
United Kingdom
Seen 2 Days Ago
Posted November 24th, 2018
103 posts
6 Years
There weren't that many changes from v15, mostly just terrain tags and a few other methods. However, most of those are just things that would crash your game. Asking you to surf makes no sense, I don't see what would cause that.
I reinstalled the script and set the switches and variables again. Apparently my brain didn't recognise that ItemWalk was also a variable. The script is working fine now.

As for actual bugs with the script, whenever you stop sprinting and stand still the following Pokémon still appears to be sprinting on the spot. Any way to fix this?

EDIT: When you switch Pokémon while surfing the new Pokémon will appear on your head, regardless of type.

EDIT 2: NPC events can walk through your following Pokémon.
Non-binary
Seen January 8th, 2017
Posted December 19th, 2016
22 posts
4.9 Years
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 6, map 2 (Lappet Town):

Exception: NoMethodError

Message: Section003:123:in `effect?'undefined method `>' for nil:NilClass

***Full script:

pbPokemonFollow(17)


Interpreter:243:in `pbExecuteScript'

RPG__Sprite:434:in `effect?'

RPG__Sprite:433:in `each'

RPG__Sprite:433:in `effect?'

AnimationSprite:31:in `update'

AnimationSprite:88:in `follower_update'

AnimationSprite:87:in `each'

AnimationSprite:87:in `follower_update'

Followers:1511:in `update'

Scene_Map:51:in `updateSpritesets'



Interpreter:276:in `pbExecuteScript'

Interpreter:1606:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `follow_update'

Scene_Map:101:in `loop'

Scene_Map:114:in `follow_update'

Followers:1371:in `update'



This exception was logged in 

C:\Users\us\Saved Games/Pokemon Essentials/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------
Any thing? I'm using a clean version of essentials. It occurs when I talk to the npc.
Male
Omnipresence
Seen 2 Days Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 6, map 2 (Lappet Town):

Exception: NoMethodError

Message: Section003:123:in `effect?'undefined method `>' for nil:NilClass

***Full script:

pbPokemonFollow(17)


Interpreter:243:in `pbExecuteScript'
Any thing? I'm using a clean version of essentials. It occurs when I talk to the npc.
You did not follow the installation instructions exactly.
Male
Omnipresence
Seen 2 Days Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
First off, thanks for bringing this script back to life. Previously it was very buggy and you've done a great job fixing some of those bugs.

I was wondering if this script works with versions of Essentials below v16. I'm currently using Kleinstudio's BW Essentials v3.1.1 which is essentially a modified v15.1. I'm aware that there were lots of script changes between v15.1 and v16, but whenever I talk to my Pokémon it asks if I would like to surf.

Is there a way around this, or would it involve editing a lot of the script? Any help or clarification would be greatly appreciated.
Ok I get this error: http://i.imgur.com/UN22OtU.png
I added a small fix to add compatibility (and tested) for v15. However, crispybacon1234, none of your errors occur in my testing with a clean v15.1.
Male
Seen January 26th, 2020
Posted September 30th, 2019
197 posts
5.2 Years
Great to see this one back but as a plug and play version just one question if i don't have walking sprites for a few pokemon will that mess up the script in anyway?
You can add checks with

FileTest.image_exist?("Graphics/Characters/"+$Trainer.party[0].species.to_s)
if you don't want certain things to happen if the walking sprite doesn't exist.
Male
Omnipresence
Seen 2 Days Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
You can add checks with

FileTest.image_exist?("Graphics/Characters/"+$Trainer.party[0].species.to_s)
if you don't want certain things to happen if the walking sprite doesn't exist.
These checks are already done, there is no need to fiddle with that.

The script is working with v16.1, but if you start a new game and go to the PC to get the potion it will crash....
The only work around I found is to get the pokemon following first then get the potion from the PC...
Fixed, update your script please.
Male
Seen January 26th, 2020
Posted September 30th, 2019
197 posts
5.2 Years
These checks are already done, there is no need to fiddle with that.
Was it updated recently? Without the modifications I made with those checks in place, I was able to rotate through and to talk to the follower even if the graphic isn't there. Which I didn't want to happen.
Male
Omnipresence
Seen 2 Days Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
Was it updated recently? Without the modifications I made with those checks in place, I was able to rotate through and to talk to the follower even if the graphic isn't there. Which I didn't want to happen.
That wasn't what mewlover asked, he asked if not having all the graphics would cause trouble with the scripts. The answer to which is no.
Male
Seen January 26th, 2020
Posted September 30th, 2019
197 posts
5.2 Years
That wasn't what mewlover asked, he asked if not having all the graphics would cause trouble with the scripts. The answer to which is no.
Oh I know. I'm just giving advice in case they want it to look good with some graphics missing. I modified mine so I can't do stuff like this