Installing StoryDev 2
To install, use the
haxelib git command:
haxelib git sd2 https://github.com/storydev/sd2.git
Using StoryDev 2
StoryDev 2 comes in two parts: The Parser (the thing that parses your scripts), and the Implementation (the Graphical User Interface that displays and runs the parsed results).
Implementation is currently limited to HTML5, but you can implement StoryDev 2 into your engine very easily. All that is required is a user interface that is customised to work with StoryDev 2.
To implement, you can use the technical specification for exactly how StoryDev parses scripts. Tutorials will become available at a later time.
A Simple Example
To get started with a simple example, you can use the command:
haxelib run sd2 create "My Simple Example" js
cd "My Simple Example" followed by
haxelib run sd2 build to build the project. The build command requires
project.json to exist in the root of the project's folder.
The project.json structure
If you're creating a custom implementation for StoryDev 2 and you wish to build using the
run sd2 build command, a
project.json file is required for the run module to work.
Here is the simple structure it requires:
- output - This is the output file or folder (depending on target).
- target - This is the target language you want to build to. Follow the Haxe manual for more information on targets.
- convos - This is an array of strings of all the files to conversations you want to use in your project. Their resource names will be shortened to the name of the file without the extension, so make sure all filenames are unique and do not contain any special characters. Spaces in the file name will create underscores.