AGN (FS2002/FS2004)

From FSDeveloper Wiki
Jump to: navigation, search


This document describes the FS2002 and FS2004 format for autogen (AGN) files. Each file ends with 24 bytes of zero padding.

Header

int32 percentage buildings with 1-2 floors (range 0 - 20)
int32 percentage buildings with 3-5 floors (range 0 - 20)
int32 percentage buildings with 6-8 floors (range 0 - 20)
int32 percentage buildings with 9-12 floors (range 0 - 20)

int32 number of houses
int32 number of vegetation areas
float vegetation area

int32 building texture length
string building texture with extension (if building texture length > 0)

int32 vegetation class 1
int32 vegetation class 2
int32 percentage vegetation class 1 (range 0 - 100)
int32 maximum vegetation density (range 0 - 100)
float vegetation class 1 minimum height
float vegetation class 1 maximum height
float vegetation class 2 minimum height
float vegetation class 2 maximum height

Vegetation class

The following vegetation classes are available:

  1. Deciduous
  2. Coniferous1
  3. Coniferous2
  4. Shrub wet
  5. Shrub dry
  6. Palm trees

Buildings

For each building the following data is specified:

float x position of first point
float y position of first point
float x direction to second point
float y direction to second point
float x offset to third point
float y offset to third point

The x and y coordinates are given as offset from the middle of the LOD13 square (range -0.5 till 0.5).

Vegetation

For each vegetation rectange the following data is specified:

float x position of first point
float y position of first point
float x offset to third point
float y offset to third point

The x and y coordinates are given as offset from the middle of the LOD13 square (range -0.5 till 0.5).

FS2004 only

The following sections of the AGN file are for FS2004 only. They are only read if the FS2004 header has a value greater than zero.

int32 FS2004 header

Row houses

int32 row house texture length
string row house texture with extension (if row house texture length > 0)
int32 number of row houses

For each row house the following information is specified:

float x position of first point
float y position of first point
float x direction to second point
float y direction to second point
float x offset to third point
float y offset to third point

The x and y coordinates are given as offset from the middle of the LOD13 square (range -0.5 till 0.5).

Library objects

int32 number of library object guids

For each GUID the following information is specified:

guid GUID (16 bytes long)
int32 number of objects

For each object the following information is specified:

float x position of first point
float y position of first point
float x direction to second point
float y direction to second point
float x offset to third point
float y offset to third point

The x and y coordinates are given as offset from the middle of the LOD13 square (range -0.5 till 0.5).