II. Building a New Adventure

To create a new adventure, you need to create your own set of pdb (Palm DataBase) files that will be installed on the Palm device along with the DrgBane.prc file. This section explains the procedure, "mkpdbs", used to create your adventure pdb file(s). Here, you will learn the to run the mkpdbs command, as well as the format of the configuration files used as input to the mkpdbs command.

Mkpdbs tool ("make pdbs")

The program, "mkpdbs", is used to read your tree of source data, compile them, and output a set of pdb files for one color depth. You will have to run this command 3 times (using 3 different pdb.cfg files) to generate all three wall and tile pdb color depths.

To run the mkpdbs, program, select it from the DBIIACK shortcut in your start menu, and when prompted, choose your pdbs.cfg file. For example, choose pdbs4.cfg in SampleAdventure to build the SampleAdventure.pdb file. (The samples build only the adventure.pdb file - the wall and brush files will be shared with the original Dragon Bane II - Return of Kra'an adventure. See below for more details

Adventure, Wall, and Tile PDB's

The pdbs*.cfg files are simple text files that list all the files, directories, and data elements used to create each pdb file. (See the samples provided in the SampleAdventure directory). It is divided into three sections for the adventure, tile, and wall pdbs. You will need to create a set of three config files; one for each of 4, 16, and 256 color depth (such as MyBigAdventure4.cfg, MyBigAdventure16.cfg, MyBigAdventure256.cfg), and run mkpdbs on each one separately to create the three sets of tile and/or wall pdb data files. Of course, if you are not going to change any of the graphics from Return Of Kra'an, you will only need one mkpdbs config file with just the adventure pdb section.

The syntax of the config file consists of a name line, plus three pdb header lines, each followed by a complete list of data types contained in that pdb. Although it is not necessary to put all three pdb headers and data into a single config file, for each one that is included, you must include a complete set of data for that pdb. For example, you may omit the adventure pdb from the config file, but you may not omit any specific data members from the adventure pdb. The four sections of the pdb config file are:

Name section: This is always required. The name provided must match the name of the directory created in the Adventures path. For example, the directory for the provided sample is SampleAdventure, so the Name section needs to contain the name SampleAdventure. When you make a copy of the SampleAdventure and rename the directory, be sure to change this section to reflect the name change.

Wall section: This optional section will tell mkpdbs how to build the wall pdb for your adventure. Note that the wall pdb contains the palette ("PA") data element, so if you plan to use your own color palette, you must build and distribute your own wall pdb. It consists of a header and body

Tile section: This optional section tells mkpdbs how to build the tile pdb.

Adventure section: This section tells mkpdbs what data to use when building your adventure pdb.

DataViewer Tool

The DB2ACK comes with a DataViewer.prc tool that you can install on your Palm device (or emulator) to examine all the walls in the game. This is only important in cases where you are creating or modifying your own walls, rather than re-using the set that is distributed with the Return of Kra'an adventure in Walls*Shade.pdb. If you are creating your own walls, it is a good idea to examine each one closely from all views to make sure they line up correctly and do not have any undesirable artifacts.

Using the DataViewer is simple. Install the program and all data files on your palm, and when you run it, you will be asked to select an adventure. From there, the following features are available:

The following information is displayed below the wall (calculator key toggles these stats on and off):

Using the Sample Adventure and Building Your Own Adventure

The DB2ACK comes with a sample adventure that contains all the data from Return of Kra'an (except for the maps), so you can have a working set of data from which to start your own adventure building. An index of the wall set provided in the Sample Adventure is included here. You may refer to these images when designing your own maps to help you locate the desired wallID quickly. Instead of supplying you with the "Return of Kra'an" maps, we have supplied two sample maps that have many examples of the various mechanisms that are possible. We recommend you study the examples, but of course, you should not limit yourself to those; there are an infinite number of game mechanisms possible, and you should try to construct new techniques to differentiate your adventure.

Note that the "Sample Adventure" included with the DB2ACK does not use any new walls or tiles. Instead, it re-uses all the walls and tiles distributed with Return of Kra'an. For this reason, it is not necessary to create new wall and tile databases for the adventure, just an adventure pdb. To specify which wall and tile databases should be associated with the adventure database, there are two pieces of data listed in the pdbs.cfg files for the adventure:

See above for the syntax of the "RT" and "RW" data types.

To create your own adventure, copy the SampleAdventure directory, rename it to whatever you want, and then make the same name change in the pdbs*.cfg files contained in the adventure directory. For example, if you copy SampelAdventure and name it MyAdventure, then you would edit Adventures\MyAdventure\pdbs4.cfg and change the !NAME line to be "!NAME:MyAdventure". You would then make this same change to the other two pdbs.cfg files.

If you wish to change where your adventures directory is, you can run the ChgAdvDir.exe program. This is not required, but offers more flexibility in locating all of the data for your adventure. It is only recommended for advanced users.

Testing your adventure with Debug Version of Dragon Bane II

In the tools/Palm directory of the DB2ACK is a version of the Dragon Bane II engine that includes extra debug cheats to assist level developers. Just install the DrgBane2_Dbg.prc file and you can use it to play any pre-release adventure just like the normal Dragon Bane II engine.

By convention, pre-release adventures are defined to be those with a version number less than 1.0. The adventure's version is listed in the pdb.cfg file at the end of the line that begins with "!DADV...". For example, the Return of Kra'an adventure is version 1.0, so it cannot be loaded by the DrgBane2_Dbg.prc program. So be sure to use a version number less than 1.0 while you are developing your adventure so you can use the debug cheat facilities. We recommend that just before you release your adventure, you do two things: one, change the version to be 1.0 so that users cannot mess up their savegame adventures using the debug version of the engine, and two, create an identical 0.99 version of the adventure for yourself so that you can debug users' savegames that were created with the release version of your adventure.

The debug facilities allow you to basically do anything you want to the game while playing it so you don't have to insert fake teleports or extra map special code to set or clear state bits to test out your level design. There are several screens of debug cheat controls. Each of them must be accessed from the "3D View" by typing a secret word in the graffiti area. The cheat codes and their functionality are:

Important! We made the debug version of the DB2 engine incompatible with release versions of adventures because it is intended for developers' use only. We do not want the debug version of the engine to be used by end users because it's very dangerous if you don't know what you're doing. It's very easy to permanently destroy a save game if you set the wrong state bit by accident. For this reason, if your adventure version number is 1.0 or greater, the debug engine will refuse to run it. You should only distribute version 1.0 and higher adventures to your users, and keep another one with version 0.9 or something for your own use.