Wartbed:Files/Formats

From Dark Omen Wiki

(Difference between revisions)
Jump to: navigation, search
(Types of File Formats: +Archives)
(WARTBED Script)
Line 10: Line 10:
Human-readable text-based mark-up language for data definitions. Script v2 is a flexible language parser that can use arbitrarily defined symbols for scoping and operators, but the WARTBED Script syntax is loosely based on C/C++ syntax. The WARTBED Script can be said to fulfil the same function as XML, but is infinitely more readable and easy to maintain.  
Human-readable text-based mark-up language for data definitions. Script v2 is a flexible language parser that can use arbitrarily defined symbols for scoping and operators, but the WARTBED Script syntax is loosely based on C/C++ syntax. The WARTBED Script can be said to fulfil the same function as XML, but is infinitely more readable and easy to maintain.  
-
:''NOTE that WARTBED currently uses Script v2, but most examples in this article still are written in the style of v1. In the first version, name and value in pairs where separated by colon, while in v2 C-style assignment operators are used.''
+
:''See [[Wartbed:Files/Formats/Script|The WARTBED Script Format]]
-
 
+
-
===Syntax===
+
-
WARTBED Script
+
-
* represents data as couples of names and values separated by an operator
+
-
* supports data values of types integers, doubles, strings and booleans.
+
-
* uses curly brackets ("{" and "}") for scopes
+
-
* uses C's assignment operators (=, +=, -=, *= and /=) to separate name and value of data
+
-
* supports white space in names and data without citation marks. If leading or trailing white space is required, to be retained or operators must be included in name or value, citation marks must be used
+
-
* reads EOL as end of the current declaration. Multiple declaration on the same line must be separated with semi-colon.
+
-
* uses // and /* ... */ for single-line and block comments.
+
-
* when parsing values as booleans accepts the words "true", "yes" and "on" for true, and "false", "no" and "off" for false.
+
-
 
+
-
===Example===
+
-
<div style="font-family: lucida console, monospace; white-space: pre; border: 1px black dashed; margin: 1em; padding: 1em;"><nowiki>first = Hello, file!
+
-
second = "  Hello, whitespace!      "
+
-
 
+
-
outer block
+
-
{
+
-
    1st value = 10
+
-
    2nd value = 3.1415
+
-
 
+
-
    inner block { name 1 = "WARTBED"; name 2 = "Script" }
+
-
}</nowiki></div>
+
=File Formats=
=File Formats=

Revision as of 21:55, 15 November 2009

Description of WARTBED file formats.

Contents

Types of File Formats

Archives and Virtual File Systems

Many WARTBED data files are in fact .zip archives. Some contain several files, like .model files, and sometimes entire file systems of directories and files, like the .module files.

WARTBED Script

Human-readable text-based mark-up language for data definitions. Script v2 is a flexible language parser that can use arbitrarily defined symbols for scoping and operators, but the WARTBED Script syntax is loosely based on C/C++ syntax. The WARTBED Script can be said to fulfil the same function as XML, but is infinitely more readable and easy to maintain.

See The WARTBED Script Format

File Formats

Configuration

See application.config

3D Geometry ("Models")

3D geometry (a "model") is represented as a set of files contained inside a .ZIP archive with .model extension. Archive containing the following file types and extensions (can contain any number of all file types except meshes.desc).

Sprites

A spritesheet it a texture where every frame of a sprite is laid out. A sprite may have several spritesheets. Notice that if frames are cropped to minimal rectangles their in-game size will vary. Size frames to reflect their in-game size.

spritename.sprite
sprite.desc text (1)
spritesheet.bmp/jpg/png bitmap (2)

Map

mapname.map
map.desc (1)

placeholder line

placeholder line

Formats related to unit attributes

Main article: Units, Regiments and Armies
See Unit Attributes
  • Unit definition format
  • Regiment file format
  • Army file format

Modules and Campaigns

Modules are top-level files. Principally considered self-sufficient and contains a complete and specific game (though it may use data of other modules, which voids its self-sufficiency). Must contain at least one campaign or individually playable mission.

The .module format


Campaigns are sequences of cutscenes and missions, the order of which are determined by simple scripting.

The .campaign format

Mission

A mission is composed of a map, engagement parameters (zones and rules), armies and victory conditions.

Cutscene

A cutscene can be interactive or non-interactive. It can follow simple scripting.

Other

background : bitmap name; //background for module main menu 
music: music name; //bgm for module main menu
icon : bitmap name; //"icon" for module in WARTBED main menu
etc...
Personal tools
communication