Tweaked npc structure data types and wrote predicate