Skip to content

Difficulty settings and handicaps

Turns the chosen difficulty into one slot per house and scales that house's damage, speed, armor, rate of fire, prices and build times by the figures the slot holds.

Features & systemsScenarios & AIAI & teams

Changed in 0.2.0

Every house plays at a difficulty slot of 0, 1 or 2. The slot selects the rules section the house takes its handicap from: [Easy] for slot 0, [Normal] for slot 1 and [Difficult] for slot 2. The section names describe the game from the side of the house that reads them. A computer house reading [Easy] is the opponent a player meets on Hard.

A scenario holds two difficulties, one for the player and one for the computer:

  • In a campaign game, both come from Difficulty=, the campaign setting kept in sun.ini. The player’s difficulty is that setting, and the computer’s is 2 minus it.
  • A launch file that starts a campaign mission sets the two separately instead, so it can pair any player difficulty with any computer difficulty.
  • Outside a campaign, both come from the difficulty chosen for the session. The computer’s is again 2 minus the player’s.

With the menu’s settings, the player’s houses and the computer’s houses read opposite sections:

Setting chosenA player-controlled house in a campaignA computer house
Easy[Easy][Difficult]
Normal[Normal][Normal]
Hard[Difficult][Easy]

Outside a campaign game, every human house plays at slot 1, whatever the session was set to. There, only the computer houses take their handicap from the setting.

A computer seat’s [HouseHandicaps] entry in a launch file sets that house’s slot directly. The entry replaces the computer’s slot from the table and the multiplayer bonus.

A campaign mission names its difficulty in a message as it starts. The name follows the computer’s difficulty and describes the game from the player’s side. When the computer houses read [Easy] the mission is announced as Hard, [Normal] as Medium and [Difficult] as Easy. A launch file can supply its own name instead, so a client that offers more than three difficulties can name the one it chose.

In a campaign, each house gets its handicap as the game reads that house’s section of the map. Only PlayerControl=yes in that section puts the house in the player’s column. More than one house may set it, and each one that does reads the player’s section.

A difficulty section has eight settings that take effect. The six multipliers do not all point the same way. A value above 1 makes the house deal more damage, move faster and take less damage. It also makes the house fire more slowly, pay more and build more slowly. Each house uses the values in its section as written; only the choice of section is inverted.

SettingEffect on a house in that slot
FirePower=Multiplies the damage of most weapons its objects fire; above 1 deals more. The key page lists the projectiles it does not scale.
Groundspeed=Multiplies the speed of its ground movement; above 1 travels faster.
Armor=Divides the damage its objects take; above 1 takes less.
ROF=Multiplies the delay between its shots; above 1 fires more slowly.
Cost=Multiplies the prices it pays; above 1 pays more.
BuildTime=Multiplies the build time of everything it produces; above 1 builds more slowly.
RepairDelay=Sets how long a computer house waits after starting one building repair before it can start another. The wait is a random time between a quarter of the value and twice the value, in minutes.
DestroyWalls=no stops a computer house’s objects from scoring walls as targets.
rules.ini
[Difficult] ; example values that weaken the house reading this section
FirePower=0.8
Groundspeed=0.9
Armor=0.8
ROF=1.2
Cost=1.2
BuildTime=1.2
RepairDelay=0.05
DestroyWalls=no

The linked key pages give the defaults.

The first seven settings are copied into the house when it gets its slot, as the next section describes. DestroyWalls is read from the section whenever a computer object considers a wall. The section’s current value therefore always applies, and no country setting changes it.

Files that contain a difficulty section are read in this order: each rules file in turn, then the map. In a campaign, the companion .INI named for the scenario is read after every house already has its handicap. Its difficulty sections therefore change only DestroyWalls, not the seven figures the houses already hold.

A house’s seven copied figures are computed once, when the house gets its slot. They are not recomputed per shot, order or frame, so a later change to a difficulty section or a country reaches the house only when it is re-handicapped.

Outside a campaign game, six of the figures are also multiplied by the matching setting in the house’s country section. A campaign game leaves the country out and keeps everything else:

Difficulty settingCampaign gameOutside a campaign
FirePower=On its ownTimes the country’s Firepower=
Groundspeed=Times GameSpeedBiasTimes the country’s Groundspeed= and GameSpeedBias
Armor=On its ownTimes the country’s Armor=
ROF=On its ownTimes the country’s ROF=
Cost=On its ownTimes the country’s Cost=
BuildTime=Times GameSpeedBiasTimes the country’s BuildTime= and GameSpeedBias
RepairDelay=Taken as writtenTaken as written

The country multipliers each default to 1, so a rules tree that never sets them gives the same figures in both columns.

How long it takes places the build-time figure in the production chain. When the computer repairs covers how the repair delay is used.

A house is assigned its slot and its figures again at these points:

  • Campaign scenario load or restart. Each house in the scenario’s [Houses] list, as its section is read. Nothing carried over from the previous mission changes the slot.
  • Every other mode. As the session’s houses are assigned: human houses to slot 1, and computer houses to the computer’s slot, adjusted by the bonus below or set by the launch file. The Neutral and Special houses created alongside them get no handicap, and all their multipliers stay at 1.
  • A player leaving a network game. When the computer takes over the departed player’s base, the house keeps slot 1 and keeps reading [Normal], whatever the session was set to. It does not take the other computer houses’ slot. Its figures are computed again and its team countdown restarts.

[General] holds lists with one entry per difficulty slot. Each house reads the entry matching its slot, with no further inversion. For a computer house, entry 0 is therefore the one used at the Hard setting and entry 2 the one used at Easy.

These lists are read in every mode:

AIHateDelays and MultiplayerAICM are applied once to each computer house, as a scenario outside a campaign finishes loading. A campaign game never uses them.

