Add garage car variants and yard parking; record Workshop 0.0.142
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-11-06 11:32:33 +01:00
parent 9caed3f12d
commit 55c0ec775a
27 changed files with 6158 additions and 35 deletions
+7 -7
View File
@@ -431,21 +431,21 @@ Open **Admin menu → Mission → Civilian vehicles**. Each garage control has a
| Control | Range | Default |
| --- | --- | --- |
| Nearby garage vehicles | 0–24; 0 disables | 16 |
| Garage selection chance | 0–100%; 0 disables | 70% |
| Garage and yard vehicles | 0–24; 0 disables | 16 |
| Parking-site selection chance | 0–100%; 0 disables | 70% |
| Spawn radius | 250–1500 metres | 1000 m |
| Time between spawns | 5–60 seconds | 5 s |
The additional saved keys are `mission.garageChancePercent`, `mission.garageRadiusMetres` and `mission.garageSpawnIntervalSeconds`. Chat equivalents are `/esc mission garagechance set N`, `/esc mission garageradius set N`, and `/esc mission garageinterval set N`.
In **Mission → Civilian vehicles**, set **Nearby garage vehicles** (or `/esc mission garagevehicles set N`). `mission.garageVehicleCount` defaults to 16, accepts 0–24, and applies next round. Zero disables placement. This is a shared limit on **unclaimed nearby vehicles**, not a lifetime limit of 16 across the island. Every fourth vehicle attempts an optional unarmed WCS motorbike when its dependencies are loaded; otherwise cars fill the slots.
In **Mission → Civilian vehicles**, set **Garage and yard vehicles** (or `/esc mission garagevehicles set N`). `mission.garageVehicleCount` defaults to 16, accepts 0–24, and applies next round. Zero disables placement. This is a shared limit on **unclaimed nearby vehicles**, not a lifetime limit of 16 across the island. Every fourth vehicle attempts an optional unarmed WCS motorbike when its dependencies are loaded; otherwise cars fill the slots.
As players explore, the server discovers native `Garage_E_01` and `HouseAddon_Garage_E_01` buildings within the configured radius. Each garage uses the configured selection chance, rolled once on discovery. A bay must be at least 35 metres from every player body/spectator target, hidden by scenery from all of them, dry and collision-free. Open editor cameras or unknown observer targets suspend spawning and retirement. Adjacent suitable garages can both contain vehicles; the old 150-metre spacing and whole-island survey are gone. Custom garage models are not currently supported.
As players explore, the server discovers native `Garage_E_01` and `HouseAddon_Garage_E_01` buildings, plus yards beside village houses from the `House_Village_E_1I01`, `1I02`, `1I03` and `1I06` families, within the configured radius. Each building uses the configured selection chance, rolled once on discovery. Yards try four positions around the building bounds, with one car per house; they share the garage population limit. Outdoor positions require dry, nearly level terrain across the whole vehicle footprint and clearance from road edges. A bay must be at least 35 metres from every player body/spectator target, hidden by scenery from all of them, dry and collision-free. Open editor cameras or unknown observer targets suspend spawning and retirement. Adjacent suitable garages can both contain vehicles; the old 150-metre spacing and whole-island survey are gone. Custom garage and house models are not currently supported. Cars include civilian S105, T601 and V2101 colour variants. When Rally DLC is mounted, its S105, T601 and V2101 Rally variants also join the pool; no DLC dependency is added, and native DLC access rules still apply. Armed, oversized and inaccessible vehicles are rejected.
Discovery, candidate checks, prefab loading and creation run as separate updates, every 250 ms. Each update scans at most one 500-metre cell, maintains one vehicle, checks one physical bay, loads one prefab, or creates one vehicle. Native creations respect the configured delay, with a minimum of five seconds. Prefabs stay cached for later spawns. Native resource loading and entity creation are indivisible calls, so this limits bursts rather than guaranteeing zero frame spikes.
Vehicles have 30–80% fuel and no AI crew. Entering a vehicle permanently preserves it, including after exiting. Occupants or movement beyond three metres also protect it as a fallback for missed entry callbacks or towing. Its original garage is then consumed for the round, preventing repeated vehicle farming. Used vehicles do not occupy the nearby unclaimed allowance. A separate limit of 128 retained-plus-current vehicles bounds accumulation during unusually long rounds; it never deletes used vehicles.
Vehicles have 30–80% fuel and no AI crew. Entering a vehicle permanently preserves it, including after exiting. Occupants or movement beyond three metres also protect it as a fallback for missed entry callbacks or towing. Its original garage or yard is then consumed for the round, preventing repeated vehicle farming. Used vehicles do not occupy the nearby unclaimed allowance. A separate limit of 128 retained-plus-current vehicles bounds accumulation during unusually long rounds; it never deletes used vehicles.
An untouched vehicle can be retired only when it is at least 1,400 metres from every known observer (or the configured spawn radius plus 400 metres, whichever is larger) and hidden for a sampled 60-second grace period. Returning nearby, gaining visibility or losing observer information cancels that grace period. Retirement frees a nearby slot for the players' new area; an unused garage can become eligible again on a later visit. Unclaimed cars are maintained one at a time. The discovery cache is capped at 16,384 cells and 2,048 garages per round. Vehicles still incur ordinary physics and replication costs.
An untouched vehicle can be retired only when it is at least 1,400 metres from every known observer (or the configured spawn radius plus 400 metres, whichever is larger) and hidden for a sampled 60-second grace period. Returning nearby, gaining visibility or losing observer information cancels that grace period. Retirement frees a nearby slot for the players' new area; an unused parking site can become eligible again on a later visit. Unclaimed cars are maintained one at a time. The discovery cache is capped at 16,384 cells and 2,048 garage/yard anchors per round. Vehicles still incur ordinary physics and replication costs.
Validation: [menu settings and round persistence](evidence/garage-vehicles-2026-10-30/menu/report.json), [nearby garage spawning and retention](evidence/garage-vehicles-2026-10-30/nearby/report.json), plus production-method observer, lifecycle, settings and menu tests.
Validation: [DLC car fit, optional loading and native yard placement](evidence/garage-dlc-yards-2026-11-06/README.md), [menu settings and round persistence](evidence/garage-vehicles-2026-10-30/menu/report.json), [nearby garage spawning and retention](evidence/garage-vehicles-2026-10-30/nearby/report.json), plus production-method observer, lifecycle, settings and menu tests.