FANDOM

A FANDOM user
  Loading editor
  • Is there any way you can help me find a way to save variables 451-500 to a sperate file so its independant from other variables? IE: If a player starts a new game those variables are loaded, or if the player Xs out of a game without saving the game, certain events change? I'm trying to re-create a game called "Undertale" and I saw you made a contribution to the saving and loading script...

      Loading editor
    • I guess that just writing/reading a binary file with standard Marshal class before save and after load may do this. Keep in mind that you need to request the save location, so look at the calls 'RTP.getSaveFileName("Game.rxdata")'.

        Loading editor
    • -FL- wrote:
      I guess that just writing/reading a binary file with standard Marshal class before save and after load may do this. Keep in mind that you need to request the save location, so look at the calls 'RTP.getSaveFileName("Game.rxdata")'.

      Thanks! I'll try it :)

        Loading editor
    • A FANDOM user
        Loading editor
  • Heyo, did you make the extended tilesets that are shown on your page? Also, may I use parts of them?

      Loading editor
  • Due to different codes in v16, I would like to update a tutorial where HM moves turns into items. Here's a code for Surf in V16:

    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 a deep blue...\nWould you like to surf on it?"))
            speciesname=!movefinder ? $Trainer.name : movefinder.name
            Kernel.pbMessage(_INTL("{1} used Surf!",speciesname))
            pbHiddenMoveAnimation(movefinder)
            surfbgm=pbGetMetadata(0,MetadataSurfBGM)
            if surfbgm
              pbCueBGM(surfbgm,0.5)
            end
            pbStartSurfing()
            return true
          end
        end
      end
      return false
    end
    
    def pbStartSurfing()
      Kernel.pbCancelVehicles
      $PokemonEncounters.clearStepCount
      $PokemonGlobal.surfing=true
      Kernel.pbUpdateVehicle
      Kernel.pbJumpToward
      Kernel.pbUpdateVehicle
      $game_player.check_event_trigger_here([1,2])
    end
    
    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 PBTerrain.isSurfable?(currentTag) && !PBTerrain.isSurfable?(facingTag)
        if Kernel.pbJumpToward(1,false,true)
    #      Kernel.pbCancelVehicles
          $game_map.autoplayAsCue
          $game_player.increase_steps
          result=$game_player.check_event_trigger_here([1,2])
          Kernel.pbOnStepTaken(result)
        end
        return true
      end
      return false
    end
    
    def Kernel.pbTransferSurfing(mapid,xcoord,ycoord,direction=$game_player.direction)
      pbFadeOutIn(99999){
         $game_temp.player_new_map_id=mapid
         $game_temp.player_new_x=xcoord
         $game_temp.player_new_y=ycoord
         $game_temp.player_new_direction=direction
         Kernel.pbCancelVehicles
         $PokemonGlobal.surfing=true
         Kernel.pbUpdateVehicle
         $scene.transfer_player(false)
         $game_map.autoplay
         $game_map.refresh
      }
    end
    
    Events.onAction+=proc{|sender,e|
       terrain=Kernel.pbFacingTerrainTag
       notCliff=$game_map.passable?($game_player.x,$game_player.y,$game_player.direction)
       if PBTerrain.isSurfable?(terrain) && !$PokemonGlobal.surfing &&
          !pbGetMetadata($game_map.map_id,MetadataBicycleAlways) && notCliff
         Kernel.pbSurf
         return
       end
    }
    
    HiddenMoveHandlers::CanUseMove.add(:SURF,proc{|move,pkmn|
       terrain=Kernel.pbFacingTerrainTag
       notCliff=$game_map.passable?($game_player.x,$game_player.y,$game_player.direction)
       if !$DEBUG &&
          !(HIDDENMOVESCOUNTBADGES ? $Trainer.numbadges>=BADGEFORSURF : $Trainer.badges[BADGEFORSURF])
         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("It can't be used when you have someone with you."))
         return false
       end
       if pbGetMetadata($game_map.map_id,MetadataBicycleAlways)
         Kernel.pbMessage(_INTL("Let's enjoy cycling!"))
         return false
       end
       if !PBTerrain.isSurfable?(terrain) || !notCliff
         Kernel.pbMessage(_INTL("No surfing here!"))
         return false
       end
       return true
    })
    
    HiddenMoveHandlers::UseMove.add(:SURF,proc{|move,pokemon|
       if !pbHiddenMoveAnimation(pokemon)
         Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
       end
       pbStartSurfing()
       return true
    })
    
      Loading editor
See archived talk page
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.