Crates
Places pickup crates on the map and gives one result to the infantry or vehicle that collects each crate.
A crate is an overlay. Any OverlayType with Crate=yes is collected as a crate. Crates the engine places itself always use the overlay type named by WoodCrateImg. In a campaign, WoodCrateImg and CrateImg also decide which result a crate gives.
Outside a campaign, the engine places random crates, draws each crate’s result from weighted shares, and replaces crates as they expire or are collected. A campaign does none of this: its crates come only from the map and from destroyed vehicles, and each gives a fixed result.
Placing crates
Section titled “Placing crates”At scenario start
Section titled “At scenario start”Outside a campaign, when crates are enabled for the match, random crates are placed once as the scenario finishes loading. The number placed is the larger of CrateMinimum and the number of human players, capped at CrateMaximum. Both keys belong in [CrateRules] in rules.ini.
Network games and spawned matches record the number of human players. A skirmish started from the game’s menus does not, so it places CrateMinimum crates. A network game played earlier in the same session can leave a larger count behind.
Each random crate occupies one of 256 tracking slots until it is collected or expires. When all 256 slots are in use, no further random crate is placed, whatever CrateMaximum says.
Crates drawn into a map
Section titled “Crates drawn into a map”A map can draw crates in its overlay layer. They appear in every match, including campaigns and matches with crates switched off. As with every other overlay, a crate drawn outside the playfield is dropped.
A drawn crate appears exactly where it was drawn, whatever occupies the cell or its terrain type. The only exception is the slope: a crate appears only on flat ground or on one of the four standard ramps. A standard ramp slopes toward one of the four map directions and has two of the cell’s corners raised. Corner, steep and double-ramp slopes never hold a crate, however it arrives.
A drawn crate takes no tracking slot, so it never expires. It stays on the map until something collects it.
Where a random crate can land
Section titled “Where a random crate can land”Placing a random crate makes up to 1000 attempts. Each attempt draws a random cell anywhere on the map, including the border outside the playable area, then goes through these steps:
-
If the cell lies outside the playable area, the attempt fails and the next attempt draws a new cell.
-
If the cell holds an overlay, the engine draws a fresh random cell, then takes a nearby cell that is unoccupied, lies in the playable area and can be crossed by tracked vehicles. It repeats this until the cell has no overlay or has one that allows a crate. The new cell is not near the rejected one.
-
The engine creates the
WoodCrateImgoverlay on that cell. It never placesCrateImg. -
The crate appears only if the cell passes all of these tests, in this order:
- the cell is flat or has one of the four standard ramps;
- it holds no infantry, vehicle, building, landed aircraft, or terrain object such as a tree;
- it has no wall;
- tracked vehicles can cross its land type;
- the overlay already in the cell, if there is one, does not set
Overrides=yes.
In step 2, an overlay allows a crate only when its type sets BuildableOver=yes, it is not a wall, and the cell’s land type is passable to the Foot or the Float speed type. Any other overlay forces a redraw, including Tiberium, veins, walls, bridges and an existing crate. A crate placed on such a cell replaces the overlay, unless the overlay also sets Overrides=yes, in which case step 4 rejects the cell.
The wall test in step 4 never fails, because step 2 always moves away from a wall.
How long a crate lasts
Section titled “How long a crate lasts”A random crate’s lifetime is chosen when it is placed. It is a random time between half of CrateRegen and twice CrateRegen, in minutes of game time. The shipped rules set CrateRegen=3, so a crate lasts between 1.5 and 6 minutes. With CrateRegen=10, it lasts between 5 and 20 minutes.
Outside a campaign, while crates are enabled for the match, a crate that reaches the end of its lifetime is removed and a new random crate is placed.
Collecting a crate also places a new random crate, outside a campaign, when crates are enabled for the match and Crates in [MultiplayerDefaults] is yes. This applies to every collected crate, including one drawn into the map or dropped by a vehicle.
Crates dropped by destroyed vehicles
Section titled “Crates dropped by destroyed vehicles”A destroyed vehicle whose type sets CarriesCrate=yes can drop a WoodCrateImg crate. The crate lands on a nearby cell in the playable area that is unoccupied, has no overlay, and can be crossed by tracked vehicles. If no such cell is found, nothing drops.
The map’s [Basic] section decides whether drops happen. A type with IsTrain=yes drops a crate only when TrainCrate is enabled, and every other type only when TruckCrate is enabled. The Toggle Train Cargo trigger action changes the train setting during a mission.
A dropped crate takes no tracking slot, so, like a crate drawn into the map, it never expires.
Collecting a crate
Section titled “Collecting a crate”Infantry, walkers, hovercraft and driven vehicles collect a crate when they move into its cell. These are the walking, mech, hovering and driving locomotors. Objects with any other locomotor never collect a crate: jump-jet infantry and flying aircraft pass over the cell, and buildings never move onto one.
A crate can be collected anywhere its collector can move. Crates placed by the engine always lie inside the playable area, so any crate in the map border was drawn there by the map.
Some objects refuse to enter a crate’s cell at all. The table shows which, by whether a human plays the object’s house and whether the match is a campaign:
| The collector | In a campaign | Outside a campaign |
|---|---|---|
| A vehicle of a human-played house | Enters and collects | Enters and collects |
| Infantry of a human-played house | Enters and collects | Enters and collects |
| A vehicle of a house that is not human-played | Refuses the cell | Enters and collects |
| Infantry of a house that is not human-played | Refuses the cell | Refuses the cell |
Outside a campaign, a house whose country sets MultiplayPassive=yes never collects a crate. Its vehicles still drive over crates, leaving them in place, and its infantry refuse crate cells as the table shows. In a campaign, MultiplayPassive does not affect crates.
Springing the crate trigger
Section titled “Springing the crate trigger”When the overlay type sets CrateTrigger=yes, collecting the crate fires two trigger events:
- Pickup Crate springs on the collector’s tag, if it has one, before the result is chosen. If that trigger destroys the collector, the crate stays on the map, gives no result, and Pickup Crate (any) does not fire.
- Pickup Crate (any) fires on the next game frame.
Crates without CrateTrigger=yes fire neither event.
The [Powerups] section
Section titled “The [Powerups] section”[Powerups] gives each crate result a share of the random draw, an animation, and one number that the result’s effect uses. The entry names are the result tokens on the crate result page, and Crate powerups owns the syntax. If you already write [Powerups] entries, skip to choosing the result.
Each value is a comma list of Share,Anim,Data. The animation can be <none> or none; an AnimType name the rules do not register also gives no animation. The third field is optional. Written with a percent sign, it is divided by 100: Armor=33,ARMOR,50% stores 0.5.
[Powerups]Money=55,MONEY,2000 ; share 55, plays the MONEY animation, pays at least 2000 creditsArmor=33,ARMOR,2 ; share 33, plays ARMOR, halves incoming damage inside the radiusExplosion=38,<none>,500 ; share 38, no animation, 500 raw damage per blastVeteran=15,VETERAN,1 ; share 15, plays VETERAN, one promotion step per objectChoosing the result
Section titled “Choosing the result”In a campaign
Section titled “In a campaign”In a campaign, a crate’s result depends only on its overlay type, and the shares in [Powerups] are ignored. The overlay is tested in this order:
- An overlay matching
CrateImggives theSilverCrateresult. - An overlay matching
WoodCrateImggives theWoodCrateresult, replacing the result from step 1. - Any other crate overlay gives money.
A campaign crate that is collected is not replaced. A Squad result becomes money, as described under results without effect.
Outside a campaign
Section titled “Outside a campaign”Outside a campaign, the result is drawn at random, weighted by the shares in [Powerups]. Each result’s chance is its share divided by the total of all shares, so raising one share lowers the chance of every other result.
The drawn result is then replaced by a free MCV, delivered through the Unit result, when the collector’s house meets all of these conditions:
- it owns no buildings;
- it has more than 1500 credits available;
- it owns no vehicle of any
BaseUnittype; - bases are enabled for the match.
Six results are then converted to money. The conversions run after the MCV override, so a house with more than 50 vehicles receives money in place of its free MCV.
| Drawn result | Converted to money when |
|---|---|
Unit | the collector’s house owns more than 50 vehicles |
Squad | always, in campaigns too |
Armor | the collector’s armor multiplier was already changed by an earlier crate, unless ArmorCrateStacks=yes |
Speed | the collector’s speed multiplier was already changed |
Firepower | the collector’s firepower multiplier was already changed, unless FirepowerCrateStacks=yes; or the collector has no primary weapon |
Cloak | the collector can already cloak |
What each result does
Section titled “What each result does”The third field of a result’s [Powerups] row is the only per-result number the engine reads, and most results ignore it.
| Result | What the third field sets |
|---|---|
Money | The minimum credits paid outside a campaign; a random bonus of up to CrateMoneyBonus is added |
Unit | The minimum credits paid outside a campaign when the vehicle cannot be placed |
Explosion | Raw damage of the direct hit on the collector and of each of the five blasts |
Napalm | Raw damage of the direct hit on the collector and of the blast |
Gas | Raw damage applied to each of the nine cells |
Veteran | How many promotion steps each object takes |
Armor | The armor factor or additive amount |
Speed | The speed multiplier |
Firepower | The firepower factor or additive amount |
| Every other result | Not read |
Money and free units
Section titled “Money and free units”Outside a campaign, a money crate pays a random amount between the Money row’s third field and that figure plus CrateMoneyBonus credits, inclusive. In a campaign it pays SoloCrateMoney instead. If SoloCrateMoney is 0, a campaign crate uses the random range.
In a campaign, money from a crate collected by any house the local player controls goes to the player’s house, not to the collecting house.
The unit result chooses a vehicle type in these steps. A later step can replace an earlier choice. Steps 1 and 2 use the house’s preferred entry of a list: the first entry that the country the house acts as may own, or the list’s first entry if that country may own none.
-
If the MCV override applied, the house’s preferred
BaseUnitentry. -
If no type is chosen yet, and the house owns a structure of any
BuildRefinerytype but no vehicle of anyHarvesterUnittype: the house’s preferredHarvesterUnitentry. -
If
UnitCrateTypenames a type, that type, replacing any earlier choice. -
If no type is chosen yet, a random vehicle type that meets all of these conditions:
- it sets
CrateGoodie=yes; - the country the collector’s house acts as may own it;
- Any of: bases are enabled for the match, or it is not a
BaseUnittype.
- it sets
If no vehicle type meets the step 4 conditions, the crate gives nothing: no vehicle and no money. It still plays the Unit row’s animation.
The vehicle appears on the crate’s cell or on a nearby cell it can occupy. Either way, the collector stops short of the crate’s cell.
If the vehicle cannot be placed in either location, the crate pays money instead. Outside a campaign, the amount is drawn from the Unit row’s third field up to CrateMoneyBonus credits more, not from the Money row.
Results that sweep a radius
Section titled “Results that sweep a radius”Cloak, Veteran, Armor, Speed and Firepower affect objects on the ground within CrateRadius of the center of the crate’s cell. None of them checks ownership, so enemy and neutral objects inside the radius are affected along with the collector’s side.
Cloakmakes each object able to cloak, which cloaking and detection then acts on.Veteranpromotes each object whose type setsTrainable=yes, as many steps as its third field says. Promotion without kills describes the steps.Armor,SpeedandFirepowereach set a multiplier on the affected objects.
ArmorCrateStacks=yes allows armor upgrades for objects whose armor multiplier is no longer 1. FirepowerCrateStacks=yes does the same for firepower. Speed always requires a speed multiplier of exactly 1 and also skips buildings and aircraft.
Speed always multiplies the current speed multiplier by its third field. ArmorCrateStacksAdditively and FirepowerCrateStacksAdditively choose the calculation for their result:
- At
no,new multiplier = current multiplier × third field. - At
yes,new multiplier = current multiplier + third field.
This calculation applies to the first pickup too. The added amount is the third field as written: 0.5 adds 0.5. The additive settings do not change the recipient checks or the conversions to money.
For example, these armor settings take an object’s multiplier from 1 to 1.5, then 2, then 2.5 after three armor crates. Keep the rest of your [Powerups] entries alongside the example so other results remain in the draw.
[CrateRules]ArmorCrateStacks=yesArmorCrateStacksAdditively=yes
[Powerups]Armor=33,ARMOR,0.5An additive upgrade is skipped for an object if the new multiplier is not finite or is 0 or less. That object keeps its multiplier and does not trigger an upgrade EVA line. The crate is still consumed, and rejecting an upgrade does not suppress its configured animation. Zero and negative amounts are allowed when the resulting multiplier stays finite and above 0. This check applies only to additive upgrades.
Incoming damage is divided by the armor multiplier. Movement uses the speed multiplier, and firepower scales weapon damage. An armor multiplier of 2 halves ordinary incoming damage, and 0.5 doubles it.
Results that reach the whole map
Section titled “Results that reach the whole map”HealBase restores every object of the collector’s house that is on the map to maximum strength. CrateRadius does not limit it. Passengers inside a transport are not healed. HealCrateSound plays at the collector when the collector belongs to the local player.
Darkness covers the whole map in shroud again, and Reveal reveals the whole map. Both act for the player who controls the collecting house, including, in a campaign, a house the scenario marks PlayerControl=yes. Collected by any other house, either crate is used up and plays its animation without changing anyone’s vision.
Darkness is the only crate result that restores shroud.
The ICBM result grants the collector’s house a one-time superweapon; that section explains which weapon it is. A house that already holds that weapon gains nothing. The sidebar button appears only when the collector belongs to the local player.
Damaging results
Section titled “Damaging results”Explosion damages the collector with the C4Warhead warhead. It then sets off five blasts of the same damage and warhead at random points within two cells of the crate. Each blast has its own explosion animation and lighting flash, and can set off chain reactions.
Napalm damages the collector with the FlameDamage warhead. It then sets off a blast of the same damage halfway between the crate’s cell and the collector. The blast plays the first AnimType the rules register, whatever its name, and [Powerups] cannot change it.
Gas applies its damage with the warhead named GAS to the crate’s cell and each of its eight neighbors. The damage has no attacker, so its kills earn no one experience, and it sets off no chain reactions. If the rules define no warhead named GAS, the result does nothing.
Tiberium
Section titled “Tiberium”Tiberium places one growth stage of a random Tiberium type on the crate’s cell, and at 10 to 20 random points within three cells of it. Two points can land on the same cell. A point that lands on a cell already holding that Tiberium grows it one stage. A cell that cannot take it is left unchanged.
The type is drawn from the registered Tiberium types, except that a draw of the second entry in [Tiberiums] becomes the first entry. The second type therefore never comes from a crate, and the first type is twice as likely as each of the others.
Settings and results without effect
Section titled “Settings and results without effect”Three result tokens have no effect: Invulnerability, IonStorm and Pod. Drawing one uses up the crate and plays that row’s animation; nothing else happens. Pod shares its name with the Drop Pods superweapon but has no connection to it.
Squad always becomes money before its effect runs, so its share acts as extra weight on money. The payout uses the Money row’s third field.
FreeMCV is read from [CrateRules] but has no effect. The free MCV override applies whenever its conditions hold, whatever FreeMCV says.
What a crate leaves behind
Section titled “What a crate leaves behind”The result’s animation, named by the second [Powerups] field, plays slightly above the center of the crate’s cell. It comes from the result that actually ran, so a converted crate plays the animation of what it became: a wasted firepower crate plays the money animation. A unit crate whose vehicle is placed plays no animation.
Armor, Speed and Firepower each play one EVA line per crate, and only when at least one affected object belongs to the local player.
When selected, an object whose armor or firepower multiplier is above 1 shows a different selection bracket. So does an infantry unit or vehicle whose speed multiplier is above 1. That bracket is the only lasting sign of the three multiplier crates. Buildings and IsCoreDefender=yes vehicles show a pip bar in place of a bracket, so they never show it.
A veterancy crate’s effect shows as the rank insignia, and a cloak crate’s effect shows when the object cloaks.
Related settings
23 of 23
| Key | Description | Value | When omitted |
|---|---|---|---|
ArmorCrateStacksglobal rules | boolean | no | |
ArmorCrateStacksAdditivelyglobal rules | boolean | no | |
CarriesCrateUnitType | Whether a destroyed vehicle of this type drops a crate, when the scenario allows the drop. | boolean | no |
CrateOverlayType | Whether the overlay is a crate, which infantry and vehicles collect by entering its cell. | boolean | no |
CrateGoodieUnitType | Whether the vehicle type is in the random pool a unit crate draws from. | boolean | no |
CrateImgglobal rules | The OverlayType whose crates deliver the SilverCrate result in a campaign. | class | none |
CrateMaximumglobal rules | Most crates placed at the start of a non-campaign scenario. | integer | 255 |
CrateMinimumglobal rules | Fewest crates placed at the start of a non-campaign scenario. | integer | 1 |
CrateMoneyBonusglobal rules | integer | 900 | |
CrateRadiusglobal rules | The distance from an opened crate within which its sweeping results reach other objects, in cells. | distance (cells) | 2.5 |
CrateRegenglobal rules | The range, in minutes, of the random lifetime given to each random crate. | floating point | 10 |
CrateTriggerOverlayType | Whether collecting the overlay springs the crate pickup trigger events. | boolean | no |
Cratesglobal rules | Starting state of the crates option for a multiplayer or skirmish match. | boolean | yes |
FirepowerCrateStacksglobal rules | boolean | no | |
FirepowerCrateStacksAdditivelyglobal rules | boolean | no | |
HealCrateSoundglobal rules | Sound played at the collector when it opens a heal crate for the local player. | sound | none |
SilverCrateglobal rules | The crate result delivered by a CrateImg crate in a campaign. | cratetype | HealBase |
SoloCrateMoneyglobal rules | Credits a campaign crate pays when its result is money. | integer | 2000 |
TrainCratescenarios | Whether a destroyed train vehicle drops a crate in this scenario. | boolean | no |
TruckCratescenarios | Whether a destroyed non-train vehicle drops a crate in this scenario. | boolean | no |
UnitCrateTypeglobal rules | The single vehicle type every unit crate delivers. | class | none |
WoodCrateglobal rules | The crate result delivered by a WoodCrateImg crate in a campaign. | cratetype | Money |
WoodCrateImgglobal rules | The OverlayType used for every crate the engine places itself. | class | none |
No keys match the current filters.
History
- Changed0.1.0
- Changed0.1.0
- Changed0.1.0
- Changed0.2.0In development
- Changed0.2.0In development
- Changed0.2.0In development
- Changed0.2.0In development