Wartbed:Files/Formats

From Dark Omen Wiki

< Wartbed:Files(Difference between revisions)
Jump to: navigation, search
(Geometry)
(File Formats)
 
(34 intermediate revisions not shown)
Line 1: Line 1:
-
Description of WARTBED file formats
+
[[category:WARTBED]]
 +
Description of WARTBED file formats.
-
==Geometry==
+
=Types of File Formats=
-
.ZIP archive with .model extension. Archive containing the following file types and extensions (can conatin any number of all file types except meshes.desc).
+
<div style="margin-left: 2em;">
 +
==Archives and Virtual File Systems==
 +
Many WARTBED data files are in fact .zip archives. Some contain several files, like <tt>.model</tt> files, and sometimes entire file systems of directories and files, like the <tt>.module</tt> 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 [[Wartbed:Files/Formats/Script|The WARTBED Script Format]]
 +
</div>
 +
 
 +
=File Formats=
 +
<div style="margin-left: 2em;">
 +
==Configuration==
 +
:''See [[Wartbed:Files/Formats/Application Settings|application.config]]''
 +
 
 +
==3D Geometry ("Models")==
 +
3D geometry (a "model") is represented as a set of files contained inside a .ZIP archive with <tt>.model</tt> extension. Archive containing the following file types and extensions (can contain any number of all file types except meshes.desc).
 +
 
 +
* 3D Models <tt>'''[[Wartbed:Files/Formats/3D|.model]]'''</tt> format (an archive of the following files)
 +
