<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="../layout/rss.xsl" ?>
<rss version="2.0"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
>
 <channel>
	<title>Legendary Pokemon: Weekly Mechanics</title>
	<description>The Pokemon site for all your needs!</description>
	<language>en-us</language>
	<link>http://www.legendarypokemon.net</link>
	<copyright>Copyright 2001-2005 Hercules Papatheodorou a.k.a Arty2</copyright>
	<generator>AJ Fork</generator>
	<image>
		<title>Logo</title>
		<link>http://www.legendarypokemon.net</link>
		<url>http://www.legendarypokemon.net/layout/titlesmall.gif</url>
		<width>148</width>
		<height>25</height>
		<description>The Pokemon site for all your needs!</description>
	</image>
<item>
<title>Move Data Structure</title>
<link>http://www.legendarypokemon.net/2005/11/06/Weeklymech/move-data-structure</link>
<dc:creator>Arty2</dc:creator>
<dc:date>2005-11-06T07:34:40+02:00</dc:date>
<description><!-- <h3>Introduction</h3>
<p>This article provides detailed documentation on the Move data structures in the GBA games. Move names are stored elsewhere.</p>
<p>If you have something to add feel free to comment and I'd be happy to see people contributing to these articles. After every article will follow some related links that will help you get additional information.</p>
<p>Always remember that <strong>ROM images are illegal</strong> if you do not own the actual game and should only be used for personal backup reasons. If you like a game, please buy it and help the producers make new games.</p>
<h3>Specs.</h3>
<p>A <strong>base stats structure</strong> is a 34-byte piece of data in the Advanced Generation games.</p>
<table>
	<thead>
	<tr class="dexmainhead"><th colspan="3">Move Data Structure</th></tr>
	<tr><th> Data </th><th> Type </th><th> Description </th></tr></thead><tbody>
	<tr><td class="dexmaincol">Effect</td><td>byte</td><td>This is the move's effect number. Some moves share the same effect number. Effectless moves have an Effect number of 0x00.</td></tr>
	<tr><td class="dexmaincol">Base Power</td><td>byte</td><td>This is the move's Base Power which is used when calculating inflicted damage.</td></tr>
	<tr><td class="dexmaincol">Type</td><td>byte</td><td>This is the move's Type.</td></tr>
	<tr><td class="dexmaincol">Accuracy</td><td>byte</td><td>This is the move's accuracy. Divide this value by 256 to get a % accuracy. An accuracy of 0x00 means that it will never fail.</td></tr>
	<tr><td class="dexmaincol">PP</td><td>byte</td><td>The move's base Power Points.</td></tr>
	<tr><td class="dexmaincol">Effect Accuracy</td><td>byte</td><td>This is the effects's accuracy. Divide this value by 100 to get a % accuracy. An accuracy of 0x00 means that the effect will always occur.</td></tr>
	<tr><td class="dexmaincol">"Affects Whom"</td><td>byte</td><td>This determines who the move will hit on a 2on2 battle</td></tr>
	<tr><td class="dexmaincol">Priotiry</td><td>byte</td><td>Priority determines the move's speed, for example <a href="http://www.legendarypokemon.net/attacks/Extremespeed">Extremespeed</a> will always hit first. The byte is signed which means that it can be either positive or negative. The higher the number is, the faster the move is.</td></tr>
	<tr><td class="dexmaincol">Special Flags</td><td>byte</td><td>A group of bit level flags that determine whether the move is affected by items such as King's Rock or Brightpowder etc. See below for more.</td></tr>
	<tr><td class="dexmaincol">Padding</td><td>3 bytes</td><td>Always equals 0000. It is used as a divider/padding between the data entries.</td></tr>
	</tbody>
</table>
<h3>Additional References</h3>
<h4>Types (decimal)</h4>
<pre>
00  Normal      09  ???
01  Fighting    10  Fire
02  Flying      11  Water
03  Poison      12  Grass
04  Ground      13  Electric
05  Rock        14  Psychic
06  Bug         15  Ice
07  Ghost       17  Dark
08  Steel
</pre>
<h4>"Affects Whom" table</h4>
<p>Note than only <a href="http://www.legendarypokemon.net/attacks/Spikes">Spikes</a> has a value of 0x40.</p>
<pre>
0x00  Selected target
0x01  Last opponent who moved
0x02  Unused
0x04  Random target
0x08  Both opponents
0x10  User
0x20  Both opponents and partner
0x40  Opponent field
0x80  Unused
</pre>
<h4>Special Flags</h4>
<pre>
Format (bit level): 00?? ????

0  Empty
0  Empty
?  1: Affected by King's Rock
?  1: Affected By Brightpowder

?  1: Affected by <a href="http://www.legendarypokemon.net/attacks/Snatch">Snatch</a> (Stat Altering)
?  1: No Damage For Opponent
?  1: Affects Opponent   0: Affects User
?  1: Physical Contact (Touch)
</pre>
<h4>Sound moves</h4>
<p>Moves that make sound and are therefore negated by the Soundproof <a href="http://www.legendarypokemon.net/rs_abilities">ability</a>.</p>
<p>It is unknown where this data is located.</p>
<ul>
	<li><a href="http://www.legendarypokemon.net/attacks/Grasswhistle">Grasswhistle</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Growl">Growl</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Heal+Bell">Heal Bell</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Hyper+Voice">Hyper Voice</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Metal+Sound">Metal Sound</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Perish+Song">Perish Song</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Roar">Roar</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Screech">Screech</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Sing">Sing</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Snore">Snore</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Supersonic">Supersonic</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Uproar">Uproar</a></li>
