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:
- Basic Data - These are some general values
that can be set to adjust various settings in the game:
- Database Name - The name of the Database.
- Bomb Move Cost - Cost in movement points required for a unit to
perform a Bomb Combat
attack.
- Bombard Move Cost - Cost in movement points required for a unit
to perform a Bombard Attack.
- Air Move Cost - Default Cost in movement points for an
air unit in flight to
move in a square.
- Orb Move Cost - Default Cost in movement points for an
orbital unit to
move in a square.
- Ground Move Cost - Default Cost in movement points for a
surface or sub-ground
unit to move in a square.
- Mine Base Attack - Attack probability for a
mine in combat.
- Mine Charges - Number of times a
mine can kill units before it is
destroyed.
- Range Fire - Mine: Probability that
range fire in an
empty square will destroy a mine.
- Range Fire - Road: Probability that
range fire in an
empty square will destroy a road.
- Road Cost - The cost for a unit to use a
road.
- Icon Data Sets - This is a collection of images that will be used
in the database. See the Unit Icon Notes for
preparatory details. They have the following Attributes:
- Unit Icon Set Id - A number representing the unit set for a
database.
- Regular Icon - This is the "normal" display of the unit. At
minimum an Icon Set must have a Regular Icon.
- Loaded Icon - This icon is displayed when the Unit is loaded.
- Efficiency Icons - These are icons are used when a
producer unit is at or
below a particular
Production Efficiency. An efficiency value is specified which indicates
when the icon should be used for display.
- Unit Type Information -
Here the unit information is established with its many attributes. There must
be at least one icon set available before there can be unit type information.
- Basic Attributes - The basic
information for a unit:
- Basic Id - Each unit must have a Basic Id. This is a two
character identification of that unit. The Id "**" is a reserved type. It
is recommended you stay away from using space and other characters if you
plan on using name files.
This id must be unique for each unit type.
- Icon Set - This is the Icon set associated with this unit type.
Different unit types may share the same icon set.
- Abbreviation - This is a short abbreviation code for the unit.
It is recommended this correspond to the Basic Id.
- Short Name - A short descriptive name used for display.
- Long Name - A longer descriptive name used for display.
- Unit Can Be Disbanded - Boolean property identifying if this
unit can be disbanded by a player in
the game.
- Unit Is A City Type - Indicates if the unit is a
City Type.
- Unit Is An "Ignored Type" - Ignored Type are units which don't
do to much, and this is an indicator to that effect.
- Buy Points Value -
Buy Points Cost
for a unit.
- Unit Classification - This describes the
basic unit classification.
- Description - Verbose text describing the unit.
- Movement Sound - Sound to be played when the unit is selected
or moving.
- Fire Sound - Sound to be played when a unit is firing.
- Death Sound - Sound to be played when a unit is dying.
- Movement Attributes -
Attributes relating to a unit's movement capabilities:
- Speed - The
movement points for a unit.
- Range - The
range of a unit. This value is 0 when the unit has
unlimited range.
- Can Use Roads - Boolean property noting whether or not the unit
can take advantage of roads. It must also be classified as A
Ground/Land/Sea unit for this to take effect.
- Terrain Costs - This is a set of Terrain and the associated
cost for moving into that square (overrides the defaults set in the
Basic Data). This value may be "Impossible".
- Can Land - Indicates that the unit can
land.
It must be classified as an Air or Orbital Unit for this to be meaningful.
- Land Attacker Bonus - Probability modifier applied when the
unit is attacked while
landed.
- Can Land Terrain - Allowable Terrain Types that the unit cant
land on.
- Other Attributes - These are various specialized attributes for a unit
type:
- Unit Can Dive - Defines whether or not a unit can
dive.
- Can Dive Crippled - Defines if a unit can dive while
crippled.
- Changes Type On Dive - The Basic Id of the unit it
changes into when
it dives.
- Unit Can Rise - Defines whether or not a unit can
rise.
- Change Type On Rise - The Basic Id of the unit it
changes into when it
rises.
- Allow Sub Below - If a
ground level unit, this specifies whether
or not Sub-Ground units can go under this unit.
- Move Attack Sub - If a
ground level unit, this specifies whether
or not enemy Sub-Ground units can go under this unit without combat.
- Range Attack Sub - If a
ground level unit and capable of range fire
attacks, this defines whether or not the unit can fire at a unit when the
target is in the sub-ground level.
- Can Re-Enter - If an
Orbital Unit, this tells whether or not the unit
can perform re-entry.
- Re-Entry Speed - Speed while in re-entry
- Re-Entry Range - Range while in
re-entry. Zero indicates an unlimited
range.
- Re-Entry Cost - The cost associated with
Re-entry.
- Can Launch - Whether or not this unit can
launch orbital units it is
transporting.
- Can Detonate - Whether or not this unit can perform
Detonation
Attacks.
- Is Nuclear - Whether or not the units attacks are
nuclear in
capability.
- Drain Cost - The "resource drain cost" for a unit of this type.
- Drain No Production Value - If this unit is also a
producer, this will
be the "No Production" value applied towards the
resource drain.
- Drain Production Value - If this unit is also a
producer, this
will be the "Production" value applied towards the
resource drain.
- Can Exploit - Whether or not this unit can
exploit resources. Must be
a ground unit as well to be meaningful.
- Exploit Value -
Exploit value of the unit to be applied to the
resource drain. (Similar to Drain No Production Value).
- Can Supply - Whether or not this unit can perform
supply operations.
- Supply Value - Value applied in turns for
Production Supply, or in
Drain No Production for
Drain Supply.
- Can Change - Whether or not a unit can
change.
- Change Type - The Basic id of the unit it can
change into.
- Can Change While Hosted - Whether or not a unit can
change while under
transport.
- Change Language - The Text that is displayed when prompting for the
change action.
- Change Name On Morph - Whether or not the unit will change its
name when it changes.
- Movement Combat Attributes
- These attributes define the
movement combat
capabilities of the unit:
- Damage - The amount of
damage a unit does every time it hits.
- Strength - The maximum
hit points a unit can have.
- Ignore Terrain on Defense - Whether or not terrain is a factor when
this unit is attacked.
- Can Dig In - Whether or not units of this type can
dig in.
- Consumed on Attack - Whether or not the unit is
consumed when it
attacks, regardless of the result.
- Dig-In Bonus for Siege - Whether or not units of this type will enjoy
a Dig-In bonus when attacked in a
siege combat setting.
- Attacks - This is the list of
attacks the unit can make. If an attack
against a unit type is not listed, it will not be able to engage that
unit. Each attack can have some or all of the following:
- Defender Unit Type - The defender's type (Basic Id).
- Attack Type - The type of attack.
- Probability - The
base probability of success in this attack.
- % Damage - The amount of damage done to a Defender's
Production
Efficiency in cases of Capture and
Bombing.
- Change Into Type on Capture - Whether or not the unit will
change
into a type in capture attacks, and the specified type to change into.
- Terrain Modifiers - Made up of a set of pairs of the Terrain Id and
the modification value for the
attack.
- Range Combat Attributes - These attributes define the
range attacking
capabilities of this unit type:
- Firing Damage - The amount of
damage a unit does every time it hits.
- Firing Range - The unit's
range capability.
- Can Defensive Fire - Whether or not a unit can perform
Defensive Fire
- Range Attacks - This is the list of
attacks the unit can make. If an
attack against a unit type is not listed, it will not be able to engage
that unit. Each attack can have some or all of the following:
- General Combat Attributes - These attributes refer to
general combat situations:
- Siege Defenders - This lists the hosted unit types that will
experience a modifier when this unit is attacked in a
siege situation.
- Experience - These are the levels of hit points inflicted on enemy
units that will cause a change in the unit's
experience.
- Transporting Attributes - These are attributes that will define a unit's
ability to
transport
other units
- Portage Value - The
cargo size of a unit.
- Portage Capacity - The amount of
cargo a unit can carry. This
may be
"Unlimited".
- Override Terrain and Boarding Cost - The cost a unit must pay to move
onto a transporting unit of this type if it overrides terrain.
- Load Still Only - The unit cannot move onto a unit to
load it. It must be
loaded while both are hosted by another unit. (Example : Both in a city).
- Drop Un-hosted Only - The unit can only
drop units, not unload, when it
is not hosted.
- Cannot Drop Units - this unit will not be able to execute a
drop action with any transported units.
- Unload Hosted Only - The unit can only
unload when it is
hosted.
- Suspend Load - The unit will
suspend the transported unit when it is
loaded.
- Allow Hosted Bombard - Units carried by this unit can make
bombard
attacks.
- Allow Hosted Range Fire - Units carried by this unit can make
range
fire attacks.
- Allow Hosted Scans - Units carried by this unit can still
observe
enemy sightings.
- Carry List - The Carry List defines the unit types this type is able
to carry,
repair, and
refuel.. Each entry in the list has the following
attributes:
- Unit Type - The type that can be
loaded.
- Stop - The transported unit will lose all further movement for the
turn when it is loaded.
- Refuel - The transported unit will be
refueled.
- Repair - The transported unit can be
repaired by a specified number
of hit points each turn.
- Default Load - Whether or not this unit type is considered a
Default
Load Type.
- Spotting Attributes - These attributes are in regards to the
sighting of enemy
units:
- Base Ranges - These are the default sighting capabilities for each of
the World Levels. A negative value indicates no capability.
- Individual Ranges - These ranges define the unit types capability to
spot other types at specified ranges and
World Levels. These override the
base ranges.
- Production Attributes - These are the attributes that define the
production of individual
unit types by this unit type:
- Is A Producer - Whether or not a unit of this type will be a producer.
If so, the unit will have a
Production Efficiency and possibly a
Production Specialization.
- Production List - This is the list of unit type that can be produced,
the initial production values, and the continuing or repeat production
times.
- Construction Attributes - These are the attributes that define the
construction of
individual unit types by this unit type:
- Is a Constructor - Whether or not a unit of this type can
construct
other units.
- Construction List - This is a list of all the unit types this type is
capable of constructing, and the construction time in turns for each unit
type.
- Building/Repair Attributes - These define the capability of the unit to
create mines,
roads and repair other units via
hosted repair:
- Can See Mines - Whether or not the unit can see
mines.
- Can Build Mines - Whether or not a unit can
build mines.
- Can Disable Mines - Whether or not a unit can
disable mines.
- Can Build Roads - Whether or not a unit can build roads.
- Can Destroy Roads - Whether or not a unit can
destroy roads.
- Road Time List - This is a list of Terrain Ids and time in turns that
it takes to build a road on that terrain type.
- Hosted Repair List - This is the list of Unit Types and the hit point
per turn repair value that is used to make
hosted repairs on a unit.
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:
- New Unit DB - Creates a new unit database. It will be empty and
have no lock code.
- Load Unit DB - Prompts you to load an existing unit database. The
unit database is loaded by identifying the "UnitDB.ini" file in one of the
named database directories.
- Set DB Lock Code - To protect yourself from yourself, a database
can have a Lock Code, which will be required to be entered before a database
will be changed. Selecting this menu option will prompt you to set the lock
code. A lock code is not required, but is a matter of precaution.
- Merge Another Unit DB - This will take your current database, grab
another database you specify, and merge the two together.
- Save Unit DB - This will save your unit database. A lock code may
be required. NOTE: Do not save over the databases
distributed with the game. This will disrupt your ability to play with others.
Copy them and make new ones.
- Save Unit DB As - This will save the unit database as a new
database, with no lock code. You will be prompted to enter the new directory
name.
- Delete Database - This will remove your database and all of the
contents in the directory. Use this option with caution.
- Terrain Reference Window - This will call up the
Terrain Database Reference Window.
- Battle Odds - This will call up a
Battle Odds Calculator.
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:
- Edit Set - Edits the selected set. You may also double click on a
selected set to perform this function. This will call up the
Icon Set Editor.
- Delete Set - Removes the selected set.
- New Set - Creates a new set. This will call up the
Icon Set Editor.
- Copy Set - creates a copy of the selected set. This will call up
the Icon Set Editor.
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:
- Sort Columns - Allows you to drag and drop the column names so that
they appear in different order.
- Edit - Edits the selected unit type. Calls up the
Editor Pad.
- Delete - Deletes the selected unit type.
- New - Creates a new unit type. Calls up the
Editor Pad.
- Copy - Creates a new unit type by copying the currently selected
unit type. Calls up the Editor Pad.
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:
- UnitDB.ini file - This is where the unit information is stored. DO
NOT EDIT THIS FILE DIRECTLY.
- *.bmp files - All of the unit images for the icon sets.
- *.wav files - The external sound files for the database.
- *.nam files - These are the name files used by the game engine for
each unit type. The file should take the structure _<Basic Id>_.nam . The game
engine checks at runtime to see if such a file exists, and uses the names
inside of it randomly to assign names to the unit. Name files may also have
comments in them on a line if the line begins with the character "#".