19 — Making mods, step by step¶
Index · Basics · Cheats build · Other configuration files
The practical entry point: where a mod lives, a minimal mod, how to test it in the Cheats build and read the error messages, then short guides with complete files for the common kinds of mods. Each guide gives the goal, the files, their contents and how to check the result in the game, and links to the reference chapter with the details.
Sections 2, 5, 6 and 8 build one mod, Air Defence, step by step: a cheaper SAM site, a new unit, a new weapon with its research, and the AI files that make computer players use them. The other guides are mods of their own.
Contents
- Where mods live
- A minimal mod
- Testing in the Cheats build
- When something goes wrong
- Units: change a unit, add a unit
- A new weapon and the research that unlocks it
- A diplomacy mod
- An AI mod
- Explodopedia: an article and a category text
- Pictures and music
- Maps
- A scenario and a small campaign
- More small mods
1. Where mods live¶
A mod is a folder with an info.txt at its top. The rest of the folder mirrors the game folder: a file at the same
path as a game file replaces it, or extends it when it starts with USE PREVIOUS.
| Folder | What is there |
|---|---|
| Documents/My Games/ICBM-Escalation/MODS/ | Your own mods. Make every new mod here. |
MODS/ in the game folder |
Mods installed with the game. |
| Steam Workshop | The mods the player subscribed to. A mod in My Games with the same name replaces the subscribed one. |
| The game folder | The game's own files: Tech.txt, Units/Units.txt, AI/, Lang/Eng/, Maps/, Scenario/ … Read them to see what to change and how the shipped data writes it. |
Some pictures and models of the game are kept in its pack and are not visible as files. A data line names them anyway
(Icon "Units/Images/Icons/Ground/Fixed_SAM_Site.png"), and a mod file at that path replaces them (§10).
Switching a mod on. The game collects the mods when it starts. The main menu lists them as +MOD "name"; a new mod
joins the bottom of the list, switched on (unless its info.txt says DefaultOff). Click a mod's box to switch it on or
off, drag it to change the order. A mod higher in the list wins: its copy of a file is read, and a USE PREVIOUS in it
reads the copy of the mods below it, then the game's. Details: 12 §2.
2. A minimal mod¶
Goal: SAM sites cost 3 production points instead of 5.
Files:
Documents/My Games/ICBM-Escalation/MODS/Air Defence/
info.txt
Units/Units.txt
info.txt:
ICBM MOD "Air Defence"
Version "1.0"
Description "Cheaper SAM sites, a SAM battery and a long-range SAM."
GameVersion "1.2.0"
ICBM MOD "name" must be the first line: the name is what the mod list shows and what other mods refer to.
GameVersion goes last; a mod without it counts as made for an older game version and may be switched off
(12 §2). A preview.png beside it is the picture of the mod on the Steam Workshop.
Units/Units.txt:
USE PREVIOUS "Units/Units.txt" // the game's units (and those of the mods below this one)
[UNIT] "SAM_site" MODIFY // keep everything of the SAM site, change only what follows
ProductionCost 3
USE PREVIOUS + MODIFY changes one value and leaves the rest of the file to the game, so the mod keeps working
with other mods and with later versions of the game. A Units/Units.txt without USE PREVIOUS would replace the
game's whole file. More: 00 §3, 00 §4.
The files are plain UTF-8 text: // starts a comment, keywords are not case-sensitive, unit and weapon IDs are.
Check it: start the game, see +MOD "Air Defence" ticked in the mod list, start a game: the SAM Site costs 3 in
the production panel.
3. Testing in the Cheats build¶
Test every mod in the Cheats build, ICBM_CHEATS.exe (chapter 10). It reads the same files and
mods as the game; the main menu shows CHEATS after the version number. In a single-player game:
| To | Do |
|---|---|
| Get a technology | Queue it in the research screen (its parents are queued with it), press Shift + T: the whole queue is researched. |
| Get a unit | Ctrl + click it in the production panel: it is added already built, ready to deploy. Hold Ctrl while deploying to place it anywhere. |
| Play another faction | Shift + 0 … 9 (the slot); the computer takes over the one you leave. |
| See everything | Ctrl + V shows every unit of every faction, with its orders. |
| Find an ID | Hold Shift while a technology's details are shown: its ID is shown and copied. |
After editing a file, go back to the main menu and switch the mod off and on again: the game reads all the data
again. A game in progress keeps the data it started with. Changes to info.txt and new mod folders need a restart.
The same test again and again: save the game at the point to test, and write the save's folder name (SAVE3) into
autoload.txt in Documents/My Games/ICBM-Escalation: the next start of the Cheats build loads it at once
(10 §1).
Every game mode: Blitz reads its own unit, technology and AI files, and the game loads the data of all three modes when the player looks for a multiplayer game. Start a game in each mode and open the multiplayer game list once (00 §10).
4. When something goes wrong¶
The game stops loading with Mod loading error and the message. The message is also written to Fatal.txt in
Documents/My Games/ICBM-Escalation. It names the file, the line and the mod:
Units/Missile_defs.txt (1014) (mod "Air Defence"): unknown keyword "Rnage" - the rest of this file was not loaded (misspelled property?)
At start-up the game then switches all mods off and starts without them: fix the file, then switch your mod (and the others) on again. When you switch mods in the menu, it goes back to the previous mod list instead.
| Message | Usual cause |
|---|---|
unknown keyword "x" |
A misspelt property, or a property in the wrong place. Fix the word the message names. |
Unit Type not found, Missile type not found, Technology not found, Explosion type not found, Radar not found |
A name that does not exist, or not yet at that point. Unit and weapon IDs are case-sensitive. |
No technology assigned, No movie assigned … |
A required property is missing, or a MODIFY names an entry that does not exist. |
Double default weapon config |
A config written twice: delete Config "name" first, then write it whole. |
All messages: 00 §9. The AI files only warn
(Error parsing file: (AI/Default/Invasion.txt, 127) unexpected "…" - the rest of this AI file was not loaded) and the
game goes on without the rest of that file (08 §2).
No message, but it does not work:
| What you see | Look for |
|---|---|
| The change has no effect | The file's path in the mod (Units/Units.txt, not Units.txt); the mod switched off; another mod above it that replaces the same file; a USE of a file that does not exist (it reads nothing). |
A name shows as its key, U_SAM_BATTERY_NAME |
The line is missing in Lang/<language>/tech_t.lng, or the mod has no file for the language played. |
| UI string missing. | A numbered string missing in this language's UI.lng. |
| A unit or weapon is there from the start | A misspelt LeadsTo or Parent: a technology without points and without a parent is known from the start. |
| The computer players never build the new unit | No AI file names it (§8). |
| The mod list shows (made for an older game version) | GameVersion "1.2.0" missing at the end of info.txt. |
Test a mod in the Cheats build (ICBM_CHEATS.exe): start a game, read any message and Fatal.txt, then check the
changes in game.
5. Units: change a unit, add a unit¶
5.1 Change a unit's values¶
Goal: the SAM site of §2 also gets more hit points. Add to its entry in Units/Units.txt:
USE PREVIOUS "Units/Units.txt"
[UNIT] "SAM_site" MODIFY
ProductionCost 3
Power 4.5 // hit points (the game's value: 3)
The game's own entry in Units/Units.txt of the game folder shows every value it has. What each property does:
01 — Units; recipes for common balance changes: 07.
5.2 Add a unit¶
Goal: a SAM Battery: a sturdier, dearer SAM site, unlocked by the research Improved SAMs (SAM_Mk2), with an
icon of its own.
A new unit needs four things: the unit, a technology that names it and makes it available, its name and description in the language file, and its pictures.
Files (added to the Air Defence mod):
Tech.txt
Units/Units.txt
Lang/Eng/tech_t.lng
Units/Images/Icons/Ground/SAM_Battery.png
Tech.txt:
USE PREVIOUS "Tech.txt"
[TECHNOLOGY] "SAM_Mk2" MODIFY
LeadsTo "U_SAM_Battery" // researching Improved SAMs unlocks the unit
[TECHNOLOGY] "U_SAM_Battery" // no Points: known as soon as its parent is
Name "U_SAM_BATTERY_NAME"
Description "U_SAM_BATTERY_DESC"
Units/Units.txt (the whole file):
USE PREVIOUS "Units/Units.txt"
[UNIT] "SAM_site" MODIFY
ProductionCost 3
Power 4.5
[UNIT] "SAM_Battery" COPY "SAM_site" // everything of the SAM site, then the changes below
Tech "U_SAM_Battery"
delete ImprovedBy ALL Movie // the SAM site's upgrades change its pictures; the battery keeps its own
Icon "Units/Images/Icons/Ground/SAM_Battery.png"
Power 9
ProductionCost 8
COPY takes the source's values as they are at that point, so the battery is cheaper and sturdier only through its
own lines. It also takes the source's upgrades: ImprovedBy "SAM_Mk2" on the SAM site swaps its map picture and icon
for the Mk2 ones, which is why the copy deletes the picture upgrades before giving its own icon.
Lang/Eng/tech_t.lng:
USE PREVIOUS "Lang/Eng/tech_t.lng"
"U_SAM_BATTERY_NAME" LANG "SAM Battery"
"U_SAM_BATTERY_DESC" LANG "Several SAM launchers dug in around one command post: harder to destroy than a single site."
END
The unit's name is its technology's name: units have no name of their own. Ship the same file for each language you
support (Lang/Rus/tech_t.lng …); a language without it shows the key (12 §5).
The icon is a PNG of the size of the game's unit icons, 256 × 192 pixels. Without an Icon line the copy keeps the
SAM site's icon; the map picture (Movie) and the 3D model (Model) stay the SAM site's unless you give others
(01 §11, 12 §4).
Check it: in the Cheats build, queue Improved SAMs, press Shift + T: the SAM Battery appears in the production panel with its icon. Ctrl + click it, deploy it, compare its panel with a SAM site's. The Explodopedia has a page for it without any extra work (14).
Checklist and pitfalls: 01 §16. The computer players do not build it yet: §8.2.
6. A new weapon and the research that unlocks it¶
Goal: a Long Range SAM, 600 km instead of 300, unlocked by a new research Long-Range SAMs after Improved SAMs, fired by SAM sites and SAM batteries in a weapon configuration of its own.
Files (added to the Air Defence mod): Units/Missile_defs.txt (new), TechLevels.txt (new), and additions to
Tech.txt, Units/Units.txt and Lang/Eng/tech_t.lng.
Units/Missile_defs.txt:
USE PREVIOUS "Units/Missile_defs.txt"
[MISSILE] "Long Range SAM" COPY "SAM"
Tech "M_Long_Range_SAM"
delete ImprovedBy "SAM_Mk2" // the SAM's upgrade sets Range 400: it would cut this weapon's range
delete DisablingTech // the SAM disappears with the SAM MD research; this weapon stays
Range 600
Speed 4000
A copy takes everything of the source, its upgrades and its DisablingTech too: read the source's entry in the
game's Units/Missile_defs.txt and remove what does not fit.
Add to Tech.txt:
[TECHNOLOGY] "SAM_Mk2" MODIFY
LeadsTo "U_SAM_Battery"
LeadsTo "Long_Range_SAM"
[TECHNOLOGY] "Long_Range_SAM" // a research: it has Points
Name "Long_Range_SAM_NAME"
Description "Long_Range_SAM_DESC"
Image "Images/Science/SAM_Mk2.png"
Points 40
TechLevel 5
Type "Air and Missile Defence"
LeadsTo "M_Long_Range_SAM"
[TECHNOLOGY] "M_Long_Range_SAM" // the weapon's own technology, known with its parent
Name "M_Long_Range_SAM_NAME"
Description "M_Long_Range_SAM_DESC"
(The SAM_Mk2 MODIFY entry of §5.2 gets the second LeadsTo; LeadsTo lines add up.) The pattern of a research
plus one zero-cost technology per object is the game's own: the object moves in the tree by moving one link
(05 §5).
TechLevels.txt: without a line here the new research does not raise the faction's tech level. The game's scale is
Points ÷ 500:
USE PREVIOUS "TechLevels.txt"
tech "Long_Range_SAM" Add 0.08
Add the configuration to the SAM site in Units/Units.txt, before the COPY, so that the battery gets it too:
[UNIT] "SAM_site" MODIFY
ProductionCost 3
Power 4.5
Config "Long Range"
Weapon "Long Range SAM" 20000 Launch 1 Time 90 AutoEngage
The Weapon line: 20000 missiles in stock (a site never runs out), one per salvo, a salvo every 90 reload units
(3 game seconds), fired on its own at targets in range. A configuration becomes available once one of its weapons is
known; the player switches between configurations in the unit's panel (01 §3).
Add to Lang/Eng/tech_t.lng, before END:
"Long_Range_SAM_NAME" LANG "Long-Range SAMs"
"Long_Range_SAM_DESC" LANG "Larger boosters let fixed SAM sites reach aircraft far beyond the border."
"M_Long_Range_SAM_NAME" LANG "Long Range SAM"
"M_Long_Range_SAM_DESC" LANG "A surface-to-air missile with twice the reach of the standard SAM."
Check it: research Long-Range SAMs (queue it, Shift + T), select a SAM site, switch it to the Long Range configuration: its range circle doubles. Its page in the Explodopedia lists the new weapon.
What every weapon property does: 02 — Missiles; checklist: 02 §11; damage and hit chances: 03.
7. A diplomacy mod¶
Goal: computer players hold grudges twice as long, gifts count for more, a faction becomes a pariah sooner, and the AI's answers get new wordings. Details of the whole system: 20 — Diplomacy; every rule of these files: 08 §19 and 08 §22.
Files:
MODS/Long Memories/
info.txt
AI/Mood.txt
AI/Infamy.txt
Lang/Eng/mood.lng
AI/Mood.txt and AI/Infamy.txt read no USE: the mod's file replaces the game's, and every rule it leaves out keeps
its default, which is the value in the game's file. So the files hold only the rules to change, and end with END.
AI/Mood.txt:
HalfLifeAI 432000 // the mood halves in 432000 ticks (2 game hours) instead of 216000
WarDeclaredOnUs -3 // a war declared on it: -3 instead of -2
Gift 2 // a gift counts twice as much
END
AI/Infamy.txt (Conquest only):
PariahAt 4 // a pariah from infamy 4 instead of 6
PariahOffAt 3 // ... and one until it falls below 3
END
Lang/Eng/mood.lng: a key written again is one more variant, picked at random; a Personality tag makes a variant for
the AIs of that personality only; CLEAR drops the game's variants of a key:
USE PREVIOUS "Lang/Eng/mood.lng"
"REPLY_GRUDGE" LANG "Your crimes are written in our history books."
"REPLY_GRUDGE" Personality "Rogue" LANG "We remember. And we are patient."
CLEAR "REPLY_ALMOST"
"REPLY_ALMOST" LANG "Nearly. Add a little more."
END
The game's Lang/Eng/mood.lng lists every key, and its comments say what %s stands for. A language with no variant
of a key takes the English ones, so these lines show in every language.
Check it: start a Conquest game in the Cheats build with several computer players. The diplomacy screen of the Cheats build shows every faction's moods; declare a war on one AI and watch its mood toward you fall and fade. Offer a deal it refuses to read its answers.
8. An AI mod¶
The AI files are in AI/ of the game folder (08 — AI). The AI never builds a unit no AI file names, and
researches what its research lists and its groups' units need.
8.1 Make the AI research a technology¶
Goal: every computer player researches Improved SAMs early and Long-Range SAMs (§6) when it can.
Every strategy reads AI/Default/TechDomestic.txt, so one file reaches them all. Add to the Air Defence mod
AI/Default/TechDomestic.txt:
USE PREVIOUS "AI/Default/TechDomestic.txt"
DomesticTechList
"SAM_Mk2" Target // Target: preferred
"Long_Range_SAM" // no tag: when nothing preferred is left
The lines add to the game's list. MinRequired researches first; Critical makes a strategy unavailable to a faction
that cannot research the technology, so leave it off. Lists and tags: 08 §8.2.
8.2 Make the AI build a new unit¶
Goal: the computer players build the SAM Battery of §5.2 where they built SAM sites.
Two files. AI/SupportTypes.txt puts the unit in a role, so that the AI counts it, its own and an enemy's: there is
no "add" word, so the role is written again whole, with the new unit at the end:
USE PREVIOUS "AI/SupportTypes.txt"
AntiAir
AntiAir
compare "Bomber"
"Destroyer" "Cruiser" "AA_Site_Old" "SAM_site" "MOBILE_SAM" "Laser_Defence_Complex" "SAM_Battery"
END
AI/GroupsConquest.txt names it in a group, so that it is built. A group written again replaces the game's group of
that name; here the city-defence group SAMSite of the game's file, with the battery as the first choice:
USE PREVIOUS "AI/GroupsConquest.txt"
Group SAMSite
PlacementType CityDefence self
"SAM_Battery" then "SAM_site" Leader // the first one the faction can build is used
"EW_MOBILE" optional
"Fixed_LW_radar" optional
Avoid City
Copy the group from the game's AI/GroupsConquest.txt and change only the unit line. The last alternative's
technology is researched automatically, so the earliest unit goes last. These two files name the new unit, so they
belong to the mod that adds it. Blitz has its own AI files and does not read them. All the files a new unit may need:
08 §13.1.
Check it: start a Conquest game with computer players in the Cheats build, read any message and Fatal.txt, play
long enough for them to research Improved SAMs (or
switch to one with Shift + 1 and press Shift + T on its queue), and look at its cities with Ctrl + V.
8.3 A new personality¶
Goal: a Hawk: aggressive, greedy in deals, slow to court, quick to threaten.
AI/Personalities.txt reads no USE, and a mod's file replaces the game's: copy the game's whole file into the mod
and add the new profile before its END:
// … the game's Cautious, Balanced, Rogue and Classic profiles, unchanged …
Personality "Hawk"
Probability 20 // drawn by weight: Cautious 40, Balanced 40, Rogue 20, Classic 0, Hawk 20: one AI in six
Aggressiveness 0.65
Greed 0.35
Bluff 0.5
Courtship 0.2
NuclearRestraint 0.4
SurpriseStrike 0.3
Terrorism 0
END
Probability comes right after the name. A trait left out keeps its default; the comments at the head of the game's
file explain each one, and 08 §16 lists them all.
The Hawk can have words of its own in Lang/Eng/mood.lng (§7):
"REPLY_GRUDGE" Personality "Hawk" LANG "We have not forgotten. Neither will you."
Check it: for the test, raise its Probability to 1000, start a game with computer players and save it. The save's
world.txt (in Documents/My Games/ICBM-Escalation/SAVES/) holds Personality "Hawk" for each AI faction that drew it.
Set the Probability back before publishing.
9. Explodopedia: an article and a category text¶
Every unit, weapon, sensor and research of a mod gets its Explodopedia page by itself. Written by hand are the category
texts and the articles of the general tab, in Lang/<language>/explodopedia.lng (14 — Explodopedia).
Goal: a new chapter "Air Defence" with one article in the general tab, and a new overview text for the weapon category Air and missile defence.
Files:
MODS/Air Defence Notes/
info.txt
Explodopedia.txt
Lang/Eng/explodopedia.lng
Lang/Eng/Explodopedia/Air_Defence_1.txt
Lang/Eng/explodopedia.lng:
USE PREVIOUS "Lang/Eng/explodopedia.lng"
"CATEGORY_Defence" LANG "Air and missile defence weapons destroy aircraft and missiles in flight. Their range and speed decide how far from home an attack is met."
"GENERAL_6_TITLE" LANG "Air Defence"
"GENERAL_6_DESC" LANG "How air defence works in the game."
"GENERAL_6_1_TITLE" LANG "Layered defence"
"GENERAL_6_1_FILE" LANG "Explodopedia/Air_Defence_1.txt"
END
The game has chapters 1 to 5, so the new chapter is 6; numbers go on without gaps. A key the game has already
(CATEGORY_Defence) replaces its text. _FILE is a path from Lang/<language>/.
Lang/Eng/Explodopedia/Air_Defence_1.txt, plain UTF-8 text: paragraphs apart by an empty line, ## and ###
start headings:
## Three layers
Long-range missiles meet bombers far from their targets, SAM sites cover the cities, and guns stop what gets through.
### Why one layer is not enough
A single site can fire only so fast. Several layers give each attacker more than one chance to be stopped.
Explodopedia.txt gives the chapter the icon of the game's chapters:
USE PREVIOUS "Explodopedia.txt"
Category "GENERAL_6" Icon "Main2_Journal_Icon"
Check it: open the Explodopedia from the main menu. The general tab has the chapter Air Defence after the game's five; the Weapons tab's Air and missile defence overview shows the new text. The Explodopedia reads its texts each time it opens. HTML articles with pictures and links, and a step-by-step example: 14 §5, 14 §6.
10. Pictures and music¶
A picture is replaced by a file at the same path in the mod. The paths are those the data files name; the sizes are those of the game's pictures.
| Picture | Path | Size |
|---|---|---|
| A unit's icon | the unit's Icon line, e.g. Units/Images/Icons/Ground/Fixed_SAM_Site.png (an upgrade's icon is in its ImprovedBy block: Fixed_SAM_Site_2.png) |
256 × 192 PNG |
| A research's picture | the technology's Image line, e.g. Images/Science/SAM_Mk2.png |
512 × 512 PNG |
| A leader portrait | Images/LEADERS/LEADER_<n>.png, n = the map's Portrait Index n (0–40 in the game) |
368 × 512 PNG |
| A faction icon | Images/FACTION_ICONS/ICON_<n>.png, n = the map's Icon Index n (0–9) |
256 × 256 PNG |
| A loading-screen picture | Images/Loading/<name>.png or .jpg: a new name adds a picture to the ones shown, the same name replaces one |
4096 × 2160 |
| A main-menu background | Images/VM/Slide/<n>.jpg, numbered from 0 without gaps (0–4 in the game): 5.jpg adds one |
4096 × 2418 |
A new leader portrait. Images/LEADERS/LEADER_41.png in a mod adds portrait 41: the player can pick it in the
game setup, and a map's Player block can name it (Portrait Index 41, 09 §4).
Portrait "Images/MyMod/leader.png" names a picture by its path instead.
A picture on the main menu. AdditionalElements.txt draws extra pictures there; the two numbers are the picture
centre's offset from the screen centre, in fractions of the screen size:
USE PREVIOUS "AdditionalElements.txt"
Element "Images/AirDefence/banner.png" 0.0 -0.35
Music. The tracks are .ogg files in ogg/, and ogg/music.txt says which plays when. It reads no USE: the
mod ships a copy of the game's whole file with its changes. A mod that adds a track to peace time:
"Open" = "DEFCON 5.ogg"
"Peace" = "Peace Is Our Profession.ogg", "Quiet Skies.ogg"
"Tension" = "Warheads Wide Awake.ogg", "Twitch In The Dead Hand.ogg"
"Conventional Invasion" = "Weapons Tight.ogg", "Policy By Other Means.ogg"
"Huge Invasion" = "Death In The Air.ogg", "Iron-Soaked Earth.ogg"
"Nuclear Sting" = "Not An Exercise.ogg"
"Battered Peace" = "Fallout Warning.ogg", "Nuclear Autumn.ogg"
"Victory Sting" = "Another Winning Move.ogg"
"Apocalyptic Violence" = "M.A.D. As Hell.ogg", "Omnicide Authorized.ogg"
"End Game" = "Envy The Dead.ogg"
with ogg/Quiet Skies.ogg in the mod. The situation names are fixed (12 §4).
Check it: the icons in the production panel, the portraits in the game setup, the loading screen and the main menu after a restart. A picture once shown stays loaded until the game restarts.
Unit pictures for one faction only (ModelPrefix, model_info.txt) and 3D models: 12 §4.
11. Maps¶
A map is a text file in Maps/ plus the data files it names (09 — Maps). Both guides below keep the
Earth of the game (its water, regions, cities and texture) and change who owns what.
11.1 A map from a saved game¶
Goal: a map that starts from a position you set up: borders moved, armies deployed, technologies known.
- In the Cheats build, start a single-player game on Atomic Earth. For each faction (Shift + 0 … 9): research with Shift + T, build with Ctrl + click, deploy (hold Ctrl to place anywhere), move with Ctrl + T, take regions with Ctrl + O (10 §3).
- Hold Shift when confirming Save: the game is saved as a scenario,
world.txtandworld.txt.remap.txtin Documents/My Games/ICBM-Escalation/SAVES/SAVEn/. - Copy them into the mod as
Maps/Frontline.txtandMaps/Frontline.txt.remap.txt(the region owners are read from the map file's name plus.remap.txt). - In
Maps/Frontline.txt, replace the first lineMAP Name ID …with
MAP
Name "Frontline 1962"
Description "The armies stand on the border."
and in each Player block remove the Events FromFile "Scenario/MY_SCENARIO_NAME/…" line or point it at a script
that exists, e.g. the game's Events FromFile "Maps/EarthRRUltraV3.Virtual/Events/Russia.txt" for Russia.
Check it: the map list shows Frontline 1962; a game on it starts with the saved units in place. More: 09 §11.
11.2 A map from zero: new factions on the Earth¶
Goal: Two Blocs, a two-faction map: the West against the East, every region of the Earth given to one of them.
Files:
MODS/Two Blocs/
info.txt
Maps/TwoBlocs.txt
Maps/TwoBlocs.virtual/default.txt
- Copy the game's
Maps/EarthRRUltra.txttoMaps/TwoBlocs.txt. Everything it names stays in the game's folders, so the map uses the game's water maps, regions, cities, terrain, texture and AI sites. - Change the name lines at its top (keep
MAPfirst and theNamelines right after it):
MAP
Name idx "Two Blocs, 2 Players"
Description ENG "The world split in two."
- Copy the game's
Maps/EarthRRUltraV3.virtual/V7_default.txttoMaps/TwoBlocs.virtual/default.txt. It gives each region its owner, the faction's slot from 0. Change the numbers: 0, 1, 2, 3 and 9 become 0 (the West), 4, 5, 6, 7 and 8 become 1 (the East):
"Alaska" 0
"Hawaii" 0
…
"Amur Oblasts" 1
"Central Russia" 1
…
END
A region left out of the file has no owner.
4. In OwnershipMap, point Default at the new file and replace the ten Player blocks with two:
OwnershipMap "Maps/EarthRRUltraV3.Virtual/V7_default.vec"
MultiCountry "Maps/EarthRRUltraV3.Virtual/V7_segment_names.txt"
Borders "Maps/EarthRRUltraV3.Virtual/V7_split.bin"
Ownership "Maps/EarthRRUltraV3.Virtual/V7_split.vec"
Default "Maps/TwoBlocs.virtual/default.txt"
Player "West" Color "1188FF" Name "Blue" Portrait Index 15
ModelPrefix "NA"
Events FromFile "Maps/EarthRRUltraV3.Virtual/Events/North America.txt"
Player "East" Color "FF0011" Name "Red" Portrait Index 17
ModelPrefix "RU"
Events FromFile "Maps/EarthRRUltraV3.Virtual/Events/Russia.txt"
ModelPrefix picks the faction's unit pictures; the Events scripts give the computer players the game's common
behaviour. Leave out the Achievement words: they belong to the game's own maps.
5. Replace the DefaultEnemy lines, which name the old factions:
DefaultEnemy "West" "East"
DefaultEnemy "East" "West"
- Optionally change the starting units (
Default AvailableUnits) and the lobby defaults (09 §6, 09 §7).
A region keeps its production and science shares from the game's V7_segment_names.txt, so each bloc has its regions'
economy together. Nothing needs to be generated: the AI sites do not depend on who owns a region.
Check it: the map list shows Two Blocs, 2 Players; start it, look at the borders on the map, and with Ctrl + V at both factions' deployments. A map with a world of its own (its own water and regions) is made with the steps of 09 §10; a mod that applies only on one map: 09 §13.
12. A scenario and a small campaign¶
A campaign is a SCENARIO file in Scenario/ listing its missions; a mission is a map file with a ScenarioInfo
block (objectives, briefing, end screens) and event scripts that decide the objectives. A scenario is a campaign of one
mission. Full reference: 11 — Campaigns and scenarios; the event language:
15–18.
Goal: Arctic Crisis: North America must take the Russian Far East Arctic and keep Alaska.
Files:
MODS/Arctic Crisis/
info.txt
Scenario/ArcticCrisis.txt
Scenario/ArcticCrisis/ArcticCrisis-1.txt
Scenario/ArcticCrisis/ArcticCrisis-1.txt.remap.txt
Scenario/ArcticCrisis/ArcticCrisis-1/EVENTS/North America.txt
Lang/Eng/UI.lng
1. The position. Set it up in the Cheats build on Atomic Earth and save it with Shift held, as in §11.1. Copy
world.txt and world.txt.remap.txt to Scenario/ArcticCrisis/ArcticCrisis-1.txt and ….txt.remap.txt.
2. The campaign file, Scenario/ArcticCrisis.txt (directly in Scenario/, not in a sub-folder):
SCENARIO
Name "Arctic Crisis"
Description "A war over the Bering Strait."
Faction 0
MAP "Scenario/ArcticCrisis/ArcticCrisis-1.txt"
Faction 0: the player commands slot 0, North America on Atomic Earth.
3. The mission map. In ArcticCrisis-1.txt, replace the first line MAP Name ID … with MAP Name "Bering Strait",
then replace the commented-out ScenarioInfo template with:
ScenarioInfo
BriefingText "Take the Russian Far East Arctic. Do not lose Alaska."
BriefingImage "Scenario/Main/Main-1/briefing.png"
Primary Mission "Strait"
Text ID 7650
Value 1
ON Success
Text ID 7651
Image "Scenario/Main/Main-1/success.png"
ON Failure
Text ID 7652
Image "Scenario/Main/Main-1/failure.png"
EndGameCountdown 600
ResultFileName "Scenario/ArcticCrisis/ArcticCrisis-1.txt.result"
(The pictures are the main campaign's; a mod ships its own.) In the Player blocks, point North America's
Events FromFile at "Scenario/ArcticCrisis/ArcticCrisis-1/EVENTS/North America.txt" and the others at the game's
"Maps/EarthRRUltraV3.Virtual/Events/<faction>.txt" scripts (or remove their lines).
4. The event script, ArcticCrisis-1/EVENTS/North America.txt, decides the objective:
FOR PLAYER
ON REGION_OCCUPIED "Russian Far East Arctic" BY ME MISSION "Strait" SUCCESS
ON REGION_OCCUPIED "Alaska" BY ENEMY MISSION "Strait" FAIL
END
5. The texts. A mission's Text must be a string ID: the mod's Lang/Eng/UI.lng adds them, from 7601 up, the
numbers free for mods (12 §5):
USE PREVIOUS "Lang/Eng/UI.lng"
7650 LANG "Take the Russian Far East Arctic and hold Alaska."
7651 LANG "The strait is ours."
7652 LANG "Alaska has fallen."
END
Check it: go over the scripts with the pitfalls checklist. The campaign menu lists Arctic Crisis; start it, read the briefing, take the region with your armies (or Ctrl + O on it in the Cheats build). The result is written to Documents/My Games/ICBM-Escalation/SCENARIO/ArcticCrisis/: delete it to play the mission as new.
A second mission makes it a campaign: add its MAP line to Scenario/ArcticCrisis.txt, give mission 1
ProceedTo "Scenario/ArcticCrisis/ArcticCrisis-2.txt", and give mission 2
TransitionFileName "Scenario/ArcticCrisis/ArcticCrisis-1.txt.result": the player carries the technologies and half of
the earned points into it. Keep the player's faction in the same slot in every mission. A complete three-mission
example: 11 §9.
13. More small mods¶
Game rules: the game-setup sliders¶
Limits.txt sets the ranges of the game-setup sliders, times in ticks (216000 ticks = one game hour). It reads USE, so
a mod changes single values:
USE PREVIOUS "Limits.txt"
MaxPeaceTimer 288000 // the peace timer up to 4 game hours instead of 2
MaxNoNukesTimer 288000 // the no-nukes slider must reach at least as far
Conquest and Standoff read the file with USE PREVIOUS too and set a few sliders of their own over it. All the keys:
12 §3. The values of one map (its lobby defaults) are in the map file:
09 §7.
Game speeds¶
speed.txt gives the four speed buttons; it reads no USE, so the mod ships all four lines:
Speed 1 2 4 32
Divider 1 1 1 1
ReplaySpeed 1 5 20 2000
Divider 1 1 1 1
The fastest button runs 32 simulation steps a frame instead of 16 (12 §3).
Names on the map and in another language¶
Rename a faction, region or city for English players with Lang/Eng/city.lng:
USE PREVIOUS "Lang/Eng/city.lng"
"Russia" LANG "Soviet Union"
END
The names in maps and scripts stay as they are; only the text shown changes. Each language has its own city.lng.
A new language is a folder of Lang/ with a codepage.table: copy the game's Lang/Eng/ into the mod as, say,
Lang/Epo/, set the first line of its codepage.table to Locale "Esperanto" (the name the language list in the
game's settings shows), and translate the files. A string the language lacks shows UI string missing., so translate
all of UI.lng. The files and their forms: 12 §5.
Unit names¶
The units a faction deploys take names from the name banks of Lang/Eng/namebank.txt (the game's file holds examples,
commented out). A mod's file adds banks:
USE PREVIOUS "Lang/Eng/namebank.txt"
Unit "Destroyer" "Cruiser"
Prefix "NA"
Names
"Vigilant" "Resolute" "Steadfast" "Intrepid"
END
Prefix "NA": for the factions that use the North American unit pictures (ModelPrefix "NA"); without it, for every
faction. The names show on your own and allied units once deployed. The names a unit shows for each of its upgrades
(the premade decks, Lang/<language>/UNIT_NAME/) and the translation of the banks:
12 §5.