</ul>
<h4>Maximum PP</h4>
<code>maxPP = floor((PP*20/100)*3 + PP)</code>
<h4>Signed byte</h4>
<p>Use this function to convert the Priority value to a readable number.</p>
<pre><code>function signedbyte($number) {
	if ($number &lt; 128) { return $number; }
	return $number-256;
}</code></pre>
<h3>Related links</h3>
<ul>
<li><a href="http://www.legendarypokemon.net/datalists">Various Data Lists</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Move_data_structure_in_the_GBA">Bulbapedia: Move data structure in the GBA</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Category:Game_mechanics">Bulbapedia: General Game Mechanics</a></li>
</ul> --></description>
<content:encoded><![CDATA[<h3>Introduction</h3>
<p>This article provides detailed documentation on the Move data structures in the GBA games. Move names are stored elsewhere.</p>
<p>If you have something to add feel free to comment and I'd be happy to see people contributing to these articles. After every article will follow some related links that will help you get additional information.</p>
<p>Always remember that <strong>ROM images are illegal</strong> if you do not own the actual game and should only be used for personal backup reasons. If you like a game, please buy it and help the producers make new games.</p>
<h3>Specs.</h3>
<p>A <strong>base stats structure</strong> is a 34-byte piece of data in the Advanced Generation games.</p>
<table>
	<thead>
	<tr class="dexmainhead"><th colspan="3">Move Data Structure</th></tr>
	<tr><th> Data </th><th> Type </th><th> Description </th></tr></thead><tbody>
	<tr><td class="dexmaincol">Effect</td><td>byte</td><td>This is the move's effect number. Some moves share the same effect number. Effectless moves have an Effect number of 0x00.</td></tr>
	<tr><td class="dexmaincol">Base Power</td><td>byte</td><td>This is the move's Base Power which is used when calculating inflicted damage.</td></tr>
	<tr><td class="dexmaincol">Type</td><td>byte</td><td>This is the move's Type.</td></tr>
	<tr><td class="dexmaincol">Accuracy</td><td>byte</td><td>This is the move's accuracy. Divide this value by 256 to get a % accuracy. An accuracy of 0x00 means that it will never fail.</td></tr>
	<tr><td class="dexmaincol">PP</td><td>byte</td><td>The move's base Power Points.</td></tr>
	<tr><td class="dexmaincol">Effect Accuracy</td><td>byte</td><td>This is the effects's accuracy. Divide this value by 100 to get a % accuracy. An accuracy of 0x00 means that the effect will always occur.</td></tr>
	<tr><td class="dexmaincol">"Affects Whom"</td><td>byte</td><td>This determines who the move will hit on a 2on2 battle</td></tr>
	<tr><td class="dexmaincol">Priotiry</td><td>byte</td><td>Priority determines the move's speed, for example <a href="http://www.legendarypokemon.net/attacks/Extremespeed">Extremespeed</a> will always hit first. The byte is signed which means that it can be either positive or negative. The higher the number is, the faster the move is.</td></tr>
	<tr><td class="dexmaincol">Special Flags</td><td>byte</td><td>A group of bit level flags that determine whether the move is affected by items such as King's Rock or Brightpowder etc. See below for more.</td></tr>
	<tr><td class="dexmaincol">Padding</td><td>3 bytes</td><td>Always equals 0000. It is used as a divider/padding between the data entries.</td></tr>
	</tbody>
</table>
<h3>Additional References</h3>
<h4>Types (decimal)</h4>
<pre>
00  Normal      09  ???
01  Fighting    10  Fire
02  Flying      11  Water
03  Poison      12  Grass
04  Ground      13  Electric
05  Rock        14  Psychic
06  Bug         15  Ice
07  Ghost       17  Dark
08  Steel
</pre>
<h4>"Affects Whom" table</h4>
<p>Note than only <a href="http://www.legendarypokemon.net/attacks/Spikes">Spikes</a> has a value of 0x40.</p>
<pre>
0x00  Selected target
0x01  Last opponent who moved
0x02  Unused
0x04  Random target
0x08  Both opponents
0x10  User
0x20  Both opponents and partner
0x40  Opponent field
0x80  Unused
</pre>
<h4>Special Flags</h4>
<pre>
Format (bit level): 00?? ????

0  Empty
0  Empty
?  1: Affected by King's Rock
?  1: Affected By Brightpowder

?  1: Affected by <a href="http://www.legendarypokemon.net/attacks/Snatch">Snatch</a> (Stat Altering)
?  1: No Damage For Opponent
?  1: Affects Opponent   0: Affects User
?  1: Physical Contact (Touch)
</pre>
<h4>Sound moves</h4>
<p>Moves that make sound and are therefore negated by the Soundproof <a href="http://www.legendarypokemon.net/rs_abilities">ability</a>.</p>
<p>It is unknown where this data is located.</p>
<ul>
	<li><a href="http://www.legendarypokemon.net/attacks/Grasswhistle">Grasswhistle</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Growl">Growl</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Heal+Bell">Heal Bell</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Hyper+Voice">Hyper Voice</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Metal+Sound">Metal Sound</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Perish+Song">Perish Song</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Roar">Roar</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Screech">Screech</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Sing">Sing</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Snore">Snore</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Supersonic">Supersonic</a></li>
	<li><a href="http://www.legendarypokemon.net/attacks/Uproar">Uproar</a></li>
</ul>
<h4>Maximum PP</h4>
<code>maxPP = floor((PP*20/100)*3 + PP)</code>
<h4>Signed byte</h4>
<p>Use this function to convert the Priority value to a readable number.</p>
<pre><code>function signedbyte($number) {
	if ($number &lt; 128) { return $number; }
	return $number-256;
}</code></pre>
<h3>Related links</h3>
<ul>
<li><a href="http://www.legendarypokemon.net/datalists">Various Data Lists</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Move_data_structure_in_the_GBA">Bulbapedia: Move data structure in the GBA</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Category:Game_mechanics">Bulbapedia: General Game Mechanics</a></li>
</ul>]]></content:encoded>
<slash:comments>0</slash:comments>
</item><item>
<title>Pokedex Data Structure</title>
<link>http://www.legendarypokemon.net/2005/11/04/Weeklymech/pokedex-data-structure</link>
<dc:creator>Arty2</dc:creator>
<dc:date>2005-11-04T16:09:33+02:00</dc:date>
<description><!-- <h3>Introduction</h3>
<p>This article provides detailed documentation on the Pok&eacute;dex data structures in the GBA games.</p>
<p>If you have something to add feel free to comment and I'd be happy to see people contributing to these articles. After every article will follow some related links that will help you get additional information.</p>
<p>Some might notice that the following article looks like Bulbapedia's related page; I started that one page and fellow Bulbapedia editors are free to take more details from this one article and add it to Bulbapedia. Most stuff is self-explicatory but let's get into detail.</p>
<h3>Specs.</h3>
<p>A <strong>base stats structure</strong> is a 34-byte piece of data in the Advanced Generation games.</p>
<table>
	<thead>
	<tr class="dexmainhead"><th colspan="3">Pok&eacute;dex Data Structure</th></tr>
	<tr><th> Data </th><th> Type </th><th> Description </th></tr></thead><tbody>
	<tr><td class="dexmaincol">Padding</td><td>byte</td><td>Always equals 0x00.</td></tr>
	<tr><td class="dexmaincol">Name</td><td>12 bytes</td><td>This is the Pok&eacute;mon's species/nickname. It is always in capital letters and possible empty letters are filled with 0x00. The last byte is a normal slash /. (TINYRACCOON/ for example)</td></tr>
	<tr><td class="dexmaincol">Height</td><td>2 bytes</td><td>This is the Pok&eacute;mon's height. It is stored in decimetres (1/10 metres) and converted to other units with in-game functions.</td></tr>
	<tr><td class="dexmaincol">Weight</td><td>2 bytes</td><td>This is the Pok&eacute;mon's weight. It is stored in hectogrammes (1/10 kilogrammes) and converted to other units with in-game functions.</td></tr>
	<tr><td class="dexmaincol">Description pointer start</td><td>4 bytes</td><td rowspan="2">These show the game where the description for that Pok&eacute;mon is. The MSB byte is always set to 0x08, which matches a BRANCH instruction (B) in assembly. If a pointer looks like 0x123456<em>08</em> (in hex) then the location is 0x563412.</td></tr>
	<tr><td class="dexmaincol">Description pointer end</td><td>4 bytes</td></tr>
	<tr><td class="dexmaincol">Pok&eacute;mon scale</td><td>2 bytes</td><td>This is the Pok&eacute;mon's scale used in the compare size function.</td></tr>
	<tr><td class="dexmaincol">Pok&eacute;mon offset</td><td>2 bytes</td><td>This is the Pok&eacute;mon's offset used in the compare size function.</td></tr>
	<tr><td class="dexmaincol">Trainer Scale</td><td>byte</td><td>This is the Trainer's scale used in the compare size function.</td></tr>
	<tr><td class="dexmaincol">Trainer Offset</td><td>1 bytes</td><td>This is the Pok&eacute;mon's offset used in the compare size function.</td></tr>
	<tr><td class="dexmaincol">Padding</td><td>byte</td><td>Always equals 0x0000.</td></tr>
	</tbody>
