- Pokémon Essentials Version
- v20.1 ➖
Hi everyone! In this tutorial, I'm gonna show you how to add water currents to your game.
Before starting, be aware that this is for Essentials v20/20.1, and I'm not planning to make any compatibility with older versions of Essentials. This also isn't compatible with PSDK.
STEP 1 : TerrainTag section
In your script editor, go in the TerrainTag section and look for attr_reader :ignore_passability.
Add
Then, look for @ignore_passability in the same section, and add
This should look like this :
Now, at the end of the section, add these four terrain tag registrations after the :NoEffect one. If you already have scripts that add new terrain tags, change the id numbers (18, 19, 20 and 21) so they don't clash with other id's.
This should look like this :
STEP 2 : Overworld section
Now go in the Overworld section and look for Auto-move the player over waterfalls and ice.
Add these two lines between pbSlideOnIce and end :
Now look for def pbSlideOnIce, and add this after the last end :
To show you how it should look, here is a bit of code from def pbSlideOnIce and def pbWaterCurrent :
STEP 3 : Overworld_WildEncounters section
Finally, go in the Overworld_WildEncounters section, and look for def encounter_possible_here?
Add this line before the last return false :
STEP 4 : Assign the terrain tags
You can now assign the terrain tags to water current tiles. These should already exist within the Autotile folder from base Essentials.
Enjoy this new feature, and let me know if something went wrong.
Also, a big thank you to Vendily and TechSkylander1518 who helped me fix a bug!
Before starting, be aware that this is for Essentials v20/20.1, and I'm not planning to make any compatibility with older versions of Essentials. This also isn't compatible with PSDK.
STEP 1 : TerrainTag section
In your script editor, go in the TerrainTag section and look for attr_reader :ignore_passability.
Add
attr_reader :water_current
on the next line.Then, look for @ignore_passability in the same section, and add
@water_current = hash[:water_current] || false
on the next line.This should look like this :
Now, at the end of the section, add these four terrain tag registrations after the :NoEffect one. If you already have scripts that add new terrain tags, change the id numbers (18, 19, 20 and 21) so they don't clash with other id's.
This should look like this :
STEP 2 : Overworld section
Now go in the Overworld section and look for Auto-move the player over waterfalls and ice.
Add these two lines between pbSlideOnIce and end :
Now look for def pbSlideOnIce, and add this after the last end :
To show you how it should look, here is a bit of code from def pbSlideOnIce and def pbWaterCurrent :
Ruby:
$game_player.center($game_player.x, $game_player.y)
$game_player.straighten
$game_player.walk_anime = oldwalkanime
$PokemonGlobal.sliding = false
end
def pbWaterCurrent
return if !$game_player.pbTerrainTag.water_current
$game_temp.followers.update
$PokemonGlobal.sliding = true
direction = $game_player.direction
STEP 3 : Overworld_WildEncounters section
Finally, go in the Overworld_WildEncounters section, and look for def encounter_possible_here?
Add this line before the last return false :
STEP 4 : Assign the terrain tags
You can now assign the terrain tags to water current tiles. These should already exist within the Autotile folder from base Essentials.
Enjoy this new feature, and let me know if something went wrong.
Also, a big thank you to Vendily and TechSkylander1518 who helped me fix a bug!
- Credits
- Credit if used:
ChromusSama => main script
Vendily and Techskylander1518 => helping fixing a bug