Starting forces
Places each house's base unit and a budget of randomly chosen vehicles and infantry around its start position as a skirmish or multiplayer match begins.
Each house in a skirmish or multiplayer match starts with a base unit when bases are on, followed by randomly chosen vehicles and infantry up to a budget. The forces are placed once, as the scenario finishes loading. A campaign mission gets them only when it is a generated map.
A house whose country sets MultiplayPassive gets no starting forces and holds no start position. Neither does an observer’s house.
A mod sets the starting forces in rules.ini:
; MYINF and MYCIV must also be listed in [InfantryTypes]
[General]BaseUnit=MCV ; the first entry a house may own becomes its starting base unit
[MultiplayerDefaults]UnitCount=8 ; the setup screen's unit count starts here
[MYINF] ; example InfantryType that joins the drawCost=100 ; what a drawn type charges the budgetTechLevel=2 ; the house's tech level must reach thisOwner=GDI ; the house's country must be listed here
[MYCIV] ; example InfantryType held out of the drawAllowedToStartInMultiplayer=noIn this example, a GDI house whose tech level is at least 2 can draw MYINF. No house draws MYCIV, and its price does not count toward the budget.
The budget
Section titled “The budget”Every house spends the same budget: the average price of the allowed types, multiplied by the match’s unit count.
The average covers every InfantryType and every UnitType set to AllowedToStartInMultiplayer=yes, except the UnitTypes listed in BaseUnit. Each type counts once at its Cost, whatever its tech level and whichever countries may own it.
The unit count is a match option, set by UnitCount in the launch file’s [Settings] or on the setup screen. UnitCount in [MultiplayerDefaults] gives the setup screen its starting figure.
With bases on and BaseUnit naming at least one type, the unit count is reduced by one before the multiplication. That leaves room in the budget for the base unit, which is never charged against it.
If no type is allowed, the average and the budget are both zero. Each house then starts with its base unit alone, or with nothing when bases are off.
Each house’s shortlist
Section titled “Each house’s shortlist”Each house draws only from its shortlist of allowed types. A type is on the shortlist when both of these hold:
Vehicles and infantry have separate shortlists. BaseUnit types never appear on the vehicle shortlist.
The start position
Section titled “The start position”Each playing house starts at one of the map’s placed waypoints 0 through 7. A house left over when those run out starts on open ground.
Every placed waypoint from 0 to 7 is eligible, with one exception. On a map whose Official flag is set, only waypoints below a cutoff are eligible; the key page gives the cutoff. The exception does not apply when any playing seat in the launch file names a start position.
Houses take positions in this order:
- A house whose seat names a start position in the launch file holds it before anybody draws. If that waypoint is not eligible, or another house already holds it, the house draws with the others instead.
- The remaining houses draw in turn. When no position is held yet, the house takes an eligible position at random. Otherwise it takes the open position with the greatest total distance from the positions already held.
- A house still without a position once every eligible waypoint is held starts at a random spot where an 8-by-8 block of cells is open ground that a tracked vehicle can cross. This cell is found after the map has loaded, and the house holds no numbered position.
On a map read from a file, the numbered positions are settled after the waypoints are read and before the spawn house sections, teams, triggers, and objects. That lets a spawn house name the house that starts at each position.
The base unit
Section titled “The base unit”With bases on, each house starts with the first BaseUnit entry that the country the house acts as may own. If that country may own none of them, the house gets the first entry. With bases off, or with BaseUnit empty, no base unit is placed.
The base unit goes on the start cell when it can stand there. Otherwise the placement search puts it on the nearest cell it finds, from one to thirty-one cells out. If no cell takes it, the house has no base unit.
With AutoDeployMCV=yes in the launch file’s [Settings], every house’s base unit starts deploying as soon as it is placed. This includes computer houses. The unit deploys where it stands, with the building’s foundation laid over and around the unit’s cell.
If the ground there cannot take the building, or an object stands in its foundation, the unit stays undeployed. A human player’s base unit waits where it was placed. A computer house’s base unit drives off to find ground it can deploy on, provided its building is listed in BuildConst; otherwise it hunts enemies.
Spending the budget
Section titled “Spending the budget”Each house draws one object at a time and adds each placed object’s Cost to what it has spent. Drawing stops once the spent total reaches the budget, so the last object can take the total past it.
Each draw picks, in this order:
- While less than two thirds of the budget is spent and the vehicle shortlist is not empty, a random vehicle from it.
- Otherwise, a random infantry type from the infantry shortlist.
- If step 2 finds the infantry shortlist empty, the house stops drawing. When placement fails covers the result.
If the placement search cannot place a drawn object, the object is removed without being charged, and the house draws again.
A placed object starts on guard, or on area guard for a computer house. With InitialVeteran set, each placed object starts elite. Neither applies to the base unit.
Where an object lands
Section titled “Where an object lands”The search first tries the start cell, then works outward one distance at a time. The random objects are tried from three to thirty-two cells out, and the base unit from one to thirty-one cells out. With bases off, the first random object that can stand on the start cell is placed there; with bases on, the base unit holds it whenever the base unit could stand there.
The random objects start three cells out to leave the base unit room to deploy. The shifted second pass described below can still place a random object two cells from the start, and near a map corner an object can land closer still.
At each distance, the search starts from a random compass direction and tries the cell that far out in each of the eight directions in turn. If none takes the object, it tries the same eight cells again, each shifted at random by up to one cell along each axis. A candidate that lands back on the start cell is skipped.
A candidate that falls off the map is skipped. Near one of the map’s four corners, a candidate past the corner can instead be pulled back onto it, so objects bunch there.
A cell that already holds a vehicle, infantry, aircraft, or structure is refused, except that infantry may share a cell with infantry. Otherwise the object’s placement test decides, so a cell the type cannot enter is refused too.
When placement fails
Section titled “When placement fails”Related settings
9 of 9
| Key | Description | Value | When omitted |
|---|---|---|---|
AllowedToStartInMultiplayerAircraftType, BuildingType, InfantryType, UnitType | Lets a vehicle or infantry type appear in the starting forces each house receives outside a campaign or on a generated map. | boolean | yes |
BaseUnitglobal rules | The UnitTypes handed out at a multiplayer start, one per house, and counted as a base of their own. | typelist | none |
Basesglobal rules | Starting state of the bases option for a multiplayer or skirmish match. | boolean | yes |
Cost6 applicable types | The credit price of one object of this type, or the multiplier a country or a difficulty applies to every price it pays. | integer | Varies by type |
InitialVeteranscenarios | Creates the randomly chosen starting units of a skirmish or multiplayer match at elite rank. | boolean | no |
MultiplayPassiveHouseType | Keeps the country's computer houses from building or choosing attacks and, in skirmish and multiplayer games, takes its houses out of the contest. | boolean | no |
OwnerAircraftType, BuildingType, InfantryType, UnitType | The countries that may own the type. | list of HouseTypes | (empty) |
TechLevelNo effect in some scopes7 applicable types | The level an object type requires, the level a house holds, the starting value of the tech level setting for skirmish and network games, or a TeamType level that nothing reads. | integer | Varies by type |
UnitCountglobal rules | Starting figure for the unit count a multiplayer or skirmish match opens with. | integer | 10 |
No keys match the current filters.
History
- Changed0.2.0In development
- Changed0.2.0In development
- Changed0.2.0In development
- Changed0.2.0In development
Draw start positions from placed waypoints before open ground
- Changed0.2.0In development