</table>
<h3>Functions</h3>
<p>Here follow some functions that are pretty similar to the ones used in the games.</p>
<h4>Centimetres to Feet/inches</h4>
<code>feet = (round($value/0.254)-$inches)/12</code>
<code>inches = (round($value/0.254)%12)</code>
<h4>Hectogrammes to libres</h4>
<code>round(($value)*2.20459)/10</code>
<h4>Size compare</h4>
<p>This returns the picture's height/width in Size Compare Mode.</p>
<code>x = floor(64*256/scale)</code>
<p>Note: 64pixels is a standard sprite size.</p>
<p>The offsets' true use is not confirmed but they sure affect the placement of the Pok&eacute;mon's sprite. A Pok&eacute;mon's Levitate ability or Flying type, also seems to have something to do with the sprite's placement.</p>
<h3>Related links</h3>
<ul>
<li><a href="http://www.legendarypokemon.net/datalists">Various Data Lists</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Pok&eacute;dex_data_structure_in_the_GBA">Bulbapedia: Pok&eacute;dex data structure in the GBA</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Category:Game_mechanics">Bulbapedia: General Game Mechanics</a></li>
</ul> --></description>
<content:encoded><![CDATA[<h3>Introduction</h3>
<p>This article provides detailed documentation on the Pok&eacute;dex data structures in the GBA games.</p>
<p>If you have something to add feel free to comment and I'd be happy to see people contributing to these articles. After every article will follow some related links that will help you get additional information.</p>
<p>Some might notice that the following article looks like Bulbapedia's related page; I started that one page and fellow Bulbapedia editors are free to take more details from this one article and add it to Bulbapedia. Most stuff is self-explicatory but let's get into detail.</p>
<h3>Specs.</h3>
<p>A <strong>base stats structure</strong> is a 34-byte piece of data in the Advanced Generation games.</p>
<table>
	<thead>
	<tr class="dexmainhead"><th colspan="3">Pok&eacute;dex Data Structure</th></tr>
	<tr><th> Data </th><th> Type </th><th> Description </th></tr></thead><tbody>
	<tr><td class="dexmaincol">Padding</td><td>byte</td><td>Always equals 0x00.</td></tr>
	<tr><td class="dexmaincol">Name</td><td>12 bytes</td><td>This is the Pok&eacute;mon's species/nickname. It is always in capital letters and possible empty letters are filled with 0x00. The last byte is a normal slash /. (TINYRACCOON/ for example)</td></tr>
	<tr><td class="dexmaincol">Height</td><td>2 bytes</td><td>This is the Pok&eacute;mon's height. It is stored in decimetres (1/10 metres) and converted to other units with in-game functions.</td></tr>
	<tr><td class="dexmaincol">Weight</td><td>2 bytes</td><td>This is the Pok&eacute;mon's weight. It is stored in hectogrammes (1/10 kilogrammes) and converted to other units with in-game functions.</td></tr>
	<tr><td class="dexmaincol">Description pointer start</td><td>4 bytes</td><td rowspan="2">These show the game where the description for that Pok&eacute;mon is. The MSB byte is always set to 0x08, which matches a BRANCH instruction (B) in assembly. If a pointer looks like 0x123456<em>08</em> (in hex) then the location is 0x563412.</td></tr>
	<tr><td class="dexmaincol">Description pointer end</td><td>4 bytes</td></tr>
	<tr><td class="dexmaincol">Pok&eacute;mon scale</td><td>2 bytes</td><td>This is the Pok&eacute;mon's scale used in the compare size function.</td></tr>
	<tr><td class="dexmaincol">Pok&eacute;mon offset</td><td>2 bytes</td><td>This is the Pok&eacute;mon's offset used in the compare size function.</td></tr>
	<tr><td class="dexmaincol">Trainer Scale</td><td>byte</td><td>This is the Trainer's scale used in the compare size function.</td></tr>
	<tr><td class="dexmaincol">Trainer Offset</td><td>1 bytes</td><td>This is the Pok&eacute;mon's offset used in the compare size function.</td></tr>
	<tr><td class="dexmaincol">Padding</td><td>byte</td><td>Always equals 0x0000.</td></tr>
	</tbody>
</table>
<h3>Functions</h3>
<p>Here follow some functions that are pretty similar to the ones used in the games.</p>
<h4>Centimetres to Feet/inches</h4>
<code>feet = (round($value/0.254)-$inches)/12</code>
<code>inches = (round($value/0.254)%12)</code>
<h4>Hectogrammes to libres</h4>
<code>round(($value)*2.20459)/10</code>
<h4>Size compare</h4>
<p>This returns the picture's height/width in Size Compare Mode.</p>
<code>x = floor(64*256/scale)</code>
<p>Note: 64pixels is a standard sprite size.</p>
<p>The offsets' true use is not confirmed but they sure affect the placement of the Pok&eacute;mon's sprite. A Pok&eacute;mon's Levitate ability or Flying type, also seems to have something to do with the sprite's placement.</p>
<h3>Related links</h3>
<ul>
<li><a href="http://www.legendarypokemon.net/datalists">Various Data Lists</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Pok&eacute;dex_data_structure_in_the_GBA">Bulbapedia: Pok&eacute;dex data structure in the GBA</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Category:Game_mechanics">Bulbapedia: General Game Mechanics</a></li>
</ul>]]></content:encoded>
<slash:comments>0</slash:comments>
</item><item>
<title>Base Stats Structure</title>
<link>http://www.legendarypokemon.net/2005/10/20/Weeklymech/base-stats-structure</link>
<dc:creator>Arty2</dc:creator>
<dc:date>2005-10-20T11:21:26+02:00</dc:date>
<description><!-- <h3>Introduction</h3>
<p>Each Pok&eacute;mon has some preset <strong>base stats</strong>, that determine its potential and power. It has also at least one preset type, a catch rate, gender, EP yield etc.</p>
<p>If you have something to add feel free to comment and I'd be happy to see people contributing to these articles. After every article will follow some related links that will help you get additional information.</p>
<p>Some might notice that the following article looks like Bulbapedia's related page; I started that one page and fellow Bulbapedia editors are free to take more details from this one article and add it to Bulbapedia. Most stuff is self-explicatory but let's get into detail.</p>
<h3>Specs.</h3>
<p>A <strong>base stats structure</strong> is a 28-byte piece of data in the Advanced Generation games.</p>
<table>
	<thead>
	<tr class="dexmainhead"><th colspan="3">Base Stats Structure</th></tr>
	<tr><th> Data </th><th> Type </th><th> Description </th></tr></thead><tbody>
	<tr><td class="dexmaincol">Base HP</td><td>byte</td><td>The Pok&eacute;mon's base HP used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Attack</td><td>byte</td><td>The Pok&eacute;mon's base Attack used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Defense</td><td>byte</td><td>The Pok&eacute;mon's base Defense used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Speed</td><td>byte</td><td>The Pok&eacute;mon's base Speed used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Special Attack</td><td>byte</td><td>The Pok&eacute;mon's base Special Attack used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Special Defense</td><td>byte</td><td>The Pok&eacute;mon's base Special Defense used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Type 1</td><td>byte</td><td>The first Type of Pok&eacute;mon of the species.</td></tr>
	<tr><td class="dexmaincol">Type 2</td><td>byte</td><td>The second Type of Pok&eacute;mon of the species. Matches the first if it only has one Type.</td></tr>
	<tr><td class="dexmaincol">Catch Rate</td><td>byte</td><td>The Catch Rate used to calculate the probability of catching a wild Pok&eacute;mon of that species. The higher the value is, the easier it is to capture the Pok&eacute;mon.</td></tr>
	<tr><td class="dexmaincol">Base EXP</td><td>byte</td><td>The Base Experience used when calculating the gained EXP. Points when defeating a Pok&eacute;mon of that species.</td></tr>
	<tr><td class="dexmaincol">Effort Points yield</td><td>word</td><td>The amount and type of Effort Points gained when defeating a Pok&eacute;mon of that species.</td></tr>
	<tr><td class="dexmaincol">Held Item 1</td><td>word</td><td>Wild Held Item number 1 with a Probability of 50%.</td></tr>
	<tr><td class="dexmaincol">Held Item 2</td><td>word</td><td>Wild Held Item number 2 with a Probability of 5%. When this value matches with the previous one, then the Probability is 100%.</td></tr>
	<tr><td class="dexmaincol">Gender</td><td>byte</td><td>The value that determines a Pok&eacute;mon's gender. It represents the rate of females versus males of the species. 0x255 is Genderless, 0x254 is 100% female and 0 is 100% male.</td></tr>
	<tr><td class="dexmaincol">Base Egg Steps</td><td>byte</td><td>Determines the number of steps that must be taken before an Egg of the species hatches. ActualEggSteps = BaseEggSteps*256.</td></tr>
	<tr><td class="dexmaincol">Base Tameness</td><td>byte</td><td>The tameness value of a Pok&eacute;mon of that species has when caught/traded.</td></tr>
	<tr><td class="dexmaincol">Growth Group</td><td>byte</td><td>This value determines how fast a Pok&eacute;mon of that species will level up.</td></tr>
	<tr><td class="dexmaincol">Egg Group 1</td><td>byte</td><td>The first Egg Group a Pok&eacute;mon of the species belongs to.</td></tr>
	<tr><td class="dexmaincol">Egg Group 2</td><td>byte</td><td>The second Egg Group a Pok&eacute;mon of the species belongs to. Matches the first if it only belongs to one Egg Group.</td></tr>
	<tr><td class="dexmaincol">Ability 1</td><td>byte</td><td>The first Ability a Pok&eacute;mon of the species may have.</td></tr>
	<tr><td class="dexmaincol">Ability 2</td><td>byte</td><td>The second Ability a Pok&eacute;mon of the species may have. If none then the value equals 0.</td></tr>
	<tr><td class="dexmaincol">Safari Zone Flag</td><td>byte</td><td>Determines rate at which Pok&eacute;mon of the species flee when encountered in the Safari Zone. Only Pok&eacute;mon that appear in the Safari Zone have this flag.</td></tr>
	<tr><td class="dexmaincol">Color</td><td>byte</td><td>The Pok&eacute;mon's  Pok&eacute;dex color.</td></tr>
	<tr><td class="dexmaincol">Padding</td><td>word</td><td>Always equals 0000. It is used as a divider/padding between the data entries.</td></tr>
	</tbody>
