octgn
[[patch_file_format__o8p_]]
Last edit on Jun 13, 2010 2:03 PM by Anonymous

Patch file format (o8p)

OCTGN can load .o8p files and apply them to set files (.o8s) to update them (e.g. fix pictures, rules, typos, etc.)
The main advantage of that system is that sets can be quite big and many. A patch provides a convenient way to update a set without having to download the full thing again.

Basic structure

As most other OCTGN files, .o8p are Packages.
The package itself must have the following relationships:

Sample package relationships:

" rel="nofollow" target="_blank">http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Target="/Patch.xml" Id="PatchDescription" Type="http://schemas.octgn.org/patch/description" />
<Relationship Target="/9th.xml" Id="Scc61bff16f186facbc57142ec8ad1ca0" Type="http://schemas.octgn.org/patch/set" />
<Relationship Target="/10th.xml" Id="S4ef02cc1190eb9f9d90662cd9c80f7cc" Type="http://schemas.octgn.org/patch/set" />


Patch description

This file is almost unused at the moment. It contains the target game name and GUID.




Set patch

Here's a sample set patch structure:


        minVersion="0.0" maxVersion="0.9">
<new targetUri="/Morningtide.xml" relationshipId="f01" contentType="text/xml" />
<newrel partUri="/Morningtide.xml" relationshipId="C8125fa9ad9a048bfbba7f84be34c5859" targetUri="/tokens/Spirit.jpg" relationshipType="http://schemas.octgn.org/picture" />


The setPatch attributes are:
  • name = set name;
  • id = set GUID;
  • minVersion = minimum set version that can be patched. Earlier sets are ignored.
  • maxVersion = maximum set version that can be patched. Later sets are ignored. It is strongly advised to put the last set version published before this patch, so that later patches won't be reverted by inadvertently applying an earlier patch.

The setPatch element may contain one or more of the following tags:

new: creates a new (or replaces an existing) set file.
  • targetUri = the URI of the target file to create or replace (in the target set package).
  • relationshipId = id of the relationship pointing to the new file (in this package).
  • contentType = contentType to use in the target set package, if the relationship doesn't exist yet.

newrel: creates a new (or replaces an existing) relationship in the target set file.
  • partUri = the URI of the part (in target set package), to which a relationship should be added.
  • relationshipId = the id of the new relationship.
  • targetUri = the target of the relationship (in target set package).
  • relationshipType = the type of the relationship.

This file should have its relationship set up accordingly to locate the files to copy, e.g.

" rel="nofollow" target="_blank">http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Target="/Morningtide/Morningtide.xml" Id="f01" Type="http://schemas.octgn.org/patch/newfile" />