Fandom

Pokémon Essentials Wiki

Obstacles

228pages on
this wiki
Add New Page
Talk0 Share

This article describes how to set up obstacles, which can be a (temporary) physical barrier or a special kind of path (such as sliding ice). It also describes how to set up Headbutt trees. Most obstacles described here can be overcome or traversed by using a move outside battle.

See also

Events

  • Several obstacles are events.

Tilesets

  • Some obstacles are tiles with particular terrain tags (e.g. water, ice).

Getting around

  • This article gives general information about surfing and diving.

Using moves outside battle

  • This article describes how to use a move outside battle. Several moves can be used to overcome obstacles, either by destroying them or allowing passage through/around them.

Event obstacles

These, quite simply, are events that cannot be passed. Most of them can, however, be moved or destroyed. Such events include:

  • Trees that can be cut down (Cut).
  • Cracked rocks that can be smashed (Rock Smash).
  • Boulders that can be moved (Strength).
  • NPCs that block paths/doors.

Cut trees

A tree that can be cut down with the move Cut should contain the following commands:

@>Set Move Route: This event
:               : $>Turn Down
@>Conditional Branch: Script: Kernel.pbCut
  @>Set Move Route: This event
   :              : $>Wait: 2 frame(s)
   :              : $>Turn Left
   :              : $>Wait: 2 frame(s)
   :              : $>Turn Right
   :              : $>Wait: 2 frame(s)
   :              : $>Turn Up
   :              : $>Wait: 2 frame(s)
  @>Wait for Move's Completion
  @>Script: pbEraseThisEvent
  @>
 :  Branch End
@>

It should also have a name of "Tree", as when the player chooses to use Cut from the party screen, one of the checks performed to see if it can be used is whether there is an event immediately in front of the player with this name (and if so, to use Cut).

The move routes are for the purpose of animating the tree being cut down.

The script called in the Conditional Branch includes messages such as "This tree looks like it can be cut down." and asks whether the player wants to do so (if they can). Therefore there is no need to include these messages in the event.

When cut down, a Cut tree will only disappear until the player leaves the map; at which point, it will reappear. To cut the tree down permanently, replace the pbEraseThisEvent script with a command that sets the event's Self Switch A to ON, and give the event a second (blank) page which depends on Self Switch A being ON.

Cracked rocks

A cracked rock that can be smashed with the move Rock Smash should contain the following commands:

@>Set Move Route: This event
:               : $>Turn Down
@>Conditional Branch: Script: Kernel.pbRockSmash
  @>Set Move Route: This event
   :              : $>Wait: 2 frame(s)
   :              : $>Turn Left
   :              : $>Wait: 2 frame(s)
   :              : $>Turn Right
   :              : $>Wait: 2 frame(s)
   :              : $>Turn Up
   :              : $>Wait: 2 frame(s)
  @>Wait for Move's Completion
  @>Script: pbEraseThisEvent
  @>Script: Kernel.pbRockSmashRandomEncounter
  @>
 :  Branch End
@>

It should also have a name of "Rock", as when the player chooses to use Rock Smash from the party screen, one of the checks performed to see if it can be used is whether there is an event immediately in front of the player with this name (and if so, to use Rock Smash).

The move routes are for the purpose of animating the rock shattering.

The script called in the Conditional Branch includes messages such as "It's a rugged rock, but a Pokémon may be able to smash it." and asks whether the player wants to do so (if they can). Therefore there is no need to include these messages in the event.

When a cracked rock has been smashed, there is a 25% chance that there will be a wild Pokémon encounter (if the "RockSmash" encounter type has been defined for the map). The def that decides this is in the script section PokemonHiddenMoves.

When smashed, a cracked rock will only disappear until the player leaves the map; at which point, it will reappear. To smash the rock permanently, replace the pbEraseThisEvent script with a command that sets the event's Self Switch A to ON, and give the event a second (blank) page which depends on Self Switch A being ON.

Boulders

A boulder that can be pushed with the move Strength should trigger not by pressing the Use button (Action Button) like above, but instead when the player walks into it (Player Touch). It should contain the following command:

@>Script: pbPushThisBoulder

It should also have a name of "Boulder", as when the player chooses to use Strength from the party screen, one of the checks performed to see if it can be used is whether there is an event immediately in front of the player with this name (and if so, to use Strength).

The script called simply checks whether Strength has been used already, and if so, to move the boulder. The script that asks the player whether they want to use Strength in the first place is a procedure that checks whether there is an event immediately in front of the player with the name "Boulder", and if so, to call a def that asks whether the player wants to use Strength. See the article Using moves outside battle for more information about this procedure.

