Jump to content
PureBlue

How to create an airfield from scratch

Recommended Posts

Here's a quick tutorial on creating your own airfield.

 

 

First lets get the model to display in-game and later we will add/correct the necessary bits.

 

 

GETTING a Basic Model to display in-game

-------------------------------------------------------------------------------------------------

 

1. Decide where to place the airfield. Turn on DisplayDebug from Flight\Huddata.ini.

Using freecam fly to your construction site and note down the coordinates from ingame.

Remember you need a flat spot for the whole airfield. If it's not flat, use TerrainEditor to flatten the area. (This is another tutorial topic, check KB)

 

2. Design your runway in 3DS Max.

You can choose your own approach here. Either model different LODs for Runway, taxiway and ramps; OR make a single model.

 

I suggest modelling the runway looking North-South.

Make sure your runway centerline is at X=0. AI does take off roll on this centerline. Y coordinates doesn't matter that much because you will set the Taxi and Takeoff/Land spots from the airfield.ini file.

 

 

 

post-30257-043859100 1290193319.jpg

 

post-30257-072869200 1290193332.jpg

 

 

3. Export your lod and place it in the actual Terrain's folder. (Example: Terrains\GermanyCE)

Files needed for your airfield:

xxAirfield.LOD

xxAirfield.INI (If you want to define view distance and different lods for your model)

All texture files used in the model.

AirfieldDataFile (example: Airfield_Merzifon_AJU.INI, more on this later)

 

4. Add an entry to Terrain_Types.ini

 

[TargetType126]

Name=AirfieldMerzifon

FullName=Merzifon Airfield

ModelName=AirfieldMerzifon.LOD

TargetType=LARGE_RUNWAY

ActiveYear=0

TargetValue=1000

UseGroundObject=FALSE

DamagePoint=140.0

ArmorValue=0.0

ArmorType=0

RepairRate=10.0

StartDetectChance=100

StartIdentifiedChance=50

IncreaseDetectChanceKey=10

MaxVisibleDist=30000.0

ZBufferOffset=6.000000

FlatObject=TRUE

DamagedModel=

DestroyedEffect=

DestroyedModel=

SecondaryChance=0

 

Things to consider here:

TargetType will tell the game this is a RUNWAY and the size will determine which aircraft can take off from here. (Aircraft_data.ini files have variables corresponding to this.)

 

Set FlatObject=TRUE for all airfields.

 

 

5. Add your airfield to your Terrain_Targets.ini

 

[TargetArea023]

Name=Merzifon AJU

Position=1007800.000000,810400.000000

Radius=5656.854492

ActiveYear=0

Location=1

Alignment=FRIENDLY

AirfieldDataFile=AIRFIELD_MerzifonAJU.ini

NumSquadrons=3

 

Target[001].Type=AirfieldMerzifon

Target[001].Offset=0,0

Target[001].Heading=0

 

 

The position is the coordinates you noted in Step 1.

AirfieldDataFile will cointain information on Takeoff/Touchdown coordinates, Taxi coordinates for AI, Parked aircraft coordinates and lighting data.)

 

You can use one of the stock airfield data file as an example. (Example, extract from GermanyCE.cat)

 

All coordinates here correspond to x,y values in your model. (Take reference from there or your Terrain_Targets.ini entries)

 

 

6. At this stage you should be able to display your airfield, in the game.

After this, I use a mission editor (like KMD) to design a mission to take off from this airbase. So I can start testing and adding more groundobjects.

 

 

 

 

FILES TO WORK ON

-------------------------------------------------------------------------------------------------

 

AirfieldDataFile: (Ex: Airfield_Merzifon_AJU.IN)

 

[Runway001]

Heading=0

Offset=0,0

Length=2700

Width=56

TouchDownHead=0,1400

TouchDownTail=0,-1150

TakeOffHead=0,1464

TakeOffTail=0,-1209

 

TaxiHead[01].Heading=270

TaxiHead[01].Offset=40,1485

TaxiHead[02].Heading=270

TaxiHead[02].Offset=90,1485

.

.

TaxiTail[01].Heading=270

TaxiTail[01].Offset=50,-1231

TaxiTail[02].Heading=270

TaxiTail[02].Offset=100,-1231

.

.

ParkingChance=100

ParkingMaxSpan=18.0

Parking[01].Heading=320

Parking[01].Offset=321,720.4

Parking[02].Heading=210

Parking[02].Offset=288.4,818.2

.

.

LargeParkingChance=100

LargeParkingMaxSpan=40.4

LargeParking[01].Heading=270

LargeParking[01].Offset=204,1125

LargeParking[02].Heading=270

LargeParking[02].Offset=204,1175

 

 

For touchdown and takeoff data, take the coordinates from your 3DS Max model. Leave proper spacing and consider larger aircraft taxiing/taking off. Keep running test flights to see how the AI acts..

I think the max number aircraft taking off at one time is 16. So have at least 15 TaxiHead and TaxiTail entries, this way you have them all covered, because the first plane starts from the TakeOffHead/TakeOffTail coordinates.

 

Parked Aircraft are great. You can get some activity going on around them in the next step.

The best part is, in campaign gaming, the parked aircraft will be the actual squadrons based here.

 

 

Terrain_Targets.INI entries:

 

[TargetArea023]

Name=Merzifon AJU

Position=1007800.000000,810400.000000

Radius=5656.854492

