Headbutt trees are special trees found in the Johto and Kanto regions that a Pokémon can use Headbutt on to encounter wild Pokémon. They are only found in the games that feature Johto: Pokémon Gold, Silver, and Crystal and Pokémon HeartGold and SoulSilver.

## Generation II

 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.

${\displaystyle TreeIndex=\left\lfloor {\frac {X\cdot Y+X+Y}{5}}\right\rfloor {\bmod {1}}0}$

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:

{\displaystyle {\begin{aligned}TreeIndex&=\left\lfloor {\frac {Z\cdot n+Z+n}{5}}\right\rfloor {\bmod {1}}0\\&=\left\lfloor {\frac {(Z+1)\cdot n+Z}{5}}\right\rfloor {\bmod {1}}0\end{aligned}}}

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 ${\textstyle {\tfrac {Z+1}{5}}}$ (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.

Pokémon Games Location Levels Rate
Moderate-encounter trees
G S C 10 65%
G S C 10 15%
G S C 10 5%
G S C 10 65%
G S C 10 15%
G S C 10 5%
G S C 10 15%
High-encounter trees
G S C 10 50%
G S C 10 5%
G S C 10 50%
G S C 10 5%
G S C 10 15%
G S C 10 30%
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 Games Location Levels Rate
Moderate-encounter trees
G S C 10 80%
G S C 10 20%
High-encounter trees
G S C 10 50%
G S C 10 20%
G S C 10 30%
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.

Pokémon Games Location Levels Rate
Moderate-encounter trees
G S C 10 65%
G S C 10 15%
G S C 10 20%
High-encounter trees
G S C 10 50%
G S C 10 20%
G S C 10 30%
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 Games Location Levels Rate
Moderate-encounter trees
G S C 10 5%
G S C 10 5%
G S C 10 50%
G S C 10 10%
G S C 10 30%
High-encounter trees
G S C 10 15%
G S C 10 5%
G S C 10 15%
G S C 10 5%
G S C 10 60%
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 Games Location Levels Rate
Moderate-encounter trees
G S C 10 15%
G S C 10 20%
G S C 10 65%
High-encounter trees
G S C 10 20%
G S C 10 50%
G S C 10 30%
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 Games Location Levels Rate
Moderate-encounter trees
G S C 10 15%
G S C 10 20%
G S C 10 65%
High-encounter trees
G S C 10 20%
G S C 10 50%
G S C 10 30%
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 Games Location Levels Rate
Moderate-encounter trees
G S C 10 20%
G S C 10 50%
G S C 10 15%
G S C 10 15%
High-encounter trees
G S C 10 20%
G S C 10 50%
G S C 10 30%
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 Games Location Levels Rate
Moderate-encounter trees
G S C 10 80%
G S C 10 20%
High-encounter trees
G S C 10 50%
G S C 10 20%
G S C 10 30%
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

In Pokémon HeartGold and SoulSilver, Pokémon are now pre-defined for each eligible location. Due to this, the levels of Pokémon vary between locations, and the player can now find Pokémon in Kanto beyond Routes 26 and 27. The player can Headbutt trees while Surfing, and in fact certain encounter 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. The trees that potentially can contain encounters are pre-defined and will always be the same. The trees that are not part of the game's Headbutt array will never contain encounters - those that are, may contain an encounter depending on the player's Trainer ID and secret ID number combination. Unlike in Generation II, a Headbutt tree that contains encounters will always yield one; 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, to as many as 44 or 45 in Ilex Forest.

### Encounter mechanics

Which of the trees with possible encounters are assigned to have them is influenced by the following formula.

${\displaystyle X=((ID_{secret}\ll 16)|ID_{normal})\mod 10}$

The X is used to determine encounter slots for a given defined tree; where TreeID is tree's index number in the location's Headbutt array (for example, this equals to 0 for the first defined tree).

• One potential encounter tree (unused): The tree will have group A encounters if X is even, and group B if X is odd.
• Two (Route 16 half by Celadon City), three (Routes 14, 16, 21, 39 and 45, as well as Mt. Silver's mountainside) or four (Routes 3, 5 and 33) potential encounter trees: ${\displaystyle Encounter_{ID}=Tree_{ID}+(x*n)}$, where n is amount of potential encounter trees (that aren't part of Group C) in the location

In the following table, rows refer to n while columns refer to EncounterID. - signifies lack of encounters:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
2 A B A B A B A B A B A N/A
3 A B - A - B A - B - A - A B - B A A B - A - B A - B - A N/A
4 - A B - A B - A B - A B - A B A B - A B A B - A B A B - A B A B

These can be simplified into cases:

${\displaystyle {\begin{cases}{\text{ For }}n=2{\begin{cases}A,&{\text{if }}Encounter_{ID}\mod 4=\{0,3\}\\B,&{\text{if }}Encounter_{ID}\mod 4=\{1,2\}\end{cases}}\\{\text{ For }}n=3{\begin{cases}A,&{\text{if }}Encounter_{ID}\mod 18=\{0,3,7,11,13,17\}\\B,&{\text{if }}Encounter_{ID}\mod 18=\{1,5,6,9,14,16\}\end{cases}}\\{\text{ For }}n=4{\begin{cases}A,&{\text{if }}Encounter_{ID}\mod 5=\{1,2\},&{\text{for }}Encounter_{ID}<20\\B,&{\text{if }}Encounter_{ID}\mod 5=\{3,4\},&{\text{for }}Encounter_{ID}<20\\A,&{\text{if }}Encounter_{ID}\mod 5=\{1,3\},&{\text{for }}Encounter_{ID}\geq 20\\B,&{\text{if }}Encounter_{ID}\mod 5=\{2,4\},&{\text{for }}Encounter_{ID}\geq 20\end{cases}}\end{cases}}}$

• More than four trees: ${\displaystyle Encounter_{ID}=(Tree_{ID}\mod 5)+(x*5)}$
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
- A B - A B - A B - A B -
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
- A B A B - A B A B - A B A B - A B A B -

Due to the way the trees are assigned encounters, certain IDs have one less tree with encounters. For example, locations with 4 potential encounter trees have one tree with no encounters unless the ID combination results in X of 4 and 9. Similarly, in Ilex Forest, if an ID combination results in 0 or 5, there will be 12 trees without encounters instead of 11.

Group C trees are defined separately from normal trees, and as such are not influenced by the Trainer ID numbers.

#### Example

For Trainer ID of 19410 and secret ID of 21243:

• 1941010 = 4BD216
• 2124310 = 52FB16

{\displaystyle {\begin{aligned}X&=((52FB\ll 16)|4BD2)\mod A\\X&=(52FB0000|4BD2)\mod A\\X&=52FB4BD2\mod A\\X&=8\end{aligned}}}

Effectively, X is a modulo operation by 10 of a 32-bit number where secret ID is responsible for its 16 upper bits and regular ID is responsible for its 16 lower bits.

With X of 8, EncounterID for first tree in the location is 16 for areas with 2 potential encounter trees, 24 for areas with 3, 32 for areas with 4, and 40 for areas with more than 4. In the first case, the tree has encounter group A; in all other cases it has encounter group B.

### Pokémon

Pokémon Games Location Levels Rate
Group A
New Bark Town, Routes 29 and 30: Lv. 2-3
Ecruteak City and Route 37: Lv. 12-14
Safari Zone Gate: Lv. 14-16
Routes 26 and 27: Lv. 28-29
Route 31: Lv. 3-4
Route 34: Lv. 9-10
Route 35: Lv. 10-11
Route 36: Lv. 4-5
Route 39: Lv. 14-15
Route 48: Lv. 15-16
HG SS Varies 20%
HG SS Varies 50%
HG SS Varies 30%
Group B
New Bark Town, Routes 29 and 30: Lv. 4-5
Ecruteak City and Route 37: Lv. 15-17
Safari Zone Gate: Lv. 17-19
Routes 26 and 27: Lv. 31-32
Route 31: Lv. 5-6
Route 34: Lv. 11-12
Route 35: Lv. 13-14
Route 36: Lv. 6-7
Route 39: Lv. 16-17
Route 48: Lv. 17-18
HG SS Varies 20%
HG SS Varies 50%
HG SS Varies 30%
HG SS Varies 30%
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 Games Location Levels Rate
Group A
HG SS 2-3 20%
HG SS 2-3 50%
HG SS 2-3 30%
Group B
HG SS 4-5 20%
HG SS 4-5 50%
HG SS 4-5 30%
HG SS 4-5 30%
Group C
The four trees on the hill by the sea. Accessible by surfing west into the water, then using Rock Climb.
HG SS 18-20 65%
HG SS 18-20 30%
HG SS 21-25 5%
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 Games Location Levels Rate
Group A
HG SS 10 20%
HG SS 2-3 50%
HG SS 10 30%
Group B
HG SS 10 20%
HG SS 4-5 50%
HG SS 10 30%
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 Games Location Levels Rate
Group A
Azalea Town and Route 33: Lv. 3-5
Route 42: Lv. 13-14
Route 44: 21-22
Route 46: Lv. 2-3
HG SS Varies 50%
HG SS Varies 20%
HG SS Varies 30%
Group B
Azalea Town and Route 33: Lv. 6-8
Route 42: Lv. 15-16
Route 44: 23-24
Route 46: Lv. 4-5
HG SS Varies 80%
HG SS Varies 20%
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 Games Location Levels Rate
Group A
Pallet Town and Route 1: Lv. 2-3
Viridian City and Routes 2 and 22: Lv. 3-4
HG SS Varies 50%
HG SS Varies 30%
HG SS Varies 20%
Group B
Pallet Town and Route 1: Lv. 5-6
Viridian City and Routes 2 and 22: Lv. 5-7
HG SS Varies 50%
HG SS Varies 30%
HG SS Varies 30%
HG SS Varies 20%
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 Games Location Levels Rate
Group A
HG SS 3-5 50%
HG SS 3-5 30%
HG SS 3-5 20%
Group B
HG SS 7-9 80%
HG SS 7-9 20%
Group C
Two uppermost trees by the fence, reachable from Route 2
HG SS 5-9 65%
HG SS 5-9 30%
HG SS 8-12 5%
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 Games Location Levels Rate
Group A
Cerulean City, Routes 5 and 6: Lv. 11-13
Route 8: Lv. 16-17
HG SS Varies 50%
HG SS Varies 30%
HG SS Varies 20%
Group B
Cerulean City, Routes 5 and 6: Lv. 14-16
Route 8: Lv. 18-19
HG SS Varies 80%
HG SS Varies 20%
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 Games Location Levels Rate
Group A
Vermilion City: Lv. 11-13
Celadon City and Route 7: 15-17
Route 11: Lv. 13-14
Route 16: Lv. 26-27
HG SS Varies 50%
HG SS Varies 30%
HG SS Varies 20%
Group B
Vermilion City: Lv. 14-16
Celadon City and Route 7: 18-20
Route 11: Lv. 15-16
Route 16: Lv. 29-30
HG SS Varies 80%
HG SS Varies 20%
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 Games Location Levels Rate
Group A
Fuchsia City and Route 15: Lv. 21-23
Routes 12 and 13: Lv. 22-23
Routes 14 and 18: Lv. 26-27
Route 21: Lv. 24-26
HG SS Varies 50%
HG SS Varies 30%
HG SS Varies 30%
HG SS Varies 20%
Group B
Fuchsia City: Lv. 26-34
Routes 12 and 13: Lv. 24-25
Routes 14 and 18: Lv. 29-30
Route 15: Lv. 24-26
Route 21: Lv. 27-30
HG SS Varies 15%
HG SS Varies 65%
HG SS Varies 20%
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 Games Location Levels Rate
Group A
HG SS 6-7 50%
HG SS 6-7 30%
HG SS 6-7 20%
Group B
HG SS 9-10 80%
HG SS 9-10 20%
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 Games Location Levels Rate
Group A
HG SS 10-11 50%
HG SS 10-11 30%
HG SS 10-11 20%
Group B
HG SS 13-14 80%
HG SS 13-14 20%
Group C
The four trees at the northwest corner of Route 25.
HG SS 10-14 30%
HG SS 15-18 5%
HG SS 10-14 65%
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 Games Location Levels Rate
Group A
Route 28 and Mt. Silver (exterior): Lv. 39-40
Mt. Silver (mountainside): Lv. 42-44
HG SS Varies 20%
HG SS Varies 30%
HG SS Varies 50%
Group B
Route 28 and Mt. Silver (exterior): Lv. 41-43
Mt. Silver (mountainside): Lv. 45-48
HG SS Varies 20%
HG SS Varies 30%
HG SS Varies 50%
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 Games Location Levels Rate
Group A
HG SS 4-5 20%
HG SS 4-5 50%
HG SS 4-5 30%
Group B
HG SS 6-7 20%
HG SS 6-7 80%
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 Games Location Levels Rate
Group A
HG SS 13-14 20%
HG SS 13-14 50%
HG SS 13-14 30%
Group B
HG SS 15-16 20%
HG SS 15-16 50%
HG SS 15-16 30%
HG SS 15-16 30%
Group C
The easternmost tree at top of the hill accessible via Route 39 by Rock Climb.
HG SS 18-20 65%
HG SS 18-20 30%
HG SS 21-25 5%
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 Games Location Levels Rate
Group A
Route 43: Lv. 15-16
Lake of Rage: Lv. 14-16
HG SS Varies 20%
HG SS Varies 50%
HG SS Varies 30%
Group B
Route 43: Lv. 17-18
Lake of Rage: Lv. 17-19
HG SS Varies 15%
HG SS Varies 20%
HG SS Varies 65%
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 Games Location Levels Rate
Group A
HG SS 23-24 50%
HG SS 23-24 20%
HG SS 23-24 15%
HG SS 23-25 15%
Group B
HG SS 26-27 80%
HG SS 26-27 20%
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 Games Location Levels Rate
Group A
HG SS 15-16 20%
HG SS 15-16 50%
HG SS 15-16 30%
Group B
HG SS 17-18 20%
HG SS 17-18 50%
HG SS 17-18 30%
HG SS 17-18 30%
Group C
Leftmost and rightmost trees at top of the east waterfall and the two upmost trees on top of the hill on the western side
HG SS 25-28 50%
HG SS 25-28 30%
HG SS 25-28 50%
HG SS 25-28 30%
HG SS 25-28 15%
HG SS 27-30 5%
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 Games Location Levels Rate
Group A
HG SS 3-5 30%
HG SS 3-5 10%
HG SS 3-5 30%
HG SS 3-5 10%
HG SS 3-5 60%
Group B
HG SS 6-8 10%
HG SS 6-8 10%
HG SS 6-8 50%
HG SS 6-8 10%
HG SS 6-8 30%
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 Games Location Levels Rate
Group A
HG SS 10-12 20%
HG SS 10-12 50%
HG SS 10-12 30%
Group B
HG SS 13-15 20%
HG SS 13-15 50%
HG SS 13-15 30%
HG SS 13-15 30%
Group C
Five trees at top of the hill in the north-east section. Requires Rock Climb.
HG SS 18-20 65%
HG SS 18-20 30%
HG SS 21-25 5%
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 Games Location Levels Rate
Group A
HG SS 3-4 50%
HG SS 3-4 10%
HG SS 3-4 10%
HG SS 3-4 30%
HG SS 3-4 5%
HG SS 3-4 5%
HG SS 3-4 30%
Group B
HG SS 5-7 50%
HG SS 5-7 10%
HG SS 5-7 10%
HG SS 5-7 30%
HG SS 5-7 5%
HG SS 5-7 5%
HG SS 5-7 30%
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.