Open General
by Luis Guzman

CONFIG FILES

If you want to support
this site, please ...
CONFIG FILES

Most of latest optional rules are included in external config files (plain text files) of these types:

  • Efile/Campaign/Scenario cascade options (.CFG files)
  • Custom purchase list of units (.BUY files)
  • Custom AI (.AI files)
  • Custom text (.TXT) files
  • Misc files
  • Tiles 2.0

All lines in text files should end with a [CR+LF]
Efile/Campaign/Scenario cascade options (.CFG files)

Can be defined for equipment, campaign and or scenario level. So some global options can be defined at efile level and then changed for any campaign and later for specific scenarios, allowing this way a flexible and structured mechanism to config options.  When loading any scenario up to 3 .cfg files can be loaded in this sequence:

  • Equip.cfg will be searched first, and loaded if found. All vars defined will be set
  • If playing "Mycam.xcam", then file "Mycam.cfg" will be searched and loaded if found. All variables defined will overrite any existing
  • If loading "MyScen.xscn" finally "MyScen.cfgy" will be searched and if found, loaded, overwriting any variable previously set.
Using OpenSuite 5.0.33 or higher can configure this .cfg from EquipView, CamViewUnit, and UnitsView, respectively.
Vars are no case sensitive, so you can type uppercase, lowercase or mising and can define any number in any order.
Format  is Var = Value  ' Optional comment
$VAR VALUE/s COMMENT
pg2mode 0..1 1 = Force to play using pg2 compatibility mode
no_lose_transport 0..1 1 = Avoid losing transport when transport can't enter hex to move
sides Axis, Allied Overrides sides' labels
green 0..1 1 = Can use green replacements
green_cost 0..100 Cost percent for green replacements, relative to standar cost
green_exp 0..100 Percent of green replacement taking coming with same experience than unit
green_defexp 0..1 1 = Green reinforces come with default experience set in scenario
elite_cost 0..65535 Cost percent for elite (normal) units, relative to standar cost
exp_unit_cap 0..65534 Experience cap for units
exp_bar_factor 0..20 Factor to decrease experience gained in combat according bars
remove_leader 0..1 1 = Leaders will be removed if unit loses all bars when using green replacements
critical_hit 0..N (see formula) Chance for critical hit. Can use this formula:
C(firing) = ( NA(Firing) * (1+bars(Firing)) * SP(Firing) * N - D(Fired) * (1+Bars(Fired)) * SP(Fired) * N ) / 30
  • NA(Firing) is naval attack of unit firing
  • SP(Firing/Fired) is unit strength at start of combat
  • D(Fired) is GD or AD depending unit firing is Air/Gnd.
  • Submarines always add 10% when firing (either attacking or defending)
  • If C(firing) > 75 then C(firing)=75
  • If C(Firing) < Dice(1,100) then critical hit, fired unit is sunk
am_delayparadrop 0..1 1 = Paratrops should drop after moving. Only works if Air Missions are enabled
am_atpcheckweather 0..1 1 = Disables moving units by Air with bad weather when using Air Missions
reinf_move 1..100 Percentage of movement in the turn reinforce arrives
sh_pg1 0..1 1 = Allow upgrading in SH at any time ...this setting works only for standalone scenarios, not in campaign mode
upgrade_exp 1..100% Percentaje of remaining experience for units upgrading, rest is lost
build_mask bitwise logic 0 =Allow any else allow to build only certain facilities defined by these codes:
     Bridge=1, Airport=2, Port=4, Fort=8, Station=16
* Sample: to allow building only Bridge and Station, set build_mask = 1+16
blow_mask bitwise logic 0 = Allow any else allow to blow only certain facilities defined by these codes:
     Bridge=1, Airport=2, Port=4, Fort=8, Station=16, City=32
* Sample: to allow blowing only Bridge and Cities, set blow_mask = 1+32
build_cost 16,20,12,12,18 Cost to build: Bridge, Airport, Port, Fort, Station
naval_noblock_bridge 0..1 1 = Allow land units (<=AT class) attacking naval units located on bridges to flee / scuttle (same than with ports)
class_evade list of probabilities Probability for each class to evade (first % is for infantry = class #1)
Must define 23 values, for classes 1 to 23, delimited by commas, or just a basic probability for all classes prefixing value with exclamation mark: "!"
zoc_evade 0..100% Probability of evading reduced for each adjacent enemy
refit_base 0..1 1 = Refit to scenario base strength or unit base strength, whichever is lower
sabotage_min 0..Value 0 = 40, other Min. probability for sabotage to success
sabotage_max 0..Value 0 = 85, other Max. probability for sabotage to success
kamikaze 0..1 0 = Kamikaze units die after using all ammo or engaged in combat
1 = Extended missile rules: units dies after using all fuel and not able to resupply
ground_carrier bitwise logic (0..7) 0 = No ground carrier
>0 to define different options summing up values (bitwise logic)
any value no zero allow to enter into empty carrier's hangar
1 enables to enter/launch
2 enables these options: Combat Support, AirDefense and FireSupport
4 disables being launched (taking off) units 8 allow land units to enter naval-class carriers out of a port
air_carrier 0..1 0 = ground units cannot enter air-containers (default)
1 = Allow ground units to enter air-carriers moving into them. Hotkey Ctrl+K disables it, so unit can move to same hex than air-container without entering its hangar
air2container_deploy 0..1 0 = Allows to enter the carrier without limitation (default)
1 = Restrict the deployment when container is located at a port airfield for ground/air container
supply_ex bitwise logic (0..10) Change rules summing up options:
0 = disabled (default supply rules). Any other value restricts units to resupply only from Depots and/or Cities/Ports.
....Options are made summing up these values:
1 = Units can resupply if adjacent to Depots (supply units), except if unit is also a Depot.
2 = Units can resupply if into/adjacent to cities or ports.
3 = Units can resupply by Depots or in/adjacent to city/ports
4 = Depots must spend 1 ammo/turn to resupply other units. So if no ammo, cannot resupply units in that turn.
8 = Depots can resupply from other Depots, as far as they have not supplied other units, nor moved nor fired.
* Air units are not affected by this config var.
* Adding 4 or 8 implies Depots are enabled (no need to add 1 as well)
* Naval units can always supply in Ports, and optionally also adjacent to Depots (if 1,4 or 8 values are added)
evade_special bitwise logic (0..18) Change normal behavior of units able to evade.
1 = evade is disabled when attacked from air
2 = evade is disabled if attacked from range>1
3 = 1+2
4 = evade is disabled completely
8 = options 1 and 2 only apply to ground units (that is air-units still can evade regardless these options)
32= Subs won't evade if "evade" special is ticked.
trigger_ex 0..1 0 =Default, only enemy units can activate triggers
1 = All units can activate triggers regardless owner
allow_pontoon_ex -1, 0, 1, 2   -1 = (default if not defined in .cfg). Cost to cross a river using pontoons is one more than using a bridge (road cost+1).
   0 = Cost to cross a river using pontoons is the same than using a bridge (road cost only). Can only be used in rivers/streams
   1 = Pontoons can be used on any terrain allowed to build a bridge/road with no extra cost to cross
   2 = Pontoons can be used on any terrain allowed to build a bridge/road withan extra cost (road+1)
force_weather 0..1 1 = Keep weather as defined in scenario (not random)
zero_msu 0..1 Avoids the engine assuming survive victory condition because there are msu in game
flak_ex2 0..1 1 = Flaks protect adjacent units attacked by planes from any adjacent hex
flak_range 0..Value 0 = Default. All Flak's combat with air units are limited to range 1
>0 = Set a range for Flak's combats with air units not limited to 1. (* Note: interception remains limited to range 1)
ignore_custom_ename 0..1 1 = Ignore custom efile names in bottom banner of map
ai_refit_free 0..1 0 = Default, means ai must expend prestige to refit
1 = AI will refit for free
noldr_auxunits 0..1 1 = Avoid P1 aux units to get a leader (when playing campaigns)
1 = Avoid all units not marked as core to get a leader (when playing scenarios)
noldr_randtype R1, R2, ... Set the list (delimited by commas) of random leader type numbers to disable ( >=9 and <=34)
noldr_classunits C1,C2,... Set the list (delimited by commas) of unit's classes you want to disable getting a leader
build_start_ex 0..1 Set to 1 to allow start building, blowing or repairing if only unit can fire, regardless movement
g2a_intercept_mode Bitwise logic Customizes ground-to-air interception, using a bitwise logic allowing these values
0 = default rule:
      * Hidden AD/Flaks can intercept in range 1 both when plane is moving or plane finish movement
      * AD/Flaks can also do air-defense if plane attacks any friend unit in range
1 = disable air-defense after interception
2 = enable interception if plane finish movement in range 1 even if Flak/AD is spotted
3 = 1+2
      * Disable air-defense after interception
      * Enable interception if plane finish movement in range 1 even if Flak/AD is spotted
Note: Remember that any inmobile unit (cannot move) remains spotted after first time it is spotted, thus they will no longer able to intercept if hidden status is required.
gnd_air_range 0..255 For ground units firing air, limit their range to this value
build_terr_ex 0..1 Set to 1 to allow building also in terrain: Mountain and Forest and also convert City in Port (if connected to sea)
air_landmines 0..1 Set to 1 to allow air units having "DropMines" but not having "AirDropMines" specials, to drop mines in land too (not only in sea)
upgrade_ldr 0..2 When upgrading leadered unit which makes random leader attribute useless...
Set to 1 to assign new random (according new equipment) but losing 1 bar.
Set to 2 to remove leader, reducing unit's exp and bars as to be able to get a new leader.
blow_any_terrain 0..1 Set to 1 to be able to blow any terrain except Ocean, Impas.River, River and Shallow Sea
wild_weasel_ex 0..2 Set to 1 to allow planes enabled to fly wild-weasel mission in efile to attack AD/Flaks/CanAA units firing first.
Set to 2 to allow same when flying as an AirMission
avoid_cbf 0..1 Set to 1 to allow aty/ships units having "Recon" special to avoid CounterBatteryFire (CBF) as far as they have remaining movement
peg_firesup 0..1 Set to 1 to get single fire-support (once per combat)
Set to 2 to get single air-defence
Set to 3 to get both
ff_mustmatch 0..1 Set 1 to force units to land in carrier to match F/F. Only use efile F/F settings for unit and carrrier/transport, not scenario settings.
subcd_naval_only 0..1 Avoid using CD if submarine is involved and defender's target-type is not naval
allow_country0_gtp 0..1 Allow units defined in efile as all-country (country#= zero), to use GTP units defined also as all-country as far as both match F/F set in efile
limit_move2set_bridge 0..1 Restricts entering an impassable hex to build bridge or pontoon, from another impasable hex.
sub_ex 0..1 Extended rules for submarines (are hidden while submerged and can be spotted only by DD,TB or units with ASW special)
sub_buytra 0..1 allow subs to buy organic transport to simulate being surfaced
weather_rain_snow Rain%, Snow% Makes Rain%, Snow% of movement available for units moving on Air/Sea when Rain/Snow. Set zero to leave 100% of movement
know_ex 0..1 Make units retreating to unspotted hexes to remain demi-spotted until the next player turn.
newcores_use_scensettings 0..1 Make new cores to skip cam auto-refit/resuply.
air_noblock 0..1 Make air units don't block supplies from adjacent hexes.
build_turn 2,2,2,2,2 Can define the duration (turns) to build: Bridge, Airport, Port, Fort, Station.
repair_turn 2,2,2,2,2 Can define the duration (turns) to repair: Bridge, Airport, Port, Fort, Station.
Attachments...
attach_on 0..1 1 = Can use attachments
attach_factor Value Cost attachments percentage. Default 25 (%)
attach_mincost Value Minimal cost for attachment. Default 30 (pp)
attach_armycost 0..2 0 = Attachments don't count in ArmyCost
1 = Count in ArmyCost
2 = Count in ArmyCost for items not defining penalty
attach_minfuel 0..Value 0 = Fuel Pods bonus is taken as an absolute value
>0 Fuel Pods bonus is taken as a percentage and the unit receives an extra fuel at least the same than Value
attach_minmove 0.. 0 = Fast Speed bonus is taken as an absolute value
>0 Fast Speed bonus is taken as a percentage and the unit receives an extra movement at least the same than Value
attach_defrules 0.. 0 = Units' attachments restrictions are defined by the efile
1 Units' attachments restrictions defined in the efile are ignored

Attachments types configuration: ( see Attachments )

Note: Last optional parameter (penalty-type) can be: 1=Movement penalty, 2=Initiative, penalty, 3=ammo penalty, 4=fuel penalty

Var Denomination Disable Bonus Penalty MinCost FactCost Penalty-type Bonus Def.Penalty
attach_1 Recon 0 2 - 1 30 25 1 Spot Mov(1)
attach_2 Air Defense 0 2 - 1 30 25 2 AA/AD Ini(2)
attach_3 Bridge 0 2 - 1 30 25 1 HA Mov(1)
attach_4 AntiTank 0 2 - 1 30 25 1 HA Mov(1)
attach_5 Support 0 2 - 1 30 25 1 MaxAmmo Mov(1)
attach_6 Forward Observer 0 2 - 1 30 25 2 SA/HA to adjacent targets Ini(2)
attach_7 Special Munition 0 2 - 1 30 25 1 Bonus firing Mov(1)
attach_8 FastEntrench 0 2 - 1 30 25 2 Add terrain-entrench Ini(2)
attach_9 Bunker Buster 0 2 - 1 30 25 3 Ignores effective defense of bunkers and bonus of fortification terrain Ammo(3)
attach_10 Fast Builder 0 2 - 1 30 25 2 Reduces turns needed for building/repairing Ini(2)
attach_11 Fuel Pods Munition 0 2 - 1 30 25 1 Adds fuel to the unit (see also attach_minfuel) Mov(1)
attach_12 Fast Speed 0 2 - 1 30 25 2 Adds movement to the unit (see also attach_minmove) Ini(2)
Custom purchase list of units (.BUY files)

When loading "MyScen.xscn" a file "MyScen.buy" will be searched and if found, loaded. Then only items (lines of equipment's codes) in this file will be available to purchase. Using OpenSuite 5.0.33 or higher can configure this .buy file

Customizing AI (.AI files)


Using OpenSuite 5.0.33 or higher can configure a list of available items to purchase and also a set of pseudo-vars to customize how AI will purchase units.
These are the vars available right now (notice they should be prefixed by a $ sign):
 

$var Default value Comment
$buy_ver2 0 0 = use same system than before
1 = use new buy system
$buy_turn 1,1 Don't buy until turn "1st value" turn and can only buy every "2nd value" turn.
$buy_minpres 0 Minimun prestige required to purchase new units.
$buy_refit 70 % of the prestige needed to refit all units, that ai will save
$buy_newair 50 % of remain prestige used to buy new air units
$buy_pick_method 0 How ai will pick unit to buy.
0 = buy cheaper unit (default)
1 = buy rand in cheap/range
2 = buy rand in strongest/range
$buy_pick_range 1 Range of units (number of unit) to select (random) the unit purchase.
$ai_class_cap list delimited by commas list of class cap. AI won't buy units having more than this values.
$buy_aggresive 2, 1, 9, 5 ,1, 4, 2, 3 Sequence of class (1=inf,2=tank,...) to buy when aggressive (up to 12 items).
$buy_defensive 1 ,1 ,9 ,10,1, 4, 9, 2 Sequence of class (1=inf,2=tank,...) to buy when defensive (up to 12 items).

When $buy_ver2 is 1 then AI's purchase sequence is:
  • AI checks if can buy because, turn, min-pres, buy-cap and equipment available
  • AI figures how much prestige it would need to refit all its units, and save $buy_refit percentage
  • If there is at least 1 SH, AI checks for VH in danger and buys an infantry or AT able to move to garrison that VH. Will pick the cheapest units able to move in next phase having GD+CD >= 9
  • Then will try to buy air units according $buy_newair and prestige available
  • Finally AI will check each SH (sorted out by danger level) counting enemies and friends in a radio of 10 hexes from the closest VH to the "active" SH. Will check each item in sequence (according global stance) buying one unit (from the class in sequence), if enemy has more units of that class than AI, within the range-10. It loops until running out of prestige assigned to buy.
Custom Text files


OPENTXT_SAMPLE folder in Main game folder includes a sample for each of the text files the game uses. Also a sample of .CFG files is included, so anyone can load any of them using a text editor (Notepad or similar) to see how they are defined.

These are the text files used by the game, and should be placed in EFolder:

  • Nations.txt
    Cannot be omitted. Define the countries for the Efile
  • Names.txt
    Can be omitted, but then leaders won't get a name
  • TerrainExt.txt
    Can be omitted as game will use defaults. See below for details
  • Strings_efile.txt
    Can be omitted, but it define custom text needed for customized EFiles
  • Colors.txt
    Can be omitted and game will use defaults. Required only if you want a few different colors
  • Weather.txt
    Can be omitted and game will use defaults. Only require for EFiles wanting different weather zones
  • Fronts.txt
    Can be omitted. Only needed for designers when using OpenSuite
  • Eyear.txt
    Allows to set a specific base year different than default 1900
    A better alternative, which takes precedence, is to include this token:  "BYEAR = ####" in first equipment item name (first record of Equip.txt file)
.
Nations.txt

Every EFile must include two lines to define side's labels, one line for each country in game, being the first entry for "All countries"

Names.txt

This file has same structure than PG's file.
For compatibility, first 31 lines are not used and then every next 31 lines are used to take randomly a leader name for the unit's country when needed.

TerrainEx.txt

This file replaces the old deprecated Terrain.txt file, using a much better structured layout.
This file can define most of the data related with terrain behavior on game, replacing default behavior. No lines should be deleted nor added, if you want to edity it, just overwrite the values.

This file defines:

  1. For each terrain type:

    Base-entrench: entrench units get when entering this terrain
    Inititiative-cap: unit cannot use more inititative than this value
    Supply-factor: supply % of maximun that unit can get in this terrain (i.e %25 for sand terrain). Any terrain with no supply parameter takes 100% as default.
    Allow-bridge: 1/0 if terrain can/cannot have a bridge on it
    Avoid-mech-landing: 1/0 if track and half track units cannot land in this terrain

  2. Supply modifiers to be added to terrain supply-factor percentaje:

    [frozen-supply = Negative Value ] ... meaning that a terrain with default 100% will be limited to 89% when frozen ground condition
    [mud-supply = Negative Value ]    ... meaning that a terrain with default 100% will be limited to 89% when mud ground condition
    [road-supply =Value]                     ... meaning that if there is a road default sand 25% will be increased to 35%
    [rail-supply =Value]                       ... meaning that if there is a road default sand 25% will be increased to 30%

  3. one block defining cost to enter each terrain type by using each movement method for dry, frozen and mud ground conditions
  4. one block defining cost to enter each terrain type by using roads and rails for dry, frozen and mud ground conditions
Strings_efile.txt

This file allows defining customizable strings replacements according the EFile specifics. It is structured in several sections (tokens between brackets, not case sensitive). You can define (uncomment) only the sections you want, but for any uncommented section, all lines following until next section must be uncommented too.

  • [Results]
  • [Targets]
  • [Apaces]
  • [Movement] (can define an additional [Movement2] and [Movement3] sections)
  • [Transports]
  • [Classes]
  • [Requisition]
  • [Terrain] (can define an additional [Terrain2] section)
  • [UnitData]
  • [Latitude]

Misc files

There are also other files with very specific meaning:

  • Antique.ini
    Place in EFolder when you need to define different string for leaders denominations
  • Pg1Mode.cfg
    Place in EFolder when EFile and campaigns are made to use spacial Pg1-Mode, emulating many of PG rule
  • ogrun.
    Game creates this file after first time you run it.

Config Tiles 2.0

This version of tiled-maps allows to use a text configuration file Hex_tileset.cfg to be placed in the specific efile's OPENGUI folder. The png files though can be read either from efile's OPENGUI or main OPENGUI folder.

This .cfg file allows these pseudo vars ($Vars). When the $var accepts a list it means a row of values delimited by commas (ie: 0,2,4). When values refer to 'terrin' it means terrain id(0 clear, 1 city,...)

$var Default value Comment
bkg_ter 0 Define terrain to be painted as background of terrains different than 'clear'
Values: 0..18
draw_after_roads none List of terrains that will be painted after roads/rails
Sample: = 1,2 means cities and airfields will be drawn upon roads
rand_ter none List of terrains that will pick a random image to paint it
Sample: = 0,1 means the clear and desert will use random images. For default 9 columns this setting means that 11% of - say clear terrain - will use a given image
rand_neighbor_factor 0 Factor reducing probability to draw a random decorative for each adjacent hex having same terrain. When
Sample: = 5, means that probability to paint a random image when surrounded by 6 same terrain hexes would be:
100-6x5 = 70%
last_rand_prob none Probability to pick last random column when using $rand_ter
Sample: = 5, means that last column of random decorations will be picked 5% of times, while rest (8) of 9 total random columns would be 1 / (9-1) = 12.5% using default columns. If not defined each column has a probability of 11.1%
norand_roads 0 When set to 1, terrain will always use first column if hex has roads
Values: 0..1
norand_rails 0 When set to 1, terrain will always use first column if hex has rails
Values: 0..1
sides_ter none List of terrains using sides' overlays
Sample: = 3, 4, 5, 6, 7 means that Forest, Boccage, Hill and Mountain will use 'sides' overlays when same adjacent terrain on S1,S2 and/or S3 (See picture in Tiled-maps)
sides_inter_ter none List of terrain's pairs that should draw sides' overlays.
Pairs should be joined by tokens '+' or '>', being each pair comma delimited (i.e: 3+5,3+6,5+6)
Pairs joined by '>' means only first terrain will draw the side overlay toward the other terrain
Pairs joined by '+' means the relation is reversible, then both will draw the overlay toward the other
Sample: = 3>5 means forest will draw side overlay to adjacent hills (only)
Sample: = 3+5 is the same than 3>5, 5>3 (forest to hills, and hills to forest)
adjacent_ter none List of terrains that would use Cols#1,#2 or #3 accosding how many same terrain is adjacent
Sample: 1, means that cities will use Col#1 if alone, Col#2 if 1it has 1,2 or 3 adjacent cities, and will use Col#3 if it has 4,5 or 6 cities adjacent
draw_after_shores none List of terrains that should be painted after the shores
clean_water_shores none List of terrains that will erase adjacent water hexes when painting shores

All the $Vars can be omitted or commented out, and then 'default' values will be used.