move BASETYPE from the runtime in here + add a lot of new functions that
are necessary to the MentalState > new interface version