05 — Technologies (tech.txt, TechLevels.txt)¶
The shipped tree is Tech.txt in the game folder; the names are in Lang/<Language>/tech_t.lng.
Technologies do three jobs:
- The research tree — techs with a cost that factions research.
- Availability and names — every unit, missile and radar names a
Tech; the object exists for a faction when that tech is known, and takes its display name from it. - Switches for balance — every
ImprovedBy/AffectedBynames a tech, and unit modifier tags are techs too.
[TECHNOLOGY] "Nuclear_Fission"
Name "Nuclear_Fission_NAME" // string ID in lang/<Language>/tech_t.lng — required
Description "Nuclear_Fission_DESC" // required
Image "Images/Science/Fission.png"
Points 45
LeadsTo "M_100kt_nuke_light" // zero-cost child: the tech of the 100 kt bomb
LeadsTo "Thermonuclear_bomb" // next research step
TechLevel 1
Type "Weapons of Mass Destruction" // tree category
1. Kinds of entries¶
| Header | Purpose |
|---|---|
[TECHNOLOGY] "id" |
A technology (researchable if it has Points, otherwise a zero-cost tech). |
[TYPE] "id" |
A tech-tree category (tab). Techs join it with Type "id". Also a normal tech in every other respect. Define it before the first Type line that names it. |
[LEVEL] "id" |
A tech level (L_1 … L_10). Read like a [TECHNOLOGY]; TechLevels.txt puts the levels in order, and the setup screen shows the Name and Description of each as a starting level. |
[UNIT_CLASS] "id" |
A unit class for the production UI (UC_Building, UC_Naval, …). Units/missiles use it with Class "id"; AutoAssignTo <unit type> makes it the default class for that unit type. |
[DEFCON] "id" |
A DEFCON state, listed from DEFCON 5 down to 1 (the first entry is the peace-time state). While a faction is at a state, that tech counts as known, so modifiers such as ImprovedBy "DEFCON_2" Production 0.75 on VirtualCity apply. Points sets the switching delay: the delay is taken from the state being left, and because Points is stored ×0.01 the value is in hundredths of a tick (Points 90000 = 900 ticks = 15 "seconds", which is also the default when Points is omitted). |
Top level of the file, besides the headers: USE (00 §3), IF
(00 §5), [END] (the file ends there) and
DRAWING [SCALE <f>] [DISTANCE <f>] — layout scale and spacing of the tech-tree view.
[TYPE] "Ground Forces" // shipped entries
Name "T_GROUND_NAME"
Description "T_GROUND_DESC"
[UNIT_CLASS] "UC_Building"
Name "UC_BUILDING_NAME"
Description "UC_BUILDING_DESC"
[DEFCON] "DEFCON_5"
Name "M_DEFCON_5_NAME"
Description "M_DEFCON_5_DESC"
Image "Units/Images/Missiles/DEFCON5.png"
2. Properties¶
| Property | Syntax | Default | Meaning |
|---|---|---|---|
Name |
"STRING_ID" |
required | Display name (looked up in tech_t.lng; without a translation the ID itself is shown). |
Description |
"STRING_ID" |
required | Description text, looked up the same way. |
Points |
<float> |
0 | Research cost. 0 = zero-cost tech: known automatically as soon as all its parents are known (or always, if it has no parent). Multiplied by 0.01 and by the tech-level factor (§4). |
LeadsTo |
LeadsTo "tech" [HideLink] |
none | Makes tech a child of this one. HideLink = no connecting line in the tree. List property. |
Parent |
Parent "tech" [Before "sibling"] [HideLink] |
none | The same link written from the child's side. Before orders the child before a sibling in the tree. |
BlockedBy |
BlockedBy "tech" |
none | The tech is disabled for every faction that is able to research tech (used for faction-specific alternatives). List property. |
CanBeResearched |
Yes\|No |
Yes | No = cannot be researched in the tree; it can still be known by being zero-cost, granted by a scenario or granted by a script (GRANT_TECH). |
TechLevel |
<int> |
inherited | Tech level 1–10. Never lower than the highest level among its parents: a parent's higher level wins over the number written here. Affects cost (§4) and start-of-game unlocking. |
NoAutoUnlockTillLevel |
<int> |
= TechLevel |
When a game or scenario starts at tech level N, techs with TechLevel ≤ N and NoAutoUnlockTillLevel ≤ N are granted automatically. N is the level's position counted from 0, so a start at L_1 grants no tech of level 1 and a start at L_2 grants those of level 1. Raise it to keep a tech locked; the shipped data writes 99 for "never". Like TechLevel, never lower than the highest value among its parents. |
Type |
"category" |
none | Tree category (a [TYPE]). List property. A tech also joins the categories of its researched parents. |
ResearchStream |
standard\|default (0) or nuclear\|wmd (1) |
inherited (0) | Leave it out. A faction has one research queue, stream 0; a tech in stream 1 cannot be queued. |
AutoAssignTo |
<unit type> |
— | For [UNIT_CLASS]: default class for units of that Type. |
AvailableFrom |
<tick> |
0 | Cannot be researched before this game tick. |
Image |
"file.png" |
missing-image icon | Tree icon. |
Movie |
"file" |
none | Animated tree icon. |
ResetBlockedZone |
"zone_type" / NULL |
none | When known, clears AI "blocked zones" of that type (see unit BlockedZoneTypeID). false and No work like NULL. |
AchievementProperty |
"ACH_ID" |
none | Achievement hook. An unknown ID is ignored. |
Place |
Place Before\|After "tech" |
— | Moves the entry to another position in the tech list (display order). Written after the entry. |
Editing: [TECHNOLOGY] "id" MODIFY, [TECHNOLOGY] "id" remove, delete LeadsTo|Parent|BlockedBy|AchievementProperty "…",
reset LeadsTo|Parent|BlockedBy|AchievementProperty (00 §4).
Rules worth knowing:
- Names in
LeadsTo,ParentandBlockedBymay come later in the file, and a name that exists nowhere is ignored without a message. A misspeltLeadsToleaves the child without that parent, so a zero-cost child is then known from the first tick. Check in game that a new unit or technology is not there from the start. removetakes a tech out of the tree, and its name stays known: whatever still names it loads, and is never available. Its ownLeadsTolines are dropped with it, so a zero-cost child that had only this parent becomes known from the first tick. A child that saysParent "removed_tech"stays locked.- Tech IDs are not case-sensitive.
- Saved games store research by a tech's place in the reading order. Add new techs after
USE PREVIOUS, not in the middle of the game's file, or saves made before the change read the wrong techs.PlaceandMODIFYdo not change that order.
USE PREVIOUS "tech.txt"
[TECHNOLOGY] "Tactical_nukes" MODIFY
Points 80 // dearer
NoAutoUnlockTillLevel 99 // never granted by the starting level
[TECHNOLOGY] "M_100kt_MRBM" remove // the weapon can never be had
3. Built-in technologies (do not define these yourself)¶
| ID | Known by | Use |
|---|---|---|
S_FACTION_ID_0 … S_FACTION_ID_9 |
Only faction n | Faction-specific content: Parent "S_FACTION_ID_3" HideLink makes a tech, and everything that descends from it, available only to faction 3. |
PREFIX_XX (e.g. PREFIX_NA) |
Factions whose unit-model prefix is XX |
Region/faction-model-specific techs: Parent "PREFIX_NA" HideLink. |
BLOCKER |
Nobody, ever | A tech with Parent "BLOCKER", and everything that descends from it, is disabled for every faction — even GRANT_TECH cannot enable it. Use it to switch content off completely. |
These are made from Tech_faction.txt, which holds their common strings and cost: leave that file as it is.
U_City, the tech of the city pseudo-unit, is an ordinary zero-cost entry of tech.txt. Keep it.
[TECHNOLOGY] "U_My_Tank" MODIFY // a mod's own unit tech
Parent "PREFIX_RU" HideLink // only factions with the RU model prefix
[TECHNOLOGY] "M_Orbital_Strike" MODIFY // the Orbital Kinetic Bomb's tech
Parent "BLOCKER" // off for everybody
4. Research cost and tech levels¶
A faction has one research queue. Its science goes to the first unknown step towards the first tech in the queue, so parents are researched automatically.
Effective cost of a tech for a faction:
cost = Points × 0.01 × NextLevelMultiplier ^ max(0, TechLevel − L)
where L is the faction's current tech level index as computed from TechLevels.txt (0 for the first
level L_1, 1 for L_2, …) and NextLevelMultiplier comes from TechLevels.txt (shipped 1.5).
Note: tech levels are written 1-based in
tech.txtbut L is 0-based, so a tech of your own displayed level already costs ×1.5 and one level above ×2.25. Keep this in mind when balancingPoints.
TechLevels.txt¶
This file defines how research raises the faction's tech level.
| Line | Default | Meaning |
|---|---|---|
MinLevel <f>, MaxLevel <f>, NumLevels <n> |
0.1, 1, 2 | Range of the internal tech-level value and number of levels (shipped 1, 10, 10). Level index = ⌊(value − MinLevel) ÷ (MaxLevel − MinLevel + 1) × NumLevels⌋, at most the last Level line. |
Level "L_k" <v> |
— | Associates the [LEVEL] techs with levels. The order of the lines makes the level; the number is read and has no other use. Blitz has three lines, for L_2, L_4 and L_7. |
NextLevelMultiplier <f> |
1.5 | Cost factor per level above the current one (see above). |
GeneralMultiplier <f> |
1 | Scales how much each Add also raises the cap (shipped 0.8). |
tech "id" Add <v> |
— | Knowing this tech adds v to the value (and v × GeneralMultiplier to the cap). |
tech "id" Cap <v> |
— | Knowing this tech lets the value reach at least v (the highest known cap wins). A file with neither Cap nor Add lines has MaxLevel as its cap. |
tech "id" GrowthMult <v> |
— | Multiplies the automatic growth. |
AutoGrowth <f> |
0.0000926 | Growth of the value every 60 ticks (0 = none; shipped 0.00333). It stops at the cap. |
NormalizeLevel <f>, NormalizePower <p> |
0, 1 | Below NormalizeLevel the value is bent: ((value − Min) ÷ (Normalize − Min))^p × (Normalize − Min) + Min. Off unless NormalizeLevel is above MinLevel and p is not 1. Shipped in Blitz's ProductionEfficiency.txt. |
- A research tech moves the level only through its
Addline. The shipped scale, from the file's own note, is 500 points per level:Add=Points÷ 500, half as much again for techs of level 1 (Nuclear_Fission,Points 45,Add 0.135;Thermonuclear_bomb,Points 65,Add 0.13). USE PREVIOUSandIFwork here. Lines only add: a secondtech "X" Addcounts on top of the first and a second set ofLevellines makes more levels, so to change an existingtechorLevelline ship the whole file. The single values (NextLevelMultiplier…) are overwritten by a later line.- A word the file does not know ends the reading without a message: the lines after it are ignored. An unknown tech name stops the game (Technology not found).
// TechLevels.txt, shipped lines
MinLevel 1.0
MaxLevel 10.0
NumLevels 10
NextLevelMultiplier 1.5
GeneralMultiplier 0.8
Level "L_1" 1
Level "L_2" 2
tech "Nuclear_Fission" Add 0.135
AutoGrowth 0.003333333
ProductionEfficiency.txt uses the same format for the faction's nuclear efficiency, with Nuclear_Fuel_*
techs as caps and adders (shipped MinLevel 0.2, MaxLevel 1.2). The cost of a ProductionCostDegrades
weapon is multiplied by 1 ÷ this value, so at 0.2 it costs five times its ProductionCost, at 1 exactly that
and above 1 less.
5. Patterns used in the shipped tree¶
- One zero-cost tech per object.
M_100kt_nuke_lighthas noPointsand is aLeadsTochild ofNuclear_Fission; the missile usesTech "M_100kt_nuke_light". Researching the parent unlocks the child and therefore the weapon, and you can move the weapon elsewhere in the tree by moving one link. - Upgrade techs are researched techs used only in modifiers (
ImprovedBy "SAM_Mk2" Set Range 400). - Modifier tags are zero-cost techs without parents (always known) used in unit
Modifier "…"lines and tested withImprovedBy/AffectedBy Unit "…". - Obsolescence:
DisablingTech "Newer_Tech"on a unit or missile removes the old version when the newer one is known. - Scripted unlocks: give the tech
Points(any value > 0) andCanBeResearched No, then grant it from an event script withGRANT_TECH(FactionID, "tech"). (A zero-cost tech without parents is always known, and aBLOCKERchild can never be known, so neither works for this.)
[TECHNOLOGY] "M_100kt_nuke_light" // shipped: the weapon's own zero-cost tech
Name "M_100kt_nuke_light_NAME"
Description "M_100kt_nuke_light_DESC"
[MISSILE] "100kt_nuke_light" // Missile_defs.txt
Tech "M_100kt_nuke_light"
6. What must stay in step¶
These stop the game at loading:
| Message | Cause |
|---|---|
| No technology name for X, No technology description for X | The entry lacks Name or Description. |
| Technology not found X | A unit, weapon, radar, modifier, TechLevels.txt, ProductionEfficiency.txt, Ladders.txt or an AI list names a tech missing from the tech.txt of the game mode being loaded. |
| Technology Type not found X | Type "X" before its [TYPE] entry, or Class "X" with no such [UNIT_CLASS]. |
Only LeadsTo, Parent, BlockedBy or AchievementProperty is possible after Delete (tech X), the same after Reset |
Another word after delete or reset. |
[MISSILE] "SAM" MODIFY
ImprovedBy "SAM_Mk9" Set Range 900 // no such tech: "Technology not found SAM_Mk9"
Game modes. Every file a mode reads must find its techs in that mode's tech.txt. Standoff and Conquest
read the base tree. Blitz has its own, much smaller tree, and so its own TechLevels.txt,
ProductionEfficiency.txt and Ladders.txt (which defines no ladders), as well as its own units, weapons and
AI files; a mod's versions of these files are not read in Blitz. The game loads all three modes when the player
looks for a multiplayer game, so an error in one mode stops a player who never plays it. See
Add a weapon or unit so that every game mode still loads
and 12 §8.
A new tech usually needs more than its entry: strings in every language you ship, an Add line in
TechLevels.txt, and a place in the AI's research lists. See
Add a technology the AI researches.