ActiveYear=0

Location=1

Alignment=FRIENDLY

AirfieldDataFile=AIRFIELD_MerzifonAJU.ini

NumSquadrons=3

 

Target[001].Type=AirfieldMerzifon

Target[001].Offset=0,0

Target[001].Heading=0

Target[002].Type=GFD-12

Target[002].Offset=309.524,1389

.

.

Target[041].Type=Tower1

Target[041].Offset=355,-30

Target[041].Heading=270

Target[042].Type=building3

Target[042].Offset=343,-15

Target[042].Heading=90

.

.

Target[071].Type=powercart

Target[071].Offset=-165.3,-1263.2

Target[071].Heading=0

Target[072].Type=bombtrailer

Target[072].Offset=156.45,-1274.73

Target[072].Heading=0

 

 

 

This is the most fun part of the process I think. Populating the airfield and breathing some life into the place :)

The groundobjects you define here must be present in your Terrain_Types.INI file. There are many stock objects you can use. Also many ground object models were created by modders. Check the downloads section in CombatAce. Look for groundobjects, terrain projects, and airfield mods.

 

I use the awesome STT (Swambast Target Translator) tool to create the target area, but notepad also works for basic modding.

 

Take reference from your 3DS Max project and use the Debug display in-game to note down coordinates. There will be a lot of execute game, test, take notes, edit ini entries, go back test again... But don't give up, you will love it when it all starts coming together!

 

When you are done adding all your objects, you can finally align your runway:

 

TERRAIN_TARGETS.INI entry:

Target[001].Type=AirfieldMerzifon

Target[001].Offset=0,0

Target[001].Heading=50

 

This will rotate your whole target area. Becareful now your debug display offset coordinates will be different. Go back to heading=0, if necessary, it's much less painful to work that way..

 

Good luck and post any questions on CA forums or PM me.

 

 

Thanks to Swambast, Wrench, Gepard, Polak, JSFAggie, Amokfloo, Ravenclaw, Dave, comrpnt and many others for creating the tools, info and environment to have this much fun.

Cheers!

-Pureblue

Edited by pureblue
  • Like 1

Share this post


Link to post
Share on other sites

One of the way to 'cheat the system', when physically placing the airfield on the terrain, is to REPLACE an existing airfield. Using it's exact coordinates, as defined the terrain's targets ini. The removes the necessity of having to go back into the Terrain Editor and either retile the new region for a "airfield cleared zone" and/or flatten the region for this new airfield.

 

However....if you're adding it to a new positon, where there wasn't one before, one must take into consideration the placement of TOD items (trees, small buildings, etc.) that are NOT added via targets ini placements. Unfortunately, new areas will probably require that zone to be retiled to use the various "airfield" tiles (since I forget what they're exactly called)

 

BUT...

There is yet another cheat!

The main caveats to this one are:

a) is the 'clear of obstacles? (the TOD items)

b) is there enough room for the runway?

c) knowledge on use of the Terrain Editor (this is assumed, no matter how incorrect that assumption is!)

 

On the Desert terrain, this is moot, as there's LOTs of empty spaces. For Germany, Vietnam, and to a lesser extent, Isreal, one has to be carefull in placement.

 

This cheat comes directly from the Grand Engineer Himself, TK. (and was used on the Suez War expansion pak by your's truely to add the RAF bases on Cyprus). This one gets your base in place without having to rebuild, or add to, a 335 item long city list. You create a new one, with ONLY the single entry.

 

What's required (we'll assume usage of GermanyCE):

 

The Terrain Editor for that Terrain, fully prepped (tiles, texture list, TFD & HFD, data ini, etc) Just as outlined elsewhere.

What you DON'T require is actual citylist for that terrain, as you're only adding the one base, and not touching anything else!!!. If you have the CitiesWoE.ini, rename it so it won't be seen.

 

Now, here's where it gets fun....

To save time and effort, you can copy/paste the listing of an existing airbase out of the CitiesWoE.ini onto a blank notepad sheet. "Save As..." CitiesWoE.ini.

Then, edit the name and positions of the new airfield, like below (name and coordinates are for examples only):

 

[City001]

Name=Monty's Flying Field

TextureType=5

Randomness=40

PositionX=123.000

PositionY=456.000

Width=6

Height=6

HasAirfield=FALSE

 

Save and close.

 

Then, start up the TE, load the terrain as usual. I usually scroll the map to the coordinates of the base, and zoom in to max (3200). 'Open Ciy List'. You'll see "Monty's Flying Field". Click OK, and then "Flatten Airfield".

"Save All", this will generate the new HFD with the newly flattend airbase. It will also generate a new TFD; even if you haven't changed any tiles. Use them both, and be safe! :grin:

 

Then, copy/paste the new TFD & HFD into the /GermanyCE terrain folder (*for 1stGens, in the usual place, for SF2 series, you'll have to create a /GermanyCE sub-folder in you mods folders /Terrains main folder)

 

Now, if you've already added the base, you should be ready to fly from it! If needing populating, you can use Swambasts STT (if you have it), or the test mission as described here:

 

http://combatace.com/topic/44621-adding-objects-to-your-target-areas/

 

And that, as they say, is that!

wrench

kevin stein

  • Like 1

Share this post


Link to post
Share on other sites

Guys, This tutorial is really very useful to me.

Thank you very much. good.gif

Share this post


Link to post
Share on other sites

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..