Knowledgebase Article 33

syntax of .ASCTXT files

Many of the data ASC uses is stored in .ASCTXT files. These are simple text files which you edit with any decent text editor. Since some of the existing files may have unix line ending convention, the standard Windows editor Notepad is not a good choice (you can try it, but if you see garbage you know what's wrong...). UltraEdit is a nice editor, but it is shareware.

Related links:

All ASCTXT have the following syntax:

TypeName {
} TypeName

Typename is for example VehicleType, BuildingType, ObjectType or others.

In the TypeName block can be assignments and comments:

VehicleType {
   name = trooper
   ; this is a comment
} VechicleType

An Assignment can cover more than one line, this is useful for long texts:

VehicleType {
   description = [  This is a long description.
                    It covers several lines,
                    and ends with a square bracket ]
} VechicleType

The assignments are often grouped in blocks:

VehicleType {
   Tank { 
      Energy = 0
      Material = 0
      fuel = 1610
   } Tank
} VechicleType

You could also write:

VehicleType {
   Tank.Energy = 0
   Tank.Material = 0
   Tank.fuel = 1610
} VechicleType

which is exactly the same, but the first variant is usually easier to read.

Last change: Wed, 2003-04-02 11:41

search knowledgebase
browse knowledgebase