AgnTools: Difference between revisions

From FSDeveloper Wiki
Jump to navigationJump to search
Line 45: Line 45:
== TXT format ==
== TXT format ==


This section describes the format used in the text files that are processed by agn2txt and txt2agn. If you want to make changes to the TXT file, make sure to follow the syntax described here.
This section describes the format used in the text files that are processed by agn2txt and txt2agn. If you want to make changes to the TXT file, make sure to follow the syntax described here. The format matches the binary AGN format relatively closely, so the [[AGN_%28FSX%29|AGN format description]] might provide further reference information.


Each line starts with the name of the type of autogen object. Below all possible types are described, including the additional parameters they might have.
Each line starts with the name of the type of autogen object. Below all possible types are described, including the additional parameters they might have.

Revision as of 06:00, 30 October 2011

AgnTools is the combined name for two autogen related tools: agn2txt and txt2agn. The first is a decompiler to turn FSX AGN files into a readable TXT file. The second is the compiler to do the reverse step. This allows developers to make small changes to their AGN, without using the Annotator tool from the SDK.

Getting AgnTools

Prerequisites

Microsoft .NET Framework version 2.0

Installation

At this moment AgnTools is still under development, but a beta version is already available. Please be aware that this version might have bug left. You can download the latest development release here.

The development release also contains other tools that I made, like ModelConverterX. Just unzip all of these tools to a folder of your choice. That's all the installation.

Usage

Both tools are command line applications, which means that you get best results if you run them from the command prompt.

agn2txt

agn2txt decompiles a AGN file into a readable text file. The tool takes one argument, the AGN filename to decompile. For example:

 agn2txt 003110300100212an.agn

It will then write the readable text to the screen. If you want to capture the output to a TXT file you can redirect the output to such a file. For example:

 agn2txt 003110300100212an.agn > 003110300100212an.txt

txt2agn

txt2agn compiles a TXT file back into an AGN file. The tool takes two arguments, the TXT file you want to compile and the folder in which the AGN file should be created. For example:

 txt2agn 003110300100212an.txt myscenery\texture

TXT format

This section describes the format used in the text files that are processed by agn2txt and txt2agn. If you want to make changes to the TXT file, make sure to follow the syntax described here. The format matches the binary AGN format relatively closely, so the AGN format description might provide further reference information.

Each line starts with the name of the type of autogen object. Below all possible types are described, including the additional parameters they might have.

AGNBuildingHeight

The distribution of the building hieghts for generic autogen buidlings. This command has four parameters:

  • Percentage of objects with 1-2 floors (range 0.0-1.0)
  • Percentage of objects with 3-5 floors (range 0.0-1.0)
  • Percentage of objects with 6-8 floors (range 0.0-1.0)
  • Percentage of objects with 9-12 floors (range 0.0-1.0)

AGNGenericBuilding

Defines an autogen generic building. This command has 7 parameters:

  • GUID of the roof
  • Position X
  • Position Y
  • Direction X
  • Direction Y
  • Offset X
  • Offset Y

Support

If you have any problems while using the program or if you have suggestions and other feedback to improve the tool, please let me know. You can either contact me directly or visit the Autogen subforum at FSDeveloper.com.

User license

(c) 2011 SceneryDesign.org / Arno Gerretsen

This software program is distributed without charge to other addon developers. Redistribution of the original ZIP file is allowed. You are NOT allowed to sell this software program or ask money for its distribution. Special effects created with this software program can be used in commercial scenery projects if you wish.

The copyright and any intellectual property relating to this program remain the property of the author.

The software distributed in this way may represent work in progress, and bears no warranty, either expressed or implied.