Before the 1.50 patch MOO2 mods were made using hex editor or specialized tools like OCL to create binary patches for each mod. This approach has many downsides, so 1.50 uses configuration files instead. They are plain text utf-8 files and can be viewed and edited with Notepad or any other plain text editor. Config is modular, file can "include" other files. By default the game loads ORION2.CFG on startup, which may look like this:
include 150\150i.CFG; # include 150\ICE-X.CFG;
In this example the mod 150i is enabled and ICE-X is disabled (commented out by #
sign) and. If
you comment out 150i and uncomment ICE-X, the game will start with ICE-X enabled.
A quick way to understand config syntax is to look inside some config shipped with this patch. For a formal description see Syntax below.
Startup and Command Line
By default the game loads ORION2.CFG from the game folder. It will complain and
terminate if this file does not exist or is malformed. Although most users will never need
to use anything but this default file, there is a way to provide another file or even several
files. This is done by using /c
command line switch:
ORION150.EXE /c=A.CFG
If you did specify at least one /c switch then configs provided this way will be read instead of ORION2.CFG. In the example above config will be loaded from A.CFG. You can specify /c several times, in this case files will be loaded sequentially. You may specify paths, but remember that all file and directory names must be in DOS 8.3 format.
If all config files have been loaded successfully the game will extract all current settings to
EXTRACT.CFG. This file is a full config and can be loaded (for example you can rename it to
ORION2.CFG and restart the game). Extraction is mostly intended as an aid for modding and
development, but you can also use it to review your current settings. For creating a new mod
EXTRACT.CFG is a good starting point: make a copy of it in the 150\mods\
folder, rename it to a
new mod name and adjust parameters.
You can change extracted file’s name by specifying /extract command line switch:
ORION150.EXE /extract=X.CFG
Reloading and Extracting on the Fly
You can reload config without restarting the game. This is done by pressing ALT-RE
in the main
screen, colony build screen or in combat, after which success or failure is reported via a pop-up.
This is very useful for testing but can be used to cheat so it won’t work in multiplayer games.
Additionally, ALT-RI
reloads only interface options and is allowed in multiplayer games.
You can extract current settings anytime in the same mentioned screens. Press ALT-EEE
and the game
will write settings to EXTRACT.CFG (or whatever was specified in /extract=). This again is mostly
for testing and modding, but you can also use it to check server’s game settings if you are a client
in network multiplayer.
Network Synchronization
In network multiplayer the host’s config is broadcast and applied by clients so that all sides have the same game settings. This doesn’t change config files on a client’s disk, only the memory state for the duration of the game. Only non-interface options are broadcast, e.g. if the host has renamed some weapon, the change will be visible only to the host.
Syntax
The syntax should be fairly obvious from reading ORION2.CFG or EXTRACT.CFG, but for those interested here is the summary:
-
Config file supports comments. Character
#
and anything after it is considered a comment until the end of the line. This can also be used for disabling parts of config. -
Empty lines are ignored, series of whitespaces are equivalent to a single space.
-
Apart from comments, config consists of parameter assignments and commands. Both are terminated by a ; symbol.
-
Commands are:
include
,enable
,stop
. -
Command
include
triggers parsing of a subconfig (by file name). -
Command
enable
is used by MOO2 Launcher to mark enabled mods (by mod_id). -
Command
stop
skips the rest of the current file. -
Each parameter assignment changes some game rule, e.g. the following will make the game use Point Defense on fighters' beams:
fighters_use_pd = 1
. -
Each parameter has a type: a number, a ratio, a fixed set string or an arbitrary string.
-
Numbers can be written in decimal or in binary form.
-
Parameters of type ratio are needed to represent rational numbers. They are specified as two numbers separated by / symbol.
-
Strings containing whitespaces or special symbols
"
#
;
need to be surrounded by double quotes (""
). The escape character is^
.
Commands
Include
Command include
allows to spread configuration among several files. Its primary function is to
allow easy enabling and disabling of mods, but also can be useful if you want to separate several
aspects of a mod. For example game rules and map generation rules are generally independent, so you
can write:
include \150\MyMod.cfg; include \150\harshmap.cfg;
This way you will be using MyMod.cfg game rules with map generation controlled by harshmap.cfg.
Relative Include
By default, all file paths in config are relative to the game directory, but paths starting from
..\
are interpreted relative to the CURRENT FILE, e.g. if you have file:
150\mods\my.cfg
Then inside it, two following includes are equivalent:
include \150\mods\cfg\extra.cfg; include ..\cfg\extra.cfg;
Variable Include
File path in include
is actually a template that supports variables LANG, LANG_ID and LANGUAGE,
e.g. the following command:
include \150\MyMod\$LANGUAGE$\mymod.cfg;
will include file 150\MyMod\English\mymod.cfg
if your installation has English set as a language.
This allows the creation of multilingual mods. Variables and their values are:
Installation Language |
$LANGUAGE$ |
$LANG$ |
$LANG_ID$ |
English |
English |
en |
0 |
German |
German |
de |
1 |
French |
French |
fr |
2 |
Spanish |
Spanish |
es |
3 |
Italian |
Italian |
it |
4 |
Installation language may be changed by putting a number from LANG_ID column to language.ini file in the game directory and restarting the game.
Optional Include
Normally include requires a file to exist. The game will report an error if the file being included
is missing. This can be prevented by putting ?
before the file name:
include ?\150\maybe.cfg;
This prevents the config loader from aborting if 150\maybe.cfg
does not exist.
Stop
You can skip the rest of the current file using stop command:
stop;
It has no arguments and is intended for testing. Note that config parsing will continue after
include if the current file that contains stop
was included. For example if file’s A 10th line is
include B;
and file’s B 20th line is stop;
then lines beyond 20 in B are skipped and parsing
continues from line 11 of A.
Single Value Parameters
The General form of setting a parameter is:
<parameter> = <value>;
Here parameter is one of fixed parameter names like speed_fast_bonus
, android_morale
or
mod_name
:
speed_fast_bonus = 4; android_morale = workers_only; mod_name = "My mod";
Here all 3 parameters have different types. The first is a number, the second is a string from a fixed set and the third is an arbitrary string.
Numeric Value
Numeric parameters accept numbers in a certain range. Each parameter has its own range, for example speed_fast_bonus can be 0 to 255, while fighters_use_pd can be only 0 or 1 (this is called boolean; for such parameters 0 means disabled or off and 1 means enabled or on). Sometimes you need to write parameter in binary (a bit mask), this can be done by prepending a value with 0:
weapon plasma_cannon available_mods = 010010;
Here 010010 is a binary form of the number 18. All numbers starting with 0x are parsed as hexadecimal, for example 0x1a or 0x1A equals to 26. Any other number starting from 0 is interpreted as binary, so writing 0123 will result in a parse error (2 and 3 are not binary digits).
Ratio Value
Ratio value represents a rational number. This is needed when ratio cannot be accurately expressed as percentage and rounding is undesirable for some reason. It consists of two 16 bit integers separated with / symbol:
govt_bonus feudal_reduction = 1/3;
Note that no space is allowed between / and numeric components, but you can optionally drop /<num> part if you want an integer value, i.e. specifying 2 is legal and is the same as specifying 2/1.
Enumeration
Some parameters accept a string from a fixed set of choices. For example android_morale accepts one of 8 strings:
-
workers_only
-
farmers_only
-
scientists_only
-
farmers_and_workers
-
workers_and_scientists
-
farmers_and_scientists
-
all_droids
-
none
You cannot write "all_androids" for example. The list of options for each parameter can be found in the corresponding entry in PARAMETERS.CFG.
Arbitrary String Value
Some interface parameters like mod_name accept arbitrary strings:
mod_name = MyMod;
If you want spaces or special symbols inside the string you’ll need to use double quotes:
mod_name = "MyMod version 1.0";
Inside the quotes all special characters but "
and ^
are interpreted as part of the string. For
example a #
symbol inside a quoted string will not start a comment. Symbol ^
is an
escape character and allows the use of symbols "
and ^
in strings.
Table Parameters
Some parameters are tables. You can set a single value or the whole table in one shot. To set a single value in a table:
<table> <row> <column> = <value>;
E.g. to set damage bonus for point defense mount when no high energy focus is present:
mount_dmg nohef pd = 50;
To set the whole table:
<table> = <value1> <value2> ... <valueN>;
E.g.:
mount_dmg = 50 100 150 75 150 225;
The latter form is called the bulk notation and requires you to know the order of rows and columns. Consult PARAMETERS.CFG comments for specific table, columns and rows are listed in the correct order there.
You do not have to always specify the whole table, you can specify a part of it:
mount_dmg hef pd = 75 150 225;
In this example you can also drop PD if you know it’s a first column:
mount_dmg hef = 75 150 225;
In tables you usually want to specify all values for completeness but if you want to leave some intermediate values unchanged you may skip items by using - (dash) symbol:
mount_dmg nohef pd = 50 - - 75;
In this example values 50 and 75 are assigned to PD mount without and with HEF respectively. Two dashes skip values for normal and Hv mods without HEF.
More bulk notation examples can be found in the Modding section.
LBX substitution
For a number of LBX files you can specify an alternative file to be loaded instead. This is useful to provide custom texts or graphics. Since patch 1.50.5 this feature is also used for multilingual support.
If you specify non-existing files the game will refuse to start or reload config. The check is simplistic and cannot detect malformed files, using those will result in sudden crashes. The following LBXs are supported:
cmbshp |
credits |
colsysdi |
combat |
design |
diplomse |
estrings |
eventmse |
fonts |
help |
herodata |
hestrngs |
info |
kentext |
kentext1 |
maintext |
newgame |
officer |
raceicon |
racename |
races |
racesel |
rstring0 |
shipname |
ships |
skildesc |
starbg |
starname |
techdesc |
techname |
For example:
info.lbx = \150\MyInfo.LBX;
Here we tell the game to load MyInfo.LBX from 150 subdirectory instead of INFO.LBX.
To reset to a default LBX set the corresponding parameter to 0 (a null string):
info.lbx = 0;
You can change these parameters on the fly because most LBXs are loaded on demand whenever the game needs them.
Multilingual mods require different LBXs depending on current language. To support such mods all lbx parameters are processed as templates similar to include command’s templates. Actual filename depends on the current language, e.g. this:
help.lbx = \150\HELP_$LANG$.LBX;
will expand to \150\HELP_EN.LBX if your current language is English. Refer to include command
description for the complete list of variables and their values. Note, that unlike include
templates, optional files via ?
are not supported.
Default Configuration
This patch comes with an extensive configuration. The main config file is ORION2.CFG, and it refers
to other config files by means of the include
command. Default configuration is also supplied in
machine-readable form in config.json.
ORION2.CFG
ORION2.CFG specifies the location of build lists, scripts, updated 1.50 LBX’s as well as other CFG’s to be loaded:
-
build.cfg = \150\build\BUILD$ID$.CFG;
— location of all eleven build lists. -
main.lua = \150\scripts\main\MAIN$ID$.LUA;
— location of main scripts. -
newgame.lbx = \150\lbx\NEWGAME.LBX;
— required file — contains updated graphics for the New Game screen. The 1.50 exe will crash without it. The file has been made optional and not a replacement of the original lbx to preserve compatibility with the classic exe’s: This updated lbx file cannot be used with version 1.40, 1.31 or any prior versions. -
racesel.lbx = \150\lbx\RACESEL.LBX;
— contains the redrawn Darloks button, now spelled 'Darloks' instead of 'Darlocks'. -
colsysdi.lbx = \150\lbx\COLSYSDI.LBX;
— fixes colors for tiny toxic, radiated and barren planets in the Colony screen. -
techname.lbx = \150\lbx\TECHNAME.LBX;
— this file contains a couple of spelling corrections. -
eventmse.lbx = \150\lbx\$LANG$\EVENTMSE.LBX;
— required file — contains GNN news fixes (available in all languages). -
estrings.lbx = \150\lbx\$LANG$\ESTRINGS.LBX;
— required file — supports the updated Colony Info Summary window in the Colonies screen (available in all languages). The English language file also contains updated Leader Hire Pop-up texts and several spelling corrections. -
help.lbx = \150\lbx\$LANG$\HELP.LBX;
— English only — contains corrected and substantially improved descriptions. -
hestrngs.lbx = \150\lbx\$LANG$\HESTRNGS.LBX;
— English only — contains several text corrections. -
maintext.lbx = \150\lbx\$LANG$\MAINTEXT.LBX;
— English only — contains a couple text corrections. -
rstring0.lbx = \150\lbx\$LANG$\RSTRING0.LBX;
— English only — deletes 'Used' that appeared after Robotic Factory in the Industry Summary. -
skildesc.lbx = \150\language\$LANG$\SKILDESC.LBX;
— English only — corrects texts of Leader Skills. -
techdesc.lbx = \150\language\$LANG$\TECHDESC.LBX;
— English only — corrects weapons and specials texts as seen in the Ship Design Dock. -
scan_mods = \150\mods;
— where to search for mods. -
include ?\150\ENABLE.CFG;
— contains the mods that are enabled by MOO2 Launcher. Set your desired mods in ENABLE.CFG manually when not using MOO2 Launcher. -
enable USER;
— causes USER.CFG to be included after all other mods, see the next section.
USER.CFG
Config file 150/USER.CFG contains all user specific interface settings. This file can be opened from
the Edit menu in MOO2 Launcher. Settings are disabled (#
) by default:
-
disable_vsync = 0;
— screen switches can be made even faster by setting disable_vsync = 1. With this setting screen switches happen without delay, greatly speeding up the interface. It might produce some funky colors during screen switching from time to time. -
screen_fade_speed = 25;
— sets fade-ins and fade-outs when switching screens. The 1.50 default setting is 25, while classic was 10. Values up to 100 can be set. -
scroll_interval = 2;
— slows down edge based scrolling in tactical combat. The scroll interval value sets the number of ticks between scrolling events. One tick is approximately 1/18 of a second. We have set the default at 2 ticks. 1-3 ticks should be optimal for most people. Set it to 0 to experience the classic scrolling behavior, which is unreasonably fast on modern computers. -
wormhole_color = 4;
This parameter specifies the index of the color used to draw wormholes. Possible values are 0-255. Classic value of 4 is a dark grey (default). Use 10 or 20 for lighter greys. Color map: -
no_graph_smoothing = 1;
— if set to 1, history graphs will not be smoothened. -
no_initial_tech_prompt = 0;
— if set to 1, the Select Research prompt on turn 1 is skipped. -
no_outpost_prompt = 0;
— if set to 1, the outpost creation prompt upon arrival at a system is skipped. -
warn_blockers = 0;
— This config parameter allows skipping the "repeat before a product" dialog in the Colony Build screen. Depending on this and the 'Auto Delete Trade Goods/Housing' setting, repetitive items (housing, trade goods or repeat builds) in the queue may be deleted, kept, or a dialog will appear asking what to do upon exiting the Colony Build screen.
|
|
|
Auto Delete = off |
ask |
keep |
Auto Delete = on |
delete |
delete |
Classic default behavior was to ask and 1.50 default is to keep. Additionally the 'Auto Delete Trade
Goods/Housing' setting now functions properly when using the ,
and .
keys to cycle colonies in
the Colony Build screen.
-
design_button_shield = update;
— this parameter controls if the shield of a ship design is updated to best available or stays as is upon clicking the Design button (in Colony Build screen). The default is set to 'update', which is classic behavior. Alternatively it can be set to 'intact', which disables this auto update and preserves current designs. -
design_button_computer = update;
— same as above, but for computer. -
clear_button_shield = intact;
— this controls how the CLEAR button in the Ship Design screen (Design Dock) behaves regarding shield. The three options are:-
intact
— don’t change shield currently set (default, classic), -
update
— update to the best available, -
clear
— set to none.
-
-
clear_button_computer = intact;
— same as above, but for computer. Classic is 'update', which is inconsistent with shield behavior: It doesn’t remove the shield but puts the best available computer to the design. In 1.50 the default is 'intact', the same as for the shield. -
missile_ammo_x2 = 1;
— default ammo when selecting a missile in Ship Design is x2. Classic is x5. -
confirm_battle_message_timeout = 180;
— timeout for the following combat confirmation messages in Multiplayer: 'X attacks Y at Z', 'outpost destroyed' and 'colony captured by mind control'. The value 180 is approximately 10 seconds. -
auto_close_board_result_popup = 1;
— if 1, board results pop-up times out like AUTO resolve. -
no_center_on_next_ship = 0;
— if 1, the Combat screen is not centered on the next ship, in the same way it is in combat with ship initiative off. -
finds_presented_by_scientist = 0;
— if 1, a scientist instead of a trooper presents tech finds from artifacts planets. -
rebel_display = 0;
— rebels are only present in conquered colonies. With this parameter a rebel picture along with statistics can be shown in a colony’s military pop-up anyway. -
info_lbx_menu = classic; info.lbx = 0;
— setting info_lbx_menu to 'ice' instead of 'classic' and loading the corresponding INFO.LBX with info.lbx = \150\lbx\INFO.LBX causes the INFO menu to start with the Turn Summary instead of the History Graph button: -
# format version = "Version: $VERSION$" 1 r 587 408;
— if enabled, sets the position of the version number on the Title screen for all mods. -
# format mod_name = "Mod: $MOD$" 1 r 587 422;
— if enabled, sets font size, alignment and position of the config name on the Title screen for all mods. -
# format prod = "$TURNS$ turns" 0 l 531 103;
— if enabled, sets placement of turn counter on the Colony screen for all mods. -
# format prod2 = "$TOTAL_PROD$ / $PRODUCT_COST$" 0 r 625 103;
— if enabled, sets placement of stored production and item total production cost on the Colony screen for all mods. -
prod_format housing = -2 g0;
— prod format allows to reorder building list items in colony production screen and to assign color groups to products. The first parameter is called order and defines order in which products appear in the list. Items with smaller order appear first. Items with same order are sorted alphabetically. E.g. by default order is -2 for housing, -1 for trade goods, and 0 for all buildings. This places housing first, trade goods second and then all buildings sorted alphabetically. The second parameter sets color group for item, seefont_color_group
below. -
font_color_group g0 normal = 0xCC 0xCB 0xC9;
font_color_group g0 queued = 0x99 0x98 0x96;
There are 10 groups in total, g0 through g9. Each group has a color for products not in the build queue (normal) and for products added to the build queue (queued). Each color has three components: base, dim and dark. The two latter are needed for anti aliasing. For best effect they should be darker shades of the same color as base. Each color is a palette index from 0 to 255. By default all groups are set to the classic orange font. The palette is:
ENABLE.CFG
This file 150/ENABLE.CFG lists the enabled mods. It is generated automatically by MOO2 Launcher every time it starts the game, so all manual edits are lost. Default is:
enable 150; # core mod
Edit the file manually if you are not using MOO2 Launcher and want to play another mod. For example to play ICE-M, comment out (or delete) the existing lines and write:
enable ICE-M; # core mod enable MAP2_ICE; # map
Choices of mods included with the standard pack are:
Core Mod |
Mod Name |
|
Version 1.2 mod |
|
1.50 standart |
|
1.50 improved |
|
1.50 multiplayer |
|
ICE |
|
ICE-X |
|
Melee |
|
VDC …-GM3-NR |
Map Mod |
Map Name |
|
1.50 improved |
|
1.50 multiplayer |
|
ICE |
|
ICE MP (multiplayer) |
|
Goodmap3 |
|
Orange |
|
Melee (2 players) |
Mirror |
Mirror Name |
|
Full Mirror |
|
Full Mirror except home systems |
|
Mirror home systems only |
Additional Options |
|
|
Randomize Tech |
|
Hidden Tech Tree |