Data File Development Process: Difference between revisions

From HLKitWiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 29: Line 29:


==Using Quick-Reload==
==Using Quick-Reload==
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.


==Review the Skeleton Files==
==Review the Skeleton Files==
Line 58: Line 62:


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 in just a moment.
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 in just a moment.
Using Quick-Reload
Whenever you make changes to your data files, you need to load those changes into Hero Lab so you can use and test them. The simplest 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" form for a new character. After a few dozen times, this gets really old.
So Hero Lab includes the "Quick Reload" mechanism, which can be invoked by going to the "Tools" menu and into the "Data File Debugging" submenu, where you can select the "Quick Reload" option. This mechanism re-compiles the data files, if necessary, and then reloads them into Hero Lab, bypassing the extra steps and restoring the current tab that is selected. As an added bonus, if you have a saved portfolio loaded, your portfolio is reloaded. This makes it quick and easy to incrementally modify and test out behaviors associated with selected options.


Take Snapshots Regularly
Take Snapshots Regularly

Revision as of 03:21, 21 November 2008

[Context: HL Kit … Basic Concepts and Terminology]

Overview

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.

Using Quick-Reload

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.

Review the Skeleton Files

Take Snapshots Regularly

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.

Review the Skeleton Data Files

The framework for your new game system is now setup. 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. Now would be an ideal time to review the manual that comes with the new game system, as it outlines numerous important details about the Skeleton data files and how best to evolve them into a full-fledged game system. As with any game system, you can access the manual by going to the "Help" menu and selecting the "Savage Worlds Manual" option.

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 in just a moment.

Take Snapshots Regularly

As you evolve your data files, you will be making significant changes. If you aren't extremely 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. So we strongly recommend that you take snapshots of your data files at regular intervals, preferably at milestones where everything is working the way you want it.

The easiest way to take a snapshot is to use the "HLExport" tool that is included with the Authoring Kit. This tool is designed to package up all of the data files for a game system into a single file that can be imported back into Hero Lab. Using HLExport, you can readily take snapshots of your working data files and save them. If you need to refer back to one, you can import the file back into Hero Lab. However, be sure to import the files into a different directory from your data files, else the imported files 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 ideal technique is to use a source control system of some sort, although this is an approach that most users will not have access to. If you don't we recommend using a combination of the other two methods for best results.

Before writing any data files, it's critical that you first do your homework. If you launch into writing the data files without a good plan, you will likely run into a number of surprises and setbacks along the way. While such events won't stop you from successfully creating the 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 basic building blocks you'll need, and design how everything should look and behave for the user.

Implementation Strategy

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.

Building Blocks

?????????????????????????????????????????????????????????????????

components and compsets

entities

things

tag groups

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

Visual Skins

?????????????????????????????????????????????????????????????????

colors

fonts

graphics - textures, buttons, icons