Just tried this myself; actually got Kobolds to survive as a race PAST worldgen!
Inspired by other ideas, I tested a few other tags out, and managed to make kobolds pets, trainable, and purchasable at embark. I'm not keeping them that way for my world (just as pets, if I catch one; like gremlins), but it shows its possible. Here's a copy of the raws you'll need to make it work.
Open creature_standard.txt
Find the kobold entry. It should look like this (the bolded and underlined parts are what you need to add):
[CREATURE:KOBOLD]
[DESCRIPTION:A small, squat humanoid with large pointy ears and yellow glowing eyes.]
[NAME:kobold:kobolds:kobold]
[CASTE_NAME:kobold:kobolds:kobold]
[CREATURE_TILE:154][COLOR:7:0:0]
[GLOWTILE:164][GLOWCOLOR:6:0:1]
[LOCKPICKER][TRAPAVOID][FLEEQUICK]
[PET][TRAINABLE] <------- Add this to make them pets, and the trainable tag allows you to teach them to hunt or fight.
[COMMON_DOMESTIC][PETVALUE:50]<---- This will let you buy them at embark; the value determines their price.
[CAN_LEARN][LIKES_FIGHTING]
[UTTERANCES]
[BONECARN]
[NO_DRINK][NO_EAT] <----- This allows them to survive past world gen. A must if you want vanilla kobolds AT ALL.
[CANOPENDOORS]
[PREFSTRING:mischief]
If you're having trouble with them breeding (you will, either as captives or as pets), scroll down a bit further until you see this:
[CASTE:FEMALE]
[FEMALE]
and where there's a bunch of stuff about eggs, delete it ALL and retype [MULTIPLE_LITTER_RARE]. If you did it right, it will look like this:
[CASTE:FEMALE]
[FEMALE]
[MULTIPLE_LITTER_RARE]
[CASTE:MALE]
[MALE]
[SELECT_CASTE:ALL]
This will allow your kobolds to reproduce in captivity. It doesn't SEEM to impact their numbers in world gen, but I admit I haven't done much testing on that. I spent over two hours today searching for a post to explain EXACTLY where in the raws you needed to add tags to mod these guys, and figured I'd post it here for clarity, and to help anyone that was having issues with kobolds.
EDIT: Despite being able to be tamed as pets, they WILL still have caves and develop a civilization in world gen. I cannot vouch for a bug-free existence, but it seems to do no harm to their behaviors so far. I'll continue playing for further testing, and I assume they will still assault you after stealing enough stuff. I did this modding because the people in this thread convinced me that kobolds seem like a sensible dwarven pet:
- They're small and unintelligent, but smarter than herd animals (sound like dogs, anyone?)
- They prefer cave dwelling, making them a race that is comfortable in the dwarven realms
- Their ethics aren't so far out of line with dwarven ones to make them impossible to tame and rehabilitate (since it appears ethics are based on civ, not race anyway, so domesticated kobolds would be totally in line with dwarves)
- A creature with an eye for treasure, a defiant fighting spirit, and the desire to make it happen seems like the kind of thing that would make a dwarf's eye twinkle, once he disarmed it (and assuming nobody was killed by it while invading; we put down dogs that murder our own, after all).
I see them not as low as dogs, but like perma-children. Dwarves like having them around as minions and the like, and treat them nicely, but regard them as too simple to be trusted on their own.