Long-term sieges are characterized by an absence of actual combat and a lot of sitting and waiting (for reinforcements, for the other guys to give up, for hunger and disease to take their toll), and will thus revert to civilian mode.
Productivity is also a matter of quantity produced per job. Admittedly, dwarves are now spending their time walking around: but the reason that that happens is that production is abstracted to cram it in the year without making the dwarves walk very fast and be still in their workshops for most of the time.
- Ambushes switch to siege mode ASA the first hit/shot/warning cry happens. Civilians that are fleeing are into combat mode as well.
- The type of enemy doesn't matter: it's whether dwarves are in combat/fleeing that matters.
- Trapped Goblin: ah, but you don't improve efficiency: production and consumption on a per year basis remain the same; they're just stretched out more because in siege mode the dwarf time passes more slowly - so your stonecrafter will still produce 1 instrument each week, but the weeks will now pass slowly, allowing dwarves to move and combat more.
- Stragglers: there might be a lone goblin you can't reach. You should always be able to end (or start) siege mode voluntarily; even if you do it in the middle of combat, it will switch right back on. It should depend on actual combat being fought, not on the presence of enemies.
Another option to solve that is to mark enemies as non-threatening: if they don't actually hit your dwarves, they won't trigger fleeing reactions or attacks. That would also be useful for pitted animals or cave animals down below in a lower cavern (as an aside, their should be creatures that make all but the braves dwarves flee, even if they're tamed
).
It would be announced the first time to the player as follows:
**You are now entering siege mode.** Siege mode slows down the time of your economy (production and consumption of your dwarves) because there is combat going on. You can now concentrate on the military, who operate on their normal speed. You will switch back to civilian mode automatically when combat has ceased for a day, or by pressing [key]. More info, press <Help key>.