TIL how Monster Rancher generates monsters
POSTED ON:
TAGS: gamedev
Monster Rancher is a Pokemon-type game but more focused on breeding. The cool mechanic is that monsters can be generated by inserting any CD into the game system.
Some discs are designed to produce specific monsters, often thematically related to the disc in question. For instance, in Monster Rancher 4, the Harry Potter and the Chamber of Secrets DVD (as well as the tie-in PlayStation 2 game) generates a unique owl monster, and in Monster Rancher 2 and Monster Rancher 4, Tecmo's Dead or Alive game creates a Pixie named Kasumi. Special CDs, called pandora discs, can produce multiple monsters. Often, the Monster Rancher game CD itself is a pandora disc.
How is that done? #
This is based off of Monster Rancher 2, written up by SmilingFaces96
MR2 uses the Table of Contents (TOC) to get its data.
There are 3 pieces of information in the TOC to determine what monster to create:
-
The time length of the CD (start of the lead out time),
-
the start time of track number 2 on the CD,
-
and the start time of the last track on the CD.
Within those 3 pieces, two additional pieces are used: the point time minutes (PMin) and the point time seconds (PSec).
This is an example of how a CD's TOC would look like.
The length of the CD is stored in the PMin and PSec of Entry 2 which contains Point 0xa2
, indicating lead out start time.
The second track start time is stored in the PMin and PSec of Entry 4 which contains Point 0x02
, indicating track 2.
The last track start time is stored in the PMin and PSec of Entry 5 which contains Point 0x03
, indicating track 3, which is the last track.
We know it is the last track because in Entry 1, the PMin value is set to 3,
If for some reason, any part of this data is missing on the CD, which may occur with a CD with only 1 audio track, MR2 will use 0 for these values.
Generating the Monster #
After reading the CD, MR2 follows the following simple process
-
Check to see if CD is the Monster Rancher 2 CD
a. Data Retrieval Type is marked as 4
b. Monster Main type is set to 0x19 (Mocchi) and stored off
c. Monster Sub type is set to 0x19 (Mocchi) and stored off -
Check to see if CD is a Stored Special Monster
a. Data Retrieval Type is marked as 2
b. All Monster Data for the special monster is stored off -
CD is neither Monster Rancher 2 or Special Monster
a. Data Retrieval Type is marked as 1
b. Monster Main type is determined and stored off
c. Monster Sub type is determined and stored off
d. Monster data offset indices are determined
e. Monster attribute and life week offset data is retrieved via indices and stored off -
Monster Main Type is set in Monster Data Space
-
Monster Sub Type is set in Monster Data Space
-
Monster base data based on Main and Sub Type is transferred to the Monster Data Space
a. If Monster is a Sub Type of ???, then base data will be based on a Pure Breed
-
If Data Retrieval is set to 4, then Monster data is not updated
-
If Data Retrieval is set to 2, then All special Monster data is transferred
-
If Data Retrieval is set to 1, then offset data is added to Monster base data
From there, it matches the values based on stat tables to determine what type of monster you get.
Via
https://legendcup.com/laboratory.php#overview
and
SmilingFaces96's document:
https://drive.google.com/file/d/10W0ZEIBrWVK0PjD39RF30EzdXsW5kdRR/view
Related TILs
Tagged: gamedev