This section is incomplete. Please feel free to edit this section to add missing information and complete it. Reason: Confirm that formulas/algorithms apply to both Gold/Silver and Crystal (and not only to one)
In Generation II, most outdoor areas in Johto contain a number of special trees () that Pokémon can use Headbutt on. These trees are distinct from other trees that either take up two vertical paces or that have rounded tops. When a Pokémon uses Headbutt on a tree, a wild Pokémon may drop out of the tree. Depending on the time of day, the Pokémon that falls out may be asleep. Some Pokémon can only be caught by this method (e.g., Pineco, Heracross).
All headbuttable trees contain wild Pokémon, but different trees have different chances of creating an encounter after Headbutt is used. The headbuttable trees in an area also generate their encounters from different sets of Pokémon depending on whether they have moderate encounter chances or low encounter chances. For example, on Route 44, trees with moderate encounter chances may only contain Spearow or Aipom, while trees with a high encounter chance may also contain Heracross.
Encounter mechanics
The encounter rate and encounter table of each tree depends on the tree's index and the player's Trainer ID number.
The tree's index is an integer from 0 to 9, which depends on its X and Y coordinates on the map—that is, its distance from the westernmost and northernmost edges, respectively. Specifically, the tree's index is calculated using the following formula.
The encounter rate and tree type depends on the last digit of the player's Trainer ID.
If a tree's index is equal to that ID digit, the tree is a "high-encounter tree" and its encounter rate is 80%.
If the tree's index is one of the next four indices after that ID digit (wrapping back around to 0 after 9), the tree is a "moderate-encounter tree" and its encounter rate is 50%.
Otherwise, the tree is a "moderate-encounter tree" and its encounter rate is 10%.
Encounter rate by index and Trainer ID
The following is a table depicting the encounter rate of the tree, based on the tree index and the last digit of the player's Trainer ID. Tree indexes are displayed in rows, while Trainer ID digits are displayed in columns.
An 80% encounter rate indicates the tree is a "high-encounter tree". Otherwise it is a "moderate-encounter tree".
0
1
2
3
4
5
6
7
8
9
0
80%
10%
10%
10%
10%
10%
50%
50%
50%
50%
1
50%
80%
10%
10%
10%
10%
10%
50%
50%
50%
2
50%
50%
80%
10%
10%
10%
10%
10%
50%
50%
3
50%
50%
50%
80%
10%
10%
10%
10%
10%
50%
4
50%
50%
50%
50%
80%
10%
10%
10%
10%
10%
5
10%
50%
50%
50%
50%
80%
10%
10%
10%
10%
6
10%
10%
50%
50%
50%
50%
80%
10%
10%
10%
7
10%
10%
10%
50%
50%
50%
50%
80%
10%
10%
8
10%
10%
10%
10%
50%
50%
50%
50%
80%
10%
9
10%
10%
10%
10%
10%
50%
50%
50%
50%
80%
Analysis
Since X and Y are interchangeable in the tree index formula, it is possible to "fix" one dimension to consider traveling along the other. Substituting "Z" for the fixed axis and "n" for the axis that will be traversed, the formula becomes:
This result shows that, if a single row or column of trees is traversed, moving to an adjacent tree increases the tree's index by (modulo 10), where Z is the distance of that row or column from its origin edge (north or west). This means that the closer a row or column is to the edge, the slower the indices of those trees change as the row or column is traversed.
Pokémon
Pokémon Gold and Silver
Wild Pokémon encounters from headbuttable trees in Pokémon Gold and Silver fall into two simple groups.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
Pokémon Crystal
In Pokémon Crystal, wild Pokémon encounters from headbuttable trees fall into six different groups.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
Generation IV
This section is incomplete. Please feel free to edit this section to add missing information and complete it. Reason: Trees in locations by groups
In Pokémon HeartGold and SoulSilver, Pokémon are now pre-defined for each eligible location, with no regard to player's Trainer ID, though they can still be grouped by areas. Due to this, the levels of Pokémon vary between locations, and player can now find Pokémon in Kanto beyond Routes 26 and 27. The player can headbutt trees while Surfing, and in fact certain eligible trees are otherwise unreachable.
Each location with trees has two groups of six encounter slots - a tree can be assigned to one of them, or none at all. As such, unlike in Generation II, not all headbuttable trees contain wild Pokémon - but those that do, will always yield an encounter. Repel cannot prevent Pokémon from appearing when headbutting a tree.
Additionally, Pewter City, Cherrygrove City, Routes 25, 38, and 47, and National Park. have a third group of encounter slots assigned to certain trees, with the ones on Route 38 and in Cherrygrove City and National Park being blocked off by a rocky wall and thus not available until much later.
The amount of trees with Pokémon can range from as few as 2 on certain Routes, to as many as 44 in Ilex Forest.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.
A colored background means that the Pokémon can be found in this location in the specified game. A white background with a colored letter means that the Pokémon cannot be found here.