Version 1 (modified by historic_bruno, 12 years ago) ( diff )

Initial draft

(Note: under construction!)

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). The exact structure can vary from one mod to another, but the standard is based on the public mod included with the game. This is an overview of that layout. Note: file and directory names are case sensitive.

art

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

actors

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.

animation

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

TODO

meshes

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 skeletal/skinned/dynamic/animated.

particles

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.

skeletons

Currently just skeletons.xml, used for skeletal models to share models and animations from different 3D editing software.

textures

The 2D images that give color and transparency to the underlying shapes are called "textures". Typically stored as either PNG or DDS files. Includes model textures, terrains, backgrounds, portraits, icons, cursors and buttons.

audio

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).

civs

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

fonts

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

gui

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.

maps

Maps define the layout of the world as the player sees it.

random

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

scenarios

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.

shaders

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.

simulation

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.

ai

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

components

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.

data

A few XML and JSON files for shared data between multiple components, UI, and/or Atlas scenario editor.

helper

Some helper scripts for the components.

templates

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.

gaia

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

other/special

Defines special entities not creatable in-game.

structures

Structures aka buildings.

units

Units are moving entities which the player can control.

Note: See TracWiki for help on using the wiki.