Merging in major refactoring of Character, with partially complete work on NPC support. AI stuff is incomplete and probably buggy but existing character stuff (i.e. what the game actually uses at the moment) should hopefully be stable and run the same as before.