Add NPC stuck action/event

Events and actions for when an NPC gets stuck
Add config option for trim length

A way to control debug trim length