When creating own scenarios and campaigns you'll have to save graphics, definitions and other data in a proper format to the correct directory. This HOWTO is aimed to provide information on how this is accomplished. All non-graphical files are saved in ASCII. The bold names are the name of file entries. There is an example for each entry in brackets after that which is followed by a short explanation.
Directory: gfx/flags
Format: All nation flags your refer to in a nation library must have the same size (e.g. 20x14) and are saved in a vertical order.
Example:
Directory: gfx/units
Format: All unit icons you refer to in a unit library are gathered in one bitmap and saved in a vertical order. They may have different sizes as their width and height are measured by three white dots in the left upper, right upper and left lower corner of the icon. (Note: These dots will be removed when icons are loaded.) The color one pixel below the left upper dot is used as transparency key.
Example:
Directory: gfx/maps
Format: First you have to create a pattern bitmap with the size of your map tiles (black is transparent). Save this bitmap in
gfx/maps (e.g. fog.bmp). This pattern should fit without gaps when put together in a hex order.
A scenario loads one maptile library and for each map tile
defined in this library you specify a source bitmap in which all graphical variants of this tile (all with the size of your pattern)
are saved in a horizontal order. Black is
always the transparency key. If you create a new set of map tile graphics you should save these in a subdirectoy in gfx/maps. This way it's
more structured.
Example:
All wanted graphical variants for plain terrain fitting this pattern:
Directory: gfx/maps
Format: There are some more graphics needed with the size of your pattern. You may save these with any file name you want but it's again recommended to put them into your subdirectory.
Example:
Directory: gfx/themes
Format: The existing standard theme is gfx/themes/standard. It is possible to create new themes and load them but right now it's not implemented to the campaign. I consider this issue of low priority so this is implemented in the future when all other issues are cleared.
Directory: nations
Create a new file in this directory and put the following entries into it.
flag_width ( flag_width = 20 )
flag_height ( flag_height = 14 )
Size of a single flag in the following bitmap.
flag_pic ( flag_pic = flags.bmp )
Bitmap with the nation flags.
Now you define as many nations as you want.
nation ( nation ( ger Germany 0 ) )
Each nation is defined by three arguments:
Before a scenario loads the actual unit libraries it loads a file which specifies target types and unit classes (all
unit libraries must use the same target types and unit classes).
IMPORTANT: The first unit class must be the Infantry!
Directory: units
Create a new file in this directory and put the following entries into it.
target_types ( target_types( soft hard *air naval ) )
Define as many target types as you want. Each unit is assigned one of these types and each unit
has a special attack value for each target type.
Note: You must specify the flying target types with an * as ground unit's air attack
values are cut in half in bad weather.
Then definitions of as many unit classes as you want follow.
unit_class ( unit_class( inf Infantry m_inf.wav ) )
Each unit class is defined by these arguments:
Directory: units
Create a new file in this directory and put the following entries into it.
unit_pictures ( unit_pictures = german_tanks.bmp )
This first entry of a unit library specifies the bitmap with the unit graphics.
Then definitions of as many units as you want follow. The order of property entries is important and must be kept.
entry_name ( entry_name = tiger )
When creating units in a scenario file you specify the type of the unit by this identification string.
caption ( caption = "Tiger 2" )
This is simply the type name.
nation ( nation = ger )
Entry_name of the nation that produces this type of units.
unit_class ( unit_class = tank )
Entry_name of the unit class this unit type belongs to.
initiative ( initiative = 6 )
If two units fight each other this value gives attacking bonus to the unit with the higher initiative. This value should range between 0 and 15.
movement ( movement = 5 )
Each hex tile costs movement points and a unit can move as long as it has movement points remaining.
spotting ( spotting = 2 )
This tells how far a unit can see (in hex tiles).
range ( range = 2 )
Fire range of a unit in hex tiles.
attack_count ( attack_count = 1 )
Number of attacks a unit has in one turn. This value is usually 1.
attack ( attack ( 25 20 1 3 ) )
Each unit type has a specific attack value for each target type you defined in your unit class definitions.
So in this example 25 is for 'soft' targets, 20 for 'hard' targets, 1 for 'air' targets and 3 for 'naval' targets.
defence ( defence = 20 )
The better your defence (may be improved by entrenchment) the less damage an attack causes.
ammo ( ammo = 12 )
Each fight costs one ammo point.
fuel ( fuel = 40 )
For each hex tile the unit moves it pays one fuel point.
flags ( flags ( tracked ) )
A list of flags (separated by blanks) indicating special properties (only implemented flags are listed, this list may grow in the future):
picture_type ( picture_type = single )
Either single or all_dirs where single means a unit is graphically represented by just one icon (looking to the right as it
will be flipped in game when looking to the left) and all_dirs that for each hex direction the unit may look an icon exists (saved in a
horizontal order starting with the unit looking up and going clockwise).
picture_id ( picture_id = 2 )
All (different)unit icons are saved in a vertical order and picture_id tells which icon to use from the list where index 0 means the
very first unit icon.
sounds ( sounds ( default ) )
List of sounds connected to this unit. Set an argument to none if you don't
want to have sound or to default if you wan't to use the default sound for this
unit class else specify a WAV file.
More information about the format of the graphics referred here can be found in section map tile graphics and additional map tile graphics.
Directory: maps
Create a new file in this directory and put the following entries into it.
map_tile_width ( map_tile_width = 60 )
map_tile_height ( map_tile_height = 50 )
Size of a single hex map tile.
map_tile_x_offset ( map_tile_x_offset = 45 )
map_tile_y_offset ( map_tile_x_offset = 25 )
Choose these two values so that a second hex tile fits without gaps if this offset is added.
fog ( fog_picture = fog.bmp )
This bitmap is used to shadow a map tile (fog of war).
grid ( grid_picture = grid.bmp )
It's used to lay a grid on the map.
frame ( frame = sel_frame.bmp )
Frame of a selected unit.
crosshair ( crosshair = crosshair.bmp )
Used to show that a unit attacks another one.
explosion ( explosion = explosion.bmp )
Animation shown when unit takes damage.
damage_bar ( damage_bar = damage_bars.bmp )
Three bars saved in a vertical order used to display the damage of a unit.
Then as many map tile definitions as you want follow. The order of entries is important.
entry_name ( entry_name = plains )
Not used right now.
name ( name = Plains )
Name of such a map tile in game.
char_id ( char_id = p )
When creating a map you refer to this map tile definition by this character.
picture ( picture = plains.bmp )
Bitmap with all graphical variants of this tile saved in a horizontal order.
movement ( movement = 2 )
Movement points needed if unit wants to move over this map tile.
spotting ( spotting = 1 )
Spotting cost for this map tile (usually 1).
min_entrench ( min_entrench = 0 )
Minimum entrenchment a unit has when standing on such a map tile.
flags ( flags ( none ) )
A list of flags (separated by blanks) indicated special properties:
Directory: maps
Create a new file in this directory and put the following entries into it.
map_tile_lib ( map_tile_lib = map_tiles.def )
This is your file with the map tile definitions you want to use for this map.
map_width ( map_width = 20 )
map_height ( map_height = 20 )
Size of map.
map ( map ( ... ) )
The map consists of map_width * map_height arguments. An argument consists of the identification character
of a map tile definition and a picture_id indicating which map tile picture to use. For example 'p2' means
to take the third map tile picture in gfx/maps/plains.bmp (as 'p' is the char_id of the definition of
Plains in the example above).
tile_name ( tile_name( Berlin 8,6 8,7 9,6 ... ) )
Per default the name of a map tile is the one specified in the map tile properties. The command tile_name
changes the name of the map tiles belonging to the coordinates ( 8,6 8,7 9,6 ... )
to the first argument ( Berlin ). Note, that there must not be blanks between the x-value, the comma and
the y-value!
Directory: scenarios
Create a new file in this directory and put the following entries into it.
title ( title = "Operation Barbarossa" )
Title of this scenario.
desc ( desc = "a longer description" )
Description of this scenario including information about objectives, players, turn limit etc.
date ( date = 01.08.1941 )
The date this scenario took (will take) place. There must not be spaces between day, month and year.
nation_lib ( nation_lib = nations.def )
The name of the file in which you saved your nations.
Then you define as many players as you want.
player ( player ( axis Axis human ) )
A player is defined by these arguments:
first_team ( first_team ( axis ) )
All players are divided into two groups. Players in one group are allied with each other and enemies to
the other group. All players not listet in first_team automatically build up the second one.
attacker ( attacker = first_team )
Either first_team or second_team is the the attacker in this scenario. The other team must
defend.
victory_conditions ( victory_conditions( all 6 6,8 7,2 ) )
The victory conditions are set up for the attacking team, logically the exact opposite of all single
conditions build up the victory conditions for the defending team:
minor_turn_limit ( minor_turn_limit = 20 )
major_turn_limit ( major_turn_limit = 10 )
If the attacker fullfills all victory conditions within the major turn limit it's a major victory
(only relevant for campaigns; for example to give additional forces in the beginning of the next scenario).
Within the minor turn limit it's a minor victory (surprise! ;-) else the defender won.
map ( map = russia1.map )
This is the file with the map you defined.
weather ( weather ( f5 c2 r5 ... ) )
There are four different types of weather: fair(f), clouds(c), rain(r), snow(s). The arguments passed to weather consist of one id character
(f, c, r, s) and the weather period in turns.
Then as many map flags as you want follow.
flag ( flag( 5,7 ger axis obj ) )
A map flag is defined by these arguments:
unit_class_lib ( unit_class_lib = unit_class.def )
This is the file with your definition of the unit classes. As all unit libs loaded in this scenario use the same
unit classes (and target types) this file is loaded here (and not in the unit libs).
unit_libs ( unit_libs( axis.units allies.units ) )
Here you load all files with defined unit types you want to use for this scenario.
Then for each player a definition of the type and number of the default air/sea transporter follows.
transporters ( transporters ( axis ger_air_tran 3 ger_sea_tran 2 ) )
Each player uses only one unit type as sea transporter (analogue air transporter).
If units are embarked to an air/sea transporter in the beginning of a scenario these transporters will be added to the number of available sea/air transporters.
Then as many units as you want follow.
unit ( unit ( 0 axis tiger2 "Todesbringer" left 10,12 0 2 ) )
A unit is defined by these arguments:
Directory: campaigns
Create a new file in this directory and put the following entries into it.
Usually campaigns are made for single players so there should be only one human player defined in all used scenarios as the controls can't be changed for a campaign (only for single scenarios).
title ( title = "Barbarossa" )
This is the title of this campaign.
desc ( desc = "..." )
This is a description of the campaign giving a short outline of what happens.
final_message ( final_message = "..." )
This message is displayed when this scenario was successfully finished (in case of defeat the scenario will be restarted, so no special
message for this).
Then a list of involved scenarios with information how they are connected follow.
scen ( scen = russia1.scn )
This is the scenario file you created.
briefing ( briefing = "..." )
This briefing is displayed before this scenario is played. It informs the player about his task.
next_scen_major ( next_scen_major = russia2.1.scn )
next_scen_minor ( next_scen_minor = russia2.2.scn )
In case of major victory the scenario specified in next_scen_major is played else the one in next_scen_minor. If this next scenario is
set to "none" this means that the scneario is then over and the final message will be displayed.
The engine of LGeneral comes with working examples so have a look at them and a lot of things will get clear.
Last Update: 3rd August 2001 Michael Speck
Static Wikipedia 2008 (no images)