「ポケモンIDとタマゴから孵化しないポケモンの個体値の生成過程-続き」の編集履歴(バックアップ)一覧に戻る
ポケモンIDとタマゴから孵化しないポケモンの個体値の生成過程-続き - (2008/12/19 (金) 20:26:11) のソース
<div> <blockquote>このページは<a href="http://www.smogon.com/forums/showpost.php?p=1448482&postcount=1">http://www.smogon.com/forums/showpost.php?p=1448482&postcount=1</a>からの引用です</blockquote> <p>この文書は英語が苦手な人にも本スレで議論されている内容が分かるように翻訳しているものです。</p> <p><font color="#FF0000"><strong><font size="5">対訳版、翻訳中。</font></strong></font></p> <p><font color="#FF0000" size="5">Translation with the original version. Translation is in progress.</font></p> </div> <p>項目番号が合わないのはpart 1 の番号が変更されているからです。</p> <p><strong>6.1</strong><strong>How the Game Makes a Pokemon Shiny</strong><br /> 6.1 どのように色違いのポケモンが生成されるのか</p> <p><br /> Very rarely, you might encounter a Pokemon having a different coloration than usual. This is called a<strong>shiny Pokemon</strong>. The game's criterion for making a shiny Pokemon depends in part on its PID, but also depends on two other numbers.</p> <p> ごくまれに通常の色と異なるポケモンに遭遇することがある。これは色違い(shiny)ポケモンと呼ばれる。ゲームで色違いのポケモンが生成される基準はポケモンIDに一部依存している。また他に2個の関係する数値がある。</p> <p><br /> One of these numbers is visible in the game. It is called the<strong>Trainer ID</strong>. This is the number you have when you look at your Trainer card, and is a number between 0 and 65535 (between [0000] and [FFFF] in hexadecimal). The other number is also a number between 0 and 65535 but is unfortunately invisible to you. It is called the<strong>Secret ID</strong>. Currently, there's no way you can know your Secret ID without looking at your save file or without using cheat codes.</p> <p> </p> <p> 2つのうちの一つはゲーム内で知ることが出来る。それはトレーナーIDである。この番号はトレーたーカードを見ることにより知ることが出来、0から65535の値(十六進数で[0000]から[FFFF])を取る(訳者註:日本語版ではIDNo.と記述されている)。もう一つの番号も0から65535の値をとるが、残念なことに通常知ることが出来ない。この番号は秘密ID(Secret ID, SID)と呼ばれる。現在のところ秘密IDを知る方法はセーブファイルを直接見るかチートコードを利用することである。<br /><br /> So how does the game determine that a Pokemon is shiny? Here's how.<br /><br /> Split the PID in two 16-bit numbers. That is, if the PID was [465DB901], it would split it in two as [465D] and [B901]. We shall call the first 4 hexadecimal digits the<strong>HID</strong>(high ID) and the last 4 hexadecimal digits the<strong>LID</strong>(Low ID). Now convert the HID, LID, Trainer ID (which we shall denote by<strong>TID</strong>for short) and Secret ID (denoted by<strong>SID</strong>for short) to binary, and compare the first 13 bits of all four, like so:</p> <p> ポケモンIDを2個の16ビットの数値に分解する。ポケモンIDが[465DB901]だとすると[465D]と[B901]となる。最初の4桁をHID(high ID)、残りの4桁をLID(low ID)と呼ぶことにする。そしてHID,LID,トレーナーID (以降TIDと表記する)、秘密ID(以降SIDと表記する)を二進数に変換し次のようにすべての上位13ビットを抽出する。</p> <p>Code:</p> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:82px;text-align:left;"> HID:<u>x</u>xxxxxxxxxxxx|xxx<br />LID:<u>x</u>xxxxxxxxxxxx|xxx<br />TID:<u>x</u>xxxxxxxxxxxx|xxx<br />SID:<u>x</u>xxxxxxxxxxxx|xxx </pre> <p>Here we're counting the number of 1's in the first bit of the HID, LID, TID and SID. If there are either 1 or 3 ones among those bits, the Pokemon is automatically<strong>not shiny</strong>. If there aren't, the game counts the second bits. Again, if there are either 1 or 3 ones among those bits, the Pokemon is automatically not shiny. The game checks the bits of the HID, LID, TID and SID up to their thirteenth one, and all of them would need to have 0, 2 or 4 ones for the Pokemon to be shiny! This is a one in 8192 (2 to the power of 13) chance of happening</p> <p> .ここで、HID,LID,TID,SIDの先頭ビットに存在する1の数を数える。もし1の数が1または3の場合、ポケモンは自動的に色違いにならない。もし1の数が、0,2,4の場合、上位2ビット目を選択する。そして同じ事を行い、1の数が1か3の場合にはポケモンは自動的に色違いとならない。ゲームではHID,LID,TID,SIDの値の確認を上位13ビット目まで繰り返し行い、すべて1の数が0,2,4の場合にポケモンが色違いとなる。これは8192(2の13乗)分の1の確率である。</p> <p><br /> (訳者註: なんか難しいことを書いているが、上位13ビットの排他的論理和をとってそれが0だったら色違いということ。)<br /><br /> Let's have an example. Suppose the Trainer ID of the player is 43288, or [A918] in hexadecimal, and the Secret ID is 6075, or [17BB] in hexadecimal. Suppose also that the PID of the Pokemon is [B58F0B2A]. We split the PID in two, the HID [B58F] and the LID [0B2A], and convert the HID, LID, Trainer ID and Secret ID to binary. Thus we would have:</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:82px;text-align:left;"> HID: 1011010110001|111<br />LID: 0000101100101|010<br />TID: 1010100100011|000<br />SID: 0001011110111|011 </pre></div> <p>We now count the number of bits in the first bit, second bit, third bit ... up to the thirteenth bit of each of these four 16-bit numbers.</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:98px;text-align:left;"> HID: 1011010110001|111<br />LID: 0000101100101|010<br />TID: 1010100100011|000<br />SID: 0001011110111|011<br />Ones: 2022222420224 </pre></div> <p>Since counting the ones of each bit up to the thirteenth one in turn never yields a number that is not 1 or 3, the Pokemon will be<strong>shiny</strong>!<br /><br /><strong>6.2 How to determine whether Wurmple evolves into Silcoon or into Cascoon</strong><br /><br /> There are many hoaxes on the internet as to how Wurmple evolves into Silcoon or into Cascoon. Some say that it is determined by gender, other say it is determined by whether or not it is night or day. The truth is that it is determined from the PID of Wurmple as follows.<br /><br /> Look at the last 16 bits of the PID. We have called it the LID in the previous section. Convert the LID to decimal, and look at the<strong>last digit</strong>of this decimal number. If this digit is 0, 1, 2, 3 or 4, Wurmple would evolve into<strong>Silcoon</strong>. If the digit is 5, 6, 7, 8, or 9, Wurmple would evolve into<strong>Cascoon</strong>.<br /><br /> Let's provide an example. Say a Wurmple has a PID of [5CF4091C]. The last 16 bits of the PID are [091C], which is equal to 2332 in decimal. Since the last digit of this decimal number is 2, this Wumple would evolve into<strong>Silcoon</strong>.<br /><br /><strong>6.3 How to determine Unown's shape</strong><br /><br /> As claimed previously, even Unown's shape is determined from its PID.<br /><br /> First convert the PID to binary. Look at the seventh, eighth, fifteenth, sixteenth, twenty-third, twenty-fourth, thirty-first and thirty-second bits of the PID, i.e. the ones underlined below:</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:34px;text-align:left;"> xxxxxx<u>xx</u>xxxxxx<u>xx</u>xxxxxx<u>xx</u>xxxxxx<u>xx</u> </pre></div> <p>Combine these 8 bits together to form an 8-bit number, and convert it to decimal. If this number is 28 or more, subtract 28 from this number until it is a number between 0 and 27. This number would then correspond to the Unown symbol according to the following table:</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:498px;text-align:left;"> Number Unown Shape ------------------- 0 A 1 B 2 C 3 D 4 E 5 F 6 G 7 H 8 I 9 J 10 K 11 L 12 M 13 N 14 O 15 P 16 Q 17 R 18 S 19 T 20 U 21 V 22 W 23 X 24 Y 25 Z 26 ? 27 ! </pre></div> <p>Let's give an example. Suppose an Unown has PID [4C07DE71]. We first convert this PID to binary, getting</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:34px;text-align:left;"> 010011<u>00</u>000001<u>11</u>110111<u>10</u>011100<u>01</u> </pre></div> <p>Combine the underlined bits together, getting 00111001, and convert it to decimal, getting 57. 57 is larger than 27, so it is subtracted by 28, becoming 29. 29 is again larger than 27, so it is subtracted by 28, getting 1. 1 corresponds to B, and hence the Unown would have the shape of a<strong>B</strong>.<br /><br /><strong>6.4 How Spinda's spots are determined</strong><br /><br /> Spinda's spots are the most useless thing ever implemented in the history of computer implementations, but, for the sake of completeness, we explain exactly how Spinda痴 spots are placed on its rubbery body, because the PID, again, is the culprit.<br /><br /> Look at Spinda's PID in hexadecimal. Convert each hexadecimal digit into decimal in turn. So, for example, if Spinda's PID is [65492BDA], we would have 6 = 6, 5 = 5, 4 = 4, 9 = 9, 2 = 2, B = 11, D = 13 and A = 10. From these numbers, the co-ordinates (5, 6), (9, 4), (11, 2) and (10, 13) are thus constructed. These correspond to the coordinates of the upper-left hand corner of Spinda's <strong>left face spot</strong>, its<strong>right face spot</strong>, its<strong>left ear spot</strong>and its<strong>right ear spot</strong>respectively. (Spinda痴 left spots appear on the right in its front sprite and vice-versa.) All Spinda have exactly 4 spots. If some Spinda appear to have less than four spots, it is either because some spots are superimposed on each other or because the coordinate for some spots does not fall completely on Spinda痴 sprite.<br /><br /> To put them in place, the game adds 18 to the x-coordinate and 19 to the y-coordinate of the left face spot. It also adds 6 to the x-coordinate and 18 to the y-coordinate of the right face spot. Lastly, it adds 24 to the x-coordinate and 1 to the y-coordinate of of the left ear spot. The right ear spot痴 coordinates are left unchanged.<br /><br /> Thus we have:</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:82px;text-align:left;"> Left face spot upper-left hand coordinates: (23, 25) Right face spot upper-left hand coordinates: (15, 22) Left ear spot upper-left hand coordinates: (35, 3) Right ear spot upper-left hand coordinates: (10, 13) </pre></div> <p><font size="3"><strong>7. The PID of Chained Shiny Pokemon</strong></font><br /><br /> A new feature in Diamond and Pearl is the PokeRadar, which allows you to chain Pokemon. Chained Pokemon, besides having the advantage of always catching Pokemon of the same species, have a greater probability for them to appear shiny. This section explains in detail how the game determines whether or not a chained Pokemon is shiny, and how it constructs its PID so that it conforms to the criterion that appears in the previous section entitled 践ow the game makes a Pokemon shiny?<br /><br /><strong>7.1 The Probability of a Chained Pokemon to appear Shiny</strong><br /><br /> This depends on the chain number you致e attained, which cannot be greater than 40. Suppose your chain number is c. The probability that a chained Pokemon is shiny is governed by the following formula:</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:66px;text-align:left;"> Probability = floor((14747 40 ラ c) (1640 40 ラ c)) 65536 where floor(x) is x rounded down. </pre></div> <p>Hereunder is the probability of catching a shiny Pokemon knowing your chain length:</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:498px;text-align:left;"> Chain Length Probability of catching a Shiny Pokemon 0 1 in 8192 1 1 in 7282 2 1 in 7282 3 1 in 7282 4 1 in 7282 5 1 in 6554 6 1 in 6554 7 1 in 6554 8 1 in 6554 9 1 in 5958 10 1 in 5958 11 1 in 5958 12 1 in 5461 13 1 in 5461 14 1 in 5041 15 1 in 5041 16 1 in 4681 17 1 in 4681 18 1 in 4369 19 1 in 4369 20 1 in 4096 21 1 in 3855 22 1 in 3641 23 1 in 3449 24 1 in 3277 25 1 in 3121 26 1 in 2979 27 1 in 2731 28 1 in 2521 29 1 in 2341 30 1 in 2185 31 1 in 1986 32 1 in 1771 33 1 in 1598 34 1 in 1394 35 1 in 1192 36 1 in 993 37 1 in 799 38 1 in 596 39 1 in 400 40 or more 1 in 200 </pre></div> <p>Notice that the probabilities are not very good unless your chain's length becomes 30 or more, so aim for as long a chain as possible.<br /><br /><strong>7.2 How the PID and IVs of a Chained Shiny Pokemon is created</strong><br /><br /> First, the game calls the RNG twice to create the PID as usual. Remember that the first number generated would be the LID (last 16 bits) of the PID, while the second one would be the HID (first 16 bits) of the PID. The game now needs to 素ix the PID such that the criterion for the Pokemon to appear shiny is attained. This is done as follows.<br /><br /> Convert the Trainer ID and Secret ID to binary, and look at their thirtheenth, twelfth, eleventh, etc. bits of both, until we reach their first bit. Suppose we池e looking at the i稚h bit. For each of these pairs of bits, the RNG is called once and the resulting random number痴 last bit is noted.<br /><br /> If the pair of bits at the i稚h position of TID and SID are the same (i.e. either both are 0 or both are 1), the HID and LID痴 i稚h bits are<strong>both set to the last bit of the random number generated</strong>. If the pair of bits at the i稚h position of TID and SID are different (i.e. one is 0 and the other one is 1),<strong>the LID痴 i稚h bit is set to the last bit of the random number generated, and the HID痴 i稚h bit is set to the reverse bit</strong>(1 if it was 0, 0 if it was 1) of the last bit of the random number generated.<br /><br /> Following this procedure, this would ensure that the number of 1痴 in the i稚h position of the TID, SID, HID and LID is either 0, 2 or 4. Since this would be true for all bits between the first and the thirteenth, the Pokemon would be 素orced to appear shiny.<br /><br /> After this is done, there are two subsequent calls to the RNG to create the IVs as usual. Thus, the RNG is called<strong>17 times</strong>in all to generate a chained shiny Pokemon: twice to generate the initial PID, 13 times to 素ix the PID, and twice to generate the IVs.<br /><br /><strong>7.3 An Example of generating the PID of a Chained Shiny Pokemon</strong><br /><br /> Suppose the player encounters a chained shiny Pokemon. We suppose the player has Trainer ID (TID) 38710 and Secret ID (SID) 13099. We also suppose that the current RNG seed is [69AC550F]. We call the RNG twice, getting the numbers [18E5] and [1DD6]. Hence, the LID is [18E5] and the HID is [1DD6]. The numbers in binary are:</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:82px;text-align:left;"> TID: 1001011100110110 SID: 0011001100101011 HID: 0001110111010110 LID: 0001100011100101 </pre></div> <p>We now need to fix the HID and LID such that the Pokemon is shiny. We start looking from the thirteenth bit.<br /><br /> We call the RNG, getting [A013]. When converted to binary, its last digit is 1. (To know at a glance if the last bit of a hexadecimal number is 0 or 1, look at the last hexadecimal digit. If it is 0, 2, 4, 6, 8, A, C or E, the last bit would be 0, otherwise it would be 1.)<br /><br /> The TID and SID痴 thirteenth bits are 0 and 1 respectively, hence they are different. Thus, we make the thirteenth bit of LID as 1 (last digit of the last random number generated) and the first bit of HID as 0. So we have:</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:82px;text-align:left;"> TID: 1001011100110110 SID: 0011001100101011 HID: 000111011101<u>0</u>110 LID: 000110001110<u>1</u>101 </pre></div> <p>Next we go to the twelfth bit. We generate another random number, getting [A4AE], whose last bit is 0. TID痴 and SID痴 twelfth bits are 1 and 0 respectively. Hence the twelfth bit of the LID is made to be 0 and the HID's twelfth bit is made to be 1.</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:82px;text-align:left;"> TID: 1001011100110110 SID: 0011001100101011 HID: 00011101110<u>10</u>110 LID: 00011000111<u>01</u>101 </pre></div> <p>Moving on to the eleventh bit, we call the RNG again, getting [77AD] whose last bit is 1. The TID and SID痴 eleventh bit are both 1. Thus we make both the HID and the LID's eleventh bits to be 1.</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:82px;text-align:left;"> TID: 1001011100110110 SID: 0011001100101011 HID: 0001110111<u>110</u>110 LID: 0001100011<u>101</u>101 </pre></div> <p>For the tenth bit, we again call the RNG, getting [B237] whose last bit is 1. The TID and SID痴 tenth bits are both 0. Thus we make the fourth bit of LID and HID both 1.</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:82px;text-align:left;"> TID: 1001011100110110 SID: 0011001100101011 HID: 000111011<u>1110</u>110 LID: 000110001<u>1101</u>101 </pre></div> <p>Continuing doing this until we reach the first bit, we get:</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:98px;text-align:left;"> TID: 1001011100110110 SID: 0011001100101011 HID:<u>1100001101110</u>110 LID:<u>0110011101101</u>101 Ones: 2222024402422 </pre></div> <p>The last bit of each of the subsequent random numbers generated was 0, 1, 1, 1, 0, 0, 1, 1, 0 for the ninth, eighth, seventh, ... first bit respectively. As you can see, the HID and LID now satisfy the criterion for the Pokemon to appear shiny.<br /><br /> Thus the PID of the chained shiny Pokemon would be</p> <div style="margin:5px 20px 20px;"> <div class="smallfont" style="margin-bottom:2px;">Code:</div> <pre class="alt2" dir="ltr" style="border:1px inset;margin:0px;padding:6px;width:640px;height:34px;text-align:left;"> 11000011011101100110011101101101 </pre></div> <p>which is equivalent to [C376676D] in hexadecimal, or 3279316845 in decimal. Two subsequent RNG calls would then be made to create the Pokemon痴 IVs normally.</p> <div><strong><a href="http://www.smogon.com/forums/showthread.php?t=45097" target="_blank"><br /></a></strong></div> <div class="smallfont"> <hr size="1" style="color:rgb(209,209,225);" /><em>Last edited by X-Act : December 1st, 2008 at<span class="time">05:30 AM</span>. Reason: Fixed RNG calls</em></div>