I don't remember the name of the file. I read through it awhile back and it showed how each of the auto-level schemas worked.
It's called gamelevel.mes and you can find it in the Arcanum4 or Arcanum5.dat/rules folder - depending upon what you've got.