Difference between revisions of "Data File Development Process"
|Line 66:||Line 66:|
==Have a Plan==
==Have a Plan==
data files, critical that you first do your homework . If you launch into writing data files without a plan, you will run into a number of surprises and setbacks along the way.
While won't stop you from creating data files, they will almost certainly cause unnecessary delays and frustration. So you will fare best if you take the time upfront to develop your basic implementation strategy, map out all of the you'll need, and design how everything should look and behave for the user.
==Creating the New Game System==
==Creating the New Game System==
Revision as of 01:08, 21 November 2008
Before you dive in and start writing your own data files, there are a number of important aspects to the overall development process that you should be familiar with. The topics below strive to relay some basic knowledge that will be incredibly helpful as you begin the authoring process.
Enable Data File Debugging
Before you do anything else, make sure that you've configured HL to enable all of the built-in data file development and debugging aids. By default, HL assumes that users are not creating their own data files, so assorted development facilities within the product are disabled. You need to make sure they are turned on so that you can put them to use.
To enable these tools, go to the "Debug" menu within HL and make sure the "Enable Data File Debugging" option is checked. If it's not checked, click on it once to toggle the state.
Data File Compiler
The HL engine includes a compiler that processes all of the data files you create. The benefits of a compiler are two-fold. First of all, the compiler allows HL to convert all of the disparate data files for a game system into a highly optimized version that can be used. This results in significant performance improvements and much lower memory requirements, thereby allowing HL to manage lots of information efficiently on even older, slower computers.
The second big advantage of a compiler is that the compilation process vets the data files that you've written. If there are errors in the data files, they can be caught in advance and reported to you, allowing you to fix them. Without a compiler, you wouldn't know if you had an error until you tried doing something that uncovered the error, thereby making it harder to verify that your data files work flawlessly.
NOTE! Even though HL uses a compiler, there are some kinds of errors that the compiler simply cannot catch. The vast majority of errors will be caught by the compiler, but some will not. These errors will be trapped and reported as run-time errors, and they are discussed separately in the section on debugging data files.
Compiling Data Files
During the course of developing your data files, there will be times where you want to fully test that everything is working the way you want. There will also be times when you simply want to verify that your changes are valid and compile successfully. You can ask HL to re-compile your data files at any time by going to the "Debug" menu and triggering the "Compile Data Files" option. You'll be prompted to specify the game system to re-compile, after which you'll be shown any error messages that might be encountered during the compilation process.
As long as your files fail to compile, they will not load in the HL, so you should get in the habit of frequently re-compiling your data files. This will uncover problems quickly, since the error must exist in whatever changes you've made since the previous successful compile.
As a convenient shortcut, you can use the <Ctrl-C> key combination to invoke a compile. This makes it easy to regularly verify that your data files are valid at each step along the way as you develop them. Please note that the <Ctrl-C> key combination will not work when the input focus is an edit portal, since the <Ctrl-C> is interpreted as a traditional "Copy" command within an edit portal.
Whenever you make changes to your data files, you'll need to load those changes into HL so that you can use and test them. The obvious way to do this is to go to the "File" menu and select "Switch Game System". However, this approach always shows you the release notes for the game system and potentially the "demo mode" warning, after which you'll be shown the "Configure Hero" form for a new character. After a few dozen times, this process gets really old.
To bypass this, HL includes the "Quick Reload" mechanism, which can be invoked by going to the "Debug" menu and selecting the "Quick Reload" option. This mechanism re-compiles the data files, if necessary, and then reloads them into HL, bypassing the extra steps. It also restores the current tab that is selected. As an added bonus, if you have a saved portfolio loaded, your portfolio is also reloaded. This makes it quick and easy to incrementally modify and test out behaviors associated with selected options.
Take Snapshots Regularly
As you evolve your data files, you will be making significant changes. Even if you are careful, it's likely that you will end up causing everything to break at a few points along the way. When this happens, it can be invaluable to be able to see exactly what has been changed since the last time everything was working fine. In order to do this, you need to have a saved copy of when things were last working. Consequently, we strongly encourage you to make a complete copy of your data files at regular intervals, preferably at milestones where everything is working the way you want it. We refer to these copies as "snapshots".
The easiest way to take a snapshot is to use the HLExport tool that is included with the Kit. This tool is designed to package up all of the data files for a game system into a single file that can be easily imported back into HL, and you'll be using this tool to distribute your data files once they're created. In the meantime, though, this tool can also be helpful during development. Using HLExport, you can readily take snapshots of your working data files and save them. If you need to refer back to an old snapshot, you can import the file back into HL and compare the files.
IMPORTANT! If you use HLExport as outlined above and need to reload an old snapshot, be sure to import the files into a different directory from the data files you are developing. Otherwise, the old files you import will overwrite your recent changes!
Another simple technique is to make a copy of the entire directory contents for your game system. This allows you to do a direct file-to-file comparison of any file at any time, which can be quite handy at times. The only drawback of this approach is that if often requires more effort than the HLExport technique.
The ideal method for taking snapshots is to use a source control system of some sort. Unfortunately, this is an approach that many users will not have access to. If you do, though, it's absolutely the best technique.
For users without access to a source control system, we recommend using a combination of the other two methods for best results.
Skeleton Data Files
To make it as easy as possible to get started writing data files for a new game system, the Kit includes a starting set of data files. These data files aren't just a hodgepodge of examples, though. They are a fully operational foundation that serves as a framework that you can adapt and build upon to create a solution for virtually any game system.
Since this framework provides all of the basics you'll need and must simply be fleshed out, we refer to this starting point as the Skeleton data files. These data files are minimal in nature, but they offer a solid framework to start with, including a variety of built-in mechanisms that you will likely find yourself using for whatever game system you set out to implement.
In addition to the Skeleton data files, a separate game system is provided that implements a more sophisticated game system - the Savage Worlds system from Great White Games. The Kit documentation includes a detailed walk-through of how the Skeleton data files were adapted for that game system, guiding you through the process so that you can see a concrete example of how to approach your own project. When starting on the development of data files for a new game system on your own, it's definitely best to start out with the Skeleton data files and expand upon them as necessary for the particular game system.
Review the Skeleton Files
Before you start trying to develop your own data files, you should first spend a little bit of time familiarizing yourself with the Skeleton data files. Since they will form the starting point for your efforts, you'll benefit substantially by understanding how they work. You'll find details on the Skeleton data files elsewhere within this documentation.
You should also take the time to review the contents of the data files themselves and get familiar with them, as you'll begin modifying and adapting them. You can see the Skeleton data files in action by looking at the "Authoring Kit Sample" game system that is installed with HL. If you take a look within the "sample" data file folder, you'll see all of the data files for the game system.
The only differences between the Sample game system and the Skeleton data files is that the Sample game system includes an assortment of attributes, skills, abilities, weapons, and whatnot. By including these objects, you can better see how everything works. However, the Skeleton data files omit these objects, since you would otherwise have to delete them before you could begin adding all the material for your own game system.
Have a Plan
When you set out to write your own data files, there is one detail that is more important than virtually anything else: have a plan. It is critical that you first do your homework and map out both how everything will work internally and how it will all work and behave. If you launch into writing your data files without a solid plan, you will almost certainly run into a substantial number of surprises and setbacks along the way. Heck, you'll likely have a fair number of those even if you do have a good plan in place.
While surprises and setbacks won't stop you from ultimately creating your data files, they will almost certainly cause unnecessary delays and frustration. So you will fare best if you take the time upfront to develop your basic implementation strategy, map out all of the structural pieces you'll need, and design how everything should look and behave for the user.
From a structural perspective, identify all the major elements of the game system. Figure out what types of objects you'll need, then determine the components and compsets necessary. Anticipate the various game behaviors that you need to properly model and map those into the appropriate fields and tags. Sift through all the facets of the game and you'll likely uncover a lot of subtle details that you'll need to fully implement in your data files. It's amazing how many little details lurk within even the most simple game systems. When it comes time to write data files for the game, you'll need to deal with all of them, so it's much better to create a lengthy laundry list upfront so that you can plan for them and not get hit with lots of surprises along the way.
For the visuals,
Creating the New Game System
Copy the Skeleton Files
Before you do anything, you need to setup your own copy of the Skeleton data files in a new folder for your game system. Hero Lab can do the basics for you automatically by going to the "Tools" menu and selecting the "Create New Game System" option. Provide the name of the game system and the folder to use, then let Hero Lab set everything up properly. After it's created, you can switch to the new game system to verify it.
Game System Details
Once the new copy of the Skeleton files is in place, the first step you should take is to modify the definition file for your game system. This entails opening the "definition.def" file and making appropriate changes to a few elements. The "game" element should be assigned appropriate values for each attribute to reflect the game system and its publisher. The "author" element should be assigned attribute values that identify you at the author. The "structure" element should already specify the appropriate default folder for the game system, but it's probably worth double-checking this detail. Once these changes have been made, verify everything is working properly by loading the new game system into Hero Lab.
Create the Game System
The very first step is to create your new game system. Hero Lab can automatically setup a new game system for you, starting you out with a set of data files that you can adapt and build upon. Go to the "Tools" menu within Hero Lab and select the "Create New Game System" option. For this example, we specify the name of the game system as "Savage Worlds" and the folder to use as "savage". Once Hero Lab sets everything up properly, go to the "File" menu, select "Switch Game System", and enter your new game system.
The first thing you need is to figure out how you are going to go about developing your data files. We've provided you with a solid starting point in the User Manual installed with the Skeleton data files. That manual outlines a proven methodology for creating the data files for a new game system. This document you are now reading leverages the outlined strategy for the Savage Worlds game system. You are welcome to come up with your own approach, as there is no "right" way to do it, although we recommend you start with the methodology we've presented and adapt it to suit your needs.
components and compsets
phases and evaluation cycle
Look and Feel
visual layout and organization
interactive behavior - where to use tables, choosers, menus, etc.
add scans of original sketches
graphics - textures, buttons, icons