I'm not sure how much it will help but DM of Darkness was working on something similar here. Not too long ago.

Different but similar.