• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: [Essentials v17] Following Pokemon v 1.4.1

Well those look like the same error.

Two questions,
1. when you say "interact with a Pokémon", what does that mean? It's fine to talk to people but not Pokémon? Do you have a script installed that you're not telling us about?
2. what is on line 124 of RPG__Sprite? Whatever's going on there should point you in the direction of what needs fixing.

EDIT: Was this always in the Following Pokémon thread? I must have been tired this morning when I was talking about other scripts, lol! Although it could still be that, but I was most suspicious of a badly-installed Following Pokémon.
 
Last edited:
Well those look like the same error.

Two questions,
1. when you say "interact with a Pokémon", what does that mean? It's fine to talk to people but not Pokémon? Do you have a script installed that you're not telling us about?
2. what is on line 124 of RPG__Sprite? Whatever's going on there should point you in the direction of what needs fixing.

EDIT: Was this always in the Following Pokémon thread? I must have been tired this morning when I was talking about other scripts, lol! Although it could still be that, but I was most suspicious of a badly-installed Following Pokémon.

Uzagi fixed his problem. He forgot to put a new Animation.rpgxp and forgot to att the post lol
 
Uzagi fixed his problem. He forgot to put a new Animation.rpgxp and forgot to att the post lol

True!
It's very importante the part that you have to CLOSE THE RMXP then replace the Animation.rpgxp .
If you don't recall if you did this, close the RMXP then replace the file and try to run the script.
 
Alright, so I set everything up as instructed but whenever I transfer to another map, my Pokemon disappears and I have to do the event over again. No error messages or anything. I also can't interact with the Pokemon when it is there. Any help?
 
I think there might be a bug in this script which causes Teleport and Dig to confirm that you want to do them twice? Looks like what might have happened is that v17.x split CanUseMove into CanUseMove (where the confirmation used to be) and ConfirmUseMove (where the confirmation is now), so because the Following Pokémon script duplicates the original functionality of CanUseMove (but updates it to remove the dependent event check) we have a confirmation from there, and a second one from ConfirmUseMove?

Not entirely sure, this happened in a friend's game so I don't know the full story about the versions of code being used.
 
For those who want a "more natural" Poke Center and do not know how, follow print:

Code:
Toggle_Following_Switch = [B][I][COLOR="Red"]103[/COLOR][/I][/B]         # Switch should be reserved

[PokeCommunity.com] [Essentials v17] Following Pokemon v 1.4.1


[PokeCommunity.com] [Essentials v17] Following Pokemon v 1.4.1


If you want a scene like HGSS (after player walk, the pokemon will appears) check it out:
Spoiler:


To Fix forms to OW:
Spoiler:
 
Last edited:
Is there anyway to add a space between you and your pokemon following you?

I recommend you to read all script and find:
Spoiler:
 
To show DUST_ANIMATION to following pokemon when the player jumps (Thanks Vendily):

In 'PField_Field' search to 'def pbLedge(xOffset,yOffset)' and replace all code for:
Code:
def pbLedge(xOffset,yOffset)
  if PBTerrain.isLedge?(Kernel.pbFacingTerrainTag)
    if Kernel.pbJumpToward(2,true)
      $scene.spriteset.addUserAnimation(DUST_ANIMATION_ID,$game_player.x,$game_player.y,true,1)
      $game_player.increase_steps
      $game_player.check_event_trigger_here([1,2])
      events=$PokemonTemp.dependentEvents.realEvents
      for i in 0...events.length
        follower=events[i]
        $scene.spriteset.addUserAnimation(DUST_ANIMATION_ID,
         follower.x,follower.y,true,1) if $game_switches[Toggle_Following_Switch]
      end
      return true
    end
  end
  return false
end

Now, we need to find a way to following jump too.
 
When you pokemon is out and you try to use surf and give you that error:
Spoiler:


Go to 'return HiddenMoveHandlers.triggerCanUseMove(move,pkmn)' inside following pokemon script and add a third argument:'nil':
Code:
return HiddenMoveHandlers.triggerCanUseMove(move,pkmn[COLOR="Red"],nil[/COLOR])
And it will fix.
 
Add Water Reflection to Following Pokemon event:

Inside Following Script, change all '==Dependent' to '[/Dependent/]'. The script haves 6 lines with that. Replace all of them:
Code:
  def change_sprite(id, shiny=nil, animation=nil, form=nil, gender=nil, shadow=false)
    events=$PokemonGlobal.dependentEvents
    for i in 0...events.length
      if events[i] && events[i][8][COLOR="Red"][/Dependent/][/COLOR] #=="Dependent" #original code

Code:
  def remove_sprite(animation=nil)
    events=$PokemonGlobal.dependentEvents
    for i in 0...events.length
      if events[i] && events[i][8][COLOR="red"][/Dependent/][/COLOR] #=="Dependent" original code

Code:
  def talk_to_pokemon
    e=$Trainer.party[0]
    events=$PokemonGlobal.dependentEvents
    for i in 0...events.length
      if events[i] && events[i][8][COLOR="red"][/Dependent/][/COLOR] #=="Dependent" original code

Spoiler:


Code:
def SetMoveRoute(commands,waitComplete=true)
    events=$PokemonGlobal.dependentEvents
    for i in 0...events.length
      if events[i] && events[i][8][COLOR="red"][/Dependent/][/COLOR]#=="Dependent"

Code:
class Interpreter
  
  def command_end
    # Clear list of event commands
    @list = nil
    # If main map event and event ID are valid
    if @main && @event_id > 0 && !($game_map.events[@event_id] && $game_map.events[@event_id].name[COLOR="red"][/Dependent/][/COLOR])#=="Dependent")

Change the red line:
Code:
def pbPokemonFollow(x)
 [COLOR="Red"] Kernel.pbAddDependency2(x, "DependentReflection", Unused_Common_Event)[/COLOR] #Kernel.pbAddDependency2(x, "Dependent", Unused_Common_Event)
  $PokemonTemp.dependentEvents.refresh_sprite
  $PokemonTemp.dependentEvents.Come_back(nil,false)
  $game_switches[Following_Activated_Switch]=true
  $game_switches[Toggle_Following_Switch]=true
end

Then, search 'Sprite_WaterReflection' script, and add the red line:
Spoiler:


Finally, inside 'PField_DependentEvents' search to 'def createEvent(eventData)' and add the red line:
Spoiler:



Thanks Vendily to made that great edition!
 
Last edited:
I found a way to "fix" shadow effect (using Shadow Overworld made by Marin, link here).

First, install the script and graphics. Then, inside 'Following Pokemon' script, add the red lines:
Spoiler:


To remove the shadow effect when the Player surfs or dives:
Go to 'Shadow Overworld' script made by Marin and add the red lines:
Spoiler:


If you have that problem:
"My shadows only work when I call out a following pokemon and left the room , meaning before I get a pokemon and let it follow, I have no shadow.
The script is underneath following script."
Check here.

And done!
 
Last edited:
So, I Installed the script under Elite Battle System and Modular Pause menu and when I talked to my Pokemon I got this error:
---------------------------
Pokemon Distortion
---------------------------
[Pokémon Essentials version 17.2]

Exception: NoMethodError

Message: undefined method `>' for nil:NilClass

RPG__Sprite:124:in `effect?'

RPG__Sprite:440:in `effect?'

RPG__Sprite:439:in `each'

RPG__Sprite:439:in `effect?'

Sprite_AnimationSprite:31:in `update'

Sprite_AnimationSprite:86:in `update'

Sprite_AnimationSprite:85:in `each'

Sprite_AnimationSprite:85:in `update'

Scene_Map:43:in `updateSpritesets'

Scene_Map:37:in `each'



This exception was logged in

C:\Users\jtsov\Saved Games\Pokemon Distortion\errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
====================================================================================
Then I Put it above Modular Menu System and Elite Battle System and when I talked to my Pokemon, I got the same Error:

---------------------------
Pokemon Distortion
---------------------------
[Pokémon Essentials version 17.2]

Exception: NoMethodError

Message: undefined method `>' for nil:NilClass

RPG__Sprite:124:in `effect?'

RPG__Sprite:440:in `effect?'

RPG__Sprite:439:in `each'

RPG__Sprite:439:in `effect?'

Sprite_AnimationSprite:31:in `update'

Sprite_AnimationSprite:86:in `update'

Sprite_AnimationSprite:85:in `each'

Sprite_AnimationSprite:85:in `update'

Scene_Map:43:in `updateSpritesets'

Scene_Map:37:in `each'



This exception was logged in

C:\Users\jtsov\Saved Games\Pokemon Distortion\errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
====================================================================================
I don't know what's happening, please help.
 
ATT WHEN THE PLAYER USES SURF (MAKE "MORE NATURAL")
In 'def check_surf(animation=nil)' add the red lines:
Spoiler:


To make a little more natural, when Surf ends:
Spoiler:

If you want a shadow effect "more natural" when you are healing your pokemons:
Spoiler:
 
Last edited:
Spoiler:

the issue is that you did not replace the animations.rxdata while rmxp is closed.
 
How to add pbJump to Following Pokemon:
inside 'PField_Field' replace 'def pbLedge(xOffset,yOffset)' to:
Spoiler:


Then, below 'def Kernel.pbJumpToward(dist=1,playSound=false,cancelSurf=false)' code, paste this code (red lines):
Spoiler:
 
If you use Party Screen to switch pokemon places inside the Water (surfing or diving) and want a "more natural" switch scene in overworld:
GIF example:
Spoiler:

Inside 'PScreen_Party' script paste the red lines:
Spoiler:
 
Last edited:
Hello,

I'm trying to get the follower script to work when you have to run back to the poke center, but the Pokemon won't spawn again after your party is healed. Then if you try to talk to the spot where the pokemon SHOULD be, or you use the pokemon center again, you get this error.

Code:
[Pokémon Essentials version 17.2]

Exception: NoMethodError
Message: undefined method `-' for nil:NilClass
Follower:702:in `talk_to_pokemon'
Follower:1559:in `update'
Scene_Map:234:in `main'
Scene_Map:231:in `loop'
Scene_Map:236:in `main'
Main:49:in `mainFunctionDebug'
Main:27:in `mainFunction'
Main:27:in `pbCriticalCode'
Main:27:in `mainFunction'
Main:59

Please help? thanks
 
Basically, I need help. I want second pokemon to follow instead of first one. How can I do this? And I want first Pokemon to be permanent member of party which can not be removed nor sent to box!
 
ATT WHEN THE PLAYER USES SURF (MAKE "MORE NATURAL")
In 'def check_surf(animation=nil)' add the red lines:
Spoiler:


To make a little more natural, when Surf ends:
Spoiler:

If you want a shadow effect "more natural" when you are healing your pokemons:
Spoiler:

Where do you place the third pice of code, the one for the shadow at the pokémon center? Because I can't find those code lines.
 
If you use Party Screen to switch pokemon places inside the Water (surfing or diving) and want a "more natural" switch scene in overworld:
GIF example:
Spoiler:

Inside 'PScreen_Party' script paste the red lines:
Spoiler:

May I know From where did you get that Party screen?
It looks pretty awesome!
 
Back
Top