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

Autocreate

From ModEnc
Revision as of 10:25, 4 September 2022 by Crimsonum (talk | contribs) (Made the table more compact, hopefully to improve readability (it's still quite a mess to look at, oh well))
Jump to: navigation, search
Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: Autocreate
File(s): ai(md).ini, maps
Values: Boolean values: yes or no, true or false, 1 or 0
Applicable to: TeamTypes


Autocreate in TeamTypes is used to check whether a unit should be recruited from the pre-placed unit on the map or it should be produced from a factory to form the team.

Pre-Placed unit formats on the map for Infantry, Units and Aircraft.

[Infantry]
INDEX=OWNER,ID,HEALTH,X,Y,SUB_CELL,MISSION,FACING,TAG,VETERANCY,GROUP,HIGH,AUTOCREATE_NO_RECRUITABLE,AUTOCREATE_YES_RECRUITABLE
[Units]
INDEX=OWNER,ID,HEALTH,X,Y,FACING,MISSION,TAG,VETERANCY,GROUP,HIGH,FOLLOWS_INDEX,AUTOCREATE_NO_RECRUITABLE,AUTOCREATE_YES_RECRUITABLE
[Aircraft]
INDEX=OWNER,ID,HEALTH,X,Y,FACING,MISSION,TAG,VETERANCY,GROUP,AUTOCREATE_NO_RECRUITABLE,AUTOCREATE_YES_RECRUITABLE

When a TeamType has Autocreate=no then the pre-placed units on the map with AUTOCREATE_NO_RECRUITABLE as 0 are not considered for recruitment. If there are units with AUTOCREATE_NO_RECRUITABLE as 1 then recruit those and form the team. If it falls short to form the team then produce remaining units from the factory to complete the team. If it fails to recruit the units on the map with AUTOCREATE_NO_RECRUITABLE as 1, because of any reason like Group mismatch along with Recruiter=no, then it cannot produce replacement for such units from the factory, so the team formation is interrupted and the team is not formed.

When a TeamType has Autocreate=yes then the pre-placed units on the map with AUTOCREATE_YES_RECRUITABLE as 0 are not considered for recruitment. If there are units with AUTOCREATE_YES_RECRUITABLE as 1 then recruit those and form the team. If it fails to recruit, because of any reason like Group mismatch along with Recruiter=no, then produce those units from the factory and complete the team. If it falls short to form the team from the pre-placed units on the map then also produce remaining units from the factory and complete the team. Additional restriction apply that is if AUTOCREATE_NO_RECRUITABLE is 1 then it cannot produce from factory.

For production from factory, it is assumed that the concerned house has required factory (barracks/war factory etc.) and has credits to produce units.

The value in MISSION also affects whether a pre-placed unit is recruitable or not. For example, in Rules(md).ini, Harmless section is set with Recruiter=no. So if the pre-placed unit is in Harmless mission, it is not available for recruitment whereas a unit in Guard or Area Guard mission are available for recruitment.

Here's the above information in table format:

Can these preplaced units be recruited to this team?
Unit → AUTOCREATE_YES_RECRUITABLE
0 1
Team → Autocreate no yes no yes
Unit → AUTOCREATE_NO_RECRUITABLE 0 no Cc cancel.png Cc cancel.png
yes Cc cancel.png Cc apply.png
If recruitment fails or team is not filled, produce remaining members.
1 no Cc apply.png
If recruitment succeeds but team is not filled, produce remaining members. If recruitment fails, do nothing.
Cc apply.png
If recruitment succeeds but team is not filled, produce remaining members. If recruitment fails, do nothing.
yes Cc cancel.png Cc apply.png
If recruitment fails or team is not filled, do nothing.