• 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

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
  • Last edited:
    18
    Posts
    5
    Years
    • Seen Sep 4, 2019
    is there a way to get the following pokemon to change what it says when you talk to it. based on its happiness
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • is there a way to get the following pokemon to change what it says when you talk to it. based on its happiness

    Use CTRL SHIFT F or just CTRL F (inside Following Script) and you will find:
    Code:
    #===============================================================================
    # * This random message shows the Pokemon's Happiness Level
    #===============================================================================             
              elsif random1==6 # Check Happiness Level
                if e.happiness>0 && e.happiness<=50
                  $scene.spriteset.addUserAnimation(Emo_Hate, pos_x, pos_y-2)
                  pbWait(70)
                  Kernel.pbMessage(_INTL("{1} hates to travel with {2}.",e.name,$Trainer.name))
                elsif e.happiness>50 && e.happiness<=100
                  $scene.spriteset.addUserAnimation(Emo_Normal, pos_x, pos_y-2)
                  pbWait(100)
                  Kernel.pbMessage(_INTL("{1} is still unsure about traveling with {2} is a good thing or not.",e.name,$Trainer.name))
                elsif e.happiness>100 && e.happiness<150
                  $scene.spriteset.addUserAnimation(Emo_Happy, pos_x, pos_y-2)
                  Kernel.pbMessage(_INTL("{1} is happy traveling with {2}.",e.name,$Trainer.name))
                elsif e.happiness>=150
                  $scene.spriteset.addUserAnimation(Emo_love, pos_x, pos_y-2)
                  pbWait(70)
                  Kernel.pbMessage(_INTL("{1} loves traveling with {2}.",e.name,$Trainer.name))
                end
              end
    Add what you want.

    P.S: Thanks to 'elsif random1==6' Will be a random message.
     
    3
    Posts
    5
    Years
    • Seen May 29, 2019
    Yo, for some reason the following sprites when walking left and right get bunched in with the character (as in there's no gap between the player and follower).
    Is there a modification I can do to the script to make the gap wider walking left and right? Its fine walking up and down.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • If you want the pokemon to be static (no animation) if you are sliding on the ice, find 'def update_stepping' inside Following Pokemon Script and add the lines:
    Code:
      def update_stepping
       [B][I][U] currentTag = pbGetTerrainTag($game_player)
        return if PBTerrain.isIce?(currentTag)[/U][/I][/B]
        FollowingMoveRoute([PBMoveRoute::StepAnimeOn])
      end
     
    Last edited:
    39
    Posts
    8
    Years
    • Seen May 2, 2024
    How can the following pokémon be turned off to have a trainer npc following you? I try turning switch 126 off and '$PokemonTemp.dependentEvents.remove_sprite(true)' but when the npc follows me leaves a space behind as if the following pokemon was still there but invisible (and I want to know also how to turn it back on when the event ends).
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • How can the following pokémon be turned off to have a trainer npc following you? I try turning switch 126 off and '$PokemonTemp.dependentEvents.remove_sprite(true)' but when the npc follows me leaves a space behind as if the following pokemon was still there but invisible (and I want to know also how to turn it back on when the event ends).

    The reason is when you turn off the following, the Dependency Events turns to 'nil', also the graphics gone but the event still alive into the game. So i think you need to do this to remove all events (following Pokémon in case) or use 'pbRemoveDependency(event)' before you invite some new NPC follower.
     
    Last edited:

    mybusiness

    Guest
    0
    Posts
    Good work, WolfPP. Already installed all here, but when I mount on the bicyle, this happens:
    giphy.gif
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Good work, WolfPP. Already installed all here, but when I mount on the bicyle, this happens:
    https://gph.is/g/E3ldqR7

    If you are using my shadow ow script, you will read that i coded to return if character_name==nil. So, check if you 'def remove_sprite" will calls the event (following pokemon) by "nil".

    Also, maybe you need to add the defs to macro and acro bike script, because they replace what dismountbike does, i think. So check these new codes about custom bike too.
     
    Last edited:

    mybusiness

    Guest
    0
    Posts
    Didn't understand. Here is the method. What should I change?
    Code:
     def remove_sprite(animation=nil)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8][/Dependent/]
            events[i][6]=sprintf("nil")
            @realEvents[i].character_name=sprintf("nil")
            if animation==true
              $scene.spriteset.addUserAnimation(Animation_Come_In,@realEvents[i].x,@realEvents[i].y)
              pbWait(10)
            end
            $game_variables[Current_Following_Variable]=$Trainer.party[0]
            $game_variables[Walking_Time_Variable]=0
          end
        end
      end

    Also, I installed your Sprite_ShadowOverworld with all other details, but I get like two shadows overlapped...

    EDIT: Forget about that overlapping shadows. I solved it. But when mounting the normal bike the shadow still don't fade away.
    EDIT 2: While having a non-water bird following me and using dive, also the shadow persists. So, something must be fixed in the FollowingPokemon script and Marin's OW shadows script. Example of bug:
    Spoiler:


    EDIT 3: Solved
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Wait, are you using Marin and mine script shadow ow together? If so, why? Oo
    Try to keep only mine script and test.
     

    mybusiness

    Guest
    0
    Posts
    Wait, are you using Marin and mine script shadow ow together? If so, why? Oo
    Try to keep only mine script and test.

    pfff that was the problem xd. Now I use only yours and works wonderfully.
     

    mybusiness

    Guest
    0
    Posts
    Is it safe to remove this part of the following pokemon script? I would let only $PokemonTemp.dependentEvents.add_following_time to stay.
    Code:
    #Update follower's following time
    class Game_Player < Game_Character
      
      alias follow_update update
      def update
        follow_update
        $PokemonTemp.dependentEvents.add_following_time
        if $game_switches[Toggle_Following_Switch] == false
          $scene.spriteset.usersprites.select do |e|
            e.is_a?(DependentEventSprites)
          end.each do |des|
            des.sprites.each do |e|
              if e && e.shadow
                e.shadow.dispose
                e.shadow = nil
              end
            end
          end
        else
          $scene.spriteset.usersprites.select do |e|
            e.is_a?(DependentEventSprites)
          end.each do |des|
            des.sprites.each do |e|
              e.make_shadow if e.respond_to?(:make_shadow)
            end
          end
        end
      end
    end
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Is it safe to remove this part of the following pokemon script? I would let only $PokemonTemp.dependentEvents.add_following_time to stay.
    Dude, delete everything about his script. o.o Don't be afraid. That part was what i made to trigger shadow effect into his script. Forget it and remove all you have about it and keep only with your code and test. o.o
     
    Last edited:
    220
    Posts
    9
    Years
  • I still not know exactly what the codes that belong to marin shadow for overworld in pokemon follower script, that should be removed. Because, I remove every line or little parts with shadow name on some parts, even If part containing shadow on its name. But my doubt is the same as mybusiness, because, if i remove all of that code, i'll get errors and the game crashes, if i remove only one If part and lines containing shadow name on it, it would crash too, so, i will ask this: Can you post/paste here or in the discord your Pokemon follower script without the shadows? I can't managed to do it and some people are experiencing the same issue, please give us more info on what lines should be removed or paste here your follower script so i can track the shadow lines and then post here for others what lines should be removed. Otherwise, i will not implement this script due to lack of info and support in this matter. You have some scripting experience, but some people like me, don't have that much experience, that's why it is very dificult to us to track the lines and we can do some mistakes, which it will create crashes. Another thing, sometimes your english is a bit weird in some parts when answering my questions, we can talk in portuguese in discord chat. :/ The PC will go down for some time, due to moving into the new server. Sorry for the long text guys. XD
     

    mybusiness

    Guest
    0
    Posts
    Make sure the only script for shadows are that of WolfPP´s.
    Now, remove your Following Script (save you code in a notepad, for safety purposes) and put this instead, modifying the initial settings of course:
    Spoiler:
     
    Last edited:

    avalypuff

    Legendary
    4
    Posts
    4
    Years
    • Seen May 7, 2022
    So I finally installed this script and got it working, but I noticed that the Pokemon are way too close to the player for my liking...

    I've been looking through the code and even have my girlfriend, who's more familiar with coding, looking through it to see how to reposition the sprites so that they're just a few spaces further away and not constantly touching the player, but so far we haven't had any luck. Does anyone know how we might go about repositioning the pokemon?
     
    3
    Posts
    6
    Years
    • Seen Jan 31, 2024
    I keep getting this error:
    [Pokémon Essentials version 17.2]

    Exception: TypeError

    Message: cannot convert Fixnum into String

    Following_Pokemon:222:in `+'

    Following_Pokemon:222:in `add_following_time'

    Following_Pokemon:1464:in `update'

    Scene_Map:164:in `follow_update'

    Scene_Map:161:in `loop'

    Scene_Map:170:in `follow_update'

    Following_Pokemon:1551:in `update'

    Scene_Map:234:in `main'

    Scene_Map:231:in `loop'

    Scene_Map:236:in `main'
     
    Back
    Top