Empire Deluxe Enhanced Edition

Unit Database Editor

Quick Links:

Other Details Links:


Unit Database Editor Overview

A very exciting aspect of the game is that units can be edited, and even created. The possibilities are virtually endless.

The Unit Database Editor allows you to edit almost every attribute of a unit. This is not a simple task at times, for there are a over 100 attributes available. Unit Sets must be designed with care, but don't let that stop you form experimenting. The editor will allow you to copy/merge and create new unit sets.

Be aware that if you edit a Unit Database, the changes will not effect any saved games, for that unit data is preserved with the saved game file.


The Unit Database Concept

When a game is played, it loads what is called the Unit Set, or the Unit Database. This is a particular collection of units with their attributes, their name files, their sound files, and their icons.

A unit database is stored in a directory, along with all of the necessary sound, image, and name files. The name of the directory is permanent, and should not be altered outside of the game, as maps and scenarios look for that directory name when preparing the game.

Relationship With The Terrain Database

The Units in a unit database are "loosely coupled" with terrain category type values. This means that the units have defined the terrain categories by their symbols, but they are only applied in the game if that symbol is found. In this way, units can refer to multiple Terrain Database category types, if they are uniquely defined.

Intra-Unit Type Relationships

The unit types within the database are also "loosely coupled". This means that for production, carrying, attacking, morphing, etc, the unit types specified can be undefined, and are cleaned out when the game is started.

Unit Type Attributes, The Game Engine, The Game Play Client

Some of the attributes for unit types are not meaningful to the Game Engine (sound files for example), but are very meaningful to the Game Play Client. Those that are meaningful only to the Game Play Client are generally relating to either display attributes, or queue processing attributes.

Unit Database Composition

A Unit Database is made up of three sections:


Using The Editor Interface

 

Editor Menu Options

The editor menu options are all under Data in the menu, and allow you to manage the databases available. The options are:


Editing The Basic Data

To Edit the current database's Basic Data, click on the Edit Basic Data button.


Editing The Icon Data Sets

There are four buttons to help you edit the Icon Data Sets. These are:


Icon Set Editor

The Icon Set Editor allows you to create, edit and delete Icon Data Sets. Once changed, the entire database must be saved before those changes take effect.

The icon set editor marks the icons used in this set. Every Icon Data Set needs at least a Regular Icon.

To set an icon, click on the picture square and specify the image file when prompted. Use the Remove buttons to remove the existence of a loaded icon.

To add Efficiency Icons, first select Add Icon  and choose an image file. The set the efficiency at or below setting, and press the Set Eff. Amount button.

To save your changes, press the Save Button. But you must remember to also Save the database for the changes to take effect.


Unit Type Information Editor

The Unit Type Information Editor allows you to add and edit and delete unit types from your database. Once changed, the entire database must be saved before those changes take effect.

The buttons along the bottom help you add, edit and delete unit types in your database. These are:


The Editor Pad

The Editor Pad allows you access to editing all of the Unit Type Information. It allows you to edit the information for the unit type itself, and allows you to edit the relationships with other units in regards to combat, transport, production, construction, repair, and spotting. Clicking on a button will edit that corresponding group of unit type information.


Terrain Database Reference Window

Several places in the editor, there is an option to view the Terrain Database Reference Window. Due to the fact that the Terrain Database are loosely coupled to the unit types,  you are only able to enter the Terrain Ids for terrain categories. This reference supplies the Terrain Ids for the specified Terrain Database.


Unit Icon Notes

Unit Icons need to be in the Microsoft BMP format.

Each unit icon is represented in an individual file. It is recommended that these icons be square. It is also recommended that these icons be sized in factors of 16 pixels (16, 32, 64, etc). All of the icons distributed with the Enhanced Database Set are 32x32 pixels in size, but this is not a requirement. All of the images do not have to be the same size either.

When the icons are loaded for the game play, they are loaded into whatever size the Zoom 1 setting is set to (more info), then compressed to meet each zoom scale.. This means that the best visual results will occur when the Zoom 1 level is set to the pixel length you use for icons so that the minimum amount of detail from the graphics will be lost when they are compressed to fit the appropriate scale.

The unit graphics are written out in the database directory in "unit master" sheets. This is for your debugging and viewing pleasure. It is not reused by the game.

There are three special colors that can be used in the unit graphics. These do not have to be used at all (though player colors seem necessary for identification purposes). These are

Unit Primary Transparent Color - value is RGB - 255,255,255

Any pixel matching this color will be replaced by the player's primary color.

Unit Secondary Transparent Color - value is RGB 1, 1, 1

Any pixel matching this color will be replaced by the player's secondary color.

Unit Transparent Color - value is RGB 249, 0, 240

Any pixel matching this color will not be draw, and the terrain will show underneath.

Note: There are issues with using this color and the player's display being set to 16 bit color.


Unit Type Editing Notes

Be aware that with so many attributes, there are virtually an infinite set of combinations that can be used to create new unit types. New unit types which are new in concept will not work with the current "StandardAI/ScriptedAI" player, and any new units would have to be added to an AI script to be added to the "ScriptedAI"  player.

Also, exploring new techniques of using unit attributes could lead to faults within the game.  I cannot promise these can be repaired, but please report problems to Mark Kinkead at Killer Bee Software at mok@killerbeesoftware.com .

Files Associated With The Database

Each Database is contained in its own directory, and all supporting files are stored there as well. When you specify an image file, for example,  it will be copied into that Database's directory. The database is linked to this directory name internally. You should not change the name of the database directory, even if you copy or transfer the database to another person.

The files associated with the database are: