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

Difference between revisions of "Crew System"

From ModEnc
Jump to: navigation, search
 
(4 intermediate revisions by 4 users not shown)
Line 11: Line 11:
  
 
;Whether this object has crew which can escape is determined by
 
;Whether this object has crew which can escape is determined by
;;:{{TTL|Crewed}} in the object
+
;;:{{f|Crewed|link}} in the object
 
;The chance of them escaping is determined by
 
;The chance of them escaping is determined by
;;:[{{TTL|General}}]{{TTL|CrewEscape}}
+
;;:[{{f|General|link}}]{{f|CrewEscape|link}}
 
;The infantry that escaped is determined by
 
;The infantry that escaped is determined by
 
;;:in RA
 
;;:in RA
 
;;::Hardcoded to E1
 
;;::Hardcoded to E1
 
;;:in TS
 
;;:in TS
;;::[{{TTL|General}}]{{TTL|Crew}}, {{TTL|Technician}}, {{TTL|Engineer}}
+
;;::[{{f|General|link}}]{{f|Crew|link}}, {{f|Technician|link}}, {{f|Engineer|link}}
 
;;:in RA2/YR
 
;;:in RA2/YR
;;::[{{TTL|General}}]{{TTL|Technician}}, {{TTL|Engineer}}, and side-specific {{TTL|AlliedCrew}}/{{TTL|SovietCrew}}/(in YR) {{TTL|ThirdCrew}}.
+
;;::[{{f|General|link}}]{{f|Technician|link}}, {{f|Engineer|link}}, and side-specific {{f|AlliedCrew|link}}/{{f|SovietCrew|link}}/(in YR) {{f|ThirdCrew|link}}.
 
;The amount of survivors is determined by
 
;The amount of survivors is determined by
 
;;:in RA
 
;;:in RA
;;::[{{TTL|General}}]{{TTL|SurvivorRate}}
+
;;::[{{f|General|link}}]{{f|SurvivorRate|link}}
 
;;:in TS
 
;;:in TS
;;::[{{TTL|General}}]{{TTL|SurvivorRate}} and {{TTL|SurvivorDivisor}}
+
;;::[{{f|General|link}}]{{f|SurvivorRate|link}} and {{f|SurvivorDivisor|link}}
 
;;:in RA2/YR
 
;;:in RA2/YR
;;::[{{TTL|General}}]{{TTL|SurvivorRate}} and side-specific {{TTL|AlliedSurvivorDivisor}}/{{TTL|SovietSurvivorDivisor}}/(in YR) {{TTL|ThirdSurvivorDivisor}}
+
;;::[{{f|General|link}}]{{f|SurvivorRate|link}} and side-specific {{f|AlliedSurvivorDivisor|link}}/{{f|SovietSurvivorDivisor|link}}/(in YR) {{f|ThirdSurvivorDivisor|link}}
  
 
== Notes ==
 
== Notes ==
*The {{TTL|Engineer}} infantry is created only from destroyed Construction Yards, separately from the regular survivors, free of charge.
+
*The {{f|Engineer|link}} infantry is created only from destroyed Construction Yards, separately from the regular survivors, free of charge.
*The {{TTL|Technician}} infantry is created when the destroyed object performed a special function such as {{Tt|Radar=yes}}.
+
*The {{f|Technician|link}} infantry is created when the destroyed object performed a special function such as {{Tt|Radar=yes}}.
 
*Survivors from jumpjet VehicleTypes are spawned in the air, but magically appears on ground level when you attempt to move it.
 
*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.
 
*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.
 
*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 that spawn survivors in later games will spawn them in mid-air, screwing up the movement logic and forcing the spawned infantry unit to remain fixed at the position it was spawned at, including at the same height.
+
*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.
 +
 
 +
==Limitations/Bugs/Side Effects==
 +
*Using an {{f|Engineer|link}} infantry as a regular crew survivor for buildings (such as {{f|Crew|link}}, {{f|AlliedCrew|link}}, {{f|SovietCrew|link}} and {{f|ThirdCrew|link}}) 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 {{f|Engineer|link}} infantry from the same building, it will freeze.
  
 
[[Category:Systems]]
 
[[Category:Systems]]
[[Category:Tutorials]]
 

Latest revision as of 14:14, 12 March 2013

This page explains 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
Whether this object has crew which can escape is determined by
Crewed in the object
The chance of them escaping is determined by
[General]CrewEscape
The infantry that escaped is determined by
in RA
Hardcoded to E1
in TS
[General]Crew, Technician, Engineer
in RA2/YR
[General]Technician, Engineer, and side-specific AlliedCrew/SovietCrew/(in YR) ThirdCrew.
The amount of survivors is determined by
in RA
[General]SurvivorRate
in TS
[General]SurvivorRate and SurvivorDivisor
in RA2/YR
[General]SurvivorRate and side-specific AlliedSurvivorDivisor/SovietSurvivorDivisor/(in YR) ThirdSurvivorDivisor

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.

Limitations/Bugs/Side Effects

  • 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.