You know there's something wrong with the storytelling when players need to use guides and ingame encyclopedias to explain the ending. Even though those don't even explain it fully. Then again a deux ex machina was the only thing that could've happened anyway, with the party not knowing how they're going to save Coccoon right until the end. It's just bad storytelling on a poorly worked out storyline.