Knowledgebase Article 94

Accessing ASC data with 3rd party tools

ASC has lots of data: lots of different terrain, lots or units, lots of everything.

If you want to access the data definitions with 3rd party tools, there are different ways to do so:

Parsing *.asctxt
Not recommended! Quite difficult, because the ASC system of parsing the files has organically grown over time and is not documented. Getting the inheritance and its interrelation with operators to work just like ASC is tricky

Use Weaponguide
This is an C++ application that uses the ASC functions to load the data and generates HTML pages for units and buildings. If you are familiar with C++ and are running Linux, hacking Weaponguide may be the easiest approach

Evaluating dump files
The ASC mapeditor can dump all data (see debug menu) into *.dump files. These are .asctxt files, but without any operators or inheritance. Quite easy.

Converting dump files
You can find a perl script ( scripts/dump2ini ) which converts dump files to yet another syntax, which can be parsed directly by some scripting languages (e.g. PHP) to form in-memory hashes/arrays

Last change: Sat, 2010-02-06 18:24

search knowledgebase
browse knowledgebase