+--------------------------------------------+
| |
| title: |
| "Section ID Calculator" |
| |
| game: |
| Phantasy Star Online |
| Phantasy Star Online Ver. 2 |
| PSO Episode I & II |
| |
| version: |
| 1.2 - 08 April 2003 |
| |
| size: |
| 19.9 kB |
| |
| by: |
| SuperSteve |
| |
| email: |
| supersteve1440 <AT> yahoo.com |
| |
| homepage: |
|
http://www.geocities.com/supersteve1440/ |
| |
+--------------------------------------------+
___________________
< Table of Contents >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
< 1. Introduction >
< 2. Updates, Version History >
< 3. What Are The Possible Section IDs? >
< 4. How Does PSO Calculate Your Section ID? >
< 5. C++ Source Code For A PSO Section ID Calculator >
¯¯¯
< 6. JavaScript PSO Section ID Calculator >
¯¯¯¯¯¯¯¯¯¯
< 7. PHP PSO Section ID Calculator >
¯¯¯
< 8. The Complete ASCII Character Set >
< 9. The PSO Software Keyboard Layout >
< 10. Credits, Contact Info, Copyright Info >
===============================================================================
_________________
< 1. Introduction >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
This guide is meant to bring order and understanding to the calculation and
assignment of section IDs in Phantasy Star Online (PSO).
The acronym PSO refers to the following games:
PSO (Dreamcast)
PSO ver. 2 (Dreamcast)
PSO Episode I & II (GameCube)
They will be collectively called PSO.
When I read "Phantasy Star Online Section ID FAQ" by Miyuu, I quickly realized
that Sonic Team simply used the ASCII values of the individual characters in
the character name to calculate the section ID. I decided to make my own
section ID calculator program.
When I completed the C++ program, I tested it against many other section ID
calculators on the internet and found that they were often inaccurate when
non-alphanumeric characters were in the character names. I believe this is
from a lack of understanding of how the characters are being deciphered by PSO.
So you should be wary of the accuracy of these other ID calculators when you
have special characters in your name.
This guide is based on the American version of PSO in the English language mode.
For an explanation on how the section ID is used in the game, read one of the
many fine FAQs at this site.
The source code included in this guide will correctly calculate the section ID
in PSO when given the character name.
These programs are intended to be practical and as efficient as possible.
Therefore, their final appearance is not unnecessarily elaborate.
C++ version:
It took me only a few minutes to make the C++ program because I knew how PSO
was converting the names into values. In order to make an executable program
from C++ source code, you have to have a C++ compiler. Don't ask me where to
get a compiler on the internet. I got both of mine from books that I bought.
Please don't ask me to send you the executable program.
JavaScript version:
This was the second version I created. The main problem in developing the
JavaScript version was extracting the ASCII value from a character. I got the
idea on how to do this from:
<
http://www.geol.uni-erlangen.de/geojs/JS_tutorial/5thless.html>
By having the program in a web page and viewable with a web browser, there is a
much better graphical user interface than the C++ version. To use this
calculator, simply copy and save all the code as an .html file. Then open it
in a web browser to use it.
PHP version:
If you want to know about PHP, then download the reference manual from
<
http://www.php.net>. This PHP script is compatible on versions of PHP4 and
later. I'm not sure about compatibility with other previous versions. To use
this calculator, you must have PHP installed on a webserver. Then save the
first part as an .html file, and the second as a .php file in the same
directory.
Future version & revisions:
If I update this guide, it will likely be due to more programs being created
and not because of updates to the current ones. If I decide to make a PSO
section ID calculator in another computer language, then I will.
===============================================================================
_____________________________
< 2. Updates, Version History >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
Version 0.1 11 June 2001
Created the C++ calculator program
Version 0.2 12 June 2001
Created this document
Version 0.3 09 July 2001
Modified the source code of the C++ program
Version 0.4 29 September 2001
Created the JavaScript calculator
Version 0.5 26 November 2001
Modified the JavaScript calculator
Version 0.6 11 December 2001
Created the PHP calculator
Version 0.7 12 December 2001
Rearranged the sections to put the source code before some other sections
Version 0.8 24 February 2002
I have confirmed that the algorithm works for PSO version 2
Version 0.9 12 June 2002
Modified the source code of the JavaScript and PHP programs
Version 1.0 13 December 2002
Modified the source code of the C++ and JavaScript programs
I received confirmation that the algorithm works for PSO Episode I & II
Updated Introduction, modified credits
Version 1.1 25 February 2003
Modified the PHP code
Version 1.2 08 April 2003
Changed the layout and spacing of some components
===============================================================================
_______________________________________
< 3. What Are The Possible Section IDs? >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
There are 10 possible section IDs in PSO. I suggest reading one of the
appropriate FAQs to see how they influence the game.
ID Name (value)
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
VIRIDIA (0)
GREENNILL (1)
SKYLY (2)
BLUEFULL (3)
PURPLENUM (4)
PINKAL (5)
REDRIA (6)
ORAN (7)
YELLOWBOZE (8)
WHITILL (9)
===============================================================================
____________________________________________
< 4. How Does PSO Calculate Your Section ID? >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
There are 95 available characters for use in your name in PSO. Your name may
be up to 12 characters in length.
The Dreamcast (like almost every modern computer) uses the ASCII character set
to represent characters in memory. When a character is stored in a computer's
memory, the computer stores a number that represents that character.
When you enter your character name in PSO, all of the ASCII character values of
that name are added up. PSO then takes only the "ones" digit of that value and
uses it to assign your section ID.
Example:
¯¯¯¯¯¯¯¯
If you enter Steve as the character name...
Character name= Steve
To find your section ID, first simply add all the values of the letters.
S= 83
t= 116
e= 101
v= 118
e= 101
¯¯¯¯¯¯¯¯¯¯
total= 519
or you can just add the ones digits of the ASCII values of the characters...
S= 3
t= 6
e= 1
v= 8
e= 1
¯¯¯¯¯¯¯¯¯¯
total= 19
Now take the "ones" digit of this value...
519 (or 19) yields 9.
Since this value is 9, the section ID for Steve is WHITILL.
This method works for any name in PSO.
Many section ID calculators on the internet make errors when non-alphanumeric
characters are included. This is because they generally don't know how the
characters are being converted to numerical values.
===============================================================================
____________________________________________________
< 5. C++ Source Code For A PSO Section ID Calculator >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
//*****************************************************************************
// C++ PSO Section ID Calculator
// by Steve Ward
//*****************************************************************************
#include <iostream.h>// uses cout, cin.getline
const int size=(12+1);// the maximum size of the character name in PSO
int main()
{
int total=0;
char name[size]={'\0'};
char *id[]=
{
"VIRIDIA",
"GREENNILL",
"SKYLY",
"BLUEFULL",
"PURPLENUM",
"PINKAL",
"REDRIA",
"ORAN",
"YELLOWBOZE",
"WHITILL"
};
cout<<"Enter your PSO character name: ";
cin.getline(name,size);
for(int i=0; i<=size-1; i++)
{
total+=(int)name[i];// the ASCII value of every character is added to the ID
}
cout<<"Total value of "<<name<<" is "<<total<<endl;
cout<<"The new value is "<<(total%=10)<<endl;// the one's digit is taken
cout<<"Section ID: "<<id[total]<<endl;// the section ID is displayed
if(total%2 == 0)
{
cout<<"Type A"<<endl;
}
else
{
cout<<"Type B"<<endl;
}
return 0;
}
===============================================================================
_________________________________________
< 6. JavaScript PSO Section ID Calculator >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
<!-----------------------------------------------------------------------------
JavaScript PSO Section ID Calculator
by Steve Ward
------------------------------------------------------------------------------>
<html>
<head>
<title>JavaScript PSO Section ID Calculator</title>
<script type="text/javascript">
id=new Array(
"VIRIDIA",
"GREENNILL",
"SKYLY",
"BLUEFULL",
"PURPLENUM",
"PINKAL",
"REDRIA",
"ORAN",
"YELLOWBOZE",
"WHITILL"
);
function calc(name)
{
for(i=0,total=0;i<name.length;i++)
{
ascii=name.charCodeAt(i);
if(ascii<32 || ascii>126)
{
alert(name.charAt(i)+" is an invalid character!");
ascii=0;
}
total+=ascii;
}
idnumber=total%10;
document.forms.pso.sectionid.value=id[idnumber];
document.forms.pso.idnumber.value=idnumber;
document.forms.pso.idtotal.value=total;
}
</script>
</head>
<body>
<form name="pso" action="">
<input value="<PSO name>" size="25" maxlength="12" onkeyup="calc(this.value);" /><br />
<input value="<Section ID>" size="15" name="sectionid" /><br />
<input value="" size="5" name="idtotal" /><br />
<input value="" size="5" name="idnumber" /><br />
<button type="reset">reset</button>
</form>
</body>
</html>
===============================================================================
__________________________________
< 7. PHP PSO Section ID Calculator >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
<!-----------------------------------------------------------------------------
PHP PSO Section ID Calculator
by Steve Ward
------------------------------------------------------------------------------>
<html>
<head>
<title>PHP PSO Section ID Calculator</title>
</head>
<body>
<form action="pso-id-calc.php" method="post">
<input maxlength="12" value="PSO name" name="psoname" />
<button type="submit">submit</button>
<button type="reset">reset</button>
</form>
</body>
</html>
+-----------------------------------------------------------------------------+
| Save the following script as: "pso-id-calc.php" |
+-----------------------------------------------------------------------------+
<?
$pso_name=stripslashes($_POST['pso_name']);
$display_name=htmlentities($pso_name);
$sectionids=array(
"VIRIDIA",
"GREENNILL",
"SKYLY",
"BLUEFULL",
"PURPLENUM",
"PINKAL",
"REDRIA",
"ORAN",
"YELLOWBOZE",
"WHITILL"
);
$output="";
for($i=0,$k=0;$i<strlen($pso_name);$i++)
{
$j=ord($pso_name{$i});// return the ASCII value of a character
if($j<32 || $j>126)
{
$output.=sprintf("<b>%s</b> is an invalid character!\r\n\r\n",htmlentities(chr($j)));
$j=0;
}
$k+=$j;
}
$id=$sectionids[$k%10];
$output.="PSO name: <b>$display_name</b>\r\n\r\nSection ID: <b>$id</b>\r\n\r\ntotal: <b>$k</b>";
?>
<html>
<head>
<title></title>
</head>
<body>
<pre><? print($output); ?></pre>
</body>
</html>
===============================================================================
_____________________________________
< 8. The Complete ASCII Character Set >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
This is a list of the entire ASCII character set used in almost all computers.
Code Character
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
0 NUL (null)
1 SOH (start of heading)
2 STX (start of text)
3 ETX (end of text)
4 EOT (end of transmission)
5 ENQ (enquiry)
6 ACK (acknowledge)
7 BEL (bell)
8 BS (backspace)
9 HT (horizontal tab)
10 NL,LF (new line, line feed)
11 VT (vertical tab)
12 FF,NP (form feed, new page)
13 CR (carriage return)
14 SO (shift out)
15 SI (shift in)
16 DLE (data link escape)
17 DC1 (device control 1)
18 DC2 (device control 2)
19 DC3 (device control 3)
20 DC4 (device control 4)
21 NAK (negative acknowledge)
22 SYN (synchronous idle)
23 ETB (end of trans. block)
24 CAN (cancel)
25 EM (end of medium)
26 SUB (substitute)
27 ESC (escape)
28 FS (file separator)
29 GS (group separator)
30 RS (record separator)
31 US (unit separator)
32 SP (space)
33 !
34 "
35 #
36 $
37 %
38 &
39 '
40 (
41 )
42 *
43 +
44 ,
45 -
46 .
47 /
48 0
49 1
50 2
51 3
52 4
53 5
54 6
55 7
56 8
57 9
58 :
59 ;
60 <
61 =
62 >
63 ?
64 @
65 A
66 B
67 C
68 D
69 E
70 F
71 G
72 H
73 I
74 J
75 K
76 L
77 M
78 N
79 O
80 P
81 Q
82 R
83 S
84 T
85 U
86 V
87 W
88 X
89 Y
90 Z
91 [
92 \
93 ]
94 ^
95 _
96 `
97 a
98 b
99 c
100 d
101 e
102 f
103 g
104 h
105 i
106 j
107 k
108 l
109 m
110 n
111 o
112 p
113 q
114 r
115 s
116 t
117 u
118 v
119 w
120 x
121 y
122 z
123 {
124 |
125 }
126 ~
127 DEL (delete)
===============================================================================
_____________________________________
< 9. The PSO Software Keyboard Layout >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
This is how the software keyboard is laid out in the game.
Beside each character you will find a number. This number represents the value
of that character when the section ID is calculated.
Character(value)
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
A(5) B(6) C(7) D(8) E(9) F(0) G(1) H(2) I(3) J(4) K(5) L(6) M(7) N(8)
O(9) P(0) Q(1) R(2) S(3) T(4) U(5) V(6) W(7) X(8) Y(9) Z(0)
a(7) b(8) c(9) d(0) e(1) f(2) g(3) h(4) i(5) j(6) k(7) l(8) m(9) n(0)
o(1) p(2) q(3) r(4) s(5) t(6) u(7) v(8) w(9) x(0) y(1) z(2)
1(9) 2(0) 3(1) 4(2) 5(3) 6(4) 7(5) 8(6) 9(7) 0(8)
!(3) "(4) #(5) $(6) %(7) &(8) '(9) ((0) )(1) *(2) +(3) ,(4) -(5) .(6) {(3) }(5)
/(7) :(8) ;(9) <(0) >(2) =(1) ?(3) @(4) [(1) ](3) \(2) ^(4) _(5) `(6) |(4) ~(6)
SPACE(2)
===============================================================================
___________________________________________
< 10. Credits, Contact Info, Copyright Info >
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
===============================================================================
Credits:
¯¯¯¯¯¯¯¯
This guide was created by me, myself, and I.
Thanks to Sonic Team for making PSO.
I was inspired to write the section ID calculator program after reading the FAQ
by Miyuu.
Thanks to Keitaro Urashima (keitaro <AT> mediaone.net) for contributing
some C++ code modifications that really simplified the execution of the
calculator.
It was his idea to:
Put the IDs into an array
Use the modulus operator to get the one's digit
Thanks to <
http://www.geol.uni-erlangen.de/geojs/JS_tutorial/5thless.html> for
giving me a way to extract the ASCII value from a character in JavaScript.
Thanks to Nathan Friesen (nlfriese <AT> ucalgary.ca) for confirming that
the algorithm works for the GameCube version. (Nov 8, 2002)
I used Borland C++ 4.52 and Microsoft Visual C++ 6.0 to compile and test the
C++ program.
I used Internet Explorer 6.0 and Mozilla 1.2.1 to test the JavaScript program.
The PHP program works for PHP4. It shouldn't have any problems with previous
versions.
Contact info:
¯¯¯¯¯¯¯¯¯¯¯¯¯
Questions, corrections, and comments can be emailed to me at:
supersteve1440 <AT> yahoo.com
(Email addresses are displayed this way to hinder web bots that automatically
retrieve email addresses from documents to be used for the evil spamming
purposes)
You can check out other stuff at my crappy homepage:
http://www.geocities.com/supersteve1440/
Copyright Info:
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I created this guide and the source code myself, unless otherwise stated.
You may not reproduce, sell, or distrubute this document for profitable or
promotional or commercial purposes without my consent.
You may use this guide for your own personal use.
Please give me credit if you use any part of this document or my source code in
a guide or program of your own, or use it in any way not mentioned here.
You may put this document on your site, web page, etc. as long as you don't try
to take credit for it.
I've allowed several web sites on the internet to present a copy of this
document. So, if you see this document or source code at a site or in another
publication and they don't give me credit, then they copied me and they should
be dragged into the street and shot (and, by all means, you should spam their
asses).
All source code herein is copyright © 2001-2003 Steve Ward.
This document Copyright © 2001-2003 Steve Ward.
Phantasy Star Online was created by Sonic Team and is owned by Sega.
All names and trademarks Copyright © 2001-2003 Sega Enterprises, Ltd.
EOF