This is very similar to the classic, longstanding suggestion of a graphics interface API. But for worldgen.
1) Publish the list of data fields that tiles have when first generated. However many types of tiles there are (world tiles, embark tiles, creature sized tiles, and maybe adventure travel tiles?). For example, maybe a fortress size tile contains fields for "Material, shape (ramps, etc.), liquids, boulder or not, ..." etc. These could totally change whenever you feel like it or need to add or remove game features, no big deal / shouldn't constrain development choices.
2) Whenever a tile needs to be generated, have an option for querying a third party plugin application for whatever values it needs to fill in, instead of hard coded DF functions. Or the option to just use the vanilla functions. In other words, the API sends out basically just "request for tile at XYZ coordinates and type/scale of tile" and gets back [struct or array or whatever of all the needed values] then proceeds as normal.
This sort of thing already exists, which is why I know Toady is at least somewhat cool with it -- in the form of the custom world painter (advanced world gend --> "e" --> "p" from the main menu). However, that only allows third party custom maps at the world tile level of scale.
Basically I'm asking for the same functionality, but at every scale at which world gen is done (not world history! just world gen of natural terrain and tiles). Including embark level and actual individual fortress tile level, optionally. Which would require a program API unlike the world painter, since it would need to generate info on the fly.
In terms of messy collateral issues, I can't think of very many. The API might have to have the option of deferring to the third party app for questions of which resources are available in an embark (the preview of "shallow metals" "flux" etc.). And it might have to have some help in deciding which resources the parent civilization has available for trade at embark. That's all I can think of though.
This might be horribly unrealistic and impossible (if tile generation is hopelessly sprawled out around the code) OR it might be a cakewalk (if tile generation is already a neatly isolated function). I have no idea. Just putting it out there as a long shot idea. But one that would be EPICally powerful if possible.
This would allow you to do everything on the following list:
* Make third party apps that can do arbitrarily complicated custom, more realistic geology simulations without interfering with game play or development (think PerfectWorld, but on crack -- this is my main personal motivation)
* Make apps for translating and importing worlds from other games, or shapes from 3D rendering programs, etc.
* Simple things like just "perfectly flatland" embarks, or perhaps "pre-landscaped embark" for people who want to make certain types of megaprojects that would be otherwise impossible (for example, due to the inability to build natural stone walls).
* Easier !!science!! and debugging by being able to easily make custom-tailored laboratory maps to easily test things (like walls of every ore and material, and prebuilt minecart ramps, and little convenient temperature/biome mini zones, etc. etc.)
* Make fantasy-type world gen algorithms that aren't supposed to be realistic at all, but do things like making procedural random floating island worlds (well not entirely floating to avoid cave-ins, but you know... pillar worlds), and awesome stuff like that.