</table>
<h3>Additional References</h3>
<h4>Types (decimal)</h4>
<pre>
00  Normal      09  ???
01  Fighting    10  Fire
02  Flying      11  Water
03  Poison      12  Grass
04  Ground      13  Electric
05  Rock        14  Psychic
06  Bug         15  Ice
07  Ghost       16  Dragon
08  Steel       17  Dark
</pre>
<h4>Effort Points Yield (word/bytes reversed)</h4>
<pre>
0000   11     11     11   11   11   11    (binary)
empty  SPDEF  SPATK  SPD  DEF  ATK  HP
</pre>
<h4>Gender</h4>
<code>x = ♀, y = ♂, n = gender value<br/>
x = floor(n/254)*100<br/>
y = 100 - x
</code>
<h4>Growth Group (decimal)</h4>
<pre>
0   1,000,000   Medium-Fast
1     600,000   Erratic
2   1,640,000   Fluctuating
3   1,059,860   Medium-Slow
4     800,000   Fast
5   1,250,000   Slow
</pre>
<h4>Egg Groups (decimal)</h4>
<pre>
01  Monster   09  Water 3
02  Water 1   10  Mineral
03  Bug       11  Inteterminate
04  Flying    12  Water 2
05  Ground    13  Ditto
06  Fairy     14  Dragon
07  Plant     15  No Eggs
08  Humanshape
</pre>
<h4>Color</h4>
<pre>
0  Red     5  Brown
1  Blue    6  Purple
2  Yellow  7  Gray
3  Green   8  White
4  Black   9  Pink
</pre>
<h3>Related links</h3>
<ul>
<li><a href="http://www.legendarypokemon.net/training">Stats and Training</a></li>
<li><a href="http://www.legendarypokemon.net/breeding">Breeding Guide</a></li>
<li><a href="http://www.legendarypokemon.net/datalists">Various Data Lists</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Experience">Bulbapedia: Experience</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Happiness">Bulbapedia: Happiness</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Pok&eacute;mon_base_stats_data_structure_in_the_GBA">Bulbapedia: Pok&eacute;mon base stats data structure in the GBA</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Category:Game_mechanics">Bulbapedia: General Game Mechanics</a></li>
</ul> --></description>
<content:encoded><![CDATA[<h3>Introduction</h3>
<p>Each Pok&eacute;mon has some preset <strong>base stats</strong>, that determine its potential and power. It has also at least one preset type, a catch rate, gender, EP yield etc.</p>
<p>If you have something to add feel free to comment and I'd be happy to see people contributing to these articles. After every article will follow some related links that will help you get additional information.</p>
<p>Some might notice that the following article looks like Bulbapedia's related page; I started that one page and fellow Bulbapedia editors are free to take more details from this one article and add it to Bulbapedia. Most stuff is self-explicatory but let's get into detail.</p>
<h3>Specs.</h3>
<p>A <strong>base stats structure</strong> is a 28-byte piece of data in the Advanced Generation games.</p>
<table>
	<thead>
	<tr class="dexmainhead"><th colspan="3">Base Stats Structure</th></tr>
	<tr><th> Data </th><th> Type </th><th> Description </th></tr></thead><tbody>
	<tr><td class="dexmaincol">Base HP</td><td>byte</td><td>The Pok&eacute;mon's base HP used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Attack</td><td>byte</td><td>The Pok&eacute;mon's base Attack used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Defense</td><td>byte</td><td>The Pok&eacute;mon's base Defense used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Speed</td><td>byte</td><td>The Pok&eacute;mon's base Speed used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Special Attack</td><td>byte</td><td>The Pok&eacute;mon's base Special Attack used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Base Special Defense</td><td>byte</td><td>The Pok&eacute;mon's base Special Defense used to calculate its stats.</td></tr>
	<tr><td class="dexmaincol">Type 1</td><td>byte</td><td>The first Type of Pok&eacute;mon of the species.</td></tr>
	<tr><td class="dexmaincol">Type 2</td><td>byte</td><td>The second Type of Pok&eacute;mon of the species. Matches the first if it only has one Type.</td></tr>
	<tr><td class="dexmaincol">Catch Rate</td><td>byte</td><td>The Catch Rate used to calculate the probability of catching a wild Pok&eacute;mon of that species. The higher the value is, the easier it is to capture the Pok&eacute;mon.</td></tr>
	<tr><td class="dexmaincol">Base EXP</td><td>byte</td><td>The Base Experience used when calculating the gained EXP. Points when defeating a Pok&eacute;mon of that species.</td></tr>
	<tr><td class="dexmaincol">Effort Points yield</td><td>word</td><td>The amount and type of Effort Points gained when defeating a Pok&eacute;mon of that species.</td></tr>
	<tr><td class="dexmaincol">Held Item 1</td><td>word</td><td>Wild Held Item number 1 with a Probability of 50%.</td></tr>
	<tr><td class="dexmaincol">Held Item 2</td><td>word</td><td>Wild Held Item number 2 with a Probability of 5%. When this value matches with the previous one, then the Probability is 100%.</td></tr>
	<tr><td class="dexmaincol">Gender</td><td>byte</td><td>The value that determines a Pok&eacute;mon's gender. It represents the rate of females versus males of the species. 0x255 is Genderless, 0x254 is 100% female and 0 is 100% male.</td></tr>
	<tr><td class="dexmaincol">Base Egg Steps</td><td>byte</td><td>Determines the number of steps that must be taken before an Egg of the species hatches. ActualEggSteps = BaseEggSteps*256.</td></tr>
	<tr><td class="dexmaincol">Base Tameness</td><td>byte</td><td>The tameness value of a Pok&eacute;mon of that species has when caught/traded.</td></tr>
	<tr><td class="dexmaincol">Growth Group</td><td>byte</td><td>This value determines how fast a Pok&eacute;mon of that species will level up.</td></tr>
	<tr><td class="dexmaincol">Egg Group 1</td><td>byte</td><td>The first Egg Group a Pok&eacute;mon of the species belongs to.</td></tr>
	<tr><td class="dexmaincol">Egg Group 2</td><td>byte</td><td>The second Egg Group a Pok&eacute;mon of the species belongs to. Matches the first if it only belongs to one Egg Group.</td></tr>
	<tr><td class="dexmaincol">Ability 1</td><td>byte</td><td>The first Ability a Pok&eacute;mon of the species may have.</td></tr>
	<tr><td class="dexmaincol">Ability 2</td><td>byte</td><td>The second Ability a Pok&eacute;mon of the species may have. If none then the value equals 0.</td></tr>
	<tr><td class="dexmaincol">Safari Zone Flag</td><td>byte</td><td>Determines rate at which Pok&eacute;mon of the species flee when encountered in the Safari Zone. Only Pok&eacute;mon that appear in the Safari Zone have this flag.</td></tr>
	<tr><td class="dexmaincol">Color</td><td>byte</td><td>The Pok&eacute;mon's  Pok&eacute;dex color.</td></tr>
	<tr><td class="dexmaincol">Padding</td><td>word</td><td>Always equals 0000. It is used as a divider/padding between the data entries.</td></tr>
	</tbody>
</table>
<h3>Additional References</h3>
<h4>Types (decimal)</h4>
<pre>
00  Normal      09  ???
01  Fighting    10  Fire
02  Flying      11  Water
03  Poison      12  Grass
04  Ground      13  Electric
05  Rock        14  Psychic
06  Bug         15  Ice
07  Ghost       16  Dragon
08  Steel       17  Dark
</pre>
<h4>Effort Points Yield (word/bytes reversed)</h4>
<pre>
0000   11     11     11   11   11   11    (binary)
empty  SPDEF  SPATK  SPD  DEF  ATK  HP
</pre>
<h4>Gender</h4>
<code>x = ♀, y = ♂, n = gender value<br/>
x = floor(n/254)*100<br/>
y = 100 - x
</code>
<h4>Growth Group (decimal)</h4>
<pre>
0   1,000,000   Medium-Fast
1     600,000   Erratic
2   1,640,000   Fluctuating
3   1,059,860   Medium-Slow
4     800,000   Fast
5   1,250,000   Slow
</pre>
<h4>Egg Groups (decimal)</h4>
<pre>
01  Monster   09  Water 3
02  Water 1   10  Mineral
03  Bug       11  Inteterminate
04  Flying    12  Water 2
05  Ground    13  Ditto
06  Fairy     14  Dragon
07  Plant     15  No Eggs
08  Humanshape
</pre>
<h4>Color</h4>
<pre>
0  Red     5  Brown
1  Blue    6  Purple
2  Yellow  7  Gray
3  Green   8  White
4  Black   9  Pink
</pre>
<h3>Related links</h3>
<ul>
<li><a href="http://www.legendarypokemon.net/training">Stats and Training</a></li>
<li><a href="http://www.legendarypokemon.net/breeding">Breeding Guide</a></li>
<li><a href="http://www.legendarypokemon.net/datalists">Various Data Lists</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Experience">Bulbapedia: Experience</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Happiness">Bulbapedia: Happiness</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Pok&eacute;mon_base_stats_data_structure_in_the_GBA">Bulbapedia: Pok&eacute;mon base stats data structure in the GBA</a></li>
<li><a href="http://bulbapedia.bulbagarden.net/wiki/Category:Game_mechanics">Bulbapedia: General Game Mechanics</a></li>
</ul>]]></content:encoded>
<slash:comments>0</slash:comments>
</item><item>
<title>Basics</title>
<link>http://www.legendarypokemon.net/2005/09/30/Weeklymech/basics</link>
<dc:creator>Arty2</dc:creator>
<dc:date>2005-09-30T09:25:12+02:00</dc:date>
<description><!-- <h3>Introduction</h3>
<p>This is the first article in my weekly column about game mechanics. The first few articles will be about data patterns in the GBA games (most are similar with older ones) and then shall follow some articles about specific game functions. Here are a few bits of knowledge you will need to know in order to understand future articles. Note that I am not a programmer myself but I’ll try to pass on the few things I know many of them cannot be found on the internet (unfortunately).</p>
<p>If you have something to add feel free to comment and I'd be happy to see people contributing to these articles. After every article will follow some related links that will help you get additional information.</p>
<p>Always remember that <strong>ROM images are illegal</strong> if you do not own the actual game and should only be used for personal backup reasons. If you like a game, please buy it and help the producers make new games.</p>
<h3>Basics</h3>
<p>First, there is the bit, which has two possible values, on or off, true or false, 1 or 0; exactly like a light switch. You may know that the common numeral system is called decimal, because it uses ten digits, 0-9. Normally, when a number grows too large it overflows to the left such as 09 to 10 and 099 to 100.</p>
<p>There are a few more systems including binary and hexadecimal (hex), which we are going to analyse here.</p>
<p>Hexadecimal includes the following digits:  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. It overflows in the same way as in decimall: 0F to 10 and 0FF to 100. Same applies for binary but binary has only two digits: 0 and 1 (just like a bit). In binary, 0 = decimal 0 and 1 = decimal 1 but 10 = decimal 2, 100 = decimal 4 and 1000 is decimal 8. Add 1 to 10 and you have 11 = decimal 3.
Now lets learn how to convert from binary to hex. For example have the following number: 1000101001010011. Now we are going to break it into sets of four: 1000 1010 0101 0011. 1000 is easy to convert, it’s just 8 (see above) but what about 1010? Consider the following table:</p>
<pre><code>
   8 4 2 1
   1 0 1 0
