It seems that the script was updated but not the raws : Here are the latest version of everything, you can put that in your raw folder and try again in a new world.
Link :
https://drive.google.com/file/d/0B8QFWS9tHkaaTmhpNGQ1aS1OQTA/view?usp=sharingI tried debugging that again, comparing a pet bought at embark with a summoned one. One difference is that summoned pets are historical figures and bought ones are not. But after modifying spawnunit to create non historical pets, the bug remains.
I found one weird artifact : In relations, your 'natural' units have a mount_type set to a number that has nothing to do with mounts. I got a 24 on a succubus, and a 4 digits on a pet, while summoned one has -1 as intended. For info, mount_type should be set between -1 and 4 to say if a creature is riding a beast or pulling a wagon, so clearly there is something fishy going on.
Otherwise, I suspect that the issue lies outside the creature itself. Perhaps the game maintains a list of fort members somewhere and the creature must be added there.
Edit: I finally firgured out these values must be set on the unit:
unit.enemy.anon_4 = -1
unit.enemy.anon_5 = -1
unit.enemy.anon_6 = -1
And it stays nice and tame on save reload. I need to clean up the script and add a couple of missing features and the summoning will be available out of the box.
Next up is AddPetToCiv to remove cats and dogs and replace them with fire imps and orthi.