0 A.D. Mod Layout

Most of the time, when we talk about file "paths" in 0 A.D., we mean relative to the mods directory. Examples: art/animation, simulation/components. These directories may match more than one real directory on the user's computer (if they're using multiple mods). This means of abstraction is called the VFS (Virtual File System).

The exact directory structure can vary from one mod to another, but the standard is based on the public and base mods included with the game. This is an overview of that layout. Note: VFS paths are case sensitive.


Contains most "visual" data for the game. See the Art Design Document for specific guidelines.


Actors are XML data files that define a visible thing in the game, it could be a warrior, a building, a wild animal, or a clump of grass. We call them actors (short for visual actors). It also defines possible variations of a single appearance, for instance different helmets or shields for a soldier. The Actor Editor tool is the easiest way to add or modify actors.


Animations are typically stored as COLLADA files, exported from a 3D modeling program. They defined what parts of a 3D model move during a game and how they move.


Materials are simple XML data files that describe how textures are rendered. See MaterialSystem for more information.


A "mesh" is the term used for a 3D model, essentially the collection of vertices and faces that define its shape and how a 2D texture is mapped onto that shape. They are also typically stored in COLLADA format. Meshes are either static or dynamic (aka animated, skeletal, skinned, rigged, boned).


Particles are dynamically created things which typically appear in clumps or bursts and may change appearance and move. They are purely a graphical effect. Examples: smoke, fire, leaves falling.


Skeleton XML definitions to share models and animations from different 3D editing software. If you add a new animated model, the odds are you'll need to add a new skeleton. If you modify the bone hierarchy of an existing model, you will need to updating the appropriate skeleton definition.


Terrain group and texture definitions (see TerrainFileFormat).


The 2D images that give color and transparency to the underlying shapes are called "textures". Typically stored as either PNG (preferred) or DDS files. Includes model textures, terrains, backgrounds, portraits, icons, cursors and buttons. See TextureFormat for technical details about textures in the game.


Sounds heard in the game, whether UI alerts or music. Stored as lossy OGG Vorbis format (often lossless source files exist but they would make the game data impractically large).


Fonts appearing in the game's GUI, created by the fontbuilder tool.


Scripts that are shared by all script contexts (e.g. GUI, AI, simulation).


The GUI comprises all the 2D menus and controls with which the user interacts. The GUIs are composed of XML data files that describe the static layout of the page and JavaScript scripts which handle input events for the GUI. The pages are more or less each separate with a few common files. See GUI_-_Scripting_Reference for more info.


A script for tweaking the game's default setup on different systems based on OS, graphics card, drivers, etc.


Internationalization and Localization files for the mod.


Maps define the layout of the world as the players see it.


Random maps are written in JavaScript. See the Random Map Generator page for details.


Scenarios each have predefined units, buildings, and terrains which attempt to fit a certain theme, often historical in nature. Scenarios are created with the Atlas scenario editor.


Scripts related to Triggers.


Skirmishes are similar to scenarios, except the players' civilizations and teams can be chosen during game setup. Skirmishes are also created in Atlas.


Shaders are special programs which get compiled and run on a supported graphics card in order to change the rendered scene. Examples: shadows, particles, water, specularity. See MaterialSystem for more information.


Most of the gameplay logic for 0 A.D. resides in this directory. It's called simulation because in fact it simulates the behavior of the game over time, deterministically and in response to player behavior.


The AIs (computer players) which can be used in the game, written in JavaScript, and the APIs they share.


The game is based on the concept of "component objects" which comprise the simulation. Many are written in JavaScript but some are part of the engine for various reasons (e.g. performance). The preference is to use scripts unless a very compelling need exists.


XML and JSON files for shared data between multiple components, UI, and/or Atlas scenario editor. Cheats, aura and technology templates are located here.


Cheat templates.


Data files defining the civilizations available in the game, in JSON format.


Data file specifying possible values for population capacity, game speeds, starting resources, etc.


JSON data files specifying resources that can be gathered, traded and so forth (food, wood, ...).
The unit- and structure templates may only contain resources that are specified here.
In order to add a resource, a new icon must be specified in gui/common/resources/.
As of Alpha 21, the subtypes are only used to distinguish gatherrates. There must be at least one subtype per resource.
The order attribute specifies in which order the resources will be shown in the GUI.
The truePrice determines whether how much the resource is worth in comparison to the other resources (see also the explanation in Barter.js).

The aiAnalysisInfluenceGroup determines whether and how the AI considers the resource for civic center and dropsite positioning:

  • ignore: The resource is not considered at all.
  • abundant: The resource is abundant but usually with a small amount each (like wood).
  • sparse: For resources which are sparse but with large amount each (as stone and metal).

JSON files for different victory conditions.


Technology templates.


Aura templates.


Some helper scripts for the components.


Templates, or entity templates, are XML data files which define "entities", things the user can interact with in the game. Most entities have a game play significance, like a soldier, female, tree, or temple. The elements used in templates reflect the component schemas. Entities typically refer to a visual actor as well, but not always. Templates have inheritance, so one entity can inherit e.g. the attack and armor stats of another but change its name and civilization. Currently entity templates have to be modified by hand.


Experimental campaign entities (currently unused).


Formation templates.


Gaia is the world, and gaia entities are not owned by any civilization. Gaia objects are natural resources available to all players.


Defines special entities not creatable in-game.


Generic rubble entities are defined here.


Skirmish entities are defined here, which relate generic skirmish templates to civ-specific templates.


Structures aka buildings.


Units are moving entities which the player can control.

Last modified 3 years ago Last modified on Jan 10, 2021, 10:48:50 AM
Note: See TracWiki for help on using the wiki.