# How is "Trainer ID" Calculated?

## Recommended Posts

Basically,

How is "Trainer ID" Calculated in the game?

Also,

Is it possible for two different carts (let say Diamond and HeartGold)

to generate a trainer with the same TID and secret ID?

##### Share on other sites

It is completely random, and chances for 2 trainers to have the same ID and sID are really low.

There are 65536 possibilities for the ID and the sID, so one chance over 4 294 967 296 to have both ID and Secret ID identical.

I think it is calculated with the PRNG algorithm or something similar.

##### Share on other sites

How do you think a game would know if someone alerady has a certain ID and SID?

It is impossible, unless they had us connect to Wi-Fi each time we start a new game.

##### Share on other sites

When you start a new game, the game generates a new RNG seed from the date\time\time it took you to talk to the professor. It then invokes the RNG used to create egg PIDs (nature\shininess\etc.), which is separate from the normal RNG. The first upper 16-bits of the generated number are for the TID, and the lower 16-bits is the SID. There are about 2^32 different possible seeds with the RNG, but there are only a limited number of seeds the game can generate. It is possible to get the same ID\SID with two different seeds, and some ID\TID combos are not possible.

It's pretty well documented how to start a game with a specific ID\SID. I started a game with a specific ID\SID so I could get a shiny near-flawless HP Grass Timid Raikou and Zapdos, and be able to renickname the Japanese event Mew to boot.

This program is what you're looking for if you're more interested in learning how.

##### Share on other sites

• 2 weeks later...

i thought it was linked to the card, until i found save editing and pokesav

##### Share on other sites

So to answer one of your questions: Yes they technically COULD be the same same for two people, but unless people are purposely picking them to be the same, it is unlikely, though not impossible.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.