ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Crew System

From ModEnc
Jump to navigation Jump to search

How the Crew System (survivors from destroyed objects) works

if this object has crew which can escape
 then
  roll a random number
  if it is larger than a certain percentage
   then
    multiply the object's cost by the survivor rate
    divide this over the appropriate divisor
    round that amount up and spend it on the appropriate survivor infantry
  1. Whether this object has crew which can escape is determined by
  2. The chance of them escaping is determined by
  3. The infantry that escaped is determined by
    1. In RA
      • Hardcoded to [E1]
    2. In TS/FS
      1. [General]Technician=InfantryType
      2. [General]Engineer=InfantryType
    3. In RA2/YR
      1. [General]Technician=InfantryType
      2. [General]Engineer=InfantryType
  4. The amount of survivors is determined by
    1. In RA
    2. In TS/FS
    3. In RA2/YR

Notes

  • The Engineer infantry is created only from destroyed Construction Yards, separately from the regular survivors, free of charge.
  • The Technician infantry is created when the destroyed object performed a special function such as Radar=yes.
  • Survivors from jumpjet VehicleTypes are spawned in the air, but magically appears on ground level when you attempt to move it.
  • If the vehicle is in motion when it is destroyed, survivors will not be spawned.
  • Regardless of settings, VehicleTypes and AircraftTypes(RA) seem limited to one survivor per object.
  • In RA, the survivors from AircraftTypes were spawned as parachuters falling down, however, the logic appears to have been removed from the later games, and AircraftTypes never spawn survivors.
  • If the object is destroyed by its own weapon with Suicide=yes no survivors and passengers will be left.

Bugs/Side-Effects/Unexpected Limitations

  • Using an Engineer infantry as a regular crew survivor for buildings (such as Crew, AlliedCrew, SovietCrew and ThirdCrew) isn't recommended, as the game is hard-coded to spawn only one of such from the building, no matter how many regular infantry would spawn otherwise. Furthermore, if the game tries to spawn too many Engineer infantry from the same building, it will freeze.