Headbutt tree: Difference between revisions

→‎Encounter mechanics: The number of bits shifted refers to the number of bits in binary, not in hexadecimal
(Bitwise shifts are counted in places. It is being shifted over four places, not 16 or 10)
(→‎Encounter mechanics: The number of bits shifted refers to the number of bits in binary, not in hexadecimal)
Tags: Mobile edit Mobile web edit
Line 195: Line 195:
===Encounter mechanics===
===Encounter mechanics===
Which of the trees with possible encounters are assigned to have them is influenced by the following formula.
Which of the trees with possible encounters are assigned to have them is influenced by the following formula.
:<math>X = ((ID_{secret} \ll 4) |  ID_{normal}) \mod 10</math>
:<math>X = ((ID_{secret} \ll 16) |  ID_{normal}) \mod 10</math>
The X is used to determine encounter slots for a given defined tree; where ''Tree<sub>ID</sub>'' is tree's index number in the location's Headbutt array (for example, this equals to 0 for the first defined tree).
The X is used to determine encounter slots for a given defined tree; where ''Tree<sub>ID</sub>'' 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.
*One potential encounter tree (unused): The tree will have group A encounters if X is even, and group B if X is odd.
Line 359: Line 359:
<math>
<math>
\begin{align}
\begin{align}
X & = ((52FB \ll 4) | 4BD2) \mod A \\
X & = ((52FB \ll 10) | 4BD2) \mod A \\
X & = (52FB0000 | 4BD2) \mod A \\
X & = (52FB0000 | 4BD2) \mod A \\
X & = 52FB4BD2 \mod A \\
X & = 52FB4BD2 \mod A \\
22

edits