MultiplayerAICM gives a computer house extra money. Its entry is a percentage of the money the house holds at that moment, counting its credits and the value of its stored Tiberium, and that amount is added as credits. An entry of 100 leaves the house with twice its starting money, and 0 adds nothing.

The team-creation countdown that TeamDelays sets runs for every house, human or computer, and each house reads the entry for its slot. In a campaign, the player’s house and the computer houses therefore read opposite ends of the list:

Setting chosenEntry a player-controlled campaign house readsEntry a computer house reads
Easy02
Normal11
Hard20

AI triggers and team production covers what the AI lists do. It also explains why an AI trigger’s difficulty flags mean the same thing in both modes while these lists do not.

The computer’s bonus with more than one human

Section titled “The computer’s bonus with more than one human”

Outside a campaign game, CompEasyBonus=yes moves each computer house down one slot as it is assigned. It applies only when the session has more than one human entry, and a house already in slot 0 stays there. A skirmish set up from the menu has one human entry, so the bonus applies only in a LAN or online session.

Despite its name, the bonus makes the computer stronger. A computer house already holds the inverse of the player’s setting, so moving it down a slot gives it the handicap of the next harder setting. The table follows one computer house through both steps. Its last column is never easier than the setting chosen.

Setting chosenSlot the computer house holdsSlot after the bonusSetting it then behaves like
Easy2, the [Difficult] section1, the [Normal] sectionNormal
Normal1, the [Normal] section0, the [Easy] sectionHard
Hard0, the [Easy] section0, the [Easy] section; no changeHard

Each row below reads the house’s slot directly. A row naming slot 0 or the [Easy] section describes a computer house when the player chose Hard. A row naming slot 2 describes one when the player chose Easy.

WhereWhat the slot changes
The computer’s base planThe 2 - slot extra refineries and the 3 - slot term in the extra defense placeholders
The GDI wall ringThe 3 - slot term in the cap on wall defenses
A computer house’s harvestersIt builds replacements until it owns one harvester per refinery in a campaign. Outside a campaign it builds up to two per refinery, or one in slot 2
The computer’s Ion CannonIn slot 0 it also rates enemy objects still being built in a factory
Crushing an attackerA computer house’s vehicles in slot 2 never answer fire by driving over the attacker

A map’s triggers do not use a house’s slot. They follow the scenario’s difficulty, which is the player’s difficulty in a campaign and the session’s difficulty outside one. Trigger springing covers which triggers that disables. AI triggers have a separate set of three difficulty flags, which decide whether the trigger can be drawn; AI triggers and team production covers them.

Four keys in the difficulty sections are read but change nothing:

Two related keys elsewhere have no effect either. FineDiffControl in [General] is never used. The ContentScan threshold in [IQ] belongs to the same test as the difficulty section’s ContentScan, which never runs.

20 of 20

KeyDescriptionValueWhen omitted
AIHateDelaysglobal rulesThe frames a computer house waits before picking its first enemy, one entry per difficulty.list of integers(empty)
ArmorNo effect in some scopes14 applicable typesAn object type's armor class, or on a country or difficulty setting the divisor of the damage its objects take.ArmorTypeVaries by type
BuildTimeHouseType, difficulty settingsThe build-time multiplier a country applies to everything it produces, or the one a difficulty setting applies.floating pointVaries by type
CompEasyBonusglobal rulesWhether a computer house drops one difficulty slot when the session holds more than one human seat.booleanyes
Cost6 applicable typesThe credit price of one object of this type, or the multiplier a country or a difficulty applies to every price it pays.integerVaries by type
DestroyWallsdifficulty settingsWhether a computer house in this difficulty slot scores walls as targets while it scans.booleanyes
Difficultyclient settingsThe campaign difficulty as a slider position, 0 for Easy, 1 for Normal and 2 for Hard.integer1
FillEarliestTeamProbabilityglobal rulesThe percent chance that the next vehicle, infantryman or aircraft chosen goes to the oldest waiting team, one entry per difficulty.list of integers(empty)
FirePowerdifficulty settingsThe multiplier a difficulty setting applies to the damage its houses deal by firing a weapon.floating point1
FirepowerHouseTypeThe multiplier a country applies to the damage its houses deal by firing a weapon.floating point1.0
GameSpeedBiasglobal rulesThe multiplier on every house's build time and ground movement speed.floating point1
GroundspeedHouseType, difficulty settingsThe multiplier a country or a difficulty setting applies to the top speed of its houses' vehicles and infantry.floating pointVaries by type
MaximumAIDefensiveTeamsglobal rulesThe number of defensive teams above which a house passes over its defensive AI triggers, one entry per difficulty.list of integers(empty)
MinimumAIDefensiveTeamsglobal rulesThe number of defensive teams a house must hold before any non-defensive AI trigger may spring, one entry per difficulty.list of integers(empty)
MultiplayerAICMglobal rulesThe percentage of its starting money added to each computer house outside a campaign, one entry per difficulty.list of integers(empty)
PlayerControlHouse (per-scenario)Hands a campaign house to the local player, who commands its objects, and gives the house the player's difficulty slot.booleanno
ROFHouseType, WeaponType, difficulty settingsA weapon's frames between shots, or the multiplier a country or a difficulty setting applies to that delay.floating pointVaries by type
RepairDelaydifficulty settingsThe wait a computer house takes between starting one building repair and starting the next.floating point.02
TeamDelaysglobal rulesThe frames a house waits between team creation passes, one entry per difficulty.list of integers(empty)
TotalAITeamCapglobal rulesTeam count at which a house stops starting teams from AI triggers, one entry per difficulty.list of integers(empty)

History

  1. Changed0.1.0

    Keep selected difficulty when restarting missions

  2. Changed0.2.0In development

    Name the difficulty a campaign mission is played at