Superweapons
Charges one timer per house for every superweapon a rules section declares, and delivers that section's hard-coded effect where the shot is aimed.
A superweapon exists in two layers. The rules section declares one weapon for the whole game and fixes its recharge delay, its cameo, its mouse action and its behavior. Every house then carries its own copy of that weapon, with its own countdown and its own availability, so two houses holding the same weapon share nothing but the settings.
Three words carry that split through the rest of the page. A weapon’s behavior is one of seven effects wired into the engine and chosen by Type=; a section picks one of the seven and cannot add to them. The declared list is the order [SuperWeaponTypes] puts the sections in, and a weapon’s position in that list is the only name every later reference uses for it. Everything a house’s own copy holds — whether the house has the weapon, whether it is suspended, and where its countdown stands — is per house and is written in no section.
Declaring a superweapon
Section titled “Declaring a superweapon”[SuperWeaponTypes] is a numbered list whose values name the sections that describe each weapon.
[SuperWeaponTypes]1=MultiSpecial2=EMPulseSpecial3=FirestormSpecial4=IonCannonSpecial5=HuntSeekSpecial6=ChemicalSpecial7=DropPodSpecialThe list is read in order and each name the game has not already heard of takes the next position at the end of the declared set. FIRESTRM.INI and a scenario’s own rules override are read afterward through the same path, so a name that appears only there is appended after everything rules.ini declared. Every house is given one copy of each declared weapon, in the same order, as it is created. That position is the number every later reference uses: SuperWeapon= on a structure, the parameter of the two granting trigger actions, and the place a house’s copy occupies among its own set.
A name listed with no matching section is still declared. It keeps every default, which means it charges for five minutes, shows no artwork at all, and does nothing when fired.
Type= chooses which of seven hard-coded behaviors the section delivers. Several sections may name the same behavior; each still gets its own cameo, its own timer and its own grant condition, and a section left with no recognized behavior charges and shows a cameo like any other but delivers no effect.
Becoming available
Section titled “Becoming available”A house re-examines its superweapons on its own turn, whenever something has flagged its build options for a rebuild — a structure placed, sold, destroyed, captured, switched on or off, or fitted with a plug. Two passes then run in sequence: one takes away or suspends what the house can no longer support, the other switches on everything its structures now grant. A house that has been defeated is stripped by the first pass and skipped entirely by the second. A power balance that crosses the full-power line runs the first pass on its own, without the second.
From a structure or a plug
Section titled “From a structure or a plug”For every weapon the house does not already hold, the engine walks the structure list from its end backward and keeps the entries this house owns that are active and out of limbo. The first such structure that either names the weapon in SuperWeapon= or SuperWeapon2=, or carries a plug whose type does, grants it. When the house is the local player’s, the same step puts the cameo on the sidebar.
[NAMISL] ; Missile SiloSuperWeapon=MultiSpecialSuperWeapon2=ChemicalSpecialNukeSilo=yes
[GAPLUG3] ; Ion Cannon Uplink, a plug for the GDI Upgrade CenterPowersUpBuilding=GAPLUGSuperWeapon=IonCannonSpecialAuxBuilding= is tested on the structure’s own grant: a weapon that names one is withheld unless its house has at least one standing structure of that BuildingType.
A weapon that becomes available while its house is already below full power is granted suspended, whatever IsPowered= says. Suspension by power, and what it costs a charge-draining weapon, are covered by power output and drain.
One shot at a time
Section titled “One shot at a time”Two paths hand out a single-use weapon. The Add 1-time special weapon trigger action names the position of a weapon in the declared list; a missile crate picks one of its own. A one-time weapon is forced to full charge the instant it is granted, is never suspended, and is taken away from the house the moment it discharges.
Granted outright
Section titled “Granted outright”The Add repeating special weapon trigger action grants a weapon and cancels its dependence on a building at the same time. Such a weapon recharges for as long as the house lives: the removal pass no longer examines it, so no structure can be sold to take it away, and low power can never suspend it. Only defeat removes it.
Charging
Section titled “Charging”RechargeTime= is authored in minutes and converted to game frames at 900 frames to the minute. The timer counts down toward zero and the weapon becomes ready when it arrives.
Every event that touches that timer is listed below, with what it leaves on the clock. Two distinctions are what the table is for: which events put the full delay back rather than resuming from where the clock stopped, and which leave the timer stopped, because a stopped timer never reaches zero on its own and the weapon waits for something else to start it.
| Event | Effect on the timer |
|---|---|
| Granted, ordinary weapon | started at the full delay |
Granted, ManualControl=yes | set to the full delay and stopped |
| Granted as a one-time weapon | forced to zero, ready at once |
| Suspended | stopped where it stands |
| Resumed, ordinary weapon | continues from where it stopped |
Resumed, UseChargeDrain=yes | set back to the full delay |
| Discharged, repeating weapon | restarted at the full delay |
Discharged, ManualControl=yes | set to the full delay and stopped |
| Discharged, one-time weapon | the weapon is removed from the house |
Only the local player’s own weapon is announced: ChargingVoice= speaks as an ordinary weapon starts its charge and RechargeVoice= as it reaches zero. Every other house charges silently. A charge-draining weapon still speaks ChargingVoice= on the grant that starts it, but announces neither end of its running cycle after that.
Manual control
Section titled “Manual control”ManualControl=yes leaves the timer stopped when the weapon is granted and stops it again after every discharge, so the weapon does not count down on its own and something else has to start it. The engine has exactly one such starter, and it is tied to the chem missile: on each of the house’s turns, a Type=ChemMissile weapon that is present and not already charged restarts its charge when its house’s weed pool is not empty and holds exactly WeedCapacity units, and that pool is then spent.
Charge-draining weapons
Section titled “Charge-draining weapons”UseChargeDrain=yes replaces the ordinary ready-or-charging pair with three states: charging, ready, and discharged. Firing a ready weapon moves it to the discharged state and rescales the timer by ChargeToDrainRatio, so the clock now measures how long the effect lasts. Firing it again returns it to the ready state with the ratio applied in the other direction. Letting the drain run to zero returns the weapon to charging with a full delay on the clock and takes the effect down.
The two conversions are inverses of each other, and the arithmetic is short enough to follow. The charge a weapon has built up is RechargeTime less whatever is still on the clock, so firing puts that difference times the ratio on the clock as drain; firing again puts RechargeTime less the remaining drain divided by the ratio back on it as charge. An effect switched off the instant it came on therefore runs the second conversion on the whole drain and reads RechargeTime - (RechargeTime * ratio) / ratio, which is zero: the weapon is ready again with nothing left to charge. An effect switched off with half its drain still standing leaves half of RechargeTime on the clock, which is a half-charged weapon, and any other share comes back in the same proportion.
The flag, rather than Type=, is also what shapes the cameo: a charge-draining weapon always reports itself as charging, so it always carries a clock and never shows the plain ready face, and it can be fired from any state but charging or suspended.
The whole three-state cycle runs only for a house under human control. Firing the weapon in any other house toggles its effect on or off and touches neither the state nor the clock.
The firestorm defense
Section titled “The firestorm defense”Type=Firestorm is the one behavior wired to this machinery. Firing the weapon raises every FirestormWall=yes structure the house owns and firing it again lowers them; damage aimed at a raised section is converted through DamageToFirestormDamageCoefficient into charge taken off this weapon’s clock instead of health taken off the section; and losing the last working GDIFirestormGenerator structure while the wall is up discharges the weapon outright. The firestorm wall covers the wall itself — what a raised section does to what it touches, through FirestormWarhead and the animations beside it, and how the two halves of the cycle are measured.
Firing it
Section titled “Firing it”The sidebar cameo
Section titled “The sidebar cameo”A superweapon’s artwork is the shape file named by SidebarImage=, falling back to XXICON.SHP when that file cannot be found. There is no numeric countdown anywhere on the cameo; the charge readout is 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 table gives the caption each state carries. The rows to read together are the two charge-draining ones: such a weapon is captioned while it charges where an ordinary weapon is captioned with nothing, and it reaches a fourth state that no ordinary weapon has.
| 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 because a charge-draining weapon is always treated as charging, its cameo always carries one. Two clock shapes are used: the charge-up art while the weapon cannot be fired and the discharge art once it can.
Clicking a cameo that cannot be fired speaks SuspendVoice= when the timer is stopped and ImpatientVoice= otherwise. A ManualControl=yes weapon sits with its timer stopped between firings, so it answers with the suspend voice rather than the impatient one.
Aiming and the click
Section titled “Aiming and the click”Clicking a cameo that can be fired takes one of two paths, decided by Action=. Action=None fires the weapon immediately at cell 0,0 with no targeting step at all; that is how the firestorm and the hunter seeker are fired, neither of which has a mouse action of its own. Any other value arms targeting mode, deselects everything, and speaks the select-target announcement.
While targeting mode is armed, the cursor over the map reports the weapon’s Action= in place of the ordinary one, and 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, and band selection is suppressed while it is armed. The minimap does not accept superweapon actions, so a shot cannot be aimed there.
Every left click that resolves to an action searches the declared list for the first section whose Action= matches, whether or not targeting mode was armed and without asking which weapon armed it. Two sections sharing one Action= therefore always fire the earlier of the two, and an Action= that ordinary orders also produce discharges a charged weapon on the next such order.
The computer’s use
Section titled “The computer’s use”A computer house fires its superweapons from its periodic decision pass, which re-arms itself with 7 to 7.5 seconds each time it runs. Outside a campaign that pass always reaches the superweapon step. In a campaign it is reached only when the house’s IQ= is at least SuperWeapons in [IQ], and a campaign house’s intelligence is whatever its own scenario section sets, starting at 0.
Every weapon that has finished charging is then handed to the handler for its Type=. There is no handler for EMPulse and none for Firestorm, so a computer house never fires either from this pass; its wall is raised only by the Activate Firestorm Defense trigger action.
Every handler refuses to fire while the house has no declared enemy. The computer’s own enemy pick is skipped in a campaign, so a campaign house has no declared enemy — and its superweapons stay charged and unused — until damage or a trigger raises its anger against someone.
- Multi missile and chem missile take the enemy structure whose cell carries the highest figure on the firing house’s own threat map. A building at full translucency — one whose cloak fade has run all the way to the last step, where the building counts as cloaked — is rated at a random 0 to 100 instead of by the threat map. Nothing on this loop tests limbo, strength or alliance.
- Hunter seeker is fired with no target at all.
- Drop pods pick a random point in one of the four compass quadrants of the firing house’s own base, between one and two base radii out from its center, and then the closest cell to that point that infantry could walk into. The computer’s pods land around its own base, not the enemy’s.
- Ion cannon rates every object the enemy house owns and strikes one of the best rated.
The ion cannon’s rating is the only one of the four with settings behind it, and the rest of this section is about that rating.
Only an enemy object on the ground layer, active and out of limbo, is a candidate at all — except in difficulty slot 0, where an object still inside a factory that is running and not suspended also qualifies. Every candidate opens at a rating of 1 and a structure at 3, and those two opening figures are what the table below replaces. The table is consulted only for a candidate whose current strength is at or below IonCannonDamage; anything above that keeps its opening figure whatever it is. The comparison is against the raw figure alone, not a prediction that the blast will kill the object.
What a rating decides is rank, not worth. The routine remembers the highest rating it has seen, collects every candidate that ties with it, and fires at one of those at random. A premium of 4 and a premium of 40 therefore pick out the same object as long as nothing outrates it, and because a premium replaces the opening figure rather than adding to it, a premium below that figure demotes its object: an AIIonCannonHarvesterValue entry of 1 leaves a nearly destroyed harvester rated below an untouched structure standing beside it.
The rows are tested top to bottom and the first match wins, so a base defense that also produces vehicles is rated as a war factory and never reaches the base defense row. The right-hand column is what the rating column alone hides: three rows are numbers fixed in the engine, and no rules file can move them; every other row names a per-difficulty list read at the position of the firing house’s own difficulty slot, never the target’s. None of those lists carries a built-in value, so each needs one entry per difficulty written for it.
| 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 the first BuildConst type | AIIonCannonMCVValue | Per-difficulty list |
Vehicle with Passengers above zero | AIIonCannonAPCValue | Per-difficulty list |
| Any other vehicle | 2 | Fixed in the engine |
Nothing else the enemy owns matches a row, so an aircraft standing on the ground is a candidate rated 1 however badly damaged it is.
One override then runs on top of whatever the table produced. A cloaked object, and a building at full translucency, each take a rating drawn at random from zero up to ten above the best rating collected so far, so such an object’s rating depends on where it falls in the scan and can outrate everything found before it. This is not the same rule as the flat 0 to 100 the missile handlers draw for a fully translucent building. The two are separate scales measuring different things — threat-map figures there, these premiums here — and each random range is sized for its own scale, so neither figure can be read across from one handler to the other.
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. The rest are set out here.
Ion cannon
Section titled “Ion cannon”The blast lands at the target cell, at the height of that cell’s terrain. Over water it draws the last entry of SplashList; over anything else it draws IonBlast, and the IonBeam animation is created in both cases. It then applies IonCannonDamage through IonCannonWarhead with no source, so the warhead’s Verses table, its spread falloff and Immune=yes all apply and no kill is credited, and lights the scene when that warhead is declared bright. A cell that lies under a bridge is detonated twice: once at bridge height and once at ground level. A shockwave then rolls outward over the following frames.
Multi missile and chem missile
Section titled “Multi missile and chem missile”An ordinary weapon of either behavior searches the declared BuildingTypes for the first NukeSilo=yes type that names this weapon in SuperWeapon= or SuperWeapon2=, then looks for one of the house’s structures of that type. That silo takes the missile mission, and the target is stored on the house as a single value, so a second launch overwrites a destination the silo has not yet read. A missile already in flight keeps the cell it was launched against.
The silo opens its door, holds it, and launches a projectile drawn from the recorded weapon’s WeaponType=: its projectile, warhead, maximum speed and projectile range, carrying a hard-coded strength of 200, released 160 leptons — five eighths of a cell — north of the structure’s center and pointed straight up. The launch-detected announcement plays whenever the launching house is not player-controlled. The door then closes and the structure returns to guard.
A one-time missile has no silo at all. It is created from the map edge closest to the target, out of the hard-coded weapon MultiLauncher or ChemLauncher according to the behavior, at a hard-coded range of 100000, which is longer than any map is wide.
Hunter seeker
Section titled “Hunter seeker”The house’s structures are scanned against HSBuilding and the last match is kept, not the first. The drone appears at the closest cell to that structure that infantry could walk into — the drone is a vehicle, but the search that places it asks for ground crossable on foot — and only if that cell lies inside the playable area, the region a scenario declares with [Map] LocalSize=. Otherwise nothing is created and the charge is spent. ActsLike= decides which type is used: a house acting as GDI gets GDIHunterSeeker and every other house NodHunterSeeker. A drone that cannot be placed is deleted; one that can acquires its own target and attacks.
EM pulse
Section titled “EM pulse”The shot is handed to the EM pulse cannon the house owns nearest the target, and the EM pulse cannon covers everything the pulse then does.
Scripting
Section titled “Scripting”Two trigger actions grant a weapon, and becoming available covers what each one does to it. 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, and each does nothing when the wall is already in the state it asks for.
The three strike actions — Ion-cannon strike, Nuke strike and Chem-missile strike — do not touch this system at all. 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 sets a value no superweapon routine consults; a computer house’s aim is entirely the per-behavior choice above.
Parsed settings without effect
Section titled “Parsed settings without effect”NukeProjectile and NukeDown in [SpecialWeapons] are read into the rules and never consulted; a silo takes its projectile from the firing weapon’s WeaponType= instead. EMPulseWarhead and EMPulseProjectile in the same section are inert too, and are covered by the EM pulse cannon they appear to describe.
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 | The type created by a hunter-seeker superweapon fired by a house acting as GDI. | 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 | The type created by a hunter-seeker superweapon fired by any house not acting as GDI. | 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 | A superweapon's hard-coded behavior, or under the sync-bug settings the object kind named for the playback trap. | string | Varies by type |
UseChargeDrainSuperWeaponType | Whether the superweapon holds its effect for a timed spell instead of firing once. | boolean | no |
WeaponTypeSuperWeaponType | The WeaponType a missile silo launches for this superweapon. | class | none |
WeedCapacityglobal rules | Units of weed a house can hold. | integer | 0 |
No keys match the current filters.
History
- Changed0.1.0In development