- Pokémon Essentials Version
- v17.2 ➖
This script adds in Spin tiles, a Pokémon staple! Once the player steps on one of these tiles, they'll go spinning in the direction on the tile until they hit an impassable object. Hitting another spin tile redirects the player.
To use it, you must create 4 new tiles with terrain tags specifying the spun direction. Remember to change the presets if you have other terrain tags installed!
There's also one other edit to
def character_name
in Game_Player_Visuals.
Code:
def character_name
@defaultCharacterName = "" if !@defaultCharacterName
return @defaultCharacterName if @defaultCharacterName!=""
if !@move_route_forcing && $PokemonGlobal && $PokemonGlobal.playerID>=0
meta = pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
if meta && !$PokemonGlobal.bicycle && !$PokemonGlobal.diving && !$PokemonGlobal.surfing
if pbCanRun? && (moving? || @wasmoving) && Input.dir4!=0 && meta[4] && meta[4]!=""
# Display running character sprite
@character_name = pbGetPlayerCharset(meta,4)
elsif $PokemonGlobal.spinning # New Line!
@character_name = pbGetPlayerCharset(meta,7) # New Line!
else
# Display normal character sprite
@character_name = pbGetPlayerCharset(meta,1)
end
@wasmoving = moving?
end
end
return @character_name
end
Code:
PlayerA=POKEMONTRAINER_Red,trchar000,boy_bike,boy_surf,boy_run,boy_surf,boy_fish_offset,boy_spin,xxx
pbGetPlayerCharset(meta,7)
to the new position in the metadata.You also have to edit
pbCanRun?
in the same section to add in the anti run in spin check.
Code:
def pbCanRun?
return false if $game_temp.in_menu || $game_temp.in_battle ||
@move_route_forcing || $game_temp.message_window_showing ||
pbMapInterpreterRunning?
terrain = pbGetTerrainTag
input = ($PokemonSystem.runstyle==1) ? ($PokemonGlobal && $PokemonGlobal.runtoggle) : Input.press?(Input::A)
return input &&
$PokemonGlobal && $PokemonGlobal.runningShoes &&
!$PokemonGlobal.diving && !$PokemonGlobal.surfing &&
!$PokemonGlobal.bicycle && !PBTerrain.onlyWalk?(terrain) &&
!$PokemonGlobal.spinning # this and the above && are new
end
update
in the same section to prevent carrying an old speed over into the tiles.
Code:
def update
if PBTerrain.isIce?(pbGetTerrainTag)
@move_speed = ($RPGVX) ? 6.5 : 4.8 # Sliding on ice
elsif $PokemonGlobal.spinning # New Line!
@move_speed = ($RPGVX) ? 4.5 : 3.8 # Spinning # New Line!
elsif !moving? && !@move_route_forcing && $PokemonGlobal
if $PokemonGlobal.bicycle
@move_speed = ($RPGVX) ? 8 : 5.2 # Cycling
elsif pbCanRun? || $PokemonGlobal.surfing || $PokemonGlobal.diving
@move_speed = ($RPGVX) ? 6.5 : 4.8 # Running, surfing or diving
else
@move_speed = ($RPGVX) ? 4.5 : 3.8 # Walking
end
end
update_old
end
You can swap the left and right facing columns if it looks better. I tried both, can't tell the difference.
- Credits
- Vendily, thepsynergist and Barrel's O'Fun