octgn
[[game_definition__o8g_]]
Last edit on Dec 6, 2010 10:47 PM by octgndev

Games are defined by o8g files. Those are Open Packaging Conventions containers.

Package contents

The package relationships must link to the XML game description. The type of this relationship must be http://schemas.octgn.org/game/definition
The XML definition has relationships to various game media, e.g. card backs, icons, ...

Content Types

A typical OPC [Content_Types.xml] for an OCTGN game definition looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
  <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" />
  <Default Extension="png" ContentType="image/png" />
  <Default Extension="jpg" ContentType="image/jpeg" />
  <Default Extension="wdp" ContentType="image/vnd.ms-photo" />
  <Default Extension="xml" ContentType="text/xml" />
  <Default Extension="o8d" ContentType="octgn/deck" />
  <Default Extension="py" ContentType="text/x-python" />
</Types>

Files and Folders

The o8g files must contain the following files and folders. When creating the archive it is important to select the files directly and not the folder they are located in. File names (and presumably folder names too) may not contain spaces


+ [Content_Types].xml
+ .xml (XML game description)
+ _rels
. + .rels
. + .xml.rels


Further folders to structure the contents are possible but not required. Often module creators define additional folders like "groups", "counters" and "cards" to hold the respective images. The contents of a "Blue Moon" game module might look like this:


+ [Content_Types].xml
+ bluemoon.xml
+ _rels
| + .rels
| + bluemoon.xml.rels
|
+ cards
| + back.png
|
+ counters
| + crystal.png
| + reddragon.png
| + greendragon.png
| + bluedragon.png
|
+ groups
| + hand.png
| + draw.png
| + discard.png
|
+ scripts
. + actions.py