FRDL

From AEWiki
Jump to: navigation, search

FRDL is an XML schema for specifying the various client roles in a FireEngine game and the resources and game-state variables they use. Each FireEngine game must contain exactly one FRDL file, in a particular location (see "Location" below).

Contents

Name

FRDL is an acronym standing for FireEngine Resource Description Language. It's basically pronounced the same way as "fertile," if you glottalize your t's.

Location

The FRDL file for a game is called "game.frdl". It lives in the root of a game's "resources" tree (or a FEZ archive).

File Contents

Game Element

<game name="Fire on High">
  ...
</game>

The "game" element is the root of a FRDL document. All other FRDL nodes live inside the game node.

The "game" element optionally contains a "name" attribute. This specifies the title of the game.

Role Element

<role name="Viewscreen">
  <state name="OpeningCredits" start="true">
    ...
  </state>
  <use-state name="Lockdown"/>
  ...
</role>

The "role" element specifies a node role on the FRAP network. Theoretically, only one node at a time should be identifying as a particular role.

The "role" element can contain "state" elements, or can reference globally-defined states with the "use-state" element. Of the set of a role's "state" and "use-state" elements, one, and only one, must have the "start" attribute specified as "true". This will make it the starting state of the node that fulfills that role.

State Element

<state name="CrashState">
  <resource file="alliancelogo.3ds"/>
  <resource file="zrnic.ttf"/>
  ...
</state>

The "state" element specifies a state a node can be in. States may occur inside "role" elements, and if they do, they are private to that role. Otherwise, they can be referenced by any role using the "use-state" element.

A "state" element can contain one or more "resource" elements. Each "resource" element must have a "file" attribute containing the filename of a resource that will be loaded by the client for that state.

Event Element

<event id="message_all">
  <arg name="Message" type="s"/>
</event>

The "event" element specifies a shared event that can be triggered over the FRAP network. Each event must have an "id" attribute, which specifies a unique SharedObject ID for that event.

Events are global, so they must occur as a direct child of the "game" element.

Internally, these events use solidfuel.Logic.Event objects for their implementation. SolidFuel events can be triggered using any positional or keyword arguments; however, FireEngine imposes additional restrictions on the arguments that can be used to trigger events. The argument list must be specified in the "event" element using "arg" elements. Arguments will be passed to the event positionally, in the order they are specified. For now, only one argument type is supported: "s" for string.

Hosted Shared Objects

Aside from events, all SharedObjects on the FRAP network must be hosted by a particular node. Therefore, each of the following SharedObject specifiers must occur inside of a "role" element.

Number Element

<number id="shield_level" value="1.0"/>

The "number" element specifies a shared number field. Its initial value is specified using the "value" attribute.

Enum Element

<enum id="alert_level" value="normal">
  <code name="normal"/>
  <code name="yellow"/>
  <code name="red"/>
</enum>

The "enum" element specifies a shared enumeration field. Its initial value is specified using the "value" attribute, and possible values for the field are specified with "code" elements inside the "enum" element.

Bool Element

<bool id="shields_up" value="false"/>

The "bool" element specifies a shared boolean value field. Internally, this is actually just a special case of "enum" with the possible values "true" and "false".

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox