Difference between revisions of "Cockpit Reference"

From Armagetron
(Created with a skeleton and the first section)
 
m (Added subsection skeleton for common attributes.)
Line 29: Line 29:
  
 
==Common Attributes==
 
==Common Attributes==
 +
 +
===camera===
 +
 +
===viewport===
 +
 +
===toggleSticky, toggleDefault===
 +
 +
===usetemplate===
  
 
==Common Tags==
 
==Common Tags==
Line 53: Line 61:
  
 
===Camview===
 
===Camview===
 
==Templates==
 
  
 
==Related settings==
 
==Related settings==

Revision as of 23:02, 16 January 2013



Cockpit files can be used to customize the game's HUD in the current development builds and in the upcoming version 0.4.0.


This page describes all the cockpit-related features available in the 0.4-cockpit branch. It has not been merged into 0.4 yet. The current features are explained on the Cockpit Tutorial page.

The boilerplate

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE Resource SYSTEM "cockpit.dtd">

<Resource type="aacockpit" name="cockpit name" version="a version" author="your name" category="a category">
    <Cockpit version="0.0.1">
        Widgets go here
    </Cockpit>
</Resource>

The attributes of the <Resource> tag form the path your cockpit will have to be placed at:

author/category/name-version.aacockpit.xml

If category is omitted or empty, the resource will be straight under the author directory. It can contain forward slashes, in which case the file will be several directories deep. See also Testing Resources.

A few rules and recommendations:

  • Don't use spaces/
  • Don't use dashes(-) in the name.
  • Use numbers or dotted numbers for your version. For example, you could use 1, 1.5 or 0.4.3. Make the version number increase as you publish updates and be consistent with the number of dots in it.
  • Be consistent with your author name.

Inside the <Cockpit> tag is where the widgets go. A widget is an element on the HUD. Do not change the version on that tag. It may be used to introduce backward-compatibility changes in the future.

Common Attributes

camera

viewport

toggleSticky, toggleDefault

usetemplate

Common Tags

Position and Size

Background, Foreground and LineColor

Caption

DataSet

Widgets

Rectangle

BarGauge and VerticalBarGauge

NeedleGauge

Label

Map

Camview

Related settings