The Azure Heights Forum


Post New Topic  New Poll  Post A Reply
my profile | search | faq | forum home
  next oldest topic   next newest topic
» The Azure Heights Forum   » Main Campus   » Sakaki Tower   » How do you...

UBBFriend: Email this page to someone!    
Author Topic: How do you...
Rahajamati
Orangutan Spouse
Member # 399

Rate Member
posted 06-02-2000 02:47 PM      Profile for Rahajamati   Email Rahajamati   Send New Private Message      Edit/Delete Post  Reply With Quote 
How do you figure health when changing genes?

I kinda need a very good description because I didn't understand it on that Sharkery page.

------------------
This space for rent


From: The Moon | Registered: May 2000  |  IP: Logged
cfalcon
OLDNBLD
Member # 19

Member Rated:
posted 06-02-2000 11:18 PM      Profile for cfalcon   Email cfalcon   Send New Private Message      Edit/Delete Post  Reply With Quote 
Ok, first you need to realize that everything is in binary.

Reread that first line until you're ok with it. You don't need to understand binary, though it would be nice.

Ok, here we go:

There are 16 bits that are randomly generated when a monster is caught. Each bit can contain two values. If you had a penny, it could be heads or tails. If you had a penny and a nickel, however, you have four states:

Penny: H
Nickel: T

Penny: H
Nickel: H

Penny: T
Nickel: H

Penny: T
Nickel: T

Now, genes range from 0-15. That is 16 possibilities. How many bits is this? Well, if you had a penny, a nickel, a dime, and a quarter, you would have 2*2*2*2 =16 possibilities.

So you need four bits. Picture yourself as a Game Freak designer. You need twenty bits (5 stats * 4 bits), but have only 16 without writing a couple extra lines of code and wasting a precious byte of save ram on each monster. Add an extra byte, and players can store less monsters, or less items, or something. So you save the byte. Here's how:

The 16 bit value is broken into 4 groups. Each means, in order, attack, defense, speed, and special. Hitpoints is constructed from the last bit of each value. In base 10, if a number ends in 0 it is divisible by 10. In base 2, if a number ends in zero it is divisible by 2. So for a hit point gene of 15 (max) all values need to end in 1 aka be odd numbers. The odd numbers are 1,3,5,7,9,B,D,F. (B=11, D=13, F=15).

If you want a specific number, you have to realize that it is binary. Here is the simple way:

HP gene= 8*W + 4*X + 2*Y + Z

W = 1 if attack is odd, 0 if even.
X = 1 if defense is odd, 0 if even.
Y = 1 if speed is odd, 0 if even.
Z = 1 if special is odd, 0 if even

Hope this helps,

-cfalcon


From: 39°45' N, 104°52' W | Registered: Feb 2000  |  IP: Logged
Rahajamati
Orangutan Spouse
Member # 399

Rate Member
posted 06-04-2000 09:12 AM      Profile for Rahajamati   Email Rahajamati   Send New Private Message      Edit/Delete Post  Reply With Quote 
Thanks you for your help!!!

------------------
This space for rent


From: The Moon | Registered: May 2000  |  IP: Logged


All times are ET (US)  
Post New Topic  New Poll  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
Printer-friendly view of this topic
Hop To:


Contact Us | Azure Heights Pokémon Laboratory

© 2000-2016, Maximum Penetration Industries.

Karpe Diem


The views and opinions expressed on this page are strictly those of the author(s). The contents and links have not been reviewed or approved by the University of Miami.