Quick introduction to the NDF language

From AOW HT Wiki


In a few words...

NDF is a data description language designed by Eugen Systems to describe the data used in the game.

Its main asset is the ease it provides to describe a set of coupled data.

What does it look like ?

 
// Creation of an object named "MyObject" of class "TTruc"
MyObject is TTruc :
  ValueString = 'Hello World'
 
// Creation of an object named "YourObject"
YourObject is TTruc :
  AutreTruc    = MyObject
  ValueInteger = 322

Remark
The example above use the indented syntax, it can also be written using the parenthesis syntax, as follow.
Warning: If you don't know Python, you are probably unaware of this indented syntax. It uses the indentation (whitespace) to indicate the run of a block. More info about it here:

 
// Creation of an object named "MyObject" of class "TTruc"
MyObject is TTruc
(
  ValueString = 'Hello World'
)
 
// Creation of an object named "YourObject"
YourObject is TTruc
(
  AutreTruc    = MyObject
  ValueInteger = 322
)