Superweapons
How a house gains, charges and fires each declared superweapon, and what each of the seven hard-coded behaviors delivers.
Every superweapon has one rules section and one copy in each house. The section sets what all copies share: the recharge delay, the cameo, the mouse action and the behavior. Each house’s copy keeps its own state: whether the house holds the weapon, whether it is suspended, and how far its countdown has run.
A weapon’s behavior is the effect it delivers when fired. Type= selects one of seven behaviors built into the engine, and rules cannot add more. The declared list is [SuperWeaponTypes], and a weapon’s position in that list is the number trigger actions use to name it.
Declaring a superweapon
Section titled “Declaring a superweapon”[SuperWeaponTypes] lists the sections that declare superweapons.
[SuperWeaponTypes]1=MultiSpecial2=EMPulseSpecial3=FirestormSpecial4=IonCannonSpecial5=HuntSeekSpecial6=ChemicalSpecial7=DropPodSpecialThe list is read in order, and each new name takes the next position. Later rules files, such as FIRESTRM.INI and a scenario’s rules override, can add names. A name that first appears there goes after everything rules.ini declared. A name that is already declared keeps its position.
Each house receives one copy of every declared weapon when the house is created, in list order. The two trigger actions that grant a weapon, Add 1-time special weapon and Add repeating special weapon, name it by its position. A structure names it by section name, in SuperWeapon= or SuperWeapon2=.
A listed name with no matching section is still declared, with every default. It charges for five minutes, has no cameo artwork, and does nothing when fired.
Type= selects the behavior. Several sections may use the same behavior, and each still has a separate cameo, countdown and grant condition. A section with no recognized Type= charges and shows a cameo like any other, but firing it has no effect.
Becoming available
Section titled “Becoming available”A house updates which superweapons it holds after one of its structures is built, placed, sold, destroyed, captured, switched on or off, or fitted with a plug. On the house’s next update, two passes run in order:
- The first pass removes each weapon whose granting structures are gone, and suspends or resumes the rest. Power output and drain covers when a held weapon is suspended.
- The second pass grants every weapon that the house’s structures now provide.
A defeated house loses every weapon in the first pass, including one-time and trigger-granted weapons, and skips the second pass. When the house’s power crosses the full-power line, only the first pass runs.
From a structure or a plug
Section titled “From a structure or a plug”A house gains a weapon it does not already hold when it owns a structure that grants the weapon and is active and out of limbo. A structure grants the weapons its type names in SuperWeapon= and SuperWeapon2=, and the weapons named the same way by a plug fitted to it. For the local player, the cameo appears on the sidebar at the same time.
[NAMISL] ; Missile SiloSuperWeapon=MultiSpecialSuperWeapon2=ChemicalSpecialNukeSilo=yes
[GAPLUG3] ; Ion Cannon Uplink, a plug for the GDI Upgrade CenterPowersUpBuilding=GAPLUGSuperWeapon=IonCannonSpecialAuxBuilding= adds a condition to the grant that comes from a structure’s type. A weapon that names an AuxBuilding= is granted by a structure’s SuperWeapon= or SuperWeapon2= only while its house owns at least one standing structure of that BuildingType.
A weapon granted while its house is short of power arrives suspended, even with IsPowered=no, and its ChargingVoice= does not play. Power output and drain covers suspension by power and what it costs a charge-draining weapon.
One shot at a time
Section titled “One shot at a time”The Add 1-time special weapon trigger action grants a single-use copy of the weapon at the position it names. A missile crate also grants one; the warning below explains which weapon.
A one-time weapon is fully charged the moment it is granted and is never suspended. It needs no structure, and it is removed from the house as soon as it fires. No voice announces the grant.
A house that already holds the weapon gains nothing from either path. Its copy keeps its current charge and stays a repeating weapon.
Granted outright
Section titled “Granted outright”The Add repeating special weapon trigger action grants the weapon and frees it from structures. An ordinary weapon recharges after every shot for as long as the house lives, and a ManualControl=yes weapon still waits for its next start. Losing or selling structures cannot remove the weapon, and low power cannot suspend it. Only defeat removes it.
If the house already holds the weapon, the action only frees it from structures. A one-time copy the house already holds stays one-time and is still removed when it fires.
Charging
Section titled “Charging”RechargeTime= sets the charge delay in minutes, which the game converts at 900 frames a minute. The weapon’s countdown starts at that delay, and the weapon is ready when the countdown reaches zero.
The table lists the events that change an ordinary weapon’s countdown. The weed pool and charge-draining weapons are covered below. A stopped countdown does not run, so the weapon stays uncharged until another event starts it again.
| Event | Effect on the countdown |
|---|---|
| Granted, ordinary weapon | started at the full delay |
Granted, ManualControl=yes | set to the full delay and stopped |
| Granted as a one-time weapon | set to zero, so the weapon is ready at once |
| Suspended | stopped where it stands |
| Resumed, ordinary weapon | continues from where it stopped |
Resumed, ManualControl=yes | stays stopped |
Resumed, UseChargeDrain=yes | restarted at the full delay |
| Fired, repeating weapon | restarted at the full delay |
Fired, ManualControl=yes | set to the full delay and stopped |
| Fired, one-time weapon | the weapon is removed from the house |
Voices play only for the local player’s weapons. ChargingVoice= plays when a countdown starts: when a structure grants the weapon, after each shot, and when the weed pool restarts a chemical missile. RechargeVoice= plays when the countdown reaches zero. No voice plays when a trigger action or a crate grants the weapon, or when a suspended weapon resumes. A charge-draining weapon plays ChargingVoice= only when a structure grants it; its later charge and drain cycles are silent.
Manual control
Section titled “Manual control”ManualControl=yes stops the countdown when the weapon is granted and again after every shot, so the weapon never charges on its own. The only event that starts it is a full weed pool, and only for a Type=ChemMissile weapon. A weapon of any other behavior with ManualControl=yes never charges, although a one-time grant still arrives fully charged.
When a house’s weed pool holds exactly WeedCapacity units, the first Type=ChemMissile weapon the house holds that is not ready restarts its countdown at the full delay, and the pool is emptied. This happens with or without ManualControl=yes, and a countdown that is already running starts over.
Two states change what a full pool does:
- A ready weapon leaves the pool full. The countdown restarts as soon as the weapon fires.
- A suspended weapon still empties the pool, but its countdown does not start.
Charge-draining weapons
Section titled “Charge-draining weapons”UseChargeDrain=yes gives a weapon three states: charging, ready and discharged. Firing a ready weapon delivers its Type= effect and moves it to the discharged state, where the countdown measures how long the effect lasts. Firing it again during the drain returns it to ready. When the drain runs out, the weapon returns to charging with a full delay on the countdown, and the effect ends.
ChargeToDrainRatio converts between charge and drain time:
- On firing, the charge built so far (
RechargeTimeminus the time left on the countdown) is multiplied by the ratio and becomes the drain time. - On firing again, the unspent drain is divided by the ratio and returned as charge.
An effect switched off the moment it starts therefore gives back the full charge. An effect switched off with half its drain left gives back half. A weapon returned to ready can be fired again at once, but its next drain lasts only as long as the charge it holds allows. Meanwhile its countdown keeps running toward a full charge.
A charge-draining weapon always shows a clock on its cameo and never shows the plain ready face. It can be fired while ready or discharged, but not while charging or suspended.
This cycle runs only for a house under human control. For any other house, firing the weapon only switches the effect on or off; the state and the countdown do not change.
The firestorm defense
Section titled “The firestorm defense”Type=Firestorm is the only behavior built for this cycle. Firing the weapon raises every FirestormWall=yes structure its house owns, and firing it again lowers them.
Two events outside the cycle also change the wall. Damage aimed at a raised section shortens the countdown through DamageToFirestormDamageCoefficient. Losing the last working GDIFirestormGenerator structure lowers the wall, as if the weapon had been fired again.
The firestorm wall covers what a raised section does to what it touches, through FirestormWarhead and the animations beside it.
Firing it
Section titled “Firing it”The sidebar cameo
Section titled “The sidebar cameo”A superweapon’s cameo is the shape file named by SidebarImage=, or XXICON.SHP when that file cannot be found. The cameo shows no numeric countdown. Its charge appears as a clock and a short caption. The sidebar covers where the cameo sits, how it is announced, how it is captioned, and when it leaves.
The caption depends on the weapon’s state. A charge-draining weapon has a caption while it charges and a fourth state that ordinary weapons lack.
| Weapon state | Caption |
|---|---|
| Suspended | “On Hold” |
| Charging | none, or “Charging…” for a charge-draining weapon |
| Ready | “Ready”, or “Release” for Type=HunterSeeker |
| Discharged, charge-draining | “Activated” |
The clock is drawn while the weapon is not fully charged, and on every charge-draining weapon. It uses the charge-up art while the weapon cannot be fired and the discharge art once it can.
Clicking a cameo that cannot be fired plays SuspendVoice= when its countdown is stopped and ImpatientVoice= otherwise. A ManualControl=yes weapon waiting for its next start has a stopped countdown, so it plays SuspendVoice=.
Aiming and the click
Section titled “Aiming and the click”Action= decides what clicking a cameo that can be fired does:
Action=Nonefires the weapon at once at cell 0,0, with no targeting step. The shipped firestorm and hunter seeker are fired this way.- Any other value arms targeting mode, deselects everything, and plays the select-target announcement.
While targeting mode is armed, the cursor over the map shows the weapon’s Action= in place of the usual cursor. An EM pulse also shows an out-of-range cursor, which the EM pulse cannon covers.
Releasing the left button fires the weapon at the cell under the pointer. A right click on the cameo or on the map cancels targeting.
Band selection is off while targeting mode is armed. The minimap does not accept superweapon actions, so a shot cannot be aimed there.
A left click fires the first section in the declared list whose Action= matches the click’s action. This happens whether or not targeting mode is armed, and whichever cameo armed it. Two sections that share one Action= therefore always fire the earlier section. Clicking the later section’s cameo arms targeting, but the shot fires the earlier section, or nothing if that section is not ready.
If a section’s Action= is one that ordinary orders also use, the player’s next such order fires the weapon whenever it is charged. For example, a ready weapon with Action=Attack fires at the target of the player’s next attack order.
The computer’s use
Section titled “The computer’s use”A computer house fires its ready superweapons during its periodic AI pass, which runs every 7 to 7.5 seconds. Outside a campaign, the pass always fires them. In a campaign, it fires them only when the house’s IQ= is at least SuperWeapons in [IQ]. A campaign house takes its IQ= from its section in the scenario, and has 0 when the section sets none.
Each ready weapon goes to the handler for its Type=. There is no handler for EMPulse or Firestorm, so the computer never fires either on its own. Its firestorm wall goes up only through the Activate Firestorm Defense trigger action.
Every handler waits until the house has a declared enemy. In a campaign the computer does not pick an enemy on its own, so a campaign house has none until damage or a trigger makes it angry at someone. Until then its superweapons stay charged and unused.
- Multi missile and chem missile target the enemy structure whose cell rates highest on the firing house’s threat map. A structure at full translucency, the last step of a cloak’s fade, is rated at random from 0 to 100 instead. Every structure the enemy owns is considered, including one in limbo.
- Hunter seeker is released with no target; the drone chooses one itself.
- Drop pods land around the computer’s own base, not the enemy’s. The handler picks a random point in one of four compass quadrants, one to two base radii from the base’s center, with the radius held between 3 and 8 cells. It then aims at the nearest cell to that point that infantry can enter.
- Ion cannon rates every enemy object and strikes one of the highest rated.
The ion cannon’s rating is the only one of the four with settings.
Only enemy objects that are on the ground layer, active and out of limbo are candidates. In difficulty slot 0, an object still being built also counts, if its factory is producing and not on hold.
Each candidate starts at a rating of 1, or 3 for a structure. A candidate whose current strength is at or below IonCannonDamage takes its rating from the table below. A candidate above that figure keeps its starting rating. The test compares strength with the damage figure only; it does not predict whether the blast will destroy the object.
Only the highest rating matters. The computer collects every candidate that ties for the highest rating and strikes one of them at random. Apart from cloaked objects, described below, a table value of 4 and one of 40 therefore select the same target when nothing else rates 4 or higher. A table value replaces the starting rating; it is not added to it. A value below another candidate’s rating ranks the object below that candidate. For example, an AIIonCannonConYardValue of 2 ranks a nearly destroyed construction yard below any structure still above IonCannonDamage, which keeps its starting 3.
The rows are tested from the top for each kind of object, and the first match wins. A base defense that also produces vehicles is therefore rated as a war factory. Rows marked as fixed cannot be changed by any rules file. Each per-difficulty list is read at the position of the firing house’s difficulty slot, not the target’s. None of these lists has a built-in value, so each needs one entry for every difficulty.
| Candidate | Rating | Where the figure comes from |
|---|---|---|
| Engineer | AIIonCannonEngineerValue | Per-difficulty list |
| Vehicle thief | AIIonCannonThiefValue | Per-difficulty list |
| Any other infantry | 2 | Fixed in the engine |
Factory=BuildingType structure | AIIonCannonConYardValue | Per-difficulty list |
Factory=UnitType structure | AIIonCannonWarFactoryValue | Per-difficulty list |
| Structure whose rated output beats its rated drain | AIIonCannonPowerValue | Per-difficulty list |
IsBaseDefense=yes structure | AIIonCannonBaseDefenseValue | Per-difficulty list |
IsPlug=yes structure | AIIonCannonPlugValue | Per-difficulty list |
IsTemple=yes structure | AIIonCannonTempleValue | Per-difficulty list |
HoverPad=yes structure | AIIonCannonHelipadValue | Per-difficulty list |
| Any other structure | 4 | Fixed in the engine |
Harvester=yes vehicle | AIIonCannonHarvesterValue | Per-difficulty list |
Vehicle whose DeploysInto is a BuildConst type | AIIonCannonMCVValue | Per-difficulty list |
Vehicle with Passengers above zero | AIIonCannonAPCValue | Per-difficulty list |
| Any other vehicle | 2 | Fixed in the engine |
No row covers aircraft, so an aircraft on the ground is a candidate rated 1 however badly damaged it is.
A cloaked object, or a structure at full translucency, takes a random rating instead, from 0 up to ten above the best rating found so far in the scan. It can therefore outrate everything scanned before it, and its chance depends on its place in the scan. The higher the best rating so far, the less likely the draw is to beat it, so large table values make cloaked objects rarely chosen. This rule is separate from the 0 to 100 draw the missile handlers use.
What each behavior delivers
Section titled “What each behavior delivers”Type=DropPod calls the drop-pod delivery on the chosen cell, and Type=Firestorm toggles the firestorm defense. This section covers the other behaviors.
Ion cannon
Section titled “Ion cannon”The blast lands on the target cell, at the height of that cell’s terrain. It plays IonBlast, or the last entry of SplashList over water, and always plays IonBeam.
The blast deals IonCannonDamage through IonCannonWarhead with no attacker. The warhead’s Verses table, its spread falloff and Immune=yes all apply, and no kill is credited. A bright warhead also lights the scene. A cell under a bridge is hit twice: once at bridge height and once at ground level.
A shockwave then rolls outward and stops the infantry and vehicles it passes near the target. Vehicles driving out of a war factory, or standing on its exit cells, keep moving.
Multi missile and chem missile
Section titled “Multi missile and chem missile”A repeating missile launches from a silo. The engine finds the first BuildingType with NukeSilo=yes that names this weapon in SuperWeapon= or SuperWeapon2=, and uses one of the house’s structures of that type. If the house owns none, nothing launches, but the charge is spent. Only that first type is searched, so a silo of a later type that grants the same weapon never launches it.
The house stores a single missile target. A second launch before the first silo has launched its missile therefore redirects that silo. A missile already in flight keeps its target.
The silo opens its door, launches the missile, closes the door and returns to guard. The projectile, warhead, maximum speed and range come from the WeaponType= of the section the declaration warning describes. The silo ignores that weapon’s Damage= and gives the projectile a fixed strength of 200. The missile leaves five eighths of a cell (160 leptons) north of the silo’s center, pointing straight up. When the launching house is not the local player’s, the player hears the launch-detected announcement.
A one-time missile needs no silo. It enters from the map edge nearest the target. It is built from the hard-coded weapon MultiLauncher or ChemLauncher, according to the behavior, and deals that weapon’s Damage=. It is fired with a range of 100000 leptons, longer than any map is wide.
Hunter seeker
Section titled “Hunter seeker”The drone comes out of the house’s structure whose type is listed in HSBuilding. If the house owns several, the newest is used. If it owns none, the charge is spent and nothing launches.
The drone appears at the nearest cell to that structure that infantry could enter, even though the drone is a vehicle. If that cell lies outside the playable area, the region a scenario declares with [Map] LocalSize=, or the drone cannot be placed there, nothing launches and the charge is spent. A placed drone chooses a target and attacks it.
The drone type is the HunterSeeker of the side the firing house acts as. In each rules file, GDIHunterSeeker and NodHunterSeeker in [General] set it for the first two sides in [Sides], and a side’s section in the same file overrides them. A house with no side, or whose side names no drone, spends the charge and launches nothing.
EM pulse
Section titled “EM pulse”The shot goes to the house’s EM pulse cannon nearest the target. That page covers everything the pulse then does.
Scripting
Section titled “Scripting”Two trigger actions grant a weapon, and becoming available covers what each one does. Two more toggle the firestorm defense. Activate Firestorm Defense and Deactivate Firestorm Defense each fire the house’s first Type=Firestorm weapon at cell 0,0. Each does nothing when the wall is already in the state it asks for.
Three strike actions do not use superweapons at all: Ion-cannon strike, Nuke strike and Chem-missile strike. They create the effect directly at the waypoint, so they need no weapon, no charge, no silo and no house that owns one.
The Preferred target action does not affect superweapons. A computer house aims each behavior as the computer’s use describes.
Parsed settings without effect
Section titled “Parsed settings without effect”NukeProjectile and NukeDown in [SpecialWeapons] are read but have no effect; a silo takes its projectile from a section’s WeaponType= instead. EMPulseWarhead and EMPulseProjectile in the same section have no effect either. The EM pulse cannon covers them.
Related settings
40 of 40
| Key | Description | Value | When omitted |
|---|---|---|---|
AIIonCannonAPCValueglobal rules | The ion cannon rating a computer house gives an enemy vehicle that can carry passengers. | list of integers | (empty) |
AIIonCannonBaseDefenseValueglobal rules | The ion cannon rating a computer house gives an enemy IsBaseDefense structure. | list of integers | (empty) |
AIIonCannonConYardValueglobal rules | The ion cannon rating a computer house gives an enemy structure that produces buildings. | list of integers | (empty) |
AIIonCannonEngineerValueglobal rules | The ion cannon rating a computer house gives an enemy engineer. | list of integers | (empty) |
AIIonCannonHarvesterValueglobal rules | The ion cannon rating a computer house gives an enemy harvesting vehicle. | list of integers | (empty) |
AIIonCannonHelipadValueglobal rules | The ion cannon rating a computer house gives an enemy HoverPad structure. | list of integers | (empty) |
AIIonCannonMCVValueglobal rules | The ion cannon rating a computer house gives an enemy vehicle that deploys into a construction yard. | list of integers | (empty) |
AIIonCannonPlugValueglobal rules | The ion cannon rating a computer house gives an enemy IsPlug structure. | list of integers | (empty) |
AIIonCannonPowerValueglobal rules | The ion cannon rating a computer house gives an enemy structure that produces more power than it draws. | list of integers | (empty) |
AIIonCannonTempleValueglobal rules | The ion cannon rating a computer house gives an enemy IsTemple structure. | list of integers | (empty) |
AIIonCannonThiefValueglobal rules | The ion cannon rating a computer house gives an enemy vehicle thief. | list of integers | (empty) |
AIIonCannonWarFactoryValueglobal rules | The ion cannon rating a computer house gives an enemy structure that produces vehicles. | list of integers | (empty) |
ActionSuperWeaponType, scenarios | A superweapon's targeting cursor and firing path, or on a scenario the movie played as the mission begins. | actiontype | Varies by type |
AuxBuildingSuperWeaponType | A BuildingType the house must own before a structure may grant this superweapon. | class | none |
ChargeToDrainRatioglobal rules | The exchange rate between a charge-draining superweapon's stored charge and the time its effect runs. | floating point | 3 |
ChargingVoiceSuperWeaponType | The EVA line spoken as the superweapon starts charging. | EVA speech | none |
DamageToFirestormDamageCoefficientglobal rules | How much firestorm charge a raised wall loses per point of damage aimed at one of its sections. | floating point | 0.1 |
FirestormWallBuildingType | Whether the structure is a firestorm wall section, raised and lowered with its house's firestorm defense. | boolean | no |
FirestormWarheadglobal rules | The WarheadType a raised firestorm wall destroys objects with. | class | none |
GDIFirestormGeneratorglobal rules | The BuildingType whose loss discharges a house's firestorm superweapon and brings down its wall. | class | none |
GDIHunterSeekerglobal rules | Seeds the first side's HunterSeeker. | class | none |
HSBuildingglobal rules | The BuildingTypes a hunter-seeker drone may walk out of. | typelist | (empty) |
ImpatientVoiceSuperWeaponType | The EVA line spoken when the cameo of a still-charging superweapon is clicked. | EVA speech | none |
IonCannonDamageglobal rules | The raw damage an ion cannon blast applies, and the strength ceiling the computer rates a target against. | integer | 700 |
IonCannonWarheadglobal rules | The WarheadType an ion cannon blast applies its damage through. | class | none |
IsPoweredSuperWeaponType | Whether the superweapon stops charging while its house is short of power. | boolean | yes |
ManualControlSuperWeaponType | Whether the superweapon's charge timer is left stopped instead of counting down on its own. | boolean | no |
NodHunterSeekerglobal rules | Seeds the second side's HunterSeeker. | class | none |
NukeSiloBuildingType | Whether the structure can serve as the launch site of a MultiMissile or ChemMissile superweapon. | boolean | no |
RechargeTimeSuperWeaponType | The minutes a superweapon takes to charge, and for a charge-draining weapon the base the drain is scaled from. | floating point | 5 |
RechargeVoiceSuperWeaponType | The EVA line spoken as the superweapon finishes charging. | EVA speech | none |
SidebarImageSuperWeaponType | The name of the shape file drawn as the superweapon's sidebar cameo. | string | Computed |
SuperWeaponBuildingType | The superweapon a standing structure of this type grants its owner. | SuperWeaponType | none |
SuperWeapon2BuildingType | A second superweapon a standing structure of this type grants its owner. | SuperWeaponType | none |
SuperWeaponsglobal rules | The house intelligence level at which a computer house begins firing its superweapons in a campaign. | integer | 4 |
SuspendVoiceSuperWeaponType | The EVA line spoken when the cameo of a superweapon whose timer is stopped is clicked. | EVA speech | none |
TypeNo effect in some scopesSuperWeaponType, multiplayer settings, Sounds | A superweapon's hard-coded behavior, the object kind named for the playback trap under the sync-bug settings, or where a sound is heard from. | string | Varies by type |
UseChargeDrainSuperWeaponType | Whether a fired superweapon spends its charge over a timed drain that can be ended early. | boolean | no |
WeaponTypeSuperWeaponType | The WeaponType a missile silo launches, read only from the first and sixth entries of the superweapon list. | class | none |
WeedCapacityglobal rules | Units of weed a house can hold. | integer | 0 |
No keys match the current filters.
History
- Changed0.1.0
- Changed0.2.0In development
- Changed0.2.0In development