DISCLAIMER: I do not really know much about what I am doing here, but it works. BackUp your saves either way. If my method is old news or outdated, ignore this post, but a search just turned up two people asking and nobody answering.
DF Version: PeridexisErrant's Starter Pack 0.42.04-r03 with DFHack 0.42.04-alpha2
GOAL: Get a bee (or other) colony on your embark site where no colonies are present.
1) Colonies are vermin with the 'is_colony' flag set to TRUE.
2) My understanding is that DFHack currently can create units and items, but no vermin. So we take an existing vermin and change it into a colony.
3) DFHack command:
gui/gm-editor "world.vermin"
=> all. (Or just "world", there is a lot resources for !!SCIENCE!! right there)
4) Choosing the vermin: As far as my knowledge goes any vermin with a set countdown will do, as it would disappear afterwards anyway
5) Set vermin values:
race: 151 termite/205 ant/215 bee/216 bumblebee
caste: -1
pos:
x and y start in the upper left corner both with the value 0, x being horizontal and y vertical as usual
z starts with your maps lowest level, so you have to subtract that from the value you are aiming for. Example: You want the colony on your ground level of 120, your lowest map level is 36 so 120-36= 84 = z.
visible: TRUE
countdown: -1 (else it would probably disappear before your beekeeper gets here)
flags: is_colony = TRUE, rest = FALSE
amount: the amount of insects living in the colony. Typical number are between 12000 and 18000 (I think)
population: as I was afraid to somehow screw up world population if we take 10000 of a randomly chosen population to our hive I left the region_x and region_y coordinates and set population_idx to -1.
unk_34: so far all colonies I encountered had a 4 here, so that is what I set it to.
id: just left it alone
6) my beekeepers somehow only recognize the newly "build" colony once I savequit and reload the game, so do that (after BACKUP, remember this is all experimental)
That´s it. Good luck and thanks to the DFHack team for providing us with such a powerful tool as gm-editor.
EDIT: I realize this is the 0.40.24 thread, but it should work in all DFHack versions with the gm-editor and there is no 0.42.04 thread yet
EDIT2: expressed goal more explicit