Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

I'm pretty sure that the easiest way to do this would be to have a dummy building that builds instantly, supports a unit and as soon as unit leaves you destroy it.

When population increases you tell the AI to place the building, then you deploy the unit and destroy the building.

You can create a unit directly through scripts. See t_unrest_incidents for examples, when it creates rioters.

Huh. I went through mod_api and couldn't find anything related to units other than interface of that name.

It should be in there. A function called AddUnit (or something like that)

There are 108 occurences of 'unit' in the mod_api.d.ts and none of them relate to anything like adding, placing, or spawning a unit. one of them is:

declare function CreateUnit(unitData: UnitData, position: Hex, tribe: Tribe)

Yep, that's the one