Okay, here's what I understood in X:
>in ancient times Kalos was ruled by a king who loved pokemon
>a war breaks out and people and pokemon clash in battle and many die
>against his wishes the king's favourite pokemon goes to fight in the war too
>the pokemon dies and the king suffers incredible grief, which turns to rage as he blames the war that still rages
>the king uses lostech to construct a massive device that can raise the dead, and uses the lives of pokemon in sacrifice to power it
>his pokemon is revived but is disgusted with him for it and abandons him, even as the mad king turns his weapon on the duelling armies and kills them all too
>the king ends up hollow, heartbroken and immortal and begins to wander endlessly in search of his former friend, while a legendary pokemon (Xerneas for me) can and helped revitalize everything, eventually turning into a tree
>many years later a millionaire resident of Kalos rediscovered the ancient weapon and decided to wipe out all the lazy resource-hogs in the land with it
>he captures the king and gets info out of him, but is defeated by the player
>the king is impressed by the kid's bonds and decides to try and rekindle his love for pokemon instead of just wandering, and goes out and catches some new pokemon
>at the end of the game the king reappears from the crowd and challenges the player with his unskilled new pokemon and actually has fun for the first time in three thousand years, and his original partner, who is also immortal, descends from the sky to rejoin him now he has a heart again
And everyone's happy.