NPCCommonStats and code generator program