Web Analytics
We support WINRAR [What is this] - [Download .exe file(s) for Windows]

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
SITEMAP
Audiobooks by Valerio Di Stefano: Single Download - Complete Download [TAR] [WIM] [ZIP] [RAR] - Alphabetical Download  [TAR] [WIM] [ZIP] [RAR] - Download Instructions

Make a donation: IBAN: IT36M0708677020000000008016 - BIC/SWIFT:  ICRAITRRU60 - VALERIO DI STEFANO or
Privacy Policy Cookie Policy Terms and Conditions
LGeneral HOWTO

LGeneral - HOWTO

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.

Table Of Contents

  1. Graphics
  2. Nations
  3. Unitclasses (and target types)
  4. Units
  5. Maptiles
  6. Maps
  7. Scenarios
  8. Campaigns

Graphics

Flags

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:

Unit Graphics

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:

Maptile Graphics

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:

Additional Maptile Graphics

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.

  • a pattern tile with just a thin border (used to put up a hex grid)
  • a selection frame (used when unit is selected)
  • a crosshair (used to show which units are involved in a battle)
  • explosion animation (frames saved in a horizontal order; width and height must be the same)
  • damage bars (used to show the damage of the unit; three bars in a vertical order where the first is drawn when unit's damage is lower than 40%, the second when damage's lower than 70% percent else the third one)

Example:

Themes

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.

Table Of Contents

Nations

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:

  • entry_name: you refer to this nation is other resource files by this entry_name
  • full_name: this name is displayed in game
  • picture_id: defines which nation flag to use from file flag_pic above

Table Of Contents

Unit Classes

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:

  • entry_name: is used to refer to this unit class in other resource files
  • full_name: this name is displayed in game
  • move_sound: default sound played when units belonging to this class move (set this argument to none if there is no default sound)

Table Of Contents

Units

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.

target_type ( target_type = hard )
Target type (defined in your unit class definitions) of this unit type.

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):

  • swimming: unit's a ship
  • flying: unit's an airplane
  • parachute: if unit uses an airplane as transporter it may debark everywhere (units without that flag must debark at airports)
  • wheeled: unit's a vehicle with wheels; will have influence when weather is implemented
  • tracked: unit will move easier through mud and snow (when weather's implemented)
  • transporter: such a unit may be assigned as transporter to a unit that's not swimming, flying, wheeled or tracked (Note, that transporters must have no attack and ammo!)
  • artillery: unit will support attacked allied units in its range with defensive fire but can't shoot back when attacked itself on range
  • air_defence: unit will support attacked flying allied units in its range
  • interceptor: unit will support all allied units that aren't interceptors
  • bridge_eng: unit will build a bridge as long as standing on a river allowing allied units to pass quickly

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.

  • move_sound: sound played when unit moves

Table Of Contents

Map Tiles

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.

max_entrench ( max_entrench = 3 )
Maximum entrenchment a unit can get on such a map tile.

flags ( flags ( none ) )
A list of flags (separated by blanks) indicated special properties:

  • no_spotting: this tile can only be reconnoitred when unit's close to it
  • airport: ground units can embark/debark there
  • water: only swimming (and flying) units may pass such a tile
  • river: engineers may build a bridge over this tile (not implemented yet)
  • mountain: only infantry(unitclass 0) and flying units may pass such a tile
  • difficult: such a terrain requires all movement points to pass
  • inf_entr_bonus: infantry entrenchment bonus increases minimum entrenchment(+2) and maximum entrenchment(+4) for infrantry
  • harbor:swimming units are allowed to enter this tile and supply there

Table Of Contents

Maps

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!

Table Of Contents

Scenarios

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:

  • entry_name: used to refer to this player when creating units or setting flags
  • name: real name displayed in game
  • default_control: either human or cpu (this can be changed when playing as single scenario)

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:

  • logical relation between conditions:
    • all: all victory conditions must be fullfilled
    • one: one fullfilled victory condition is enough to win for the attacking team
  • required objectives: number of strategically important flags (golden frame) the attacker must capture
  • primary objectives (optional): a number of coordinates of primary objectives (golden flags) follows (no blanks between x, comma and y allowed); primary objectives may be used to set up conditions like: capture the capitial city and three other important objectives (of your choice)

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:

  • position: coordinates of flag
  • nation: entry_name of the nation owning this flag
  • player: entry_name of the player owning this flag
  • obj (optional): add this argument if this is a strategically important flag

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).

  • player: entry_name of the player this definition is set for
  • default_air_transporter: entry_name of the unit lib entry you want to use as air transporter
  • number_of_air_transporters: number of air transporters that can be used at the same time
  • default_sea_transporter: entry_name of the unit lib entry you want to use as sea transporter
  • number_of_sea_transporters: number of sea transporters that can be used at the same time

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:

  • delay: unit has this delay (in turns) before entering game
  • player: entry_name of player controlling this unit
  • unit type: entry name of unit library entry with properties for this unit
  • name: unique name of this unit (if "none" is passed the name of the unit is set to a default name)
  • direction: If picture type is single it's one of these values (all_dirs not supported yet):
    • left: unit looks to the left
    • right: unit looks to the right
  • position: position of unit
  • entrenchment: unit starts with this entrenchment
  • experience level: unit's experience level (0 - 5)
  • transporter (optional): transporter of this unit (wheeled, tracked, flying and swimming units may not have a transporter)

Table Of Contents

Campaigns

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.

Table Of Contents

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)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2006 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Sub-domains

CDRoms - Magnatune - Librivox - Liber Liber - Encyclopaedia Britannica - Project Gutenberg - Wikipedia 2008 - Wikipedia 2007 - Wikipedia 2006 -

Other Domains

https://www.classicistranieri.it - https://www.ebooksgratis.com - https://www.gutenbergaustralia.com - https://www.englishwikipedia.com - https://www.wikipediazim.com - https://www.wikisourcezim.com - https://www.projectgutenberg.net - https://www.projectgutenberg.es - https://www.radioascolto.com - https://www.debitoformtivo.it - https://www.wikipediaforschools.org - https://www.projectgutenbergzim.com