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

AITriggerTypesEnable: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Created, with bad bugs described
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{WrongTitle|[AITriggerTypesEnable]}}
{{WrongTitle|[AITriggerTypesEnable]}}


{{SideBar|Map-specific INI sections|Template:Mapping}}
{{MappingBar}}
 
This section is responsible for disabling certain [[AITriggerTypes]] in particular maps. See the [[#Bugs|Bugs]] section for several problems with it.
This section is responsible for disabling certain [[AI/AITriggerTypes|AITriggerTypes]] in particular maps. See the Bugs section for several problems with it.


__TOC__
__TOC__
{{clr}}


== Section ==
== Section ==


=== [[TD]]/[[CO]] ===
=== <span id="td"></span>{{td}} ===
Doesn't exist.
Doesn't exist.
=== [[RA]]/[[CS]]/[[AM]] ===
 
=== <span id="ra"></span>{{ra}}, {{cs}}, {{am}} ===
Doesn't exist.
Doesn't exist.
=== [[TS]]/[[FS]]/[[RA2]]/[[YR]] ===
 
=== <span id="ts"></span><span id="ra2"></span><span id="yr"></span>{{ts}}, {{fs}}, {{ra2}}, {{yr}} ===


The [{{Tt|AITriggerTypesEnable}}] section in a map takes this format:
The [{{Tt|AITriggerTypesEnable}}] section in a map takes this format:
Line 21: Line 21:
  TRIGGER_ID=STATUS
  TRIGGER_ID=STATUS


{| style="width: 80%" border=1 class="table_descrowdesccol"
{| border=1 class="table_descrowdesccol"
|+ Meanings of each string
|+ Meanings of each string
! style="width: 13em; " | String
! style="width: 13em; " | String
Line 30: Line 30:
|-
|-
! {{Anchor|STATUS|ts}}
! {{Anchor|STATUS|ts}}
| If this is a [[Help:Values#Boolean_values|boolean]] 'true', this AITriggerType will be disabled in this map.
| Use {{tt|yes}}/{{tt|true}} or {{tt|no}}/{{tt|false}} [[Help:Values#Boolean_values|boolean]] to enable or disable this AITriggerType in this map.
|}
|}


== Problems ==
{{Bugs}}
{{RevEng}}
{{RevEng}}
'''Note''': The code implementing this feature is, let's say, sub-optimal. Avoid filling this section needlessly. It works in the following way: Global AITriggers are enabled at startup, local AITriggers are not. Then a pass is made over this section and if a trigger is listed here, its enabled-ness is set to STATUS. If this is not an SP campaign map, that trigger is enabled regardless of STATUS.  
'''Note''': The code implementing this feature is, let's say, sub-optimal. Avoid filling this section needlessly, since it takes, on average, quadratic time to parse ({{Tt|O(N^2)}}). It works in the following way: Global (from {{ini|ai}}) AI Triggers are enabled at startup, local (from the map) AI Triggers are not. Then a pass is made over this section and if a trigger is listed here, its enabled-ness is set to STATUS. If this is not an SP campaign map, that trigger is enabled regardless of STATUS. The enabledness is overridden by the {{Sl|Basic|IgnoreGlobalAITriggers}} later on, when determining which AI Triggers have met their conditions.


From that follows:  
From that follows:  
*global AITriggers should only be listed here if you want to disable some of them at startup,  
*global AI Triggers should only be listed here if you want to disable some of them at startup,  
*local AITriggers should only be listed here if you want to enable them at startup. If you do not list a local AITrigger here, you will have to rely on a map trigger activating it later.
*local AI Triggers should only be listed here if you want to enable them at startup. If you do not list a local AITrigger here, you will have to rely on a map trigger activating it later.

Latest revision as of 14:10, 5 October 2014

This page should correctly be named "[AITriggerTypesEnable]"; it is wrong due to technical restrictions.



This section is responsible for disabling certain AITriggerTypes in particular maps. See the Bugs section for several problems with it.

Section

Tiberian Dawn

Doesn't exist.

Red Alert, Counterstrike, Aftermath

Doesn't exist.

Tiberian Sun, Firestorm, Red Alert 2, Yuri's Revenge

The [AITriggerTypesEnable] section in a map takes this format:

[AITriggerTypesEnable]
TRIGGER_ID=STATUS
Meanings of each string
String Meaning
TRIGGER_ID The AITriggerType's ID.
STATUS Use yes/true or no/false boolean to enable or disable this AITriggerType in this map.

Bugs/Side-Effects/Unexpected Limitations

Reverse-Engineered Content
The following page/section possibly contradicts several ideas accepted by the community. However, it contains information reverse-engineered from the game's executable code, not observations or theories, and as such should be considered more likely to be correct.


Note: The code implementing this feature is, let's say, sub-optimal. Avoid filling this section needlessly, since it takes, on average, quadratic time to parse (O(N^2)). It works in the following way: Global (from ai(md).ini) AI Triggers are enabled at startup, local (from the map) AI Triggers are not. Then a pass is made over this section and if a trigger is listed here, its enabled-ness is set to STATUS. If this is not an SP campaign map, that trigger is enabled regardless of STATUS. The enabledness is overridden by the [Basic]IgnoreGlobalAITriggers= later on, when determining which AI Triggers have met their conditions.

From that follows:

  • global AI Triggers should only be listed here if you want to disable some of them at startup,
  • local AI Triggers should only be listed here if you want to enable them at startup. If you do not list a local AITrigger here, you will have to rely on a map trigger activating it later.