</code></pre>
<p>You can see that 8 and 2 are on (have a 1 instead of 0), so 8+2 = 10 (decimal) = A (hex). We continue doing the same with the rest of the number and we have the following:</p>
<pre><code>
   1000 1010 0101 0011   (binary)
     8   10   5    3     (decimal)
     8   A    5    3     (hexadecimal)
</code></pre>
<p>Of course, you can always use a scientific calculator (or your Windows/Linux/Mac calculator of choice) for these conversions but knowing the above makes the whole thing easier to deal with. Now here's how PC's  and Nintendo games work: they swap the high byte and low byte of two byte values.  So, whereas the highest move's number is 0AFF, then in the ROM data, it will be stored with the 0A and FF reversed. So our previous example will be stored as 538A, or if our number was something like 10EAB65 it would be stored as 65AB0E01 (mention that 1 is actually 01).</p>
<p>Another interesting fact is that GameBoy (and some other) games always round down when it comes to calculating things. We'll call that floor() while ceil() will be our round-up name and round() the normal rounding we learnt in highschool.</p>
<p>Here's a few programs you are going to need before our next article:</p>
<ul>
<li>Game oriented hex editor (for example <a href="http://www.zophar.net/trans/transutils/Thingy32.zip">Thingy32</a>)</li>
<li>General <a href="http://www.google.com/search?q=hex+editor">hex editor</a> (for example ICY Hex Explorer)</li>
<li>Relative searcher (for example <a href="http://www.google.com/search?q=%22SearchR+X%22">SearchR X</a>)</li>
</ul>
<h3>Related links</h3>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Numeral_system">Numeral systems</a></li>
<li><a href="http://en.wikipedia.org/wiki/Decimal">Decimal system</a></li>
<li><a href="http://en.wikipedia.org/wiki/Hexadecimal">Hexadecimal system</a></li>
<li><a href="http://en.wikipedia.org/wiki/Binary_numeral_system">Binary system</a></li>
<li><a href="http://en.wikipedia.org/wiki/Bit">Bits</a>, <a href="http://en.wikipedia.org/wiki/byte">Bytes</a> and <a href="http://en.wikipedia.org/wiki/Word_(computer_science)">Words</a></li>
<li><a href="http://en.wikipedia.org/wiki/ROM_image">ROM image</a></li>
</ul> --></description>
<content:encoded><![CDATA[<h3>Introduction</h3>
<p>This is the first article in my weekly column about game mechanics. The first few articles will be about data patterns in the GBA games (most are similar with older ones) and then shall follow some articles about specific game functions. Here are a few bits of knowledge you will need to know in order to understand future articles. Note that I am not a programmer myself but I’ll try to pass on the few things I know many of them cannot be found on the internet (unfortunately).</p>
<p>If you have something to add feel free to comment and I'd be happy to see people contributing to these articles. After every article will follow some related links that will help you get additional information.</p>
<p>Always remember that <strong>ROM images are illegal</strong> if you do not own the actual game and should only be used for personal backup reasons. If you like a game, please buy it and help the producers make new games.</p>
<h3>Basics</h3>
<p>First, there is the bit, which has two possible values, on or off, true or false, 1 or 0; exactly like a light switch. You may know that the common numeral system is called decimal, because it uses ten digits, 0-9. Normally, when a number grows too large it overflows to the left such as 09 to 10 and 099 to 100.</p>
<p>There are a few more systems including binary and hexadecimal (hex), which we are going to analyse here.</p>
<p>Hexadecimal includes the following digits:  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. It overflows in the same way as in decimall: 0F to 10 and 0FF to 100. Same applies for binary but binary has only two digits: 0 and 1 (just like a bit). In binary, 0 = decimal 0 and 1 = decimal 1 but 10 = decimal 2, 100 = decimal 4 and 1000 is decimal 8. Add 1 to 10 and you have 11 = decimal 3.
Now lets learn how to convert from binary to hex. For example have the following number: 1000101001010011. Now we are going to break it into sets of four: 1000 1010 0101 0011. 1000 is easy to convert, it’s just 8 (see above) but what about 1010? Consider the following table:</p>
<pre><code>
   8 4 2 1
   1 0 1 0
</code></pre>
<p>You can see that 8 and 2 are on (have a 1 instead of 0), so 8+2 = 10 (decimal) = A (hex). We continue doing the same with the rest of the number and we have the following:</p>
<pre><code>
   1000 1010 0101 0011   (binary)
     8   10   5    3     (decimal)
     8   A    5    3     (hexadecimal)
</code></pre>
<p>Of course, you can always use a scientific calculator (or your Windows/Linux/Mac calculator of choice) for these conversions but knowing the above makes the whole thing easier to deal with. Now here's how PC's  and Nintendo games work: they swap the high byte and low byte of two byte values.  So, whereas the highest move's number is 0AFF, then in the ROM data, it will be stored with the 0A and FF reversed. So our previous example will be stored as 538A, or if our number was something like 10EAB65 it would be stored as 65AB0E01 (mention that 1 is actually 01).</p>
<p>Another interesting fact is that GameBoy (and some other) games always round down when it comes to calculating things. We'll call that floor() while ceil() will be our round-up name and round() the normal rounding we learnt in highschool.</p>
<p>Here's a few programs you are going to need before our next article:</p>
<ul>
<li>Game oriented hex editor (for example <a href="http://www.zophar.net/trans/transutils/Thingy32.zip">Thingy32</a>)</li>
<li>General <a href="http://www.google.com/search?q=hex+editor">hex editor</a> (for example ICY Hex Explorer)</li>
<li>Relative searcher (for example <a href="http://www.google.com/search?q=%22SearchR+X%22">SearchR X</a>)</li>
</ul>
<h3>Related links</h3>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Numeral_system">Numeral systems</a></li>
<li><a href="http://en.wikipedia.org/wiki/Decimal">Decimal system</a></li>
<li><a href="http://en.wikipedia.org/wiki/Hexadecimal">Hexadecimal system</a></li>
<li><a href="http://en.wikipedia.org/wiki/Binary_numeral_system">Binary system</a></li>
<li><a href="http://en.wikipedia.org/wiki/Bit">Bits</a>, <a href="http://en.wikipedia.org/wiki/byte">Bytes</a> and <a href="http://en.wikipedia.org/wiki/Word_(computer_science)">Words</a></li>
<li><a href="http://en.wikipedia.org/wiki/ROM_image">ROM image</a></li>
</ul>]]></content:encoded>
<slash:comments>0</slash:comments>
</item>

	<!-- 
		#	Content proudly powered by AJ-Fork
		#	URL: http://appelsinjuice.org/?vis=cutenews-aj
		#	 @ : cutenews at appels in juice dot org
	-->
	
	

 </channel>
</rss>