Flawed characters and antiheroes make for fascinating protagonists—but their behavior can risk alienating readers. Follow this blueprint for flawed-yet-relatable heroes who can still provoke empathy.