As I mentioned in a previous post, I recently dumped the code of a Tamagotchi, and have started analysing it. Some highlights are as follows, and you can find the full analysis here: http://www.kwartzlab.ca/2013/06/what-will-tamagotchi-become-and-other-questions-tamagotchi-life/.
Please reply with other questions you want me to answer! Feel free to throw in anything! The worst that can happen is I won't answer!
What makes a Tamagotchi a boy or a girl?
This is determined randomly based on the entropy source C4, which is set based on the number of times interrupt tm0 has fired since the Tamagotchi was started. So the exact instant you hit the B button and start entering your data or reset the Tamagotchi is what seals its fate.
What determines where a Tamagotchi lives?
This is determined based on a value in the EEPROM, which is read and incremented before the EEPROM is verified. So barring very serious corruption, the Tamagotchi should move sequentially through each background as it is reset.
What determines what toddler a Tamagotchi baby becomes?
For the first generation, it’s random based on entropy source C4. It is equally likely a girl will be Belltchi and Hositchi, and equally likely a boy will be Mattaritchi or Ahirkutchi.
For the next generation, it is more probable that a baby will grow into a character that you did not have last time. If the previous toddler was Belltchi or Ahirkutchi, there is a 2/3 chance it will be Mattaritchi or Hositchi (depending on gender), and a 1/3 chance it will be Belltchi or Ahirkutchi, and vice versa.
For the next generation (and all odd numbered generations), it is random again.
This of course only applies to ‘normal’ toddlers. If a toddler’s parent was an Olditchi, it will become Grippatchi or Oyajitchi based on gender.
What determines what teenager a toddler becomes?
The Tamagotchi maintains two ‘care factors’, factor A and B based in how well you care for it. The ideal score is zero, and you get dinged for various lapses in care. It’s not clear to me everything that contributes to this score at this point, but it appears that all the Tamagotchi’s stats play a part, and whether a figure is attached seems to have an impact, although it’s not clear what that is. There’s also a random element to the care factors, sometimes it’s randomly determined whether factor A or B gets impacted.
Which character your toddler turns into depends on these care factors, but some toddlers are higher maintenance than others. For all toddlers, if both care factors are less than or equal to two, they will turn into Shelltchi or Kilatchi. For Belltchi or Ahirkutchi, if the care factors are both less than or equal to four (but not both two or less), they will turn into Mikazukitchi or Kurokotchi, but for Mattaritchi or Hositchi, both need to be three or less! Otherwise, the toddler will turn into Chuchutchi or Monpatchi.
What determines what adult a teenager will become?
This is determined based on the same care factors that determine what teenager a toddler becomes, but there is one extra factor: training. Different teens react differently to training as well.
A poorly-cared for teen will turn into Gozarutchi, Necktie-chi, Kinoitchi or Pipotchi (which specific one is determined randomly). For all teens, if the care factor is more than four, it will turn into one of these characters. However, for training, it depend on the teen. For Chuchutchi or Monpatchi, if their training is less than eight, they will turn into one of these characters. For Mikazukitchi or Kurokotchi, this value is six, and for Shelltchi or Kilatchi this value is four. So if you care for your toddler poorly, you need to make up for this in discipline in the teen years or else you will get a ‘bad’ character
I won’t go into all the combinations here (they confirm the growth chart here), but what the Tamagotchi turns into continues to depend on what toddler it was. For example, to become the ‘best’ set of adults, the ‘best’ toddlers only need care factors of less than or equal to two, and training of more than eight, while the worst cared-for toddlers need care factors of less than or equal to one, and training of fourteen or higher.
Is it possible to get any of the ‘secret characters’ in the ROM?
I haven’t found any, and I’ve been through the whole evolve function. I suspect these got removed at some point late in development (maybe they weren’t working), because there’s a lot of situations in the evolve function where a condition branches to the same function regardless of what it evaluates to, which seems like a ‘quick fix’ to remove characters
Can you toilet train your Tamagotchi?
It will never start going to the toilet by itself, but every time you drag it to the toilet in time, it improves its training score by three points. Once a Tamagotchi’s training score is over ten, it will start to go less, which is almost like toilet training it …
Just want to share some recent progress with my Tamagotchi research! I've done a bit more figure simulation.
You can see my hack in action here:
(and of course in my avatar)
A blog entry with the technical details is here: http://www.kwartzlab.ca/2012/12/reliably-simulating-tama-go/.