Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old July 15th, 2012 (5:41 PM). Edited July 16th, 2012 by ~Angel~.
~Angel~'s Avatar
~Angel~ ~Angel~ is offline
Lead developer for Pokémon Millennium
     
    Join Date: Mar 2010
    Location: United States Of America.
    Age: 19
    Gender: Male
    Nature: Quiet
    Posts: 286
    God I got some many questions XD
    But this one is for others. I am using P-sign's B/W Pack and Pokemon Essentials B/W's overworlds (Recolored shiny by me 50% Done) and finally Zingzags/Help-14's follow script. I have thought it through but can't put my finger on it. I want to make all 649 pokemon be able to follow the character on of the most ultimate add-ons for pokemon. I am yet un-able to put my finger on why the sprites won't show. This is a project Zingzags was working on but is un-able to work on now. Now I am trying to take it over. I wish I had more expirence with Scripting but what can you do about newbies?
    Code:
    #==============================================================================
    # ¡Ü Credits to Help - 14 for both the scripts and Sprites
    # ¡Ü Edited by Zingzags 
    # -Fixed bugs
    # -Clean ups
    # -Fixed Surf Bug (After Surf is done)
    # -Fixed def talk_to_pokemon while in surf
    # -Fixed Surf Check
    # -Fixed Type Check
    # -Added Door Support
    # -Fixed Hp Bug
    # -Added Pokemon Center Support
    # -Animation problems
    # -Fixed Walk_time_variable problem
    # -Added random item loot
    # -Added egg check
    #==============================================================================
    # Zingzags comments
    #==============================================================================
    # I know its not perfect, and it can be shortened, for example addind an array 
    # for the random items.
    #==============================================================================
    
    #==============================================================================
    #   ¡Ü Control the following Pokemon
    #==============================================================================
    
    def FollowingMoveRoute(commands,waitComplete=false)
        $PokemonTemp.dependentEvents.SetMoveRoute(commands,waitComplete)
    end
    
    #==============================================================================
    #   ¡Ü Pokemon Following Character v3 By Help-14
    #==============================================================================
    
    class DependentEvents
    #==============================================================================
    # Raises The Current Pokemon's Happiness levels +1 per each time the 
    # Walk_time_Variable reachs 5000 then resets to 0
    # ItemWalk, is when the variable reaches a certain amount, that you are able to talk to your pokemon to recieve an item
    #==============================================================================
        def add_following_time
          if $game_switches[2]==true && $Trainer.party.length>=1
            $game_variables[Walking_Time_Variable]+=1 if $game_variables[Current_Following_Variable]!=$Trainer.party.length
            if $game_variables[Walking_Time_Variable]==5000
              $Trainer.party[0].happiness+=1
              $game_variables[Walking_Time_Variable]=0
            if $game_variables[ItemWalk]==5
               else
               $game_variables[ItemWalk]+=1
              end
            end
          end
        end
      #----------------------------------------------------------------------------
      # -  refresh_sprite
      # -  Change sprite without animation
      #----------------------------------------------------------------------------
      
      def refresh_sprite
        if $Trainer.party.length!=$game_variables[Current_Following_Variable]
          if $Trainer.party[0].isShiny?
            shiny=true
          else
            shiny=false
          end
          if $Trainer.party[0].hp>0 && !$Trainer.party[0].egg?
          change_sprite($Trainer.party[0].species, shiny, false)
        elsif $Trainer.party[0].hp<=0 
          remove_sprite
          end
         end
        end
    
      #----------------------------------------------------------------------------
      # - change_sprite(id, shiny, animation)
      # - Example, to change sprite to shiny lugia with animation:
      #     change_sprite(249, true, true)
      # - If just change sprite:
      #     change_sprite(249)
      #----------------------------------------------------------------------------
      def change_sprite(id, shiny=nil, animation=nil)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]=="Dependent"
            if shiny==true
               events[i][6]=sprintf("%03ds",id)
            if FileTest.image_exist?("Graphics/Characters/"+events[i][6])
              @realEvents[i].character_name=sprintf("%03ds",id)
            else
              events[i][6]=sprintf("%03d",id)
              @realEvents[i].character_name=sprintf("%03d",id)
              end
            else
              events[i][6]=sprintf("%03d",id)
              @realEvents[i].character_name=sprintf("%03d",id)
            end
           if animation==true
              $scene.spriteset.addUserAnimation(Animation_Come_Out,@realEvents[i].x,@realEvents[i].y)
            end
            $game_variables[Walking_Time_Variable]=0
          end
        end
      end
      
      #----------------------------------------------------------------------------
      # - remove_sprite(animation)
      # - Example, to remove sprite with animation:
      #     remove_sprite(true)
      # - If just remove sprite:
      #     remove_sprite
      #----------------------------------------------------------------------------
      
      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
    
      #----------------------------------------------------------------------------
      # - check_surf(animation)
      # - If current Pokemon is a water Pokemon, it is still following.
      # - If current Pokemon is not a water Pokemon, remove sprite.
      # - Require Water_Pokemon_Can_Surf = true to enable
      #----------------------------------------------------------------------------
    def check_surf(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")
           else
           if $Trainer.party[0].hp>0 && !$Trainer.party[0].egg?
            if $Trainer.party[0].hasType?(:WATER)
            remove_sprite
          else
            remove_sprite
            pbWait(20)
          end
        elsif $Trainer.party[0].hp<=0 
          end
        end
      end
    end  
      
      #----------------------------------------------------------------------------
      # -  talk_to_pokemon
      # -  It will run when you talk to Pokemon following
      #----------------------------------------------------------------------------
    
      def talk_to_pokemon
        e=$Trainer.party[0]
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]=="Dependent"
              [email protected][i].x
              [email protected][i].y
          end
        end
        if e==0
        else
        if e.hp>0 && !$Trainer.party[0].egg?
        if $PokemonGlobal.surfing==true || $PokemonGlobal.bicycle==true
        else
          if e!=6
           pbPlayCry(e.species)
           random1=rand(5)
    if $game_variables[ItemWalk]==5 
          items=[:POTION,:SUPERPOTION,:FULLRESTORE,:REVIVE,:PPUP,
           :PPMAX,:RARECANDY,:REPEL,:MAXREPEL,:ESCAPEROPE,
           :HONEY,:TINYMUSHROOM,:PEARL,:NUGGET,:GREATBALL,
           :ULTRABALL,:THUNDERSTONE,:MOONSTONE,:SUNSTONE,:DUSKSTONE,
           :REDAPRICORN,:BLUAPRICORN,:YLWAPRICORN,:GRNAPRICORN,:PNKAPRICORN,
           :BLKAPRICORN,:WHTAPRICORN
          ]
    random2=0
    loop do
      random2=rand(items.length)
      break if hasConst?(PBItems,items[random2])
     end
    
    Kernel.pbMessage(_INTL("{1} seems to be holding something, it looks like {1} wants to give it to me.",e.name))
    Kernel.pbPokemonFound(getConst(PBItems,items[random2]))
    $game_variables[ItemWalk]=0
          end
          
           if random1==0
            $scene.spriteset.addUserAnimation(Emo_sing, pos_x, pos_y-2)
            pbWait(50)
            Kernel.pbMessage(_INTL("{1} loves this tune so much that {1} is singing it.",e.name)) 
          elsif e.happiness>0 && e.happiness<=50
            $scene.spriteset.addUserAnimation(Emo_Hate, pos_x, pos_y-2)
            pbWAit(70)
            Kernel.pbMessage(_INTL("{1} hate to travel with {2}.",e.name,$Trainer.name))
          elsif e.status==PBStatuses::POISON && e.hp>0 && !e.egg?
            $scene.spriteset.addUserAnimation(Emo_Poison, pos_x, pos_y-2)
            pbWait(120)
            Kernel.pbMessage(_INTL("{1} is badly poisoned, {1} needs help quick.",e.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 undecided for whether 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
          
        else
        
         
         end
        end
       end
      end
     end
    
    
    def Come_back(shiny=nil, animation=nil)
      events=$PokemonGlobal.dependentEvents
      if $game_variables[Current_Following_Variable]==$Trainer.party.length
          $game_variables[Current_Following_Variable]
        else
          $game_variables[Current_Following_Variable]
        end
        if $game_variables[Current_Following_Variable]==$Trainer.party.length
          remove_sprite(false)
          for i in 0...events.length 
          $scene.spriteset.addUserAnimation(Animation_Come_Out,@realEvents[i].x,@realEvents[i].y)
       end
         else
          if $Trainer.party[0].isShiny?
            shiny=true
          else
            shiny=false
          end
          change_sprite($Trainer.party[0].species, shiny, false)
        end
        for i in 0..$Trainer.party.length-1
            if $Trainer.party[i].hp>0 && !$Trainer.party[0].egg?
              $game_variables[Current_Following_Variable]=i
              refresh_sprite
              break
            end
          end
        for i in 0...events.length 
           for i in 0..$Trainer.party.length-1
         if $Trainer.party[i].hp<=0 
           id = $Trainer.party[i].species
         else
           id = $Trainer.party[i].species
          end
         end
      if events[i] && events[i][8]=="Dependent"
            if shiny==true
               events[i][6]=sprintf("%03ds",id)
            if FileTest.image_exist?("Graphics/Characters/"+events[i][6])
              @realEvents[i].character_name=sprintf("%03ds",id)
            else
              events[i][6]=sprintf("%03d",id)
              @realEvents[i].character_name=sprintf("%03d",id)
              end
            else
              events[i][6]=sprintf("%03d",id)
              @realEvents[i].character_name=sprintf("%03d",id)
            end
          if animation==true
          else
          end
        end 
      end 
    end
    
      #----------------------------------------------------------------------------
      # - check_faint
      # - If current Pokemon is fainted, change other Pokemon.
      #----------------------------------------------------------------------------
    
    def check_faint
      if $PokemonGlobal.surfing==true || $PokemonGlobal.bicycle==true
      else
    
      if $Trainer.party[0].hp<=0 
        $game_variables[Current_Following_Variable]=0  
        remove_sprite
       elsif $Trainer.party[0].hp>0 && !$Trainer.party[0].egg?
    
      end 
     end
    end
    
    def SetMoveRoute(commands,waitComplete=false)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]=="Dependent"
            pbMoveRoute(@realEvents[i],commands,waitComplete)
          end
        end
      end
    end
    
      #----------------------------------------------------------------------------
      # -  Auto add Script to Kernel.pbSurf, It'll check curent Pokemon when surf
      #----------------------------------------------------------------------------  
    
      def Kernel.pbSurf
    #  if $game_player.pbHasDependentEvents?
    #    return false
    #  end
      if $DEBUG ||
        (HIDDENMOVESCOUNTBADGES ? $Trainer.numbadges>=BADGEFORSURF : $Trainer.badges[BADGEFORSURF])
        movefinder=Kernel.pbCheckMove(:SURF)
        if $DEBUG || movefinder
          if Kernel.pbConfirmMessage(_INTL("The water is dyed a deep blue...  Would you like to surf?"))
            speciesname=!movefinder ? $Trainer.name : movefinder.name
            Kernel.pbMessage(_INTL("{1} used Surf!",speciesname))
            pbHiddenMoveAnimation(movefinder)
    #        $PokemonTemp.dependentEvents.check_surf
            surfbgm=pbGetMetadata(0,MetadataSurfBGM)
            $PokemonTemp.dependentEvents.check_surf
            if surfbgm
              pbCueBGM(surfbgm,0.5)
            end
            pbStartSurfing()
            return true
          end
        end
      end
      return false
    end
    
    
    
      #----------------------------------------------------------------------------
      # -  Auto add Script to pbEndSurf, It'll show sprite after surf
      #----------------------------------------------------------------------------  
    
      def pbEndSurf(xOffset,yOffset)
          return false if !$PokemonGlobal.surfing
      x=$game_player.x
      y=$game_player.y
      currentTag=$game_map.terrain_tag(x,y)
      facingTag=Kernel.pbFacingTerrainTag
      if pbIsSurfableTag?(currentTag)&&!pbIsSurfableTag?(facingTag)
        if Kernel.pbJumpToward
          Kernel.pbCancelVehicles
          $game_map.autoplayAsCue
          $game_player.increase_steps
          result=$game_player.check_event_trigger_here([1,2])
          Kernel.pbOnStepTaken(result)
          $PokemonTemp.dependentEvents.Come_back(true)
        end
        return true
      end
      return false
    end
      #----------------------------------------------------------------------------
      # -  Auto add Script to Kernel.pbCanUseHiddenMove, fix HM bug
      #----------------------------------------------------------------------------  
    def Kernel.pbCanUseHiddenMove?(pkmn,move)
     case move
      when PBMoves::FLY
       if !$DEBUG && !$Trainer.badges[BADGEFORFLY]
        Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
        return false
       end
       #if $game_player.pbHasDependentEvents?
       # Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
       # return false
       #end
       if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       return true
      when PBMoves::CUT
       if !$DEBUG && !$Trainer.badges[BADGEFORCUT]
        Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
        return false
       end
       facingEvent=$game_player.pbFacingEvent
       if !facingEvent || facingEvent.name!="Tree"
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       return true
      when PBMoves::HEADBUTT
       facingEvent=$game_player.pbFacingEvent
       if !facingEvent || facingEvent.name!="HeadbuttTree"
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       return true
      when PBMoves::SURF
       terrain=Kernel.pbFacingTerrainTag
       if !$DEBUG && !$Trainer.badges[BADGEFORCUT]
        Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
        return false
       end
       if $PokemonGlobal.surfing
        Kernel.pbMessage(_INTL("You're already surfing."))
        return false
       end
       #if $game_player.pbHasDependentEvents?
       # Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
       # return false
       #end
       terrain=Kernel.pbFacingTerrainTag
       if pbGetMetadata($game_map.map_id,MetadataBicycleAlways)
        Kernel.pbMessage(_INTL("Let's enjoy cycling!"))
        return false
       end
       if !pbIsWaterTag?(terrain)
        Kernel.pbMessage(_INTL("No surfing here!"))
        return false
       end
       return true
      when PBMoves::STRENGTH
       if !$DEBUG && !$Trainer.badges[BADGEFORSTRENGTH]
        Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
        return false
       end
       facingEvent=$game_player.pbFacingEvent
       if !facingEvent || facingEvent.name!="Boulder"
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       return true  
      when PBMoves::ROCKSMASH
       terrain=Kernel.pbFacingTerrainTag
       if !$DEBUG && !$Trainer.badges[BADGEFORROCKSMASH]
        Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
        return false
       end
       facingEvent=$game_player.pbFacingEvent
       if !facingEvent || facingEvent.name!="Rock"
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       return true  
      when PBMoves::FLASH
       if !$DEBUG && !$Trainer.badges[BADGEFORFLASH]
        Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
        return false
       end
       if !pbGetMetadata($game_map.map_id,MetadataDarkMap)
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       if $PokemonGlobal.flashUsed
        Kernel.pbMessage(_INTL("This is in use already."))
        return false
       end
       return true
      when PBMoves::WATERFALL
       if !$DEBUG && !$Trainer.badges[BADGEFORWATERFALL]
        Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
        return false
       end
       terrain=Kernel.pbFacingTerrainTag
       if terrain!=PBTerrain::Waterfall
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       return true
      when PBMoves::DIVE
       if !$DEBUG && !$Trainer.badges[BADGEFORDIVE]
        Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
        return false
       end
       if $PokemonGlobal.diving
        return true
       end
       if $game_player.terrain_tag!=PBTerrain::DeepWater
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       if !pbGetMetadata($game_map.map_id,MetadataDiveMap)
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       return true
      when PBMoves::TELEPORT
       if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       #if $game_player.pbHasDependentEvents?
       # Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
       # return false
       #end
       healing=$PokemonGlobal.healingSpot
       if !healing
        healing=pbGetMetadata(0,MetadataHome) # Home
       end
       if healing
        mapname=pbGetMapNameFromId(healing[0])
        if Kernel.pbConfirmMessage(_INTL("Want to return to the healing spot used last in {1}?",mapname))
         return true
        end
        return false
       else
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
      when PBMoves::DIG
       escape=pbGetMetadata($game_map.map_id,MetadataEscapePoint)
       if !escape
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
       end
       if $game_player.pbHasDependentEvents?
        Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
        return false
       end
       mapname=pbGetMapNameFromId(escape[0])
       if Kernel.pbConfirmMessage(_INTL("Want to escape from here and return to {1}?",mapname))
        return true
       end
       return false
      when PBMoves::SWEETSCENT
       return true
      else
       return HiddenMoveHandlers.triggerCanUseMove(move,pkmn)
     end
     return false
    end
    
    def pbPokemonFollow(x)
    Kernel.pbAddDependency2(x, "Dependent", CommonEvent)
    $PokemonTemp.dependentEvents.refresh_sprite
    end
    Replace pbMountBike
    Code:
    def Kernel.pbMountBike
      return if $PokemonGlobal.bicycle
      $PokemonGlobal.bicycle=true
      $PokemonTemp.dependentEvents.remove_sprite(true)
      Kernel.pbUpdateVehicle
      bikebgm=pbGetMetadata(0,MetadataBicycleBGM)
      if bikebgm
        pbCueBGM(bikebgm,0.5)
      end
    end
    Replace the Dependent event's with this:
    Code:
    class PokemonTemp
      attr_accessor :dependentEvents
    
      def dependentEvents
        @dependentEvents=DependentEvents.new if [email protected]
        return @dependentEvents
      end
    end
    
    
    
    def pbRemoveDependencies()
      $PokemonTemp.dependentEvents.removeAllEvents()
      pbDeregisterPartner() rescue nil
    end
    
    def pbAddDependency(event)
      $PokemonTemp.dependentEvents.addEvent(event)
    end
    
    def pbRemoveDependency(event)
      $PokemonTemp.dependentEvents.removeEvent(event)
    end
    
    def pbAddDependency2(eventID, eventName, commonEvent)
      $PokemonTemp.dependentEvents.addEvent($game_map.events[eventID],eventName,commonEvent)
    end
    
    # Gets the Game_Character object associated with a dependent event.
    def pbGetDependency(eventName)
      return $PokemonTemp.dependentEvents.getEventByName(eventName)
    end
    
    def pbRemoveDependency2(eventName)
      $PokemonTemp.dependentEvents.removeEventByName(eventName)
    end
    
    
    
    class PokemonGlobalMetadata
      attr_accessor :dependentEvents
    
      def dependentEvents
        @dependentEvents=[] if [email protected]
        return @dependentEvents
      end
    end
    
    
    
    class Game_Event
      def set_starting
        @starting=true
      end
    end
    
    
    
    def pbTestPass(follower,x,y,direction=nil)
      return $MapFactory.isPassableStrict?(follower.map.map_id,x,y,follower)
    end
    
    # Same map only
    def moveThrough(follower,direction)
      oldThrough=follower.through
      follower.through=true
      case direction
        when 2 # down
          follower.move_down
        when 4 # left
          follower.move_left
        when 6 # right
          follower.move_right
        when 8 # up
          follower.move_up
      end 
      follower.through=oldThrough
    end
    
    # Same map only
    def moveFancy(follower,direction)
      deltaX=(direction == 6 ? 1 : (direction == 4 ? -1 : 0))
      deltaY=(direction == 2 ? 1 : (direction == 8 ? -1 : 0))
      newX = follower.x + deltaX
      newY = follower.y + deltaY
      # Move if new position is the player's, or the new position is passable,
      # or the current position is not passable
      if ($game_player.x==newX && $game_player.y==newY) ||
         pbTestPass(follower,newX,newY,0) ||
         !pbTestPass(follower,follower.x,follower.y,0)
        oldThrough=follower.through
        follower.through=true
        case direction
          when 2 # down
            follower.move_down
          when 4 # left
            follower.move_left
          when 6 # right
            follower.move_right
          when 8 # up
            follower.move_up
        end 
        follower.through=oldThrough
      end
    end
    
    # Same map only
    def jumpFancy(follower,direction)
      deltaX=(direction == 6 ? 2 : (direction == 4 ? -2 : 0))
      deltaY=(direction == 2 ? 2 : (direction == 8 ? -2 : 0))
      halfDeltaX=(direction == 6 ? 1 : (direction == 4 ? -1 : 0))
      halfDeltaY=(direction == 2 ? 1 : (direction == 8 ? -1 : 0))
      middle=pbTestPass(follower,follower.x+halfDeltaX,follower.y+halfDeltaY,0)
      ending=pbTestPass(follower,follower.x+deltaX,    follower.y+deltaY,    0)
      if middle
        moveFancy(follower,direction)
        moveFancy(follower,direction)
      elsif ending
        if pbTestPass(follower,follower.x,follower.y,0)
          follower.jump(deltaX,deltaY)
        else
          moveThrough(follower,direction)
          moveThrough(follower,direction)
        end
      end
    end
    
    def pbFancyMoveTo(follower,newX,newY)
      if follower.x-newX==-1 && follower.y==newY
        moveFancy(follower,6)
      elsif follower.x-newX==1 && follower.y==newY
        moveFancy(follower,4)
      elsif follower.y-newY==-1 && follower.x==newX
        moveFancy(follower,2)
      elsif follower.y-newY==1 && follower.x==newX
        moveFancy(follower,8)
      elsif follower.x-newX==-2 && follower.y==newY
        jumpFancy(follower,6)
      elsif follower.x-newX==2 && follower.y==newY
        jumpFancy(follower,4)
      elsif follower.y-newY==-2 && follower.x==newX
        jumpFancy(follower,2)
      elsif follower.y-newY==2 && follower.x==newX
        jumpFancy(follower,8)
      elsif follower.x!=newX || follower.y!=newY
        follower.moveto(newX,newY)
      end
    end
    
    
    
    class DependentEvents
      def createEvent(eventData)
        rpgEvent=RPG::Event.new(eventData[3],eventData[4])
        rpgEvent.id=eventData[1]
        if eventData[9]
          # Must setup common event list here and now
          commonEvent=Game_CommonEvent.new(eventData[9])
          rpgEvent.pages[0].list=commonEvent.list
        end
        newEvent=Game_Event.new(eventData[0],rpgEvent,
           $MapFactory.getMap(eventData[2]))
        newEvent.character_name=eventData[6]
        newEvent.character_hue=eventData[7]
        case eventData[5] # direction
          when 2 # down
            newEvent.turn_down
          when 4 # left
            newEvent.turn_left
          when 6 # right
            newEvent.turn_right
          when 8 # up
            newEvent.turn_up
        end
        return newEvent
      end
    
      attr_reader :lastUpdate
    
      def initialize
        # Original map, Event ID, Current map, X, Y, Direction
        events=$PokemonGlobal.dependentEvents
        @realEvents=[]
        @lastUpdate=-1
        for event in events
          @realEvents.push(createEvent(event))
        end
      end
    
      def pbEnsureEvent(event, newMapID)
        events=$PokemonGlobal.dependentEvents
        found=-1
        for i in 0...events.length
          # Check original map ID and original event ID 
          if events[i][0]==event.map_id && events[i][1]==event.id
            # Change current map ID
            events[i][2]=newMapID
            newEvent=createEvent(events[i])
            # Replace event
            @realEvents[i]=newEvent
            @lastUpdate+=1
            return i
          end
        end
        return -1
      end
    
      def pbFollowEventAcrossMaps(leader,follower,instant=false,leaderIsTrueLeader=true)
        d=leader.direction
        areConnected=$MapFactory.areConnected?(leader.map.map_id,follower.map.map_id)
        # Get the rear facing tile of leader
        facingDirection=[0,0,8,0,6,0,4,0,2][d]
        if !leaderIsTrueLeader && areConnected
          relativePos=$MapFactory.getThisAndOtherEventRelativePos(leader,follower)
          if (relativePos[1]==0 && relativePos[0]==2) # 2 spaces to the right of leader
            facingDirection=6
          elsif (relativePos[1]==0 && relativePos[0]==-2) # 2 spaces to the left of leader
            facingDirection=4
          elsif relativePos[1]==-2 && relativePos[0]==0 # 2 spaces above leader
            facingDirection=8
          elsif relativePos[1]==2 && relativePos[0]==0 # 2 spaces below leader
            facingDirection=2
          end
        end
        facings=[facingDirection] # Get facing from behind
        facings.push([0,0,4,0,8,0,2,0,6][d]) # Get right facing
        facings.push([0,0,6,0,2,0,8,0,4][d]) # Get left facing
        if !leaderIsTrueLeader
          facings.push([0,0,2,0,4,0,6,0,8][d]) # Get forward facing
        end
        mapTile=nil
        if areConnected
          bestRelativePos=-1
          oldthrough=follower.through
          follower.through=false
          for i in 0...facings.length
            facing=facings[i]
            tile=$MapFactory.getFacingTile(facing,leader)
            passable=tile && $MapFactory.isPassableStrict?(tile[0],tile[1],tile[2],follower)
            if i==0 && !passable && tile && 
               $MapFactory.getTerrainTag(tile[0],tile[1],tile[2])==PBTerrain::Ledge
              # If the tile isn't passable and the tile is a ledge,
              # get tile from further behind
              tile=$MapFactory.getFacingTileFromPos(tile[0],tile[1],tile[2],facing)
              passable=tile && $MapFactory.isPassableStrict?(tile[0],tile[1],tile[2],follower)
            end
            if passable
              relativePos=$MapFactory.getThisAndOtherPosRelativePos(
                 follower,tile[0],tile[1],tile[2])
              distance=Math.sqrt(relativePos[0]*relativePos[0]+relativePos[1]*relativePos[1])
              if bestRelativePos==-1 || bestRelativePos>distance
                bestRelativePos=distance
                mapTile=tile
              end
              if i==0 && distance<=1 # Prefer behind if tile can move up to 1 space
                break
              end
            end
          end
          follower.through=oldthrough
        else
          tile=$MapFactory.getFacingTile(facings[0],leader)
          passable=tile && $MapFactory.isPassableStrict?(
             tile[0],tile[1],tile[2],follower)
          mapTile=passable ? mapTile : nil
        end
        if mapTile && follower.map.map_id==mapTile[0]
          # Follower is on same map
          newX=mapTile[1]
          newY=mapTile[2]
          deltaX=(d == 6 ? -1 : d == 4 ? 1 : 0)
          deltaY=(d == 2 ? -1 : d == 8 ? 1 : 0)
          posX = newX + deltaX
          posY = newY + deltaY
          follower.move_speed=leader.move_speed # sync movespeed
          if (follower.x-newX==-1 && follower.y==newY) ||
             (follower.x-newX==1 && follower.y==newY) ||
             (follower.y-newY==-1 && follower.x==newX) ||
             (follower.y-newY==1 && follower.x==newX)
            if instant
              follower.moveto(newX,newY)
            else
              pbFancyMoveTo(follower,newX,newY)
            end
          elsif (follower.x-newX==-2 && follower.y==newY) ||
                (follower.x-newX==2 && follower.y==newY) ||
                (follower.y-newY==-2 && follower.x==newX) ||
                (follower.y-newY==2 && follower.x==newX)
            if instant
              follower.moveto(newX,newY)
            else
              pbFancyMoveTo(follower,newX,newY)
            end
          elsif follower.x!=posX || follower.y!=posY
            if instant
              follower.moveto(newX,newY)
            else
              pbFancyMoveTo(follower,posX,posY)
              pbFancyMoveTo(follower,newX,newY)
            end
          end
          pbTurnTowardEvent(follower,leader)
        else
          if !mapTile
            # Make current position into leader's position
            mapTile=[leader.map.map_id,leader.x,leader.y]
          end
          if follower.map.map_id==mapTile[0]
            # Follower is on same map as leader
            follower.moveto(leader.x,leader.y)
            pbTurnTowardEvent(follower,leader)
          else
            # Follower will move to different map
            events=$PokemonGlobal.dependentEvents
            eventIndex=pbEnsureEvent(follower,mapTile[0])
            if eventIndex>=0
              [email protected][eventIndex]
              newEventData=events[eventIndex]
              newFollower.moveto(mapTile[1],mapTile[2])
              newEventData[3]=mapTile[1]
              newEventData[4]=mapTile[2]
              if mapTile[0]==leader.map.map_id
                pbTurnTowardEvent(follower,leader)
              end
            end
          end
        end
      end
    
      def debugEcho
        self.eachEvent {|e,d|
           echoln d
           echoln [e.map_id,e.map.map_id,e.id]
        }
      end
    
      def pbMapChangeMoveDependentEvents
        events=$PokemonGlobal.dependentEvents
        updateDependentEvents
        leader=$game_player
        for i in 0...events.length
          [email protected][i]
          pbFollowEventAcrossMaps(leader,event,true,i==0)
          # Update X and Y for this event
          events[i][3]=event.x
          events[i][4]=event.y
          events[i][5]=event.direction
          # Set leader to this event
          leader=event
        end
      end
    
      def pbMoveDependentEvents
        events=$PokemonGlobal.dependentEvents
        updateDependentEvents
        leader=$game_player
        for i in 0...events.length
          [email protected][i]
          pbFollowEventAcrossMaps(leader,event,false,i==0)
          # Update X and Y for this event
          events[i][3]=event.x
          events[i][4]=event.y
          events[i][5]=event.direction
          # Set leader to this event
          leader=event
        end
      end
    
      def pbTurnDependentEvents
        events=$PokemonGlobal.dependentEvents
        updateDependentEvents
        leader=$game_player
        for i in 0...events.length
          [email protected][i]
          pbTurnTowardEvent(event,leader)
          # Update direction for this event
          events[i][5]=event.direction
          # Set leader to this event
          leader=event
        end
      end
    
      def eachEvent
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          yield @realEvents[i],events[i]
        end   
      end
    
      def updateDependentEvents
        events=$PokemonGlobal.dependentEvents
        return if events.length==0
        for i in 0...events.length
          [email protected][i]
          next if [email protected][i]
          event.transparent=$game_player.transparent
          if (event.jumping? || event.moving?) || !($game_player.jumping? || $game_player.moving?) then
            event.update
          elsif !event.starting
            event.set_starting
            event.update
            event.clear_starting
          end
          events[i][3]=event.x
          events[i][4]=event.y
          events[i][5]=event.direction
        end
        # Check event triggers
        if Input.trigger?(Input::C) && !pbMapInterpreterRunning?
          # Get position of tile facing the player
          facingTile=$MapFactory.getFacingTile()
          self.eachEvent {|e,d|
             next if !d[9]
             if e.x==$game_player.x && e.y==$game_player.y
               # On same position
               if not e.jumping? && (!e.respond_to?("over_trigger") || e.over_trigger?)
                 if e.list.size>1
                   # Start event
                   $game_map.refresh if $game_map.need_refresh
                   e.lock
                   pbMapInterpreter.setup(e.list,e.id,e.map.map_id)
                 end
               end
             elsif facingTile && e.map.map_id==facingTile[0] &&
                   e.x==facingTile[1] && e.y==facingTile[2]
               # On facing tile
               if not e.jumping? && (!e.respond_to?("over_trigger") || !e.over_trigger?)
                 if e.list.size>1
                   # Start event
                   $game_map.refresh if $game_map.need_refresh
                   e.lock
                   pbMapInterpreter.setup(e.list,e.id,e.map.map_id)
                 end
               end
             end
          }
        end
      end
    
      def removeEvent(event)
        events=$PokemonGlobal.dependentEvents
        mapid=$game_map.map_id
        for i in 0...events.length
          if events[i][2]==mapid && # Refer to current map
             events[i][0]==event.map_id && # Event's map ID is original ID
             events[i][1]==event.id
            events[i]=nil
            @realEvents[i]=nil
            @lastUpdate+=1
          end
          events.compact!
          @realEvents.compact!
        end
      end
    
      def getEventByName(name)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]==name # Arbitrary name given to dependent event
            return @realEvents[i]
          end
        end
        return nil
      end
    
      def removeAllEvents
        events=$PokemonGlobal.dependentEvents
        events.clear
        @realEvents.clear
        @lastUpdate+=1
      end
    
      def removeEventByName(name)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]==name # Arbitrary name given to dependent event
            events[i]=nil
            @realEvents[i]=nil
            @lastUpdate+=1
          end
          events.compact!
          @realEvents.compact!
        end
      end
    
      def addEvent(event,eventName=nil,commonEvent=nil)
        return if !event
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][0]==$game_map.map_id && events[i][1]==event.id
            # Already exists
            return
          end
        end
        # Original map ID, original event ID, current map ID,
        # event X, event Y, event direction,
        # event's filename,
        # event's hue, event's name, common event ID
        eventData=[
           $game_map.map_id,event.id,$game_map.map_id,
           event.x,event.y,event.direction,
           event.character_name.clone,
           event.character_hue,eventName,commonEvent
        ]
        newEvent=createEvent(eventData)
        events.push(eventData)
        @realEvents.push(newEvent)
        @lastUpdate+=1
        event.erase
      end
    end
    
    
    
    class DependentEventSprites
      def refresh
        for sprite in @sprites
          sprite.dispose
        end
        @sprites.clear
        $PokemonTemp.dependentEvents.eachEvent {|event,data|
           if data[0][email protected]_id # Check original map
             @map.events[data[1]].erase
           end
           if data[2][email protected]_id # Check current map
             @sprites.push(Sprite_Character.new(@viewport,event))
           end
        }
      end
    
      def initialize(viewport,map)
        @disposed=false
        @sprites=[]
        @map=map
        @viewport=viewport
        refresh
        @lastUpdate=nil
      end
    
      def update
        if [email protected]
          refresh
          @lastUpdate=$PokemonTemp.dependentEvents.lastUpdate
        end
        for sprite in @sprites
          sprite.update
        end
      end
    
      def dispose
        return if @disposed
        for sprite in @sprites
          sprite.dispose
        end
        @sprites.clear
        @disposed=true
      end
    
      def disposed?
        @disposed
      end
    end
    
    
    
    Events.onSpritesetCreate+=proc{|sender,e|
       spriteset=e[0] # Spriteset being created
       viewport=e[1] # Viewport used for tilemap and characters
       map=spriteset.map # Map associated with the spriteset (not necessarily the current map).
       spriteset.addUserSprite(DependentEventSprites.new(viewport,map))
    }
    
    Events.onMapSceneChange+=proc{|sender,e|
       scene=e[0]
       mapChanged=e[1]
       if mapChanged
         $PokemonTemp.dependentEvents.pbMapChangeMoveDependentEvents
       end
    }
    Add this into the script called Settings
    Code:
    #=========================================================
    # ● Config Script For Your Game Here
    # Change the emo_ to what ever number is the cell holding the animation
    #=========================================================
    Current_Following_Variable = 36
    CommonEvent = 3
    ItemWalk=26
    Walking_Time_Variable = 27
    Animation_Come_Out = 22
    Animation_Come_In = 23
    Emo_Happy = 24
    Emo_Normal = 25
    Emo_Hate = 26
    Emo_Poison= 27
    Emo_sing= 28
    Emo_love= 29
    Place this
    Code:
    $PokemonTemp.dependentEvents.refresh_sprite
    under this in the script section called PokemonParty.
    Look for this code:
    Code:
           next if havecommand
          if cmdSummary>=0 && command==cmdSummary
            @scene.pbSummary(pkmnid)
          elsif cmdSwitch>=0 && command==cmdSwitch
            @scene.pbSetHelpText(_INTL("Move to where?"))
            oldpkmnid=pkmnid
            [email protected](true)
            if pkmnid>=0 && pkmnid!=oldpkmnid
              pbSwitch(oldpkmnid,pkmnid)
    Place
    Code:
    $PokemonTemp.dependentEvents.refresh_sprite
    and place it under this or look for this in PokemonStorage:
    Code:
    def pbTrainerPC
     Kernel.pbMessage(_INTL("\\se[computeropen]{1} booted up the PC.",$Trainer.name))
     pbTrainerPCMenu
      pbSEPlay("computerclose")
    Place this
    Code:
    $PokemonTemp.dependentEvents.refresh_sprite
    under this in this in PokemonStorage:
    Code:
    def access
       Kernel.pbMessage(_INTL("\\se[accesspc]Accessed {1}'s PC.",$Trainer.name))
       pbTrainerPCMenu
    Find this in Game_Player
    Code:
    $PokemonTemp.dependentEvents.updateDependentEvents
    and place this under that:
    Code:
    $PokemonTemp.dependentEvents.add_following_time
    Find pbEndBattle in Pokemon Actual_scene and replace it with this:
    Code:
    def pbEndBattle(result)
        @abortable=false
        pbShowWindow(BLANK)
        # Fade out all sprites
        $PokemonTemp.dependentEvents.check_faint
        pbBGMFade(1.0)
        pbFadeOutAndHide(@sprites)
        pbDisposeSprites
      end
    Place this in both sections of the Pokemon center Nurse script:
    Code:
    $PokemonTemp.dependentEvents.refresh_sprite
    Finally place this above kernel.pbReceiveItem in PokemonField
    Code:
    def Kernel.pbPokemonFound(item,quantity=1,plural=nil)
      itemname=PBItems.getName(item)
      pocket=pbGetPocket(item)
      e=$Trainer.party[0].name
    if $PokemonBag.pbStoreItem(item,quantity) 
      pbWait(5)
    
        if $ItemData[item][ITEMUSE]==3 || $ItemData[item][ITEMUSE]==4
          Kernel.pbMessage(_INTL("\\se[]{1} found {2}!\\se[itemlevel]\\nIt contained {3}.\\wtnp[30]",e,itemname,PBMoves.getName($ItemData[item][ITEMMACHINE])))
          Kernel.pbMessage(_INTL("{1} put the {2}\r\nin the {3} Pocket.",$Trainer.name,itemname,PokemonBag.pocketNames()[pocket]))
        elsif isConst?(item,PBItems,:LEFTOVERS)
          Kernel.pbMessage(_INTL("\\se[]{1} found some {2}!\\se[itemlevel]\\wtnp[30]",e,itemname))
          Kernel.pbMessage(_INTL("{1} put the {2}\r\nin the {3} Pocket.",$Trainer.name,itemname,PokemonBag.pocketNames()[pocket]))
        else
          if quantity>1
            if plural
              Kernel.pbMessage(_INTL("\\se[]{1} found {2} {3}!\\se[itemlevel]\\wtnp[30]",e,quantity,plural))
              Kernel.pbMessage(_INTL("{1} put the {2}\r\nin the {3} Pocket.",$Trainer.name,plural,PokemonBag.pocketNames()[pocket]))
            else
              Kernel.pbMessage(_INTL("\\se[]{1} found {2} {3}s!\\se[itemlevel]\\wtnp[30]",e,quantity,itemname))
              Kernel.pbMessage(_INTL("{1} put the {2}s\r\nin the {3} Pocket.",$Trainer.name,itemname,PokemonBag.pocketNames()[pocket]))
            end
          else
            Kernel.pbMessage(_INTL("\\se[]{1} found one {2}!\\se[itemlevel]\\wtnp[30]",e,itemname))
            Kernel.pbMessage(_INTL("{1} put the {2}\r\nin the {3} Pocket.",$Trainer.name,itemname,PokemonBag.pocketNames()[pocket]))
          end
        end
        return true
      else   # Can't add the item
        if $ItemData[item][ITEMUSE]==3 || $ItemData[item][ITEMUSE]==4
          Kernel.pbMessage(_INTL("{1} found {2}!\\wtnp[20]",e,itemname))
        elsif isConst?(item,PBItems,:LEFTOVERS)
          Kernel.pbMessage(_INTL("{1} found some {2}!\\wtnp[20]",$Trainer.name,itemname))
        else
          if quantity>1
            if plural
              Kernel.pbMessage(_INTL("{1} found {2} {3}!\\wtnp[20]",e,quantity,plural))
            else
              Kernel.pbMessage(_INTL("{1} found {2} {3}s!\\wtnp[20]",$Trainer.name,quantity,itemname))
            end
          else
            Kernel.pbMessage(_INTL("{1} found one {2}!\\wtnp[20]",e,itemname))
          end
        end
        Kernel.pbMessage(_INTL("Too bad... The Bag is full..."))
        return false
      end
    end
    When you want to talk to the pokemon make sure to add
    Code:
    $PokemonTemp.dependentEvents.talk_to_pokemon
    To activate the script use:
    Code:
    pbPokemonFollow(x)
    x being the number of the pokemon going to follow you.
    Yeah I know it's sorta like a tutorial but. It's more of me needing help to XD Sorry I was just asking for help.
    More credit's to Zingzag's for the script and Help-14. I re-wrote the tutorial to help people understand it a bit better. So if anyone can help me find out what might be causing the sprites to not show please help me? I want to help people more and get some answers. I checked and was un able to find where the problem was being caused. If anyone is able to show me it would be greatly appreciated. Yet again I say yes it's like a tutorial as well. Sorry for this but I just want people to have something they were not able to have in Pokemon B/W and B/W2. Thanks again.
    Reply With Quote

    Relevant Advertising!

      #2    
    Old July 15th, 2012 (6:01 PM). Edited July 16th, 2012 by Rayd12smitty.
    Rayd12smitty's Avatar
    Rayd12smitty Rayd12smitty is offline
    Shadow Maker
       
      Join Date: Dec 2011
      Gender: Male
      Posts: 647
      this is quite a bit more descriptive. Thank you. You have done a lot to help people like me. I will try implementing this, and let you know

      ok. I just put everything in. No errors come up, which is a good sign, but the pokemon don't show up either. I have all the sprites in the characters folder in graphics. I don't know whats wrong. Do I have to make them show up with an event, or should they appear automatically

      EDITEDITEDIT

      Ok. First of all, ignore my last post. I figured out the switches to activate, and the pokemon follow now. I realized you forgot to add the Talkative thing in, but I did that anyway as well. My only problem now, is adding in the things that Zingzags put to go in the data folder. I got the first three that were images, but what type of file should the others be? When I click the link, they show up as computer code, and when I try to save it, it saves as a webpage archive, which i don't think is right. Everything else is great. My only thing is since I don't have all the data in the data folder, whenever i try talking to my pokemon, it calls oak, which is a problem...
      __________________
      Reply With Quote
        #3    
      Old July 16th, 2012 (5:25 AM).
      ~Angel~'s Avatar
      ~Angel~ ~Angel~ is offline
      Lead developer for Pokémon Millennium
         
        Join Date: Mar 2010
        Location: United States Of America.
        Age: 19
        Gender: Male
        Nature: Quiet
        Posts: 286
        Quote:
        Originally Posted by Rayd12smitty View Post
        this is quite a bit more descriptive. Thank you. You have done a lot to help people like me. I will try implementing this, and let you know

        ok. I just put everything in. No errors come up, which is a good sign, but the pokemon don't show up either. I have all the sprites in the characters folder in graphics. I don't know whats wrong. Do I have to make them show up with an event, or should they appear automatically

        EDITEDITEDIT

        Ok. First of all, ignore my last post. I figured out the switches to activate, and the pokemon follow now. I realized you forgot to add the Talkative thing in, but I did that anyway as well. My only problem now, is adding in the things that Zingzags put to go in the data folder. I got the first three that were images, but what type of file should the others be? When I click the link, they show up as computer code, and when I try to save it, it saves as a webpage archive, which i don't think is right. Everything else is great. My only thing is since I don't have all the data in the data folder, whenever i try talking to my pokemon, it calls oak, which is a problem...
        Oh! Right. I remeber. Talkative or something like that. It does not work. So I have to put in the old code.
        Put this in slot 3 of your common events.
        Make sure to name it TalkToPokemon
        Code:
        $PokemonTemp.dependentEvents.talk_to_pokemon
        Reply With Quote
          #4    
        Old July 16th, 2012 (5:29 AM).
        seeker's Avatar
        seeker seeker is offline
        Electric
        • Platinum Tier
         
        Join Date: Apr 2009
        Location: Ireland
        Posts: 10,816
        Rick, you're really starting to bug me a small bit. Read the rules of this section. Take 10 minutes to read all the rules of the sections you post in and you'll not make so many mistakes.

        Quote:
        When making a thread, name it properly! A thread's name should describe what that thread is about. Calling a thread "Question" is bad, but calling it "[Question] How do I change the screen size?" is good.

        I've gone ahead and renamed this for you.
        __________________
        she's the greatest adventure I'll ever know
        Reply With Quote
          #5    
        Old July 16th, 2012 (9:27 AM).
        Rayd12smitty's Avatar
        Rayd12smitty Rayd12smitty is offline
        Shadow Maker
           
          Join Date: Dec 2011
          Gender: Male
          Posts: 647
          Quote:
          Originally Posted by Rick1234 View Post
          Oh! Right. I remeber. Talkative or something like that. It does not work. So I have to put in the old code.
          Put this in slot 3 of your common events.
          Make sure to name it TalkToPokemon
          Code:
          $PokemonTemp.dependentEvents.talk_to_pokemon
          Ok thank you. I no longer get the problem where it calls oak. Now, I get this error

          Spoiler:
          ---------------------------
          Pokemon Essentials
          ---------------------------
          Exception: RuntimeError

          Message: Script error within event 29, map 25 (Test Map 2):

          Exception: NoMethodError

          Message: (eval)in `pbExecuteScript'undefined method `talk_to_' for #<DependentEvents:0x6d720b0>

          ***Full script:

          $PokemonTemp.dependentEvents.talk_to_
          pokemon


          Interpreter:243:in `pbExecuteScript'

          Interpreter:1599:in `eval'

          Interpreter:243:in `pbExecuteScript'

          Interpreter:1599:in `command_355'

          Interpreter:494:in `execute_command'

          Interpreter:193:in `update'

          Interpreter:106:in `loop'

          Interpreter:198:in `update'

          Scene_Map:103:in `update'

          Scene_Map:101:in `loop'



          Interpreter:276:in `pbExecuteScript'

          Interpreter:1599:in `command_355'

          Interpreter:494:in `execute_command'

          Interpreter:193:in `update'

          Interpreter:106:in `loop'

          Interpreter:198:in `update'

          Scene_Map:103:in `update'

          Scene_Map:101:in `loop'

          Scene_Map:114:in `update'

          Scene_Map:68:in `main'



          This exception was logged in

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

          Press Ctrl+C to copy this message to the clipboard.
          ---------------------------
          OK
          ---------------------------



          I think this is because i still don't have the things in the data folder. I still need help with that. I mentioned it in my last post, but you didn't respond to it. Thank you for all the help so far, I hope this is almost done with. To clarify, I have the png images in the data folder, but am missing all of the code things, because I don't know how to put them in the data folder.
          __________________
          Reply With Quote
            #6    
          Old July 16th, 2012 (10:16 AM).
          ~Angel~'s Avatar
          ~Angel~ ~Angel~ is offline
          Lead developer for Pokémon Millennium
             
            Join Date: Mar 2010
            Location: United States Of America.
            Age: 19
            Gender: Male
            Nature: Quiet
            Posts: 286
            Quote:
            Originally Posted by Rayd12smitty View Post
            Ok thank you. I no longer get the problem where it calls oak. Now, I get this error

            Spoiler:
            ---------------------------
            Pokemon Essentials
            ---------------------------
            Exception: RuntimeError

            Message: Script error within event 29, map 25 (Test Map 2):

            Exception: NoMethodError

            Message: (eval)in `pbExecuteScript'undefined method `talk_to_' for #<DependentEvents:0x6d720b0>

            ***Full script:

            $PokemonTemp.dependentEvents.talk_to_
            pokemon


            Interpreter:243:in `pbExecuteScript'

            Interpreter:1599:in `eval'

            Interpreter:243:in `pbExecuteScript'

            Interpreter:1599:in `command_355'

            Interpreter:494:in `execute_command'

            Interpreter:193:in `update'

            Interpreter:106:in `loop'

            Interpreter:198:in `update'

            Scene_Map:103:in `update'

            Scene_Map:101:in `loop'



            Interpreter:276:in `pbExecuteScript'

            Interpreter:1599:in `command_355'

            Interpreter:494:in `execute_command'

            Interpreter:193:in `update'

            Interpreter:106:in `loop'

            Interpreter:198:in `update'

            Scene_Map:103:in `update'

            Scene_Map:101:in `loop'

            Scene_Map:114:in `update'

            Scene_Map:68:in `main'



            This exception was logged in

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

            Press Ctrl+C to copy this message to the clipboard.
            ---------------------------
            OK
            ---------------------------



            I think this is because i still don't have the things in the data folder. I still need help with that. I mentioned it in my last post, but you didn't respond to it. Thank you for all the help so far, I hope this is almost done with. To clarify, I have the png images in the data folder, but am missing all of the code things, because I don't know how to put them in the data folder.
            Run extend text when putting in the TalkToPokemon script. Makes the box larger so you can insert the script with no Errors.
            Reply With Quote
              #7    
            Old July 16th, 2012 (11:16 AM).
            Rayd12smitty's Avatar
            Rayd12smitty Rayd12smitty is offline
            Shadow Maker
               
              Join Date: Dec 2011
              Gender: Male
              Posts: 647
              ok thank you. That fixed the error. Now i can talk to my pokemon, and it plays their cry, and says some text, but nothing shows up above their head. I am assuming this is because i still am missing the rest of the data. any help with that?
              __________________
              Reply With Quote
                #8    
              Old July 16th, 2012 (1:36 PM).
              ~Angel~'s Avatar
              ~Angel~ ~Angel~ is offline
              Lead developer for Pokémon Millennium
                 
                Join Date: Mar 2010
                Location: United States Of America.
                Age: 19
                Gender: Male
                Nature: Quiet
                Posts: 286
                Quote:
                Originally Posted by Rayd12smitty View Post
                ok thank you. That fixed the error. Now i can talk to my pokemon, and it plays their cry, and says some text, but nothing shows up above their head. I am assuming this is because i still am missing the rest of the data. any help with that?
                Just go back to Zingzags one and put the animations in the animations folder. Edit the settings to the way you want. They will replace over any animations placed in the settings.
                Reply With Quote
                  #9    
                Old July 16th, 2012 (1:42 PM). Edited July 16th, 2012 by Rayd12smitty.
                Rayd12smitty's Avatar
                Rayd12smitty Rayd12smitty is offline
                Shadow Maker
                   
                  Join Date: Dec 2011
                  Gender: Male
                  Posts: 647
                  no no no

                  I have the animations or at least the png images. Zingzags left about 8 attachments. I don't know how to put the ones that weren't images into the data folder

                  EDITEDITEDIT

                  Ok. I figured out why it wasn't downloading. I'll figure it out by myself now. I get the general idea. Thank you for all your help. I will be giving you credits along with Help-14 and Zingzags.
                  __________________
                  Reply With Quote
                    #10    
                  Old July 16th, 2012 (3:36 PM).
                  ~Angel~'s Avatar
                  ~Angel~ ~Angel~ is offline
                  Lead developer for Pokémon Millennium
                     
                    Join Date: Mar 2010
                    Location: United States Of America.
                    Age: 19
                    Gender: Male
                    Nature: Quiet
                    Posts: 286
                    Quote:
                    Originally Posted by Rayd12smitty View Post
                    no no no

                    I have the animations or at least the png images. Zingzags left about 8 attachments. I don't know how to put the ones that weren't images into the data folder

                    EDITEDITEDIT

                    Ok. I figured out why it wasn't downloading. I'll figure it out by myself now. I get the general idea. Thank you for all your help. I will be giving you credits along with Help-14 and Zingzags.
                    No credit's needed for me. I will only accept them when I figure out why it is not working.
                    Reply With Quote
                      #11    
                    Old July 16th, 2012 (4:02 PM).
                    Rayd12smitty's Avatar
                    Rayd12smitty Rayd12smitty is offline
                    Shadow Maker
                       
                      Join Date: Dec 2011
                      Gender: Male
                      Posts: 647
                      Quote:
                      Originally Posted by Rick1234 View Post
                      No credit's needed for me. I will only accept them when I figure out why it is not working.
                      I want to credit you, as you have replied to literally dozens of my posts asking for help. It is working pretty much perfectly for me. I just need to change up a few animations. Thank you again, and you will receive credit, whether you want it or not
                      __________________
                      Reply With Quote
                        #12    
                      Old July 16th, 2012 (4:10 PM).
                      ~Angel~'s Avatar
                      ~Angel~ ~Angel~ is offline
                      Lead developer for Pokémon Millennium
                         
                        Join Date: Mar 2010
                        Location: United States Of America.
                        Age: 19
                        Gender: Male
                        Nature: Quiet
                        Posts: 286
                        Quote:
                        Originally Posted by Rayd12smitty View Post
                        I want to credit you, as you have replied to literally dozens of my posts asking for help. It is working pretty much perfectly for me. I just need to change up a few animations. Thank you again, and you will receive credit, whether you want it or not
                        All right. I have been very helpful to you a ton XD I don't wish to take credit for other peoples stuff but all right.
                        Reply With Quote
                          #13    
                        Old July 16th, 2012 (4:59 PM).
                        Nerameshu's Avatar
                        Nerameshu Nerameshu is offline
                        Regional Explorer
                           
                          Join Date: Feb 2012
                          Age: 26
                          Gender: Male
                          Posts: 32
                          Since I'm completely lost in just looking at this scripting, would one of you guys mind posting the full script for following poke's, but with one modification? I want to have an in-game choice to be able to make your lead Pokemon follow you or not.

                          Also, if I may be so bold as to ask for the Pokemon sprites, I will be much appreciative.
                          __________________


                          Just got those eggs. Thought it'd be neat to play along. Help me see what they are.

                          Also, game in development. I'll give you a demo when I announce it... Some time when I'm close to done.
                          Reply With Quote
                            #14    
                          Old July 16th, 2012 (5:29 PM).
                          Rayd12smitty's Avatar
                          Rayd12smitty Rayd12smitty is offline
                          Shadow Maker
                             
                            Join Date: Dec 2011
                            Gender: Male
                            Posts: 647
                            Quote:
                            Originally Posted by Nerameshu View Post
                            Since I'm completely lost in just looking at this scripting, would one of you guys mind posting the full script for following poke's, but with one modification? I want to have an in-game choice to be able to make your lead Pokemon follow you or not.

                            Also, if I may be so bold as to ask for the Pokemon sprites, I will be much appreciative.
                            The pokemon sprites can be found in Zingzags post in the Tutorials section, and in Help-14's original post. You make the pokemon follow you in events, although this is not working quite perfectly for me yet.
                            __________________
                            Reply With Quote
                              #15    
                            Old July 16th, 2012 (5:44 PM).
                            Nerameshu's Avatar
                            Nerameshu Nerameshu is offline
                            Regional Explorer
                               
                              Join Date: Feb 2012
                              Age: 26
                              Gender: Male
                              Posts: 32
                              Awesome, ok. Thank you. And the credits list is Zingzags, Help-14, and you guys for this, right?
                              __________________


                              Just got those eggs. Thought it'd be neat to play along. Help me see what they are.

                              Also, game in development. I'll give you a demo when I announce it... Some time when I'm close to done.
                              Reply With Quote
                                #16    
                              Old July 16th, 2012 (6:33 PM).
                              Rayd12smitty's Avatar
                              Rayd12smitty Rayd12smitty is offline
                              Shadow Maker
                                 
                                Join Date: Dec 2011
                                Gender: Male
                                Posts: 647
                                Quote:
                                Originally Posted by Nerameshu View Post
                                Awesome, ok. Thank you. And the credits list is Zingzags, Help-14, and you guys for this, right?
                                Help-14 and Zingzags. I am also crediting Rick1234 as he helped me personally with over 20 responses. Definitely not me. Just Help-14 and Zingzags. Rick1234 if you want, but he is modest, and doesn't want it, or require it
                                __________________
                                Reply With Quote
                                  #17    
                                Old July 16th, 2012 (11:38 PM). Edited July 17th, 2012 by shadowriver.
                                shadowriver shadowriver is offline
                                   
                                  Join Date: Sep 2007
                                  Gender:
                                  Posts: 49
                                  v8 essentials with Pokémon follow and ultimate b/w add-on ,i got it 100% working with all Pokémon except I don’t have gen 5 shinny’s witch I gather rick1234 does but they are easy to implement. i figured out why the exp didn’t generate, it was because the Pokémon pb base exp for all Pokémon was set to 0

                                  #EDIT ok fixed exp Problem it should be fine now.
                                  #EDIT here’s the linkhttp://www.mediafire.com/?av2o3aba0qn78yk


                                  if you youse the debug system to change pokemon you need to refresh the dependent event in order for the new pokemon to follow.

                                  the script $PokemonTemp.dependentEvents.refresh_sprite only refreshes the the dependent event so when your Pokémon faint it won’t make your Pokémon follow you again, for that to happen you need to place another dependent event and the script pbPokemonFollow() () being the event number of the dependent event. You do this in the start over events in Pokémon centres and in the players home. (which I have already done.)

                                  I’ve already changed that in the Pokémon centre example and also a $PokemonTemp.dependentEvents.refresh_sprite had to be inserted into the daycear centre event so your party will be updated with the right following Pokémon.

                                  hope this helps you out rick1234

                                  credits go to
                                  P-Sign
                                  Clowcardruler
                                  Maruno
                                  Venom12
                                  FL .
                                  for the ultamit b/w kit

                                  rick 1234 for the hero from b/w2 used to replace red

                                  and help-14 for the follow script and zingzags for the fixes.
                                  (i had nothing to do with the creation of this so no need to credit me, i just put them all together for people to enjoy.)
                                  Reply With Quote
                                    #18    
                                  Old July 17th, 2012 (4:22 AM).
                                  Rayd12smitty's Avatar
                                  Rayd12smitty Rayd12smitty is offline
                                  Shadow Maker
                                     
                                    Join Date: Dec 2011
                                    Gender: Male
                                    Posts: 647
                                    Quote:
                                    Originally Posted by shadowriver View Post
                                    v8 essentials with Pokémon follow and ultimate b/w add-on ,i got it 100% working with all Pokémon except I don’t have gen 5 shinny’s witch I gather rick1234 does but they are easy to implement. i figured out why the exp didn’t generate, it was because the Pokémon pb base exp for all Pokémon was set to 0

                                    #EDIT ok fixed exp Problem it should be fine now.
                                    #EDIT here’s the linkhttp://www.mediafire.com/?av2o3aba0qn78yk


                                    if you youse the debug system to change pokemon you need to refresh the dependent event in order for the new pokemon to follow.

                                    the script $PokemonTemp.dependentEvents.refresh_sprite only refreshes the the dependent event so when your Pokémon faint it won’t make your Pokémon follow you again, for that to happen you need to place another dependent event and the script pbPokemonFollow() () being the event number of the dependent event. You do this in the start over events in Pokémon centres and in the players home. (which I have already done.)

                                    I’ve already changed that in the Pokémon centre example and also a $PokemonTemp.dependentEvents.refresh_sprite had to be inserted into the daycear centre event so your party will be updated with the right following Pokémon.

                                    hope this helps you out rick1234

                                    credits go to
                                    P-Sign
                                    Clowcardruler
                                    Maruno
                                    Venom12
                                    FL .
                                    for the ultamit b/w kit

                                    rick 1234 for the hero from b/w2 used to replace red

                                    and help-14 for the follow script and zingzags for the fixes.
                                    (i had nothing to do with the creation of this so no need to credit me, i just put them all together for people to enjoy.)

                                    O wow. You put this all together. That is awesome. Now I'm wishing I would have waited a day, and downloaded your file. Well, there goes five hours of my life. Nice work though
                                    __________________
                                    Reply With Quote
                                      #19    
                                    Old July 17th, 2012 (5:47 AM).
                                    ~Angel~'s Avatar
                                    ~Angel~ ~Angel~ is offline
                                    Lead developer for Pokémon Millennium
                                       
                                      Join Date: Mar 2010
                                      Location: United States Of America.
                                      Age: 19
                                      Gender: Male
                                      Nature: Quiet
                                      Posts: 286
                                      Quote:
                                      Originally Posted by Rayd12smitty View Post
                                      O wow. You put this all together. That is awesome. Now I'm wishing I would have waited a day, and downloaded your file. Well, there goes five hours of my life. Nice work though
                                      Hm. He has put it together extremely well. But I already know where to place all the stuff. It's just the B/W pokemon that don't appear on the screen.
                                      Reply With Quote
                                        #20    
                                      Old July 17th, 2012 (6:48 AM).
                                      Nerameshu's Avatar
                                      Nerameshu Nerameshu is offline
                                      Regional Explorer
                                         
                                        Join Date: Feb 2012
                                        Age: 26
                                        Gender: Male
                                        Posts: 32
                                        So to use the follow script, I just need to follow the download link? Or, in order to keep using Essentials, should I try to implement the scripting myself?

                                        Sorry, script newbie. :p
                                        __________________


                                        Just got those eggs. Thought it'd be neat to play along. Help me see what they are.

                                        Also, game in development. I'll give you a demo when I announce it... Some time when I'm close to done.
                                        Reply With Quote
                                          #21    
                                        Old July 17th, 2012 (7:17 AM).
                                        ~Angel~'s Avatar
                                        ~Angel~ ~Angel~ is offline
                                        Lead developer for Pokémon Millennium
                                           
                                          Join Date: Mar 2010
                                          Location: United States Of America.
                                          Age: 19
                                          Gender: Male
                                          Nature: Quiet
                                          Posts: 286
                                          Quote:
                                          Originally Posted by Nerameshu View Post
                                          So to use the follow script, I just need to follow the download link? Or, in order to keep using Essentials, should I try to implement the scripting myself?

                                          Sorry, script newbie. :p
                                          Just a simple import. If you have a game started I recommend that your erase the maps from that which are located in Data>Map001>so on so forth. If you don't just use his data.
                                          Reply With Quote
                                            #22    
                                          Old July 17th, 2012 (7:32 AM).
                                          Nerameshu's Avatar
                                          Nerameshu Nerameshu is offline
                                          Regional Explorer
                                             
                                            Join Date: Feb 2012
                                            Age: 26
                                            Gender: Male
                                            Posts: 32
                                            Cutting the maps out, then pasting them back in would work the same, right?
                                            __________________


                                            Just got those eggs. Thought it'd be neat to play along. Help me see what they are.

                                            Also, game in development. I'll give you a demo when I announce it... Some time when I'm close to done.
                                            Reply With Quote
                                              #23    
                                            Old July 17th, 2012 (7:46 AM).
                                            ~Angel~'s Avatar
                                            ~Angel~ ~Angel~ is offline
                                            Lead developer for Pokémon Millennium
                                               
                                              Join Date: Mar 2010
                                              Location: United States Of America.
                                              Age: 19
                                              Gender: Male
                                              Nature: Quiet
                                              Posts: 286
                                              Yes but you will have to replace over the ones in the game and place in the refresh part to make the pokemon re appear after being defeated.
                                              Reply With Quote
                                                #24    
                                              Old July 17th, 2012 (7:52 AM).
                                              Nerameshu's Avatar
                                              Nerameshu Nerameshu is offline
                                              Regional Explorer
                                                 
                                                Join Date: Feb 2012
                                                Age: 26
                                                Gender: Male
                                                Posts: 32
                                                Wait, you mean his download link is for an updated version of Essentials, not just the follow script?

                                                'Cuz that's awesome too.
                                                __________________


                                                Just got those eggs. Thought it'd be neat to play along. Help me see what they are.

                                                Also, game in development. I'll give you a demo when I announce it... Some time when I'm close to done.
                                                Reply With Quote
                                                  #25    
                                                Old July 17th, 2012 (7:53 AM).
                                                ~Angel~'s Avatar
                                                ~Angel~ ~Angel~ is offline
                                                Lead developer for Pokémon Millennium
                                                   
                                                  Join Date: Mar 2010
                                                  Location: United States Of America.
                                                  Age: 19
                                                  Gender: Male
                                                  Nature: Quiet
                                                  Posts: 286
                                                  Quote:
                                                  Originally Posted by Nerameshu View Post
                                                  Wait, you mean his download link is for an updated version of Essentials, not just the follow script?

                                                  'Cuz that's awesome too.
                                                  Yes. I think XD I am unsure what he did is what he did. I had nothing to do with it.
                                                  Reply With Quote
                                                  Reply
                                                  Quick Reply

                                                  Sponsored Links
                                                  Thread Tools

                                                  Posting Rules
                                                  You may not post new threads
                                                  You may not post replies
                                                  You may not post attachments
                                                  You may not edit your posts

                                                  BB code is On
                                                  Smilies are On
                                                  [IMG] code is On
                                                  HTML code is Off

                                                  Forum Jump


                                                  All times are GMT -8. The time now is 7:47 AM.