a common lib of RPG game