Post by Light on Sept 13, 2016 11:49:36 GMT
I am writing a basic guide for developers interested in working on the duel masters plugin. This is a work in progress and will be updated as I get time. Please note that most of the necessary information is already available on the octgn wiki on github.
github.com/kellyelton/OCTGN/wiki/
Duel Masters Game definition:
It is important to understand the structure of the game files used by octgn. It is very easy to modify the game functionality by modifying some of the xml and/or python files in the definition and rebuilding the package.
O8build.exe tool and .nupkg format:
Octgn game files exist in folder format by default, but need to be converted to .nupkg for distribution. The OCTGN installation comes with a standard tool "O8build.exe" which takes the raw game files as input and converts them to an octgn-compatible format. The resulting nupkg file can be then uploaded to the game feed (only accessible by the developer/me) and the game definition will be updated on octgn.
Files in nupkg format can also be installed locally by placing them inside the "localfeed" folder in your octgn installation. This is necessary for testing.
Understanding game folder structure:
1. Go to github.com/naveed92/dm-ocg-octgn
2. Click "Clone or Download"/"Download Zip"
3. Download and extract the file.
4. Enter "game" subfolder
You should see the following files:
This is the "root" folder of the game definition. All octgn-based games follow the same convention for files and folders, with more or less folders based on which features are used. Game files structured in this format can be passed to the o8build tool directly.
The only file that can exist in root is "definition.xml". This is the most important file which holds the basic information about the game as well as card database structure and locations of all the additional files to be used.
The "Sets" folder is the next most important component. This holds the entire card database grouped into subfolders based on individual sets. The format of the sets.xml files should be compatible with the scheme defined in definition.xml
The "definition.xml" file and the "Sets" folder are the minimum requirements to define any game. The remaining folders are optional and define additional functionality (scripts, images, documents etc). All the files used till this point are defined in XML.
Reference: github.com/kellyelton/OCTGN/wiki/Game-Definition
github.com/kellyelton/OCTGN/wiki/
Duel Masters Game definition:
It is important to understand the structure of the game files used by octgn. It is very easy to modify the game functionality by modifying some of the xml and/or python files in the definition and rebuilding the package.
O8build.exe tool and .nupkg format:
Octgn game files exist in folder format by default, but need to be converted to .nupkg for distribution. The OCTGN installation comes with a standard tool "O8build.exe" which takes the raw game files as input and converts them to an octgn-compatible format. The resulting nupkg file can be then uploaded to the game feed (only accessible by the developer/me) and the game definition will be updated on octgn.
Files in nupkg format can also be installed locally by placing them inside the "localfeed" folder in your octgn installation. This is necessary for testing.
Understanding game folder structure:
1. Go to github.com/naveed92/dm-ocg-octgn
2. Click "Clone or Download"/"Download Zip"
3. Download and extract the file.
4. Enter "game" subfolder
You should see the following files:
This is the "root" folder of the game definition. All octgn-based games follow the same convention for files and folders, with more or less folders based on which features are used. Game files structured in this format can be passed to the o8build tool directly.
The only file that can exist in root is "definition.xml". This is the most important file which holds the basic information about the game as well as card database structure and locations of all the additional files to be used.
The "Sets" folder is the next most important component. This holds the entire card database grouped into subfolders based on individual sets. The format of the sets.xml files should be compatible with the scheme defined in definition.xml
The "definition.xml" file and the "Sets" folder are the minimum requirements to define any game. The remaining folders are optional and define additional functionality (scripts, images, documents etc). All the files used till this point are defined in XML.
Reference: github.com/kellyelton/OCTGN/wiki/Game-Definition