Adding tile graphics to your adventure

"Tile" graphics are up to 80x80 pixels and are displayed in the upper-left corner of the game's screen in party view. Most objects, characters, buildings, and monsters have their own tile graphics, but it's ok for some things to share tiles to reduce memory requirements.

Presently, our adventure simply leverages all the tile already available on the device in the Tiles256Shade.pdb that comes with "Return of Kra'an" (or 4, 16 shade, depending on the device being used). If you want to add your own tiles to your adventure (or change an existing tile) the only way to do it is to create your own set of tiles. In this chapter, we're going to show you how to create your own set of tile databases that you can distribute with your adventure. The advantage of doing this is it lets you add your own graphics (and further distinguish your adventure). The disadvantage is that the player will have to install an additional database on his or her device.

1) Modify your configuration files to generate a new tile database.

For each of the three pdb config files in the DB2ACK/Adventures/MyAdventure, make edits as per Figure 36, below. There are three main sections in each pdb config file.



Modify config files

2) Copy new tiles into art directories.

For each tile artwork you add to your adventure, you will want to have 3 versions: one 256 color bitmap, one 16 gray bitmap, and one 4 gray bitmap. Each bitmap must be stored in .BMP format and must be a multiple of 4 pixels wide, and no more than 80x80 pixels in dimension. The palette used by the 256 color version must match the palette bitmap file listed in your config file's wall section. The pallette file given in "My Adventure" is in DB2ACK/Adventures/MyAdventure/art/misc/palette/palette.bmp. Some paint programs, such as Adobe PhotoShope provide facilities for converting a bitmap's palette. For more information on bitmap graphics use in Dragon Bane 2, see the documentation section on graphics.

We have provided 3 versions of an exciting new tile brush that you can copy into MyAdventure (courtesy of Lucas Entertainment, Ltd. - sort of):



3 versions of new tile

3) Add your new tile brushes to the list

Instead of maintaining one big list of tiles, DB2ACK splits them up into several smaller lists, three each for: characters, buildings, monsters, and objects. The tiles are still listed sequentially, but the number range is just broken between the different lists. For example, the list: DB2ACK/Adventures/MyAdventure/lists/Tiles_buildings256.txt contains the first group of tiles numbered 0 - 9, and the file Tiles_characters256.txt contains the next range of tiles numbered 10 - 54, and so on. Unfortunately, because you cannot renumber any items in any of these lists, all new tiles must be added to the end of the last tile list, Tiles_objects256.txt. So open each of the three Tiles_Objects files and add the following line to the end:

    221 art\tiles\characters\Finished256\tile256.bmp 1

...and so forth for tile16.bmp, and tile4.bmp. Save and exit your text editor after each change.

4) Use the tile in the game

This step is left as an exercise. You may want to change CALEB into a droid by editing heroes.txt and changing his tile to #221. Or you may want to experiment with the mapeditor and use the tile somewhere else. Make sure that before you test, you must install both the new MyAdventure.pdb (which contains changes to its Tile_objects.txt list file) as well as the Tiles256MyAdv.pdb file.

Congratulations! You are now able to modify any of the tile graphics in your adventure. In the next chapter, we will show you how to create a new wall.