Air Strip/base

MattW

Chieftain
Joined
Nov 13, 2005
Messages
10
Does anyone know if it is possible to create a new unit from python.

I want to allow a worker to build a air base. The way I was going to have it happen is to add a imrovement called "air strip construction" with a upgrade time of say 4 turns, and then when the improvement is upgraded, replace it with a air strip unit (which I have based on the carrier except it is a land unit now and has no movement).

However I can't find any API function which allows a new unit to be created (other than giving a order to a city to start training one).

The only other workable idea I have came up with is that you have to build one as normal (in a city) and then get your worker to start working at the site (and build the improvement) and then once it is complete (or upgrades), automatically move the prebuilt airbase to the new location. But this is far from ideal.

The other way which is the easiest but the most unrealistic is to just allow the airbase to move. It also is a bit wierd to have to load your airbase (which at the moment is using the graphics of the carrier (which actually doesn't look that bad on land when stationary)) onto a transport ship or even a galleon so you have one to support your conquests on a different continent.
 
MattW said:
Does anyone know if it is possible to create a new unit from python.

I want to allow a worker to build a air base. The way I was going to have it happen is to add a imrovement called "air strip construction" with a upgrade time of say 4 turns, and then when the improvement is upgraded, replace it with a air strip unit (which I have based on the carrier except it is a land unit now and has no movement).

However I can't find any API function which allows a new unit to be created (other than giving a order to a city to start training one).

The only other workable idea I have came up with is that you have to build one as normal (in a city) and then get your worker to start working at the site (and build the improvement) and then once it is complete (or upgrades), automatically move the prebuilt airbase to the new location. But this is far from ideal.

The other way which is the easiest but the most unrealistic is to just allow the airbase to move. It also is a bit wierd to have to load your airbase (which at the moment is using the graphics of the carrier (which actually doesn't look that bad on land when stationary)) onto a transport ship or even a galleon so you have one to support your conquests on a different continent.

Well as for moving, you could have an engineer corp unit that can drive out to a location and once it's ability is used it can no longer move and creates the airbase.
 
I've worked out a way to allow airbases to be built in your own territory, but this isn't really what I wanted.

I wanted to be able to build them on unclaimed territory or even in other friendly nations territory. But still need to do more work, to find the best way to do that.

If anyone is interested in adding the ability to build them in their own territory to their game (I'm not sure if the AI will build them as well, but there is no reason that they wouldn't be able to if they decided to) then I'm including the files. (unzip them in your My Documents\My Games\Sid Meier's Civilization 4 folder)

Once you have researched Flight then your workers will be able to build a airbase (in your own territory). It is far from perfect because it basicaly creates a improvement (with the graphics of a fort), and also creates a new unit on that plot (the airbase unit which can't move and uses the graphics of the carrier). But I think its better than nothing.

Note: that also you will also be able to build airbase units in your cities, but there is no point in doing so as they have 0 movement. So you will not be able to move them out of the city they were built in.
 

Attachments

Back
Top Bottom