Tuesday, February 11, 2014

Monster Rancher Advance 2

This game is a decade old, but the whole idea of a code generating statistics for play is interesting to me.  I spent some time off and on through the years trying to puzzle out how exactly it works.  It's a little easier now that I actually have training and experience in compute science to understand some of the inner workings.

With the latest round of poking at it, here are some conclusions I drew.
  • Each character in the code has an assigned value:  I haven't figured out what these values are, but they definitely exist.  The game does not allow you to put all blanks in, and nor does it allow you to use one of the blank space options at all, meaning that it is likely that blank spaces have a value of NULL or 0.  You'll see why I think so in a moment.
  • Single character codes produce pure-breed monsters: This means that they are going to have base values for stats and they will not have a sub-type other than the main type.  This was confirmed by using a ROM with a cheat code to allow the creation of all monster types.  We are not talking about putting spaces in front of a single character; that produces other values.  It's likely that each character represents a value that is used in some kind of algorithm to determine the type of monster.
  • The more characters used in a code, the more variation there will be: This means traits, stats, personality type.  This is probably because additional values are used to determine these things.  There are likely hidden values as well that aren't visible while playing the game.  Stats seem to be generated using a percent plus-or-minus to the baseline stats, which would make sense because who would want to store 85^10 * 6 values when you can just have an algorithm generate it procedurally?
  • There are 512 kinds of monsters: This is actually really telling in terms of programming because 512 is a power of 2, which gives me the idea that there are 3 bytes used to determine which monster you get.
Anyway, those are my thoughts for now.