A moved boulder will return to its original position once the player leaves the map. Some puzzles require the boulder to remain in its new place (e.g. on a switch), or to disappear (e.g. pushed down a hole). To do this, you should create a "control event" which constantly checks the boulder's position via Parallel Process, and which makes it become inert/disappear if it is in a particular location (by switching to a new page of the boulder's event via manipulating its Self Switches).

Headbutt trees

Headbutt trees are, strictly speaking, not an obstacle because they can never be overcome. However, they are included here because they work similarly to the above obstacles.

A tree that can be headbutted with the move Headbutt should contain the following command:

@>Script: pbHeadbutt

It should also have a name of "HeadbuttTree", as when the player chooses to use Headbutt from the party screen, one of the checks performed to see if it can be used is whether there is an event immediately in front of the player with this name (and if so, to use Headbutt).

The script called in the Conditional Branch includes messages such as "A Pokémon could be in this tree. Maybe a Pokémon could shake it." and asks whether the player wants to do so (if they can). Therefore there is no need to include these messages in the event.

When a tree has been headbutted, there is a chance that there will be a wild Pokémon encounter (if the "HeadbuttLow" and/or "HeadbuttHight" encounter types have been defined for the map). The def that decides this is pbHeadbuttEffect in the script section PokemonHiddenMoves. The calculation of the encounter chance, and which type of Headbutt encounter is used, is a little complicated and involves the tree's coordinates and the player's trainer ID number. The chance is either 10%, 50% or 80% depending on the calculation, and if it is 10% the "HeadbuttLow" encounter type is used ("HeadbuttHigh" is used otherwise).

Terrain tag obstacles

These are tiles with particular terrain tags that prevent or limit the player's movement. Such terrain tags are:

  • 1 - Ledge.
  • 5, 6, 7, 8, 9 - Water tiles (for surfing).
  • 5 - Deep water (for diving).
  • 8 - Waterfalls (for ascending waterfalls).
  • 12 - Ice.

The movement restrictions of these tiles (except Ice tiles) are actually defined by their passabilities rather than because of a special property of the terrain tags themselves. The terrain tags mentioned are only noteworthy because they affect how the player moves over these tiles (see also the article Tilesets):

  • 1 - The player jumps over this tile rather than walking over it.
  • 5, 6, 7, 8, 9 - Can be traversed by using the move Surf.
  • 5 - Can cause a map transfer by using the move Dive while on this tile (see below).
  • 8 - The player automatically passes over these tiles, either by surfing down it or using the move Waterfall to climb it.
  • 12 - The player slides in the same direction until they hit something.

For the most part, setting up obstacles using these tiles is as simple as creating the map using these tiles.

Waterfalls

Waterfalls involve two different terrain tags: 8 (the main part) and 9 (the crest/top).

The main part of a waterfall cannot be surfed over, and it must be interacted with in order to ascend it (with the move Waterfall). When the player ascends a waterfall, they will keep moving up until they are no longer on a tile with either of the waterfall terrain tags.

The crest of a waterfall is the top row of tiles of a waterfall. When the player surfs onto a waterfall crest, they will automatically fall down the waterfall until they are no longer on a tile with either of the waterfall terrain tags.

While moving up or down a waterfall, the player will not encounter any wild Pokémon.

Underwater areas

There is a terrain tag for deep water (5). When the player uses the move Dive while surfing on a tile with this terrain tag, they will be transferred to a different map. The map they will transfer to is defined by that map's "DiveMap" metadata. All maps with reachable deep water must have this metadata set, as must all underwater maps (in which case this metadata refers to the surface map). Multiple maps cannot have the same "DiveMap" metadata.

The underwater map must be the same size as the surface map. This is because when the move Dive is used, the player is transferred to the same coordinates on the underwater map as they were at on the surface map (and vice versa). Because of this, it is vital that wherever Dive can be used on the surface, there is a corresponding open area where the player can dive to in the underwater map (i.e. there are no rocks or NPCs or anything there which they could land on).

There is a setting in the script section Settings called DIVINGSURFACEANYWHERE. If this is TRUE, then the player will always be able to surface while underwater. If this is FALSE, then they will only be able to surface if they are below a patch of deep water (i.e. they could dive down to get straight to their current position).

A special method is needed to allow the player to transfer to a different map while remaining diving (e.g. entering an underwater cave). Information about this is in the article Map transfers.

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.