A basic mod for implementing evolution in DF:
Includes mass extinction events and subsequent evolutionary radiation of the surviving creatures to fill in the perceived gaps in the ecosystem.
"The climate change drastically effected the oceans, wiping out 70% of all marine life. As a consequence, animals from the land began to return to the ocean in mass."
In the above case, you might get sea-monkeys (or perhaps sea-apes), as well as fluffy kitty plesiosaurs.
You the run the script before world-gen and what happens is, let's say in the case of a randomly determined mass marine life extinction, the function backs up your root folder's creature raws, and then proceeds to remove 70% of all of the aquatic animals in those raws. Next, the script goes through and picks random land creatures to spawn new sub-species to fill the new gaps in the bio-sphere. Those selected creatures have their raws duplicated and then modified to fill a role. Depending on what role is needed, the creature may receive new body proportions, traits, or even limbs, in order to feed on their new diet or to protect themselves from predators. Additional elements added are to their name and description. Finally a new creature_radiant_evolution.txt is written to the object/raw/ folder which contains the new species. And you're free to run world-gen.
Theres another approach that was the original idea, where creatures would evolve over time but on a scale that would allow the player to observe the phenomena, as world-gen slows down to much by year 200 alone, to even consider trying to let it run to year 2,000,000. The script was going to produce produce a number of each variant with a sliding scale of the augmented physical features. But the tricky part here was in figuring out how to temporally limit when each variant would and wouldn't spawn in a world. There might be a way to do it, but IDK. The idea was that in a world that is 200 years old, a player might notice in addition to the normal domestic cats present, there are also "Urist fruit cats" that they'll find running around, which are not carnivorous and instead eat fruit. While a world that is 2000 years old, that same player might begin to notice that these cats now possess 6 meter long necks they use to grab high-hanging fruit out of trees, and additionally now possess impressively large molars, that are broad and flat, which these cats can use to casually break through coconut husks.