** <tt>[[Wartbed:Files/Formats/3D# Model description|model.desc]]</tt>
 +
** <tt>[[Wartbed:Files/Formats/3D#Vertices|.vertices]]</tt>
 +
** <tt>[[Wartbed:Files/Formats/3D#Indices|.indices]]</tt>
 +
** <tt>.skeleton</tt>
 +
** <tt>.animation</tt>
 +
 
 +
==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.
<div style="border:1px solid gray; background:rgb(215,225,215);">
<div style="border:1px solid gray; background:rgb(215,225,215);">
-
<u style="padding:0.5em;">''modelname''.'''model'''</u><br>
+
<div style="float:right;text-align:right;padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''spritename''.'''sprite'''</div>
<div style="padding:1em; ">
<div style="padding:1em; ">
-
<tt>
 
{| style="font-family:courier;color:rgb(0,32,0);background:rgb(215,225,215);align:left;" |
{| style="font-family:courier;color:rgb(0,32,0);background:rgb(215,225,215);align:left;" |
-
|style="padding-right:8em;"|'''meshes.desc''' || text
+
|style="padding-right:8em;"|'''sprite.desc''' ||text ||(1)
|-
|-
-
|''filename''.vertices || text
+
|''spritesheet''.bmp/jpg/png ||bitmap ||(2)
-
|-
+
-
|''filename''.indices || text
+
-
|-
+
-
|''filename''.bmp/jpg/png || bitmap
+
-
|-
+
-
|''filename''.skeleton || ???
+
-
|-
+
-
|''filename''.animation || ???
+
|-
|-
|}
|}
-
</tt></div></div>
+
</div>
-
<br>
+
</div>
-
===Model description===
+
==Map==
-
<div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);">
+
<div style="border:1px solid gray; background:rgb(215,225,215);%">
-
<u style="padding:0.5em;">'''1: meshes.desc'''</u><br>
+
<div style="float:right;text-align:right;padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''mapname''.'''map'''</div>
-
<div style="padding:1em; color:rgb(0,32,0);"><tt>''Mesh_name''<br>
+
<div style="padding:1em; color:rgb(0,32,0);"><tt>'''map.desc''' (1)<br>
-
{<br>
+
placeholder line<br>
-
&nbsp;&nbsp;&nbsp;&nbsp;vertices : filename.vertices;<br>
+
placeholder line<br></tt></div>
-
&nbsp;&nbsp;&nbsp;&nbsp;indices : filename.vertices;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;offset : [x,y,z];<br>
+
-
}<br><br>
+
-
''Mesh_2_name''<br>
+
-
{<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;...<br>
+
-
}<br></tt></div>
+
</div>
</div>
-
<br>
 
-
===Vertices===
+
==Formats related to unit attributes==
-
Space, tab, '[', ']' and ',' are all valid separators and can be exchanged for reabability. Separators should be able to follow each other (cross your fingers).
+
:''Main article: [[Wartbed:Files/Formats/Units, Regiments and Armies|Units, Regiments and Armies]]''
 +
:''See [[Wartbed:Unit attributes|Unit Attributes]]''
-
The first block is identified by the keyword "'''definition'''" (of rather, any character sequence starting with "def") and details the components are their order in a vertex. Valid tokens are "xy" for a two-float dataype, "xyz" for a three-float , "xyzw" for a four-float; and "argb", "bgra" and "rgba" for four-byte colours.
+
* Unit definition format
 +
* Regiment file format
 +
* Army file format
-
Valid field names are "position", "normal", "diffuse", "specular", "emissive" and "texture coordinate". There can be multiple fields of the same type in a vertex, however, it is not yet defined how WARTBED handles this.  
+
==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.
 +
:[[Wartbed:Files/Formats/Modules_and_Campaigns#The_.module_file|The '''<tt>.module</tt>''' format]]
-
The second block is identified as "'''vertices'''" (or "vtx"). Every vertex is numbered (though item identifiers are actually ignored when parsing). Multiple vertex blocks are appended into one consecutive vertex buffer (regardless of vertex numbering).
 
-
<div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);">
+
Campaigns are sequences of cutscenes and missions, the order of which are determined by simple scripting.
-
<u style="padding:0.5em;">'''2: filename.vertices'''</u><br>
+
:[[Wartbed:Files/Formats/Modules_and_Campaigns#The_.campaign_file|The '''<tt>.campaign</tt>''' format]]
-
<div style="padding:1em; color:rgb(0,32,0);"><tt>definition<br>
+
-
{<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;xyz : position;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;xyz : normal;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;argb : diffuse;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;argb : specular;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;argb : emissive;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;xy : texture coordinates;<br>
+
-
}<br>
+
-
<br>
+
-
vertices<br>
+
-
{<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;0 : [1,2,3] [0,1,0] 0xFFFFFFFF, 0xF0F0F0F0, 0x10101010 [0,0];<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;1 : [4,5,6] [1,0,0] 0xFFFFFFFF, 0xF0F0F0F0, 0x10101010 [1,1];<br>
+
-
}<br></tt></div>
+
-
</div>
+
-
<br>
+
-
===Indices===
+
==Mission==
-
As for vertices. space, tab, '[', ']' and ',' are all valid separators and can be exchanged for reabability, and separators should be able to follow each other.  
+
A mission is composed of a map, engagement parameters (zones and rules), armies and victory conditions.
-
Each ''faces'' block is created in a new index buffer, depending on parsing parameters.  
+
==Cutscene==
 +
A cutscene can be interactive or non-interactive. It can follow simple scripting.  
-
<div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);">
+
==Other==
-
<u style="padding:0.5em;">'''3: filename.indices'''</u><br>
+
<pre>background : bitmap name; //background for module main menu
-
<div style="padding:1em; color:rgb(0,32,0);">
+
music: music name; //bgm for module main menu
-
<tt>textures<br>
+
icon : bitmap name; //"icon" for module in WARTBED main menu
-
{<br>
+
etc...</pre>
-
&nbsp;&nbsp;&nbsp;&nbsp;0 : texture1.png;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;1 : texture2.jpg;<br>
+
-
}<br>
+
-
<br>
+
-
definition<br>
+
-
{<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;123 : indices;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;xyz : normal;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;id : texture;<br>
+
-
}<br>
+
-
<br>
+
-
faces<br>
+
-
{<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;0 : 1,2,3 [0,1,0] 0;<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;1 : 2,3,5 [0,0,1] 1;<br>
+
-
}<br>
+
-
<br>
+
-
faces      //requesting creation in new index buffer<br>
+
-
{<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;...<br>
+
-
}</tt></div></div>
+
-
 
+
-
==Sprites==
+
-
 
+
-
<div style="border:1px solid gray; background:rgb(16,16,48);width:50%">
+
-
<u style="padding:0.5em;">'''spritename.sprite'''</u><br>
+
-
<div style="padding:1em; color:rgb(200,255,200);"><tt>'''frames.desc''' (1)<br>
+
-
spritesheet.bmp|jpg|png<br></tt></div>
+
</div>
</div>
-
==Map==
+
[[category:File Formats]]
-
<div style="border:1px solid gray; background:rgb(16,16,48);width:50%">
+
-
<u style="padding:0.5em;">'''mapname.map'''</u><br>
+
-
<div style="padding:1em; color:rgb(200,255,200);"><tt>'''map.desc''' (1)<br>
+
-
placeholder line<br>
+
-
placeholder line<br></tt></div>
+
-
</div>
+
-
 
+
-
==Army==
+
-
placeholder line
+
-
 
+
-
==Mission==
+
-
placeholder line
+
-
 
+
-
[[category:WARTBED]]
+

Current revision as of 21:57, 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