This is a suggestion inspired by this question/answer session between ToadyOne and Neonivek:
Quote from: Neonivek
Toady when armies, adventurer groups, and other such organisations finally can attack single units in unison (Megabeasts for example) do you forsee Megabeasts getting stronger, weaker, the same, or will they have the ability to out manuver them so to speak?
I can't say specifically which way it'll go until we see how much it affects the kill rate. If a bunch of peasants bounce off of a dragon the same as a single peasant, then it won't require as much of an adjustment. We'd generally like to emphasize heroic or specialized/weakness-based kills rather than random overwhelming of a beast. This might require megabeasts to be more manueverable or at least not get caught sleeping out in the open by large groups of regular soldiers -- beasts that are neither intelligent nor powerful enough to defend themselves from that kind of thing don't generally deserve to be megabeasts. Having a megabeast-killing hero/heroes emerging from obscurity during a regular town defense is fine, but having it be the norm from the combat mechanics would lead to larger problems, I think, so that sort of thing might end up being a kind of specifically chosen outcome in world gen or something. It's sort of unavoidable in the information-scarce time-crunched environment of world gen -- sometimes things happen all at once instead of step by step.
Warning: Wall of Text.
In reply to this: In Worldgen, each Megabeast should be assigned a "lair", located in an environment/biome that suited it.
This Lair would be a very simple, 3x3x3 cavern area, programmed to form entirely inside of stone, atleast 3 Z levels below the surface in all places, and also programmed to have a single, accessible "cave" entrance, leading either to the surface, or to the nearest cavern, body of water, or other such open space.
A very small, very simple, but unclosed cave, in other words.
This would be placed outside of normal worldbuilding, once the World had taken it's shape, but before Events occurred.
This would keep Megabeasts from listlessly wandering the countryside, without requiring heavy AI programming, and eliminate an immediate vulnerability to being "rushed".
Megabeasts would exist in a hybernating state, until contacted (by physically coming within 1 Z level of their Lair, in any direction) by a being with the ability to learn skills (anything smarter than an animal).
This could happen in WorldGen (as simple as random number generation), in which case, that megabeast would have an impact on history, as normal.
Otherwise, the Megabeast would remain "hybernating" until the time of the game.
If any part of this cave "home" touched a pre-existing cavern, the Megabeast would instead be located, awake, on the nearest immediate floor of that cavern system. Being awake in the closed environment of a cavern should reduce or eliminate the same dangers that being awake on the surface might otherwise cause.
To ensure their survival, Megabeasts would not ever be required to eat or drink or breathe fresh air. All Megabeasts would be given the ability to swim, and all could survive indefinitely underwater, even if that wasn't their "natural environment".
Megabeasts who's homes happened to touch magma at any point, would instead appear awake, on the surface immediately above, at the closest magma free area available. This would allow a few Megabeasts to occasionally awaken during Worldgen, without sentient contact ("a volcano woke them up").
Hybernating megabeasts who's homes were flooded by magma during actual gameplay, would also reappear, unharmed and awake, at a nearby but random magma-free surface area. This would keep them from being exterminated by "flooding the world" with magma, or chance volcanoes, or other events, before giving them a chance to wreak havok.
Dragons, bronze colossi, and other Megabeasts with special relationships with fire, may very well be immune to magma, anyway, but could still be awoken in this manner.
Any damage done to a hybernating Megabeast would cause exactly the same thing to occur--It would reappear, awake and angry, but completely unharmed, on a random nearby surface area.
It would be therefore impossible, as a game mechanic, to kill a hybernating Megabeast, without first waking it up. Contacting it, without causing it any damage, would cause the Megabeast to wake up, but not to randomly shift location. Sentient creatures brave enough to approach, would still be inclined to attack it, however, even if you really didn't want them to.
These means would help to eliminate the more obvious means of safely getting rid of sleeping megabeasts the player had managed to locate.
Once two or more of the same Megabeast (regardless of sex) were "awake", at any point in the game, the awake ones could then breed as a normal breeding population, provided that active population included both males and females.
Hybernating Megabeasts would not count towards the breeding population.
The requirement of only active Megabeasts of that type in the world breeding, would go a long way towards keeping numbers down, while allowing a more natural life cycle to occur, and help to keep Megabeasts from all going extinct.
In addition, for every Megabeast killed during Worldgen, there would be a 5% chance that a hybernating Megabeast, of that type (if any still exist), would become a hybernating "Breeding Mother".
That megabeast would become a female, regardless of original sex, and immedately begin laying eggs/having hatchlings, etc., while still hybernating.
These eggs, or maybe hatchlings (depending on the species of Megabeast?), would also be "hybernating". The eggs/hatchlings would not begin aging, until/unless woken up by the same means as the Mother.
Breeding Mothers would awaken by exactly the same means as other hybernating Megabeasts. Hatchlings would only awaken if physically damaged, or by contact by a sentient being, or by magma.
Unlike all other Megabeasts, Breeding Mother Hatchlings (only) could be damaged/killed, or even possibly stolen (eggs), without waking the Mother, but this should carry with it an extreme risk of waking the whole "nursery", including the Mother, at the same time.
The appearance of Megabeast "Mothers" would be a special event that would have to occur during Worldgen, and would only be caused (and rarely so) by the death of another Megabeast. No new sleeping "Mothers" would be created after Worldgen was over.
That would give the rare possibility of stumbling upon a much larger problem than even the single Megabeast you were prepairing for, while allowing some Megabeast "eggs" to exist in the world.
Birthrate would remain low.
If a Bronze Colossus ever became a "Mother", it would instead cause additional hybernating Bronze Colossi to appear in the same Lair.
This would normally be 1 additional Colossus, but it could maybe become a mod tag for "Megabeast--does not breed", that allowed you to set random number parameters, allowing players to instead stumble upon a collection of several unliving Megabeasts, rather than a nest of living, breeding ones
In that way, there would always be the possibility of running across more Bronze Colossi, and similar Megabeasts, than the player could count on appearing in the game.
Megabeasts--any of the types we have now--would never appear in the Ocean (within any Ocean or similar biome), but may appear in small bodies of water/murky pools.
If ToadyOne wants to add ocean biome Megabeasts, these may have/requre different features. This Thread isn't about them, and doesn't deal with them, or attempt to figure out how they might work.
Megabeasts who appear in bodies of water, and who's Lairs would be
completely submerged in water in all directions, would instead appear awake, on the floor of that body of water, at the time of gameplay. That would give you occasional "lake monsters", emerging to interact with the world, in a similar manner to those "awoken by volcanoes".
The ones appearing in lakes would only awaken/become active, at the time of the game, itself, unlike the ones who's lairs happened to touch magma.
They would hybernate throughout Worldgen/Events, as normal, unless awoken--which should be a fairly rare event, since they'd be hybernating on the bottom of a lake or murky pool.
That would help to increase the chances of having a handful of active Megabeasts, somewhere in the world, at the time of the start of the game.
Hybernating Megabeasts could still be worshipped, as normal, and this worship might give a clever player some clues to the Megabeast's whereabouts.