How do I allow air units to land on an improvement?

Kiloku

Chieftain
Joined
Oct 3, 2010
Messages
25
I am adding an improvement called the Airbase. It already works in the sense that there is a new improvement in the game and I can build it. But it would make no sense to have this improvement if planes can't land on it. I even tried carrying over the <SpecialCargo> and <DomainCargo> tags from the Carrier, but I think these tags are not accepted in Improvements.

Please help?

Code:
<Type>IMPROVEMENT_AIRBASE</Type>
<Description>TXT_KEY_IMPROVEMENT_AIRBASE</Description><Civilopedia>TXT_KEY_CIV5_IMPROVEMENTS_AIRBASE_TEXT</Civilopedia>
<ArtDefineTag>ART_DEF_IMPROVEMENT_AIRBASE</ArtDefineTag>
<BuildableOnResources>true</BuildableOnResources>
<DefenseModifier>20</DefenseModifier>
<CreatedByGreatPerson>true</CreatedByGreatPerson>
<PortraitIndex>35</PortraitIndex>
<IconAtlas>TERRAIN_ATLAS</IconAtlas>
 
Hey, thanks. Since I'm trying to develop my own mod (it's actually supposed to be part of a bigger mod, and also to be a learning experience, it'd be my first mod), let me ask some questions.

1. Your Airbase mod requires your "DLL - Various Mod Components" mod. Is it impossible to make an Airbase (or similar) mod without DLL modding?
2. I was checking out ImprovementAirbases.lua, and in the comments above each function, it mentions another function. Example "CanLoadAt()" is mentioned above the declariation of "OnCanLoadAt(parameters)". What are these functions you mention in these comments? I don't see you call them within the new function.
3. I was taking a look at UnitFlagManager.lua, and it seems to have a lot of stuff that is not directly related to the Airbases. Am I mistaken? What could I "trim" there?
4. Can the AI use the airbases without problems? Do they ever build them?
 
One needs the DLL while the other doesn't. If you don't want to use a modded DLL, download the other and take it to pieces to find out how it works exactly. For a non-DLL modded version, you can't park air units directly on an improvement, you need to add a "static land carrier" onto the plot to base them on
 
Top Bottom