Hey guys, another release to you guys from me. This is about 80% complete I guess. I forgot completely how does rock climb work in game, but it is similar to waterfall. This does not support side-stair's yet, but it can take you up and down a wall of rock.
TM.txt:
^ All of that belong in TM.txt it is so that a pokemon can learn the TM/HM rock climb. Rock climb uses the same player graphics as surf, but it can be changed.
Pokemon Field:
this belongs in the PBTerrain class
Hopefully you know where a def (its a method, function w.e u want to call it) goes.
in def Kernel.pbUpdateVehicle , just replace ALMOST everything
in Game_Map_:
in Walk_Run:
PokemonMap:
PokemonHiddenMoves:
in def Kernel.pbHiddenMoveEvent
NOTE:
I do not recommend adding this if you do not know how to code. I will not help with error messages. Find out where to implement the if statements on your own. Also do not ask for whirlpool(I think I have it 100% working as an event, but I realized it would be better to make it work as a terrain tag), or Defog ( which I am working on right now).
I will take Credits.
TM.txt:
Code:
[ROCKCLIMB]
VENUSAUR,BLASTOISE,SANDSHREW,SANDSLASH,NIDOQUEEN,NIDOKING,GOLDUCK,MANKEY,PRIMEAPE,ARCANINE,POLIWRATH,MACHOP,MACHOKE,MACHAMP,GEODUDE,GRAVELER,GOLEM,ONIX,CUBONE,MAROWAK,HITMONLEE,HITMONCHAN,LICKITUNG,RHYHORN,RHYDON,CHANSEY,KANGASKHAN,ELECTABUZZ,MAGMAR,PINSIR,TAUROS,OMASTAR,KABUTOPS,SNORLAX,MEWTWO,MEW,MEGANIUM,TYPHLOSION,FERALIGATR,AMPHAROS,STEELIX,GRANBULL,URSARING,BLISSEY,RAIKOU,ENTEI,SUICUNE,TYRANITAR,SCEPTILE,BLAZIKEN,SWAMPERT,LUDICOLO,VIGOROTH,SLAKING,EXPLOUD,MAKUHITA,HARIYAMA,AGGRON,ZANGOOSE,REGIROCK,REGICE,REGISTEEL,GROUDON,TURTWIG,GROTLE,TORTERRA,CHIMCHAR,MONFERNO,INFERNAPE,EMPOLEON,BIBAREL,CRANIDOS,RAMPARDOS,GIBLE,GABITE,GARCHOMP,MUNCHLAX,LUCARIO,DRAPION,CROAGUNK,TOXICROAK,ABOMASNOW,LICKILICKY,RHYPERIOR,ELECTIVIRE,MAGMORTAR,MAMOSWINE,HEATRAN,REGIGIGAS,GIRATINA,DARKRAI,ARCEUS
Pokemon Field:
this belongs in the PBTerrain class
Code:
RockClimb=16
RockCrest=17
Code:
def pbIsPassableRockTag?(tag)
return tag==PBTerrain::RockCrest
end
def pbIsRockTag?(tag)
return tag==PBTerrain::RockCrest||
tag==PBTerrain::RockClimb
end
Code:
if meta
if $PokemonGlobal.diving
$game_player.character_name=meta[6] && meta[6]!="" ? meta[6] : meta[1] # Diving graphic
elsif $PokemonGlobal.surfing
$game_player.character_name=meta[4] && meta[4]!="" ? meta[4] : meta[1] # Surfing graphic
elsif $PokemonGlobal.rock
$game_player.character_name=meta[4] && meta[4]!="" ? meta[4] : meta[1] # Climbing graphic
elsif $PokemonGlobal.bicycle
$game_player.character_name=meta[2] && meta[2]!="" ? meta[2] : meta[1] # Bicycle graphic
else
$game_player.character_name=meta[1] # Regular graphic
end
end
end
Code:
elsif pbIsPassableRockTag?(@terrain_tags[tile_id])&&
$PokemonGlobal.rock
Code:
if $PokemonGlobal.playerID>=0 && meta && $PokemonGlobal &&
!$PokemonGlobal.bicycle &&
!$PokemonGlobal.diving &&
!$PokemonGlobal.surfing &&
!$PokemonGlobal.rock
Code:
attr_accessor :rock
@rock=false
Code:
def Kernel.pbAscendRock(event=nil)
x=$game_player.x
y=$game_player.y
currentTag=$game_map.terrain_tag(x,y)
facingTag=Kernel.pbFacingTerrainTag
event=$game_player if !event
return if !event
return if event.direction!=8 # can't ascend if not facing up
oldthrough=event.through
oldmovespeed=event.move_speed
terrain=Kernel.pbFacingTerrainTag#(nil,event)
# Kernel.pbJumpToward
return if terrain!=PBTerrain::RockClimb && terrain!=PBTerrain::RockCrest
event.through=true
event.move_speed=2
Kernel.pbCancelVehicles
$PokemonEncounters.clearStepCount
$PokemonGlobal.rock=true
Kernel.pbJumpToward
Kernel.pbUpdateVehicle
# Kernel.pbJumpToward
# Kernel.pbJumpToward
loop do
event.move_up
terrain=pbGetTerrainTag(event)
break if terrain!=PBTerrain::RockClimb && terrain!=PBTerrain::RockCrest || $PokemonGlobal.rock=false #||
#$game_map.autoplayAsCue || $game_player.increase_steps
end
event.through=oldthrough
event.move_speed=oldmovespeed
$game_map.autoplayAsCue
$game_player.increase_steps
end
def Kernel.pbDescendRock(event=nil)
x=$game_player.x
y=$game_player.y
currentTag=$game_map.terrain_tag(x,y)
facingTag=Kernel.pbFacingTerrainTag
event=$game_player if !event
return if !event
return if event.direction!=2 # can't ascend if not facing up
oldthrough=event.through
oldmovespeed=event.move_speed
terrain=Kernel.pbFacingTerrainTag#(nil,event)
# Kernel.pbJumpToward
return if terrain!=PBTerrain::RockClimb && terrain!=PBTerrain::RockCrest
event.through=true
event.move_speed=2
Kernel.pbCancelVehicles
$PokemonEncounters.clearStepCount
$PokemonGlobal.rock=true
Kernel.pbJumpToward
Kernel.pbUpdateVehicle
# Kernel.pbJumpToward
# Kernel.pbJumpToward
loop do
event.move_down
terrain=pbGetTerrainTag(event)
break if terrain!=PBTerrain::RockClimb && terrain!=PBTerrain::RockCrest || $PokemonGlobal.rock=false #||
#$game_map.autoplayAsCue || $game_player.increase_steps
end
event.through=oldthrough
event.move_speed=oldmovespeed
$game_map.autoplayAsCue
$game_player.increase_steps
end
def Kernel.pbRockClimb(event=nil)
event=$game_player
if $DEBUG #|| $Trainer.badges[BADGEFORCLIMB]
movefinder=Kernel.pbCheckMove(:ROCKCLIMB)
if $DEBUG || movefinder
if Kernel.pbConfirmMessage(_INTL("These rocks look like they can be climbed upon. Would you like to use Rock Climb?"))
speciesname=!movefinder ? $Trainer.name : movefinder.name
Kernel.pbMessage(_INTL("{1} used Rock Climb.",speciesname))
pbHiddenMoveAnimation(movefinder)
#pbAscendRock
case $game_player.direction
when 2
pbDescendRock
when 8
pbAscendRock
end
return true
end
else
Kernel.pbMessage(_INTL("These rocks look like they can be climbed upon."))
end
else
Kernel.pbMessage(_INTL("These rocks look like they can be climbed upon."))
end
return false
end
HiddenMoveHandlers::CanUseMove.add(:ROCKCLIMB,proc{|move,pkmn|
if !$DEBUG# && !$Trainer.badges[BADGEFORCLIMB]
Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
return false
end
terrain=Kernel.pbFacingTerrainTag
if terrain!=PBTerrain::RockClimb
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
return true
})
HiddenMoveHandlers::UseMove.add(:ROCKCLIMB,proc{|move,pokemon|
if !pbHiddenMoveAnimation(pokemon)
Kernel.pbMessage(_INTL("{1} used {2}.",pokemon.name,PBMoves.getName(move)))
end
case $game_player.direction
when 2
pbDescendRock
when 8
pbAscendRock
end
Code:
if terrain==PBTerrain::RockClimb
Kernel.pbRockClimb
return
end
I do not recommend adding this if you do not know how to code. I will not help with error messages. Find out where to implement the if statements on your own. Also do not ask for whirlpool(I think I have it 100% working as an event, but I realized it would be better to make it work as a terrain tag), or Defog ( which I am working on right now).
I will take Credits.
Last edited: