0 A.D. Mod Layout
Table of Contents
Most of the time, when we talk about file "paths" in 0 A.D., we mean relative to the mods directory. Examples:
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
Scripts that are shared by all script contexts (e.g. GUI, AI, simulation).
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.
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.
XML and JSON files for shared data between multiple components, UI, and/or Atlas scenario editor. Cheats, aura and technology templates are located here.
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
As of Alpha 21, the subtypes are only used to distinguish gatherrates. There must be at least one subtype per resource.
order attribute specifies in which order the resources will be shown in the GUI.
truePrice determines whether how much the resource is worth in comparison to the other resources (see also the explanation in
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.
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).
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.