Wartbed:Files/Formats

From Dark Omen Wiki

< Wartbed:Files(Difference between revisions)
Jump to: navigation, search
(Geometry)
(File Formats)
 
(30 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.  
-
<div style="border:1px solid gray; background:rgb(215,225,215);">
+
==WARTBED Script==
-
<div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''modelname''.'''model'''</div>
+
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.  
-
<div style="padding:1em; ">
+
-
<tt>
+
-
{| style="font-family:courier;color:rgb(0,32,0);background:rgb(215,225,215);align:left;" |
+
-
|style="padding-right:8em;"|'''meshes.desc''' ||text || (1)
+
-
|-
+
-
|''filename''.vertices ||text || (2)
+
-
|-
+
-
|''filename''.indices ||text || (3)
+
-
|-
+
-
|''filename''.bmp/jpg/png ||bitmap
+
-
|-
+
-
|''filename''.skeleton ||???
+
-
|-
+
-
|''filename''.animation ||???
+
-
|-
+
-
|}
+
-
</tt></div></div>
+
-
<br>
+
-
===Model description===
+
:''See [[Wartbed:Files/Formats/Script|The WARTBED Script Format]]
-
<div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);">
+
-
<div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">1: '''meshes.desc'''</div>
+
-
<div style="padding:1em; color:rgb(0,32,0);"><tt>''Mesh_name''<br>
+
-
{<br>
+
-
&nbsp;&nbsp;&nbsp;&nbsp;vertices : filename.vertices;<br>
+
-
&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===
+
=File Formats=
-
Space, tab, '[', ']' and ',' are all valid separators and can be exchanged for reabability. Separators should be able to follow each other (cross your fingers).
+
<div style="margin-left: 2em;">
 +
==Configuration==
 +
:''See [[Wartbed:Files/Formats/Application Settings|application.config]]''
-
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.
+
==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).
-
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.
+
* 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>
-
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).
+
** <tt>[[Wartbed:Files/Formats/3D#Vertices|.vertices]]</tt>
-
 
+
** <tt>[[Wartbed:Files/Formats/3D#Indices|.indices]]</tt>
-
<div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);">
+
** <tt>.skeleton</tt>
-
<div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">2: ''filename''.'''vertices'''</div>
+
** <tt>.animation</tt>
-
<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===
+
-
As for vertices. space, tab, '[', ']' and ',' are all valid separators and can be exchanged for readability, and separators should be able to follow each other.
+
-
 
+
-
Each ''faces'' block is created in a new index buffer, depending on parsing parameters.
+
-
 
+
-
<div style="margin-left:2em;border:1px solid gray; background:rgb(215,225,215);">
+
-
<div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">3: ''filename''.'''indices'''</div>
+
-
<div style="padding:1em; color:rgb(0,32,0);">
+
-
<tt>textures<br>
+
-
{<br>
+
-
&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==
==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);">
-
<div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''spritename''.'''sprite'''</div>
+
<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; color:rgb(0,32,0);"><tt>'''frames.desc''' (1)<br>
+
<div style="padding:1em; ">
-
spritesheet.bmp|jpg|png<br></tt></div>
+
{| style="font-family:courier;color:rgb(0,32,0);background:rgb(215,225,215);align:left;" |
 +
|style="padding-right:8em;"|'''sprite.desc''' ||text ||(1)
 +
|-
 +
|''spritesheet''.bmp/jpg/png ||bitmap ||(2)
 +
|-
 +
|}
 +
</div>
</div>
</div>
==Map==
==Map==
<div style="border:1px solid gray; background:rgb(215,225,215);%">
<div style="border:1px solid gray; background:rgb(215,225,215);%">
-
<div style="padding:0.5em;background:grey;color:rgb(225,225,225);width:25%;">''mapname''.'''map'''</div>
+
<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>'''map.desc''' (1)<br>
<div style="padding:1em; color:rgb(0,32,0);"><tt>'''map.desc''' (1)<br>
placeholder line<br>
placeholder line<br>
Line 118: Line 51:
</div>
</div>
-
==Army==
+
==Formats related to unit attributes==
-
placeholder line
+
:''Main article: [[Wartbed:Files/Formats/Units, Regiments and Armies|Units, Regiments and Armies]]''
 +
:''See [[Wartbed:Unit attributes|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.
 +
:[[Wartbed:Files/Formats/Modules_and_Campaigns#The_.module_file|The '''<tt>.module</tt>''' format]]
 +
 
 +
 
 +
Campaigns are sequences of cutscenes and missions, the order of which are determined by simple scripting.
 +
:[[Wartbed:Files/Formats/Modules_and_Campaigns#The_.campaign_file|The '''<tt>.campaign</tt>''' format]]
==Mission==
==Mission==
-
placeholder line
+
A mission is composed of a map, engagement parameters (zones and rules), armies and victory conditions.
-
[[category:WARTBED]]
+
==Cutscene==
 +
A cutscene can be interactive or non-interactive. It can follow simple scripting.
 +
 
 +
==Other==
 +
<pre>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...</pre>
 +
</div>
 +
 
 +
[[category:File Formats]]

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