I'll make this short and sweet so I'm not wasting anyone's time.
I am aware that terrain generation is likely more advanced a task than I should be taking on but I'm making a game that uses it and all the other features are pretty much implemented.
Is there code somewhere I can use to get me started in designing my generation?
I really should be more specific on what I'm trying to accomplish:
Finite terrain generation. (I think I can figure out dimensions for map sizes but if you have ideas I'd love to hear them)
A way to generate certain tiles at certain levels. (An example would be grass on the top level and then further down stone and coal etc.)
Objects like buildings, trees, npcs, dungeons. How would I integrate them into the generation?