XVNML (formally known as X-tensible Visual Novel Markup Language), is an open-source mark-up language that can be easily paired with any game engine that requires a nice and structure way of storing Stored-Based information and dialogue. It puts together the normal mark up languages you may be used to, but adds a couple extra features (like Skriptr) to make it versitale in you game development work flow.
At it's current stage, these are the following states that this project is in:
How to Get Started
You can get started with using XVNML in a variety of ways. Since XVNML was made using C#, you can apply it to any .NET Application you want, whether that'd be on a C# Console, WPF, or ASP.NET application. You can even integrated into Unity, and make it part of your workflow. All it takes is adding the XVNML NuGet package to your project, and you're ready to go! For starters, you can reference off a C# Console Application sample here! You may also want to check out an article I wrote on Medium that walks you through how to install XVNML and integrated in both a C# Console Application and a Unity project here!
How to Use XVNML
All of your XVNML content are represented by an object called XVNMLObj. You instaniate this class, and pass it in a directory to a file you want it to parse. It'll then go through and parse the information for you, as well as extra any Skriptr used for dialogue. After the parsing, you can grab an element by using the GetElement method on the root tag of the XVNML file.
By default, you have a total of 28 pre-built tags that can be parsed by the XVNML utility.
Out of all of these valid tags, Proxy and Source are Root Tags. This means whenever you type your XVNMLObj instance and access the root, it'll either be Proxy or Source, depending on how the file was structured. A Proxy file is always your main file, and is always read first. However, a Source is a file that can be used to introduce modularity into your projects. For example, the screenshot below shows that we’re creating a Cast element called Hana, and the source of that data is in “Hana\Hana.cast.xvnml”
By utilizing Source files, you can reduce the number of lines in your proxy file. It’s one of the most important best practices of using XVNML in your development process.
User Defined Tags
You also have the ability to create custom tags (hence the X in XVNML). Creating a custom class is as easy as associating your C# class with a particular tag.
Once you've created a class that derives from the UserDefined class, you can associate that class with a tag inside your .XVNML file. You can even specifiy its scoop:
XVNML file as Sources and Resource Referencing
XVNML files can also be used as sources for other tags. Tag the list of cast members in the CastDefinition tag:
Using a configuration file to find out the relative path of your project, you can take the information from one XVNML and embed it into a tag. For example, this is what the information looks like inside "Raven.cast.xvnml":
It'll take the information from the "cast" tag inside the Raven.cast.xvnml file, and then embed it into the cast tag from the requesting file. It's a very awesome feature exclusive to XVNML. However, the only downside to this is that the "name" parameter for the "cast" tags in both files must match. They will fail to match otherwise.
Skriptr is the syntaxical language used in tandem with XVNMl to output text data. Each Skriptr line must first be given a role. It can either take in a Declaratice Role (denoted by the "@" symbol), oran Interrogative Role (denoted by the "?" symbol). When given a Declarative Role, it'll allow the user to, for example, output text to the screen. However, if given an Interrogative Role, the dialgoue comes a Prompt that requires user input.
You are also able to run macros (commands that performs a single action). Information of the command used, as well as the arguments passed will be stored inside your XVNMLObj instance. A macro is denoted by surrounding curly braces. The macro name is first defined, and then the argument(s) being passed for it (if the macro requires them).
Another feature with Skriptr is the ability to name lines using square brackets. Combining macros such as "jump_to" and "lead_to", you're able to use named lines to control the flow of dialogue.