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

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
Must define 23 values 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
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), any value >0, restrict supply to some hexes only
1 = units can resupply on hexes adjacent to depots
2 = units can resupply on hexes in city or port, or adjacent to city/port
3 = units can resupply eiter if adjacent to depot or city/port (and into city/port)
4 = depot will expend 1 ammo each turn it resupply adjacent units
evade_special bitwise logic (0..18) Change normal behavior of units able to evade.
1 = evade is disabled when attacked from air
2 = evade s 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 regrdless these options)
trigger_ex 0..1 0 =Default, only enemy units can activate triggers
1 = All units can activate triggers regardless owner
allow_pontoon_ex -1..+1   <0 = Cost to cross a river using pontoons is one more than using a bridge (road cost+1). (Same if not defined)
>-1 = Cost to cross a river using pontoons is the same than using a bridge (road cost only)
   0 = Pontoons can only be used in rivers/streams
   1 = Pontoons can be used on any terrain allowed to build a bridge/road
force_weather 0..1 1 = Keep weather as defined in scenario (not random)
zero_msu 0..1 Avois 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-type actions are limited to range 1
>0 = Can set a different air-defence range for flaks to >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)
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
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
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
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

Attachments types configuration: ( see Attachments )

Var Denomination Disable Bonus Penalty MinCost FactCost Bonus Penalty
attach_1 Recon 0 2 - 1 30 25 Spot Mov
attach_2 Air Defense 0 2 - 1 30 25 AA/AD Ini
attach_3 Bridge 0 2 - 1 30 25 HA Mov
attach_4 AntiTank 0 2 - 1 30 25 HA Mov
attach_5 Support 0 2 - 1 30 25 MaxAmmo Mov
attach_6 Forward Observer 0 2 - 1 30 25 SA/HA to adjacent targets Ini
attach_7 Special Munition 0 2 - 1 30 25 Bonus firing Mov
attach_8 FastEntrench 0 2 - 1 30 25 Add terrain-entrench Ini
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

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