14 — Explodopedia¶
Index · Technologies · Tech modifiers · Other configuration files
The Explodopedia is the game's encyclopedia, opened from the main menu. Almost all of it is built from the
data files when it opens: every unit, weapon, sensor, research and nuclear explosion of the game and of the
loaded mods gets its page, with its values, upgrades and counters. A mod's units, weapons and research
appear there without any extra work. Only the descriptions of the categories and the articles of the
general information tab are written by hand, in Lang/<language>/explodopedia.lng.
Contents
- The tabs and what appears in them
- What a page shows, and where it comes from
- explodopedia.lng
- General information articles
- Articles in HTML
- Step by step: adding an HTML article
- Step by step: a category's text, a hidden chapter, a category of your own
- Mods and translations
- Pitfalls
1. The tabs and what appears in them¶
| Tab | One page per | Categories (the icons above the list) | Left out |
|---|---|---|---|
| Units | unit technology (the modes of a unit, such as a surfaced submarine, share one page) | the unit classes, [UNIT_CLASS] in tech.txt (05), in their order, as on the production screen; units without a class get a category of their own |
VirtualCity, special states, virtual missile units, cities, abstract positions |
| Weapons | missile ([MISSILE]) |
Nuclear weapons (nuclear, or carrying a nuclear warhead); Chemical and biological weapons (special); Air and missile defence (usable only against aircraft and missiles); Naval weapons (only against ships and submarines); Anti-satellite weapons (only against satellites); Conventional strike weapons (the rest); the game's Explodopedia.txt adds Salted Nuclear Weapons, EMP Weapons, Tactical Nuclear Weapons and Other Weapons and Systems (cyber warfare, jammers, decoys) (§3) |
Hidden missiles; MIRV warheads that no unit carries on their own |
| Radars | radar ([RADAR]) |
Underwater detection (detects submarines); Air and missile detection; Space detection (only satellites); Surface detection (the rest); the game's Explodopedia.txt adds Ballistic Missile Detection, Optical Sensors and Satellite Cameras and sorts the radars by rules (§3) |
radars with DoNotShow (the plain vision); radars no unit has |
| Research | research technology | the research fields ([TYPE]); a field's overview draws its research tree as the research screen does |
— |
| Explosions | nuclear explosion yield | one category | explosions that no listed weapon delivers; explosions with no Kilotons or no ground burst |
| General | article in explodopedia.lng |
first Gameplay hints: the hints of the loading screens (loading.lng, 12 §5) as a numbered list; then the chapters of the articles |
— |
An object gets a page only when its technology has a Name line. A unit, weapon or radar whose technology has none
does not appear. The page's name is that key's text in tech_t.lng (or the mod's own language file); without a text
there, the key itself.
Keeping an object out: DoNotShowInEncyclopedia (or its alias DoNotShowInExplodopedia) in a
[UNIT], [MISSILE], [RADAR] or [EXPLOSION] keeps it out of the Explodopedia entirely: it has no page,
and no other page mentions it: not as an icon (weapons, radars, platforms, the units with a trait, the weapons
of an aura), not as a link (replaced by, delivered by), and not by its technology's name in the counters. A
weapon's MIRV warheads go with it. Write it bare (= Yes) or with Yes/No; it is not inherited from a
[TYPE], and a Type line after it does not clear it.
[UNIT] "Test_Dummy"
Tech "U_Test_Dummy"
DoNotShowInEncyclopedia
Several radars of the same technology share its name; the second and later ones get their ID added in brackets.
2. What a page shows, and where it comes from¶
Name and description: the technology's name and description from tech_t.lng. A technology whose
description is missing (the text shown is its key) gets no description.
Picture: a unit's icon and 3D model; a weapon's picture (Image). Upgrades that change the look
(ImprovedBy "Tech" Movie Image "…", a new model) give the page levels: the arrows under the picture step
through them, and the values, upgrades and counters on the page follow the level shown. A unit or weapon with its own
picture or model in the factions' decks (the XX/ folders and Variant lines of
12 §4) also has << >> arrows through the decks, with the deck's name and
the unit's name there (UNIT_NAME/*.txt, 12 §5).
Values: hit points, speed, ranges, yield, warheads, decoy warheads (FakeHeads), production cost and the others,
read from the data with the upgrades of the level shown already applied. A value changed by the level is green. The
pages show the game as if every match setting were at its default, whatever match is running: a value that depends on
a match setting (06 §6.1) shows its default.
- A weapon whose explosion is inhumane (
Inhumaneabove 0, 03), or whose MIRV warheads' is, starts its data with Inhumane weapon: Yes (infamy xN) in red: N is the highestInhumaneweight among its explosions, the weight of the deed each use adds to its user's infamy (20 §3). - A value that is 0 until a condition gives it one shows that value with the condition: in the aura of a weapon
(
ImprovedBy InRange "Weapon"), on a terrain, or by a research, forSet,Addand the cases of aComplex(a span for several). So a satellite camera withRange 0shows its range In range of: Satellite Relay, not 0 km. Precisionis named by the weapon's hit model (02): Maximum deviation in km; Hit chance in % forHitModel Chance; Deviation at a map point for a weapon that bursts on its target, shown only when it can be used against ground units, ships or cities.- A unit's Resupply range (
ResupplyRange) is shown when it has one, and a Repair range (RepairRange) only when it differs. - An aura's page (a jammer,
DrawWave Passive) has no speed or deviation row.
A mod that doubles the weight of the 1 Mt cobalt explosion changes the pages of every weapon that delivers it:
USE PREVIOUS "Units/explosion.txt"
[EXPLOSION] "nuke_1000_Cobalt" MODIFY
Inhumane 2 // the weapons' pages: Inhumane weapon: Yes (infamy x2)
Upgrades (ImprovedBy with a research, 06): each research, with what it changes,
e.g. "Speed +10%, Hit points 1.2". A modifier with a helper technology (a _Buffer technology that only a
research gives) is listed under that research. A unit's Size change of 2% or less is not shown: such
changes are markers for other modifiers, not real size changes. An upgrade that needs several research is
listed under the last of them, with the others in red after Requires also:. A modifier that takes away all of a
property, or all but 5%, says what that means: no detection, cannot fire, no damage, cannot be intercepted, cannot
hit; a damage cut to 5% or less is minimal damage. When a research gives the unit a trait
(a Modifier tag) that enemy weapons or radars react to (their AffectedBy Unit "Tag"), the research row
also tells what that does: "Enemy weapons against it: Maximum deviation +7.5%, Damage −10%". When the weapons are
affected differently, a row each lists the weapons as icons.
Enemy weapons / radars against it (units): the same effects of what the unit is from the start: its own research, as a tag of itself, and its traits that no research brings.
Improved by, in a situation: ImprovedBy Unit "Tag" (better when carried by or launched from units with
the tag; the units shown as icons, only the weapon's or radar's own platforms among them) and ImprovedBy InRange
"Weapon" (inside the aura of a weapon). A unit has a trait also on its modes (an entrenched division's).
Countered by (AffectedBy):
| Group | From | Shown as |
|---|---|---|
| Enemy research | AffectedBy "Tech" (global), and AffectedBy Unit "Tag" when a research gives the tag |
the research, a link |
| Enemy traits | AffectedBy Unit "Tag" |
the tag's effect and the units that carry it, as icons with their names as tooltips; a tag that the cities carry (the DEFCON levels) keeps its name and shows the city |
| In range of | AffectedBy InRange "Weapon" |
the aura's weapons, as icons |
| Target in range of | AffectedBy TargetInRange "Weapon" |
a row per research of the target, with the aura's weapons (jamming) |
| After an explosion of | AffectedBy Explosion "Explosion" |
the weapon that delivers it |
| On terrain | AffectedBy Terrain "Terrain" |
the terrain |
A Complex modifier whose cases are all Case Self "Tech" (the effect depends on the weapon's own
research, e.g. the accuracy penalties of ballistic missiles) is shown with the effect of the level shown.
A Ladder modifier (06 §5.1) is drawn as a table:
the measure's research down, No countermeasures and the counter's research across, the effect in each cell, the
names as links.
Weapons only: the platforms (the units whose weapon configurations carry it, with the research a
configuration needs), the explosion it delivers, Replaces / Replaced by (a weapon in the same category
made obsolete by the research that unlocks the other one) and Made obsolete by (the research that ends
its production: its DisablingTech, or an ImprovedBy "Tech" CanBeBuilt 0, without the research the weapon needs
itself). A MIRV's decoys name the research that gives them their range, if their own is 0. An aura's page has Jams: the
weapons whose shots it changes (their AffectedBy TargetInRange), with their ladder tables. A missile with
CanBeIntercepted above 0 ends its page with Can be intercepted by, after the platforms: the weapons with a platform that can
be fired at it (CanBeUsedAgainst its Missile / HighMissile type), as icons, without the interceptor
classes its DisableCanBeIntercepted excludes (02).
Units only: weapons, radars, the units it carries (Carries), where it is based (Based at), the units whose
hangars hold it (Carried by), and the units and weapons it Produces (Deploys, with Placed within its
ProductionPlacementRadius).
Built only with (units and weapons with ProducedByAnotherUnit): the units that Produces it, by the radius they
place it in. It is left out when the cities (VirtualCity) produce it too, since every side has them.
Radars only: range, Range by orbit height (RangeByHeight, a row per point), Max altitude for what sees up, what it
detects, its abilities (PreciseTargeting, CanCalculateLaunchPosition, IdentifiesCovert, CanSeeUnderIce), and Carried
by.
A weapon or radar that no research unlocks itself comes with its platforms: it shows the research of the earliest of them.
Research only: what it unlocks, improves and makes obsolete, what it needs and what it leads to.
Nuclear explosions: one page per yield, with its burst variants (ground, water, air, space; 03) and the weapons that deliver it. Each explosion fills its frame; the marks behind it tell its size, and their brightness legend is the same for every yield (a 1 kt burst has its marks almost alike, a 100 Mt one the whole range).
3. explodopedia.lng¶
Lang/<language>/explodopedia.lng holds the hand-written texts, in the form of unit.lng:
"KEY" LANG "text"
\n in a text is a new line. A quote inside a text needs no backslash (\" works too): only a quote that ends its line closes the text. USE and IF work as in the other language files
(12 §5). The English file is read first and the language's file over
it: a key missing in a language shows the English text.
| Key | Text |
|---|---|
CATEGORY_<class ID> |
a unit category's overview: the ID of its [UNIT_CLASS], e.g. CATEGORY_UC_Naval |
CATEGORY_Classless |
the category of the units without a class |
CATEGORY_Nuclear, _ChemBio, _Defence, _Naval, _Conventional, _AntiSat |
the weapon categories |
CATEGORY_RadarAir, _RadarSurface, _RadarUnderwater, _RadarSpace |
the radar categories |
CATEGORY_Explosions |
the explosions tab |
CATEGORY_PLACEHOLDER |
a category without its own text; %s is the category's name |
FIELD_<[TYPE] ID> |
a research field's overview, e.g. "FIELD_Weapons of Mass Destruction" |
FIELD_PLACEHOLDER |
a field without its own text |
EXPLOSION_<[EXPLOSION] ID> |
a nuclear explosion's page, by any explosion of its yield, e.g. EXPLOSION_nuke_1000 for 1 Mt |
EXPLOSION_PLACEHOLDER |
an explosion without its own text |
HINTS_DESC |
optional: a text above the gameplay hints |
<category key>_NAME |
a category's name, over the game's: CATEGORY_UC_Naval_NAME, "FIELD_Radar Systems_NAME"; a NewCategory of Explodopedia.txt takes its name only from it (§7) |
GENERAL_… |
the general information tab (§4) |
Explodopedia.txt: icons and the start page¶
The icons of the tabs and the categories, and the page the Explodopedia opens on, are not a language's: they
are set in Explodopedia.txt in the game's folder. A mod changes it with its own Explodopedia.txt starting
with USE PREVIOUS "Explodopedia.txt"; IF works as in the other files.
Tab "Research" Icon "Overlay_Science"
Category "FIELD_Weapons of Mass Destruction" Icon "Nuclear_Fission"
Category "FIELD_Radar Systems" Icon "Radar_Mk2"
Category "CATEGORY_UC_Naval" Icon "Images/MyMod/naval.png" Scale 1.2 // a picture of the mod
StartPage "GENERAL_1"
| Line | Meaning |
|---|---|
Tab "<name>" [Icon "<icon>"] [Scale <f>] [Hide] |
a tab's icon; the names: Units, Weapons, Radars, Research, Explosions, General |
Category "<key>" [Icon "<icon>"] [Scale <f>] [Hide] |
a category's icon above the list (without one: the picture of its first page). The key: FIELD_<[TYPE] ID> (a research field), CATEGORY_<[UNIT_CLASS] ID> (a unit class), CATEGORY_Nuclear … CATEGORY_AntiSat (the weapons), CATEGORY_RadarAir … CATEGORY_RadarSpace, CATEGORY_Explosions, GENERAL_<c> (an article chapter), HINTS (the gameplay hints) |
NewCategory "<key>" Tab "<tab>" [After "<category key>"] [Icon …] [Scale …] [Hide] |
a category of its own in a tab, after the category named (else last). Its name is <key>_NAME and its description <key> in explodopedia.lng, so it is translated with the other texts |
Category "<key>" After "<category key>" |
a category moved after another of its tab |
Tab "<tab>" Auto No |
none of the game's categories in that tab: its pages only where the rules put them (into NewCategory ones), the others left out |
Put <kind> [Where <test> [And <test>]…] In "<category key>" |
a rule: the pages of a kind (Units, Weapons, Radars, Research, Explosions) that pass all the tests into that category |
Exclude <kind> [Where <test> [And <test>]…] |
a rule: those pages left out of the Explodopedia |
Put "<page>" In "<category key>" |
one page (its ID or name, as an article's link) in that category, over all the rules |
HideProperty <property>… Of <kind> [Where <test> [And <test>]…] |
those properties (named as in the data files: Speed, Damage, Range, Precision, CanBeIntercepted…) not shown on the pages selected: no value row, no change in their upgrades and counters |
HideModifier "<source>"… Of <kind> [Where <test> [And <test>]…] |
every effect from those sources (the ID of a technology or trait, an explosion, an aura's weapon; * any characters) left out of the upgrades and counters of the pages selected |
StartPage "<page or key>" |
what it opens on: a page (its ID or name, as an article's link) or a category's overview (its key). Without it: the general tab's first category |
An icon is, in this order: a UI element, by its name in UI/UI.txt ("Main_Button_Globe") or its number; a
page of the Explodopedia, its picture (the ID or the name of a unit, weapon, radar, research or explosion); or a
picture file, its path from the game's folder (a mod's own pictures from the mod's folder). Scale draws it
that much larger, for an icon with wide empty margins. An icon that is not found leaves the default one and writes a warning to Fatal.txt.
Without these lines the categories are the game's: units by their [UNIT_CLASS], research by its field, weapons
and radars by rules on what they hit or detect, explosions in one (§1). The rules go in the order of the lines, a
later one over an earlier one; a page no rule matches stays where the game put it. A test, with Not before it for
its opposite (* in a text: any characters):
| Test | Pages | Passes when |
|---|---|---|
ID "<pattern>", Name "<pattern>", Tech "<pattern>" |
any | its ID, its name as shown, its technology's ID match |
Level [Min <n>] [Max <n>] |
any | the research level it needs (a research: its own) is in the range |
UnitType <unit types> |
units | its type is one of them (Ground, Naval, Subwater, Airborne, Missile, HighMissile, SubwaterMissile, Satellite; also City, AbstractPosition, for Against) |
Class "<[UNIT_CLASS] ID>" |
units, weapons | its class (a weapon's: its Class line in Missile_defs.txt) |
Geneva "<category>" (or GenevaCategory) |
weapons | it is in a treaties' category the pattern matches (its GenevaCategory lines, e.g. "Salted Weapons", "EMP Weapons") |
Against <unit types>, OnlyAgainst <unit types>, Nuclear, ChemBio, Kilotons [Min <n>] [Max <n>] |
weapons | it can be used against one of them; only against them (and something); a nuclear yield (EMP ones too); chemical or biological; its total yield |
ShowType <range layer>, Detects <unit types>, DetectsNothing |
radars | its GlobalShowType (SW_RANGES, LW_RANGES, OVERHORIZONT_RANGES, SONAR_RANGES, SPACE_RANGES, SATELLITE_RANGES, OPTICAL_RANGES); what it detects |
Field "<[TYPE] ID>" |
research | its field |
Kilotons [Min <n>] [Max <n>] |
explosions | its yield |
The game's Explodopedia.txt writes the game's own placement out as rules (the units by class, the weapons by what
they are used against, the radars by what they detect, the research by field, the explosions in one), so it can be
edited in place; a page none of them matches still goes where the game puts it, unless its tab has Auto No.
Some values have a purpose in the game but look odd in an encyclopedia; the game's file hides two:
HideProperty Speed Of Weapons Where Name "Cyber Warfare" // the cyber attacks are timed by a speed
HideModifier "Collateral_Damage_Modifier" Of Weapons // x800000 damage against cities: collateral damage
The order of the categories in a tab is the game's (the unit classes', the fields' order), with a new category
after the one in its After (else last) and a moved one after the one in its After: where a line stands in the file
does not change it. A line the file does not understand stops reading it, with a warning naming the line (in
Fatal.txt and on the screen).
A category of the game that is wrong is fixed by emptying it (rules putting its pages elsewhere: an empty category
is left out), renaming it (<key>_NAME in explodopedia.lng), moving it (After) or, for a whole tab, Auto No
and categories of its own. Where a NewCategory line stands does not matter to the rules that use it, but a rule or a
Put naming a category that does not exist is skipped without a warning. The game's file sorts the weapons and radars
this way, among other lines:
NewCategory "CATEGORY_SaltedNukes" Tab "Weapons" After "CATEGORY_Nuclear" Icon "Cobalt_Bomb"
NewCategory "CATEGORY_EMP" Tab "Weapons" After "CATEGORY_SaltedNukes" Icon "ICBM (1M EMP)"
NewCategory "CATEGORY_TacNukes" Tab "Weapons" After "CATEGORY_EMP" Icon "Nuclear Artillery"
Put Weapons In "CATEGORY_Conventional"
Put Weapons Where Nuclear In "CATEGORY_Nuclear"
Put Weapons Where GenevaCategory "EMP Weapons" In "CATEGORY_EMP"
Put Weapons Where GenevaCategory "Salted Weapons" In "CATEGORY_SaltedNukes"
Put Weapons Where Kilotons Min 0.001 Max 99 In "CATEGORY_TacNukes"
NewCategory "CATEGORY_RadarOptics" Tab "Radars" After "CATEGORY_RadarSurface"
NewCategory "CATEGORY_RadarSatellite" Tab "Radars" After "CATEGORY_RadarOptics"
Put Radars Where ShowType SPACE_RANGES In "CATEGORY_RadarSpace"
Put Radars Where ShowType OPTICAL_RANGES In "CATEGORY_RadarOptics"
Put Radars Where ShowType SATELLITE_RANGES In "CATEGORY_RadarSatellite"
Put Radars Where DetectsNothing And ID "Satellite Relay*" In "CATEGORY_RadarSpace"
Exclude Radars Where DetectsNothing And ID "Resupply*"
A tab of categories of one's own, e.g. the explosions by yield:
Tab "Explosions" Auto No
NewCategory "CATEGORY_SmallYield" Tab "Explosions"
NewCategory "CATEGORY_BigYield" Tab "Explosions"
Put Explosions Where Kilotons Max 999 In "CATEGORY_SmallYield"
Put Explosions Where Kilotons Min 1000 In "CATEGORY_BigYield"
A mod's new weapon or sensor goes where it belongs with a Put in the mod's Explodopedia.txt
(Put "My_Railgun" In "CATEGORY_Naval"). A rule for a page that a game mode or a mod does not have does nothing, so one
file serves them all.
Hide leaves a tab or a category out, with all its pages: no other page links to them or shows their icons
(Tab "Explosions" Hide, Category "CATEGORY_AntiSat" Hide). Hide No brings one back, e.g. in a mod.
4. General information articles¶
The general tab starts with Gameplay hints: every hint of the language's loading.lng, numbered, in
the order of the file (a mod's hints added with USE PREVIOUS in its loading.lng appear there too). The
article chapters follow it; the game has chapters 1 to 5, and its file opens on chapter 5 (StartPage "GENERAL_5").
| Key | Meaning |
|---|---|
GENERAL_<c>_TITLE |
chapter c = 1, 2, 3… in this order; the first missing number ends the chapters |
GENERAL_<c>_DESC |
the chapter's overview page |
GENERAL_<c>_<a>_TITLE |
article a = 1, 2, 3… of the chapter, in this order; the first missing number ends them |
GENERAL_<c>_<a>_FILE |
the article's text in a file of its own: Lang/<language>/<file>, the English one when the language has none. For long articles |
GENERAL_<c>_<a>_TEXT |
or the text in the key itself; more paragraphs as _TEXT_2, _TEXT_3… (a key holds up to 64 KB) |
GENERAL_<c>_<a>_IMAGE |
a picture beside the text, a file of the game's data, e.g. "Images/VM/logo.png" |
"GENERAL_1_TITLE" LANG "Lens On: Nuclear Weapons"
"GENERAL_1_DESC" LANG "How nuclear weapons shaped the second half of the twentieth century."
"GENERAL_1_1_TITLE" LANG "ICBMs and the Space Race"
"GENERAL_1_1_FILE" LANG "Explodopedia/General_1_1.txt"
"GENERAL_1_2_TITLE" LANG "A short one"
"GENERAL_1_2_TEXT" LANG "The text of the article, in the key itself."
An article's file is plain UTF-8 text (with or without a byte order mark):
- paragraphs are apart by an empty line;
- a line starting with
##starts a part of the article (a large heading); - a line starting with
###is a heading inside a part.
A text that starts with a tag is HTML instead (§5).
5. Articles in HTML¶
An article's text (its file or its _TEXT keys) that starts with a tag, such as <p> or <h2>, is read
as basic HTML. Of styles, only bold and italic are used (font-weight, font-style in a style attribute or in
the class rules of a <style> block, as Google Docs writes them); everything else of HTML is ignored, with its
text kept: there are no colours, fonts, tables or scripts, and the text of <head>, <title>, <style> and
<script> is not shown. A whole page (<!DOCTYPE html><html><head>…</head><body>…) is read as well.
| Tags | Meaning |
|---|---|
<p>, <div> |
a paragraph |
<h1>, <h2> |
a part of the article (a large heading) |
<h3> … <h6> |
a heading inside a part |
<br> |
a new line |
<hr> |
a line across the column |
<b>, <strong> |
bold |
<i>, <em> |
italic (bold and italic together: bold) |
<ul>, <ol>, <li> |
lists, with bullets or numbers; lists inside lists are indented |
<a href="…"> |
a link to another page of the Explodopedia |
<img src="…" width="…" align="…" alt="…"> |
a picture |
<figure>, <figcaption> |
a picture with its caption under it |
<!-- … --> |
a comment |
Entities: & < > " — – … « », the
quotes, ° × − and the like, and numbered ones (—, —).
Line breaks and spaces in the file do not matter: the text wraps to the column, between words, and between the characters of Chinese text.
Links: href is the ID of a page or its name, case aside:
- a unit's ID or its technology's ID:
<a href="Fighter">,<a href="U_Fighter">; - a weapon's or radar's ID or its technology's ID:
<a href="M_ICBM_10M_Heavy">; - a research's ID; an explosion's ID (the page of its yield);
- another article:
GENERAL_<c>_<a>, e.g.<a href="GENERAL_1_3">; - or the page's name as shown in the list:
<a href="10 Megaton ICBM">.
A link whose page does not exist is plain text. Back (the button, the mouse's back button, Backspace) returns from a followed link.
Pictures: src is looked for in this order:
- as written, from the game's folder (like the other pictures of the data:
Units/Images/…); - beside the article's file;
- in
Lang/<language>/Explodopedia/, thenLang/Eng/Explodopedia/.
width is in percent of the column (width="40%") or in pixels at 1920×1080 (width="300", scaled with the
screen); without it, the picture's own size. A picture never gets wider than the column.
align="left" or align="right" puts it on that side, at most 60% of the column wide, with the text going
on beside it; without align it stands on its own line, centred, below any pictures on the sides. alt is
shown as a tooltip over the picture. A picture that is not found is left out.
<h2>The Space Race</h2>
<p>In October 1957 the <b>Soviet Union</b> launched <i>Sputnik</i>, the first satellite.
If a rocket could put a satellite into orbit, it could also deliver a warhead: see the
<a href="M_ICBM_10M_Heavy">10 Megaton ICBM</a>.</p>
<img src="sputnik.png" width="35%" align="right" alt="Sputnik 1">
<ul>
<li>4 October 1957: Sputnik 1</li>
<li>3 November 1957: Sputnik 2, with the dog Laika</li>
</ul>
<figure>
<img src="launch.jpg" width="80%">
<figcaption>A launch of an R-7 rocket</figcaption>
</figure>
Writing an article in Google Docs¶
An article can be written in Google Docs and used as it is downloaded:
- Write it with the paragraph styles of Docs: Title and Heading 1/Heading 2 become large headings, Subtitle and Heading 3–6 smaller ones (text merely typed in capitals stays text). Bold, italic, bulleted and numbered lists (also nested ones) come through.
- Links to other pages of the Explodopedia: Docs accepts only web addresses, so write the page's ID as one:
link the text to
http://M_ICBM_10M_Heavyorhttp://GENERAL_1_3. The game drops thehttp://and Docs' own redirect (https://www.google.com/url?q=…). A link to a real website is plain text in the game. - Pictures: insert them in line with the text (Docs' In line); each stands on its own line, centred, as
wide a share of the column as of the Docs page (half the page: half the column).
alttext (Docs: Image options → Alt text) is the tooltip. - File → Download → Web page (.html, zipped). Unzip it into
Lang/<language>/Explodopedia/: the.html(rename it, e.g.General_1_11.html) and itsimages/folder (itssrcareimages/image1.png…, found beside the file). With several articles in one folder, give each its own pictures folder and change thesrcin its file accordingly, or theimages/of one replaces another's. - Register it with
_TITLEand_FILEkeys (§4).
Colours, fonts, sizes and tables are not carried over (a table's text stays). Resolve the document's comments before downloading: they are written into the file. Footnotes come out as plain text at the end. A picture placed with text wrapping may not stand where it did in Docs: place pictures In line.
6. Step by step: adding an HTML article¶
This example adds a chapter "Cold War Notes" with one article, "Sputnik", with a picture and a link, as a
mod. To change the base game instead, put the same files straight into the game's Lang/Eng/ folder and add
the keys to the game's Lang/Eng/explodopedia.lng (then without the USE PREVIOUS line of step 5).
1. Make the mod. Create the folder Documents/My Games/ICBM-Escalation/MODS/ColdWarNotes/ with an
info.txt (12 §2):
ICBM MOD "Cold War Notes"
Version "1.0"
Description "Articles about the Cold War for the Explodopedia"
Everything below goes into this folder; its paths mirror the game folder.
2. Pick the numbers. Open the game's Lang/Eng/explodopedia.lng and find the last chapter:
the highest GENERAL_<c>_TITLE. The game has chapters 1 to 5, so the new chapter is 6 and its first article
1: the keys will be GENERAL_6_TITLE, GENERAL_6_1_TITLE... (To add an article to an existing chapter
instead, take that chapter's next free article number, e.g. GENERAL_1_11_… after the ten of chapter 1.) Numbers
must follow each other without gaps. Check the file again after a game update, and a key with a number the game
already uses replaces the game's text: two mods that take the same chapter number overwrite each other's keys.
3. Write the article. Create Lang/Eng/Explodopedia/Sputnik.html in the mod, saved as UTF-8. Its very
first character must be <, or the file is read as plain text:
<h2>The first satellite</h2>
<p>On <b>4 October 1957</b> the Soviet Union launched <i>Sputnik 1</i>, a polished sphere 58 cm
across that did nothing but beep. It circled the Earth every 96 minutes.</p>
<img src="sputnik.png" width="35%" align="right" alt="Sputnik 1">
<p>The rocket that lifted it, the R-7, had been built to carry a nuclear warhead across the ocean.
If it could reach orbit, it could reach any city: the beginning of the age of the
<a href="M_ICBM_10M_Heavy">intercontinental ballistic missile</a>.</p>
<h3>What followed</h3>
<ol>
<li>3 November 1957: Sputnik 2, with the dog Laika on board.</li>
<li>31 January 1958: Explorer 1, the first American satellite.</li>
<li>29 July 1958: NASA is founded.</li>
</ol>
<p>Read on: <a href="GENERAL_1_1">ICBMs and the Space Race</a>.</p>
<a href="M_ICBM_10M_Heavy">opens the page of the weapon with that ID;hrefcan also be a unit's, radar's, research's or explosion's ID, another article'sGENERAL_<c>_<a>, or a page's name as shown in the list (§5).- The picture floats on the right with the text beside it;
width="35%"is of the text column.
4. Add the picture. Put sputnik.png (PNG or JPG) next to the article:
Lang/Eng/Explodopedia/sputnik.png in the mod. src is found beside the article's file, so the article and
its pictures stay together.
5. Register the article. Create Lang/Eng/explodopedia.lng in the mod. Its first line keeps the game's
texts, and the keys after it add the chapter:
USE PREVIOUS "Lang/Eng/explodopedia.lng"
"GENERAL_6_TITLE" LANG "Cold War Notes"
"GENERAL_6_DESC" LANG "Short articles about the events behind the game."
"GENERAL_6_1_TITLE" LANG "Sputnik"
"GENERAL_6_1_FILE" LANG "Explodopedia/Sputnik.html"
_FILE is relative to Lang/<language>/. Without USE PREVIOUS, the mod's file would replace the game's
and the game's own articles and category descriptions would be gone.
The mod now holds:
MODS/ColdWarNotes/
info.txt
Lang/Eng/explodopedia.lng
Lang/Eng/Explodopedia/Sputnik.html
Lang/Eng/Explodopedia/sputnik.png
6. Check it in the game. Enable the mod in the mod list, open the Explodopedia from the main menu and go
to the general tab (the globe): after Gameplay hints and the game's chapters there is an icon for "Cold War
Notes"; its overview lists "Sputnik". The game's chapters have the icon Main2_Journal_Icon; to give yours the same, add an
Explodopedia.txt to the mod with USE PREVIOUS "Explodopedia.txt" and Category "GENERAL_6" Icon "Main2_Journal_Icon".
Check that:
- the headings, bold and italic words and the numbered list look right;
- the picture is on the right (missing: the
srcname or the file's place, §9); - the links are green and open their pages, and Back (the button, the mouse's back button or Backspace)
returns to the article. A link shown in white found no page: check its
href.
The Explodopedia reads its texts and articles each time it opens: after editing the .lng or the .html
file, close it and open it again. A picture stays loaded once shown: to see a changed picture, restart the
game (or give the new version another file name).
7. Translate it (optional). For Russian, add Lang/Rus/Explodopedia/Sputnik.html (the translated
article) and Lang/Rus/explodopedia.lng with USE PREVIOUS "Lang/Rus/explodopedia.lng" and the translated
GENERAL_6_TITLE, GENERAL_6_DESC and GENERAL_6_1_TITLE. The _FILE key can stay in English only: the
game looks for the file in the language's folder first. The picture need not be copied: it is found in
Lang/Eng/Explodopedia/ too. Anything the language lacks is shown in English.
7. Step by step: a category's text, a hidden chapter, a category of your own¶
This example goes on with the mod of §6 (MODS/ColdWarNotes/). It rewrites the overview of a game category, hides one
of the game's article chapters, and adds a category for the cruisers with its own name and text. Two files do it all: the
mod's Lang/Eng/explodopedia.lng (the texts) and the mod's Explodopedia.txt (the categories).
1. Rewrite a category's text. A category's overview is the key named after it (§3): for the
unit class Ships and Submarines ([UNIT_CLASS] "UC_Naval") it is CATEGORY_UC_Naval. Add the key to the mod's
Lang/Eng/explodopedia.lng, after the lines of §6:
USE PREVIOUS "Lang/Eng/explodopedia.lng"
"GENERAL_6_TITLE" LANG "Cold War Notes"
"GENERAL_6_DESC" LANG "Short articles about the events behind the game."
"GENERAL_6_1_TITLE" LANG "Sputnik"
"GENERAL_6_1_FILE" LANG "Explodopedia/Sputnik.html"
"CATEGORY_UC_Naval" LANG "Ships carry the war to every coast.\nCarriers project air power, submarines hide the second strike, and the escorts keep both alive."
The mod's key comes after the game's, so its text replaces the game's. The same works for a research field
("FIELD_Naval Technology"), a weapon or radar category (CATEGORY_Naval, CATEGORY_RadarAir), a nuclear yield
(EXPLOSION_nuke_1000) and the gameplay hints (HINTS_DESC). A unit class the mod adds in Tech.txt gets its text the
same way, CATEGORY_<its ID>; without one it shows CATEGORY_PLACEHOLDER.
To rename a category instead, give it a _NAME key: "CATEGORY_UC_Naval_NAME" LANG "Navies".
2. Hide a chapter. The general tab's chapters are categories GENERAL_<c>. Create the mod's Explodopedia.txt:
USE PREVIOUS "Explodopedia.txt"
Category "GENERAL_4" Hide
Chapter 4 (Civil Defence) and its articles are gone: no icon in the general tab, and links to its articles are plain
text. Its texts stay in explodopedia.lng, and the other chapters keep their numbers. Category "HINTS" Hide hides the
gameplay hints the same way, and Tab "Explosions" Hide a whole tab. A later mod brings one back with Hide No.
3. Add a category of your own. Put the cruisers (the game's and the mod's) in a category after Ships and
Submarines. Add to the mod's Explodopedia.txt:
NewCategory "CATEGORY_Cruisers" Tab "Units" After "CATEGORY_UC_Naval" Icon "Cruiser"
Put Units Where ID "*Cruiser*" In "CATEGORY_Cruisers"
Icon "Cruiser" takes the picture of the unit with that ID. The rule moves every unit whose ID contains Cruiser; a
single page goes with Put "Heavy_Cruiser" In "CATEGORY_Cruisers". Then give the category its name and text in the
mod's Lang/Eng/explodopedia.lng:
"CATEGORY_Cruisers_NAME" LANG "Cruisers"
"CATEGORY_Cruisers" LANG "The workhorses of the fleet: fast enough to escort a carrier, armed enough to fight alone."
Without the _NAME key the category is called CATEGORY_Cruisers; without the text, its overview is
CATEGORY_PLACEHOLDER with the category's name.
4. Check it. The mod now holds:
MODS/ColdWarNotes/
info.txt
Explodopedia.txt
Lang/Eng/explodopedia.lng
Lang/Eng/Explodopedia/Sputnik.html
Lang/Eng/Explodopedia/sputnik.png
Open the Explodopedia: the units tab has Cruisers after Ships and Submarines, with the new text on its overview, and
the ships' overview shows the new text; the general tab has no Civil Defence. A line of Explodopedia.txt the game
does not understand stops reading the rest of the file, with a warning naming the line on the screen and in
Fatal.txt; a rule naming a category that does not exist does nothing, without a warning, so check the keys' spelling.
A Category or Tab line sets everything for its key anew: Category "GENERAL_1" Hide No alone brings the chapter
back without its icon. Repeat the icon on the same line: Category "GENERAL_1" Icon "Main2_Journal_Icon" Hide No.
8. Mods and translations¶
A mod adds its texts with its own Lang/Eng/explodopedia.lng that starts with a USE PREVIOUS of the
game's file (00 §3), then adds or replaces keys:
USE PREVIOUS "Lang/Eng/explodopedia.lng"
"CATEGORY_UC_Orbital" LANG "Orbital platforms of the mod: ..."
"GENERAL_6_TITLE" LANG "My mod's history"
"GENERAL_6_1_TITLE" LANG "How it began"
"GENERAL_6_1_FILE" LANG "Explodopedia/MyMod_6_1.html"
A later key replaces an earlier one with the same name, so a mod can also rewrite the game's texts. Adding
the next free chapter number (GENERAL_6_… after the game's chapters 1 to 5) adds a chapter; keep the numbers
without gaps, since the first missing number ends the list.
A translation is Lang/<language>/explodopedia.lng with the same keys; article files go to
Lang/<language>/… under the same names. Keys and files the language lacks show in English.
9. Pitfalls¶
- No page: the object's technology has no
Name, the missile isHiddenor a MIRV's warhead that no unit carries, the radar hasDoNotShowor no unit has it, or the object hasDoNotShowInEncyclopedia. - A page named by a key (
T_MY_RADAR_NAME): the key has no text in this language'stech_t.lng. - A gap in the numbers ends the chapters or articles:
GENERAL_1_3is never read whenGENERAL_1_2_TITLEis missing. - An HTML article shown as plain text with its tags: the text does not start with a tag (look for text
or a stray character before the first
<). - Chinese, Japanese or Korean in an article shows only in a language whose fonts have those characters
(
codepage.table, 12 §5); the Latin fonts leave them blank. A language's fonts may have no bold or italic version of them. - A picture is missing: the
srcpath is not found in any of the places of §5; paths are relative, with/. - A long text in a key is cut at 64 KB: use
_TEXT_2,_TEXT_3… or a file. - A category lost its icon after a mod's
Categoryline: the line sets the key's icon, scale andHideanew. Repeat the icon on it. - The mod's categories or rules do nothing: a line of
Explodopedia.txtthe game does not understand stops reading the rest of the file (see the warning inFatal.txt); a rule naming a category that does not exist is skipped.