[K40$]-Spectre;1434180 said:, this sounds a bit strange, but maybe you can give the villager an ability so it changes into an other villager (everything looks the same except for the buildings they can make).
The way of doing so, replacing the unit, would cause alot of troubles, not only for the AI, but for all players, as it would interrupt all queued orders and all current orders.
I found a way to do it. I did give it an ability, but what it does is to change what's buildable for the player. So whenever Toggle Military Structures is set to on, all normal structures in the building list will disappear, making room for the other ones. Upon deactivation, it reverses the effect. Now this will make it more pleasable for the player, and also the AI, since the AI isnt using this ability at all, and has all structures on the list all at once.