I think a little clarification is in order.

EB team has stated that it is in some clever way possible to choose which character becomes the next heir to the throne. Most probably this is by boosting his influence or some other trait which directly specifies the next heir. It is still impossible to change the heir.

So, if you have a leader Alexander, and his heir is Polymachos, you can't change the heir to be Aristoteles instead of Polymachos. The hardcoding makes it so Polymachos will be the next leader when Alexander dies, unless he dies before of course. But you can, with modding, specify that Aristoteles will be the next heir when Alexander dies, instead of some drunken lout that has spent all his life getting lover of beauty traits.