• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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

1,403
Posts
10
Years
    • Seen Apr 29, 2024
    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:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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

    the bunny
    20
    Posts
    5
    Years
  • 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.
     
    2
    Posts
    5
    Years
    • Seen Feb 27, 2019
    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?
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    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.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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

    unknown.png


    unknown.png


    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:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Is there anyway to add a space between you and your pokemon following you?

    I recommend you to read all script and find:
    Spoiler:
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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:
    4
    Posts
    5
    Years
    • Seen Apr 6, 2019
    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.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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:
    1,682
    Posts
    8
    Years
    • Seen today
    Spoiler:

    the issue is that you did not replace the animations.rxdata while rmxp is closed.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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:
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • 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:
    1
    Posts
    5
    Years
    • Seen Aug 9, 2020
    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
     
    19
    Posts
    5
    Years
    • Seen Nov 21, 2019
    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!
     
    39
    Posts
    8
    Years
    • Seen yesterday
    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.
     
    350
    Posts
    5
    Years
  • 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