Difference between revisions of "Triggers"
m (Correction: "missionMarkAsRearmZone" action is not specific to airplanes) |
m (→List of all Actions: added information to the moSetObjectiveStatus action) (Tag: Visual edit) |
||
(27 intermediate revisions by 8 users not shown) | |||
Line 312: | Line 312: | ||
* obj_status: Checks if the object exists | * obj_status: Checks if the object exists | ||
* check_army: Unknown | * check_army: Unknown | ||
+ | </div></div> | ||
+ | | Both | ||
+ | |- | ||
+ | | objectGroupWhenInArea | ||
+ | | <div class="mw-collapsible mw-collapsed" style="width:100%">Looks for the objectGroups in the selected area<div class="mw-collapsible-content"> | ||
+ | '''Fields:''' | ||
+ | |||
+ | * object: Selects the objectGroups object | ||
+ | * target: Selects the area | ||
+ | * object_type: Checks the status or team of the selected objectGroups | ||
+ | * check_objects: Can be "any" or "all", decides if all specified objects must be within the area or just one | ||
+ | </div></div> | ||
+ | | Both | ||
+ | |- | ||
+ | | playerAddRoundScore | ||
+ | | <div class="mw-collapsible mw-collapsed" style="width:100%">Increases the player's score and spawn points amount during the mission<div class="mw-collapsible-content"> | ||
+ | '''Fields:''' | ||
+ | |||
+ | * object: A player's unit to which the mission score or spawn points are added | ||
+ | * object_type: The status of the object to be considered by the condition | ||
+ | * useForTriggerFiltered: Will affect only those units that meet the '''Conditions.''' | ||
+ | * reason: Unknown | ||
+ | * score: The score amount which is added to player's score and their Spawn Points | ||
+ | * var: Same as above, but overrides that value with the one from the set integer variable | ||
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 348: | Line 372: | ||
* target: the area to check if the player is within | * target: the area to check if the player is within | ||
− | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the players position is calculated 2D is just concerned with if the player is within the 2D footprint of the area, regardless of | + | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the players position is calculated 2D is just concerned with if the player is within the 2D footprint of the area, regardless of height, whereas 3D takes height into consideration; notNear will activate trigger if player is not within the area, instead of being within the specified area. |
* players: the status of the player to be considered by the condition | * players: the status of the player to be considered by the condition | ||
* check_players: can be "any" or "all", decide if all players must be within distance or just one | * check_players: can be "any" or "all", decide if all players must be within distance or just one | ||
Line 387: | Line 411: | ||
* check_players: can be "any" or "all", decides if all players must be above height or just one | * check_players: can be "any" or "all", decides if all players must be above height or just one | ||
* value: the altitude to reach (in metres) | * value: the altitude to reach (in metres) | ||
− | * comparison_func: can be "more" or "less", decides if trigger should activate if player is above or | + | * comparison_func: can be "more" or "less", decides if trigger should activate if player is above or below set value |
* absolute_value: Determines whether absolute altitude (referenced to sea level) or altitude over terrain should be used | * absolute_value: Determines whether absolute altitude (referenced to sea level) or altitude over terrain should be used | ||
* team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | * team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | ||
Line 468: | Line 492: | ||
* object: The unit to check the distance from | * object: The unit to check the distance from | ||
* target: The target to check the unit's distance from | * target: The target to check the unit's distance from | ||
− | * value: The distance between the unit and the target | + | * value: The distance between the unit and the target (in metres) |
* var: An integer variable can be assigned here to override the value of the "value" field | * var: An integer variable can be assigned here to override the value of the "value" field | ||
* math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how distance is calculated 2D is just concerned with 2D distance (distance between two objects on if drawn on a top-down map), whereas 3D takes height difference into consideration; notNear will activate trigger if players are not within the distance, instead of being within the specified distance. | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how distance is calculated 2D is just concerned with 2D distance (distance between two objects on if drawn on a top-down map), whereas 3D takes height difference into consideration; notNear will activate trigger if players are not within the distance, instead of being within the specified distance. | ||
Line 477: | Line 501: | ||
* check_objects: can be "any" or "all", where there are multiple objects set decides if all objects must be within distance or just one | * check_objects: can be "any" or "all", where there are multiple objects set decides if all objects must be within distance or just one | ||
* check_targets: can be "any" or "all", decide if the object must be within the specified distance of all targets or just one | * check_targets: can be "any" or "all", decide if the object must be within the specified distance of all targets or just one | ||
− | * compareCenters: Determines if the measurement is taken from the centre of the object and target or | + | * compareCenters: Determines if the measurement is taken from the centre of the object and target or closest point |
* check_all_units: Functionality unknown | * check_all_units: Functionality unknown | ||
</div></div> | </div></div> | ||
Line 549: | Line 573: | ||
* object: The unit to check | * object: The unit to check | ||
* target: The area to check if the unit is within | * target: The area to check if the unit is within | ||
− | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the players position is calculated 2D is just concerned with if the player is within the 2D footprint of the area, regardless of | + | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the players position is calculated 2D is just concerned with if the player is within the 2D footprint of the area, regardless of height, whereas 3D takes height into consideration; notNear will activate trigger if player is not within the area, instead of being within the specified area. |
* object_type: The status of the unit to be considered by the condition | * object_type: The status of the unit to be considered by the condition | ||
* unit_type_ex: Unknown, likely more options to check the unit's status. | * unit_type_ex: Unknown, likely more options to check the unit's status. | ||
Line 611: | Line 635: | ||
* check_objects: can be "any" or "all", decides if all of the specified units must be above the height or just one | * check_objects: can be "any" or "all", decides if all of the specified units must be above the height or just one | ||
* value: the altitude to reach (in metres) | * value: the altitude to reach (in metres) | ||
− | * comparison_func: can be "more" or "less", decides if trigger should activate if player is above or | + | * comparison_func: can be "more" or "less", decides if trigger should activate if player is above or below set value |
* absolute_value: Determines whether absolute altitude (referenced to sea level) or altitude over terrain should be used | * absolute_value: Determines whether absolute altitude (referenced to sea level) or altitude over terrain should be used | ||
</div></div> | </div></div> | ||
Line 700: | Line 724: | ||
* var_value_other: An integer variable can be assigned here to override the value of the "value" field | * var_value_other: An integer variable can be assigned here to override the value of the "value" field | ||
* value: The value to compare the variable to | * value: The value to compare the variable to | ||
− | * comparison_func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the variable should compare | + | * comparison_func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the variable should compare the value in order to activate the trigger. |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 711: | Line 735: | ||
* value: The value to compare the variable to | * value: The value to compare the variable to | ||
* var_value_other: A real variable can be assigned here to override the value of the "value" field | * var_value_other: A real variable can be assigned here to override the value of the "value" field | ||
− | * comparison_func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the variable should compare | + | * comparison_func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the variable should compare the value in order to activate the trigger. |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 763: | Line 787: | ||
* gamepadControls: Exact functionality unknown, presumably relates to the use of a gamepad instead of mouse and keyboard. | * gamepadControls: Exact functionality unknown, presumably relates to the use of a gamepad instead of mouse and keyboard. | ||
* team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | * team: Can be "A", "B", or "Both", determines which team's players should be considered by the condition | ||
− | * func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the axis value should compare | + | * func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the axis value should compare the value in order to activate the trigger. |
* joyAngle: Exact functionality unknown, presumably relates to the angle of the player's joystick (for players using one). | * joyAngle: Exact functionality unknown, presumably relates to the angle of the player's joystick (for players using one). | ||
* joyDispersion: Exact functionality unknown, presumably relates to players using a joystick | * joyDispersion: Exact functionality unknown, presumably relates to players using a joystick | ||
Line 776: | Line 800: | ||
* area: The area to check objects destroyed within | * area: The area to check objects destroyed within | ||
* moreThan: the value to compare the number of destroyed objects to | * moreThan: the value to compare the number of destroyed objects to | ||
− | * func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the number of destroyed objects should compare | + | * func: Can be "less", "more", "equal", "notEqual", "notLess", "notMore", determines how the number of destroyed objects should compare the value in order to activate the trigger. |
* check_areas: Can be "any" or "all", decides if all specified areas must meet match number of targets destroyed or just one. | * check_areas: Can be "any" or "all", decides if all specified areas must meet match number of targets destroyed or just one. | ||
</div></div> | </div></div> | ||
Line 796: | Line 820: | ||
* target: The area to check if it is within another area | * target: The area to check if it is within another area | ||
* object: The area to check if the first area is within | * object: The area to check if the first area is within | ||
− | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the area's position is calculated 2D is just concerned with if the area is within the 2D footprint of the other area, regardless of | + | * math: Can be "2D", "3D", "notNear2D" or "notNear3D", determines how the area's position is calculated 2D is just concerned with if the area is within the 2D footprint of the other area, regardless of height, whereas 3D takes height into consideration; notNear will activate trigger if the area is not within the area, instead of being within the specified area. |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 820: | Line 844: | ||
* runwayEnd: The area you want to be the end of the runway (can be placed in diagonal) | * runwayEnd: The area you want to be the end of the runway (can be placed in diagonal) | ||
* runwayWidth: The width of the runway | * runwayWidth: The width of the runway | ||
− | * army: To what army this airfield should belong | + | * army: To what army this airfield should belong to |
* spawnPoint: The area where you want the planes to spawn. '''Note:''' Multiple can be added | * spawnPoint: The area where you want the planes to spawn. '''Note:''' Multiple can be added | ||
* visibleOnHud: If checked, the airfield icon will be shown to players | * visibleOnHud: If checked, the airfield icon will be shown to players | ||
Line 869: | Line 893: | ||
* object: The airfield to check | * object: The airfield to check | ||
− | * module: The part of the airfield to get the HP of | + | * module: The part of the airfield to get the HP of of |
* var: The variable to save the HP to | * var: The variable to save the HP to | ||
</div></div> | </div></div> | ||
Line 998: | Line 1,022: | ||
* team: The team to track kills from, can be both | * team: The team to track kills from, can be both | ||
* var: You need to first create a variable of type '''Integer''' (usually with a base value of 0) and then provide it here | * var: You need to first create a variable of type '''Integer''' (usually with a base value of 0) and then provide it here | ||
+ | </div></div> | ||
+ | |Both | ||
+ | |Yes | ||
+ | |||
+ | |- | ||
+ | |duplicateAreaAtPos | ||
+ | |<div class="mw-collapsible mw-collapsed" style="width:100%">Counts the number of units killed by the specified team and assigns the value to a variable<div class="mw-collapsible-content"> | ||
+ | '''Fields:''' | ||
+ | |||
+ | * area: Selects the area which will be duplicated | ||
+ | * target: Select the area or unit where that area will be placed | ||
+ | * var_out: Area name (string variable) | ||
+ | * posOffset: Position offset | ||
+ | * turnOffset: Direction offset | ||
</div></div> | </div></div> | ||
|Both | |Both | ||
Line 1,078: | Line 1,116: | ||
'''Notes:''' | '''Notes:''' | ||
+ | |||
* Although this action can get the exact amount of units in a squad, it is unable to count the number of areas in an area squad | * Although this action can get the exact amount of units in a squad, it is unable to count the number of areas in an area squad | ||
Line 1,084: | Line 1,123: | ||
* target: Select the target unit | * target: Select the target unit | ||
* target_type: Allows you to filter any unit in the given list according to the given status | * target_type: Allows you to filter any unit in the given list according to the given status | ||
− | * useForTriggerFiltered: Will affect only those | + | * useForTriggerFiltered: Will affect only those areas that meet the '''Conditions''' |
* var: Select the integer variable | * var: Select the integer variable | ||
</div></div> | </div></div> | ||
Line 1,121: | Line 1,160: | ||
|- | |- | ||
|makeSquadFromUnits | |makeSquadFromUnits | ||
− | |<div class="mw-collapsible mw-collapsed" style="width:100%"> | + | |<div class="mw-collapsible mw-collapsed" style="width:100%">Makes it possible to create a squad of units after the mission is launched in game<div class="mw-collapsible-content"> |
− | ''' | + | '''Fields:''' |
+ | * name: The name of the squad (can be a string variable) | ||
+ | * object: The unit to add to the squad, can be multiple | ||
* object_type: Allows you to filter any unit in the given list according to the given status | * object_type: Allows you to filter any unit in the given list according to the given status | ||
+ | * object_var_name: Set the unit name | ||
+ | |||
+ | ''Note: All '''object_var''' options in actions require '''object_type''' set to '''isUnitVar''' to make them work'' | ||
+ | |||
+ | * object_var_comp_op: Can be "equal", "notEqual", less or more, determines whether the variable should equal, not equal, higher or lower than the value | ||
+ | * object_var_value: Set the number | ||
+ | * useForTriggerFiltered: Will affect only those areas that meet the '''Conditions''' | ||
</div></div> | </div></div> | ||
|Both | |Both | ||
Line 1,130: | Line 1,178: | ||
|- | |- | ||
|setHeadSquad | |setHeadSquad | ||
− | |<div class="mw-collapsible mw-collapsed" style="width:100%"> | + | |<div class="mw-collapsible mw-collapsed" style="width:100%">Used to modify squads created by using the ''makeSquadFromUnits'' action<div class="mw-collapsible-content"> |
− | ''' | + | '''Notes:''' |
+ | |||
+ | * This kind of squad can be created only once during the mission (with the same name) and it cannot be updated | ||
+ | * Works even on the player units | ||
+ | |||
+ | ''fields:''' | ||
* removeOnKill: If checked, the squad will be removed once killed | * removeOnKill: If checked, the squad will be removed once killed | ||
* followLowestSpeed: Units will move with speed of lowest unit | * followLowestSpeed: Units will move with speed of lowest unit | ||
− | </div></div> | + | * object_type: Allows you to filter any unit in the given list according to the given status |
− | |Both | + | * object_var_name: Set the unit name |
+ | |||
+ | ''Note: All '''object_var''' options in actions require '''object_type''' set to '''isUnitVar''' to make them work'' | ||
+ | |||
+ | * object_var_comp_op: Can be "equal", "notEqual", less or more, determines whether the variable should equal, not equal, higher or lower than the value | ||
+ | * object_var_value: Set the number | ||
+ | * useForTriggerFiltered: Will affect only those areas that meet the '''Conditions''' | ||
+ | </div></div> | ||
+ | |Both | ||
|Unknown | |Unknown | ||
|- | |- | ||
| missionAttempts | | missionAttempts | ||
|<div class="mw-collapsible mw-collapsed" style="width:100%">Allows you to modify how many attempts the player gets at a mission<div class="mw-collapsible-content"> | |<div class="mw-collapsible mw-collapsed" style="width:100%">Allows you to modify how many attempts the player gets at a mission<div class="mw-collapsible-content"> | ||
− | Each time a player dies in a single-player mission they | + | Each time a player dies in a single-player mission they lose one attempt (by default you get 5, so 4 respawns); this trigger allows you to modify how many they have left. '''NOTE:''' The game works by counting deaths, so using "set" and "1" will set the player to 1 death (3 respawns remaining), not set the to 1 attempt left. |
'''Fields:''' | '''Fields:''' | ||
Line 1,161: | Line 1,222: | ||
'''Notes:''' | '''Notes:''' | ||
− | * Vertical | + | * Vertical height of the area is irrelevant, if the area is 10 km x 10 km x 2 km then the player can go as high as they like as long as they are within the 10 km x 10 km area. |
* Anywhere out of the battle area (air and ground) and not inside the killOutOfBattleArea will display the warning message "Return to the battlefield" constantly to the player until they go back inside the battle area | * Anywhere out of the battle area (air and ground) and not inside the killOutOfBattleArea will display the warning message "Return to the battlefield" constantly to the player until they go back inside the battle area | ||
* You can add multiple areas to set them as a whole at once (example: You select your 4 "north_restricted_area", "south_restricted_area", "east_restricted_area", "west_restricted_area" areas and check the killOutOfBattleArea field to combine their coverage) | * You can add multiple areas to set them as a whole at once (example: You select your 4 "north_restricted_area", "south_restricted_area", "east_restricted_area", "west_restricted_area" areas and check the killOutOfBattleArea field to combine their coverage) | ||
Line 1,175: | Line 1,236: | ||
* killArea: If checked, then the areas become a "kill area", players in them for more than 25 seconds will be destroyed (only works for ground units). This one is regularly used for spawn-kill protection. | * killArea: If checked, then the areas become a "kill area", players in them for more than 25 seconds will be destroyed (only works for ground units). This one is regularly used for spawn-kill protection. | ||
* detectionArea: If checked, sets the area in which the player constantly appears on the enemy map (even in realistic). This one is regularly used for soft spawn-kill protection (usually larger than the killArea as it doesn't outright kill intruders) | * detectionArea: If checked, sets the area in which the player constantly appears on the enemy map (even in realistic). This one is regularly used for soft spawn-kill protection (usually larger than the killArea as it doesn't outright kill intruders) | ||
− | * killOutOfBattleArea: | + | * killOutOfBattleArea: If checked, sets the restricted areas considered "out of the battle" where the player dies should they fail to go back to the battle area |
* newGridHorizontalCellCount: How many grid squares should be drawn between each edge of the battle area | * newGridHorizontalCellCount: How many grid squares should be drawn between each edge of the battle area | ||
* gridCellCountVar: An integer variable can be assigned here to override the value of the "newGridHorizontalCellCount" field | * gridCellCountVar: An integer variable can be assigned here to override the value of the "newGridHorizontalCellCount" field | ||
Line 1,213: | Line 1,274: | ||
|- | |- | ||
|missionDestroyArea | |missionDestroyArea | ||
− | |<div class="mw-collapsible mw-collapsed" style="width:100%"> | + | |<div class="mw-collapsible mw-collapsed" style="width:100%">Removes all physical objects from the selected area<div class="mw-collapsible-content"> |
'''Fields:''' | '''Fields:''' | ||
* area: The area(s) to use | * area: The area(s) to use | ||
− | * target_type: What kind of targets in the given area(s) needs to be | + | * target_type: What kind of targets in the given area(s) needs to be removed |
+ | * useAreaForTriggerFiltered: Will affect only those areas that meet the '''Conditions''' | ||
</div></div> | </div></div> | ||
|Both | |Both | ||
− | | | + | | Yes |
|- | |- | ||
|missionGetBalanceLevel | |missionGetBalanceLevel | ||
Line 1,343: | Line 1,405: | ||
* target: Choose area for your capture zone | * target: Choose area for your capture zone | ||
* iconIndex: Select letter for you capture zone (0 - '''A''', 1 - '''B''', '''2 - C''', 3 - '''D''') | * iconIndex: Select letter for you capture zone (0 - '''A''', 1 - '''B''', '''2 - C''', 3 - '''D''') | ||
+ | * iconIndexVar: Select letter for you capture zone based on the integer variable value (has more available letters than the ''iconIndex'') | ||
* zoneDefenders: Makes it so while defender units are active the zone can't be captured | * zoneDefenders: Makes it so while defender units are active the zone can't be captured | ||
* army: Select which team will own selected capture zone (0 - Neutral, 1 - A, 2 - B) | * army: Select which team will own selected capture zone (0 - Neutral, 1 - A, 2 - B) | ||
Line 1,424: | Line 1,487: | ||
* spawnArrangeTo: Will turn spawn icon and units to '''target''', instead using axis | * spawnArrangeTo: Will turn spawn icon and units to '''target''', instead using axis | ||
* posRecalcDelay: If spawnArrangeTo is active, sets the delay for the icon's position recalculation | * posRecalcDelay: If spawnArrangeTo is active, sets the delay for the icon's position recalculation | ||
− | * useForTriggerFiltered: Will affect only those | + | * useForTriggerFiltered: Will affect only those areas that meet the '''Conditions''' |
* loc_name: Select name for created spawn zone | * loc_name: Select name for created spawn zone | ||
* spawnEffect: Unknown | * spawnEffect: Unknown | ||
Line 1,443: | Line 1,506: | ||
* awardByBodyHP: unknown | * awardByBodyHP: unknown | ||
* disableAfter: Removes spawn zones after the specified time (seconds) | * disableAfter: Removes spawn zones after the specified time (seconds) | ||
− | * spawnOffset: Sets an offset of how many | + | * spawnOffset: Sets an offset of how many metres from the spawn's centre the unit will spawn away from, allows making a few spawns in the same one area but with some shifting |
* spawnOffsetSpace: Sets the offset type (in object coordinates or world coordinates) | * spawnOffsetSpace: Sets the offset type (in object coordinates or world coordinates) | ||
* tags: Select which unit types will be able to use spawn zones | * tags: Select which unit types will be able to use spawn zones | ||
Line 1,633: | Line 1,696: | ||
* use_army_variable: Select to which team will it belong by using an integer variable | * use_army_variable: Select to which team will it belong by using an integer variable | ||
* var_army: Select the integer variable | * var_army: Select the integer variable | ||
− | * hp: Set the HP amount for the bombing area ( | + | * hp: Set the HP amount for the bombing area (10,000 HP = one bomb with ~570 kg of explosive mass or 2 bombs with ~280 kg of explosive mass or 4 bombs with ~125 kg of explosive mass or 9 bombs with ~25 kg of explosive mass) |
− | * hpFireMult: | + | * hpFireMult: Used with the ''firespeed'' option, prevents a situation when the base has only a few HP left, automatically destroys it after reaching certain % of damage, for example when set to 0.1 the option will activate itself when there is 10% of HP left |
− | * firespeed: | + | * firespeed: Used with the ''hpFireMult'' option, sets for how much time it will take until the remaining HP will be depleted, 0.01 = 1s |
− | * use_variable: | + | * use_variable: Used the enable the variable function, enabling it disables and overwrites the ''hp'' option |
+ | * armorClass: Makes it possible to replace the default material used for the base's damage model, for example ''RHA_tank'' or ''tank_structural_steel'' | ||
+ | * var_value: Used to assign the ''real'' variable which stores the HP value | ||
* airfield: Unknown | * airfield: Unknown | ||
</div></div> | </div></div> | ||
Line 1,765: | Line 1,830: | ||
| Stops any ongoing dialogues | | Stops any ongoing dialogues | ||
| SP | | SP | ||
+ | | Yes | ||
+ | |- | ||
+ | | missionTerraform | ||
+ | |<div class="mw-collapsible mw-collapsed" style="width:100%">Used to modify the terrain shape on the high quality maps for the ground forces, works only in the center 2x2km or 4x4km area<div class="mw-collapsible-content"> | ||
+ | '''Fields:''' | ||
+ | |||
+ | * object: Selects the area or area_squad for terraforming | ||
+ | * delta: Increase or lower height of the terraforming flat area relative to the area center and the landmesh at that point (meters) | ||
+ | * deltaNoisePercent: The percentage delta calculation error to create a realistic view | ||
+ | * smoothingAreaWidth: Width from the area border to the area center, along which terraformed area is embedded to landmesh (meters) | ||
+ | </div></div> | ||
+ | | Both | ||
| Yes | | Yes | ||
|- | |- | ||
| missionUnitShootAtLine | | missionUnitShootAtLine | ||
− | |<div class="mw-collapsible mw-collapsed" style="width:100%"> | + | |<div class="mw-collapsible mw-collapsed" style="width:100%">Shoots an artillery salvo with shells that are selected for the unit (anything from APCR to smoke). The only rockets that can be shot are 150 mm Wgr.41 Spr rockets from the 15 cm Pz.W.42.<div class="mw-collapsible-content"> |
'''Fields:''' | '''Fields:''' | ||
− | * areaNameFrom: | + | * areaNameFrom: Starting point for shelling |
− | * areaNameTo: | + | * areaNameTo: Ending point of shelling |
− | * shotCount: | + | * shotCount: 1 or 2 salvoes |
− | * attackLineRange: | + | * attackLineRange: Dispersion property |
− | * heighRange: | + | * heighRange: Dispersion property |
− | * lateralOffset: | + | * lateralOffset: Only available when shotCount is set to 2 (difference of salvo locations) |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 1,813: | Line 1,890: | ||
* target: Select objective | * target: Select objective | ||
− | * status: Select status (0 - | + | * status: Select status (0 - disabled, 1 - uncompleted, 2 - completed, 3 - failed) |
* extendedEnding: Show objective text for task completing or failing message | * extendedEnding: Show objective text for task completing or failing message | ||
* team: Select which team will complete or fail it | * team: Select which team will complete or fail it | ||
Line 1,923: | Line 2,000: | ||
* It's possible to change the text colour by putting it between <code><nowiki><color=#d1d1d1> and </color> (RGB color)</nowiki></code> | * It's possible to change the text colour by putting it between <code><nowiki><color=#d1d1d1> and </color> (RGB color)</nowiki></code> | ||
* It's possible to add a space between text by using <code><nowiki><br></nowiki></code> | * It's possible to add a space between text by using <code><nowiki><br></nowiki></code> | ||
+ | * You can find a list of pre-existing localized hints [[CDK_Reference#Mission hints|here]] | ||
'''Fields:''' | '''Fields:''' | ||
Line 1,958: | Line 2,036: | ||
| playSound | | playSound | ||
|<div class="mw-collapsible mw-collapsed" style="width:100%">Will play a selected sound<div class="mw-collapsible-content"> | |<div class="mw-collapsible mw-collapsed" style="width:100%">Will play a selected sound<div class="mw-collapsible-content"> | ||
+ | '''Note:''' | ||
+ | |||
+ | * The full list of all sounds can be found here: | ||
+ | |||
+ | https://github.com/GaijinEntertainment/fmod_studio_warthunder_for_modders/tree/master/Assets | ||
+ | |||
'''Fields:''' | '''Fields:''' | ||
* name: Directory path of sound file that you want to play (full name as sfxPath/sfxName) | * name: Directory path of sound file that you want to play (full name as sfxPath/sfxName) | ||
* loop: If checked, will make the sound play again when it ends | * loop: If checked, will make the sound play again when it ends | ||
− | * start: | + | * start: If checked, will start playing the sound (unchecked will stop) |
* team: Select which team will be able to hear it | * team: Select which team will be able to hear it | ||
</div></div> | </div></div> | ||
Line 2,073: | Line 2,157: | ||
* activate_type: Select if it should check or ignore conditions | * activate_type: Select if it should check or ignore conditions | ||
* check_trigger_status: If checked, the trigger won't be executed if it is disabled | * check_trigger_status: If checked, the trigger won't be executed if it is disabled | ||
− | * after_activation: Select what should happen to the trigger when it completes | + | * after_activation: Select what should happen to the trigger when it completes its task (disable, enable, doNotChange) |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 2,081: | Line 2,165: | ||
|<div class="mw-collapsible mw-collapsed" style="width:100%">Disables selected triggers<div class="mw-collapsible-content"> | |<div class="mw-collapsible mw-collapsed" style="width:100%">Disables selected triggers<div class="mw-collapsible-content"> | ||
'''Notes:''' | '''Notes:''' | ||
+ | |||
* If the trigger to be disabled is currently being executed, the execution will also be stopped. | * If the trigger to be disabled is currently being executed, the execution will also be stopped. | ||
Line 2,157: | Line 2,242: | ||
* After typing the vehicle name look for the ''_collision'' model in ''Assets Tree'', optionally it's possible to just add ''_collision'' to the vehicle name in ''Filter'' tab and only one result should appear in ''Assets Tree'' | * After typing the vehicle name look for the ''_collision'' model in ''Assets Tree'', optionally it's possible to just add ''_collision'' to the vehicle name in ''Filter'' tab and only one result should appear in ''Assets Tree'' | ||
* Select the collision model | * Select the collision model | ||
− | * After the model appears select one of vehicle parts that you want to damage and click on it, | + | * After the model appears select one of vehicle parts that you want to damage and click on it, its name should appear, if you want to check the name of a part that is in the vehicle you need to click a few time in the same place, as an example it should be named like this: '''gunner_dm''' or '''engine1_dm''' |
'''Fields:''' | '''Fields:''' | ||
Line 2,168: | Line 2,253: | ||
* setOnFire: Sets a designated compartment on fire | * setOnFire: Sets a designated compartment on fire | ||
* setFlood: Creates a breach in a designated compartment, that compartment should be suitable for underwater breaches | * setFlood: Creates a breach in a designated compartment, that compartment should be suitable for underwater breaches | ||
− | * explodeAmmo: Make all ammunition explode (often results in cooking off and | + | * explodeAmmo: Make all ammunition explode (often results in cooking off and its turret flying away) |
* doExplosion: Will make the selected unit explode | * doExplosion: Will make the selected unit explode | ||
* useForTriggerFiltered: Will affect only those units that meet the '''Conditions''' | * useForTriggerFiltered: Will affect only those units that meet the '''Conditions''' | ||
Line 2,206: | Line 2,291: | ||
|- | |- | ||
| UnitDropAmmo | | UnitDropAmmo | ||
− | |<div class="mw-collapsible mw-collapsed" style="width:100%">Makes the unit drop all of | + | |<div class="mw-collapsible mw-collapsed" style="width:100%">Makes the unit drop all of its bombs, fire all rockets and set its ammunition amount to 0<div class="mw-collapsible-content"> |
'''Fields:''' | '''Fields:''' | ||
− | * object: Select which unit should | + | * object: Select which unit should lose all of its ammunition |
* useForTriggerFiltered: Will affect only those units that meet the '''Conditions''' | * useForTriggerFiltered: Will affect only those units that meet the '''Conditions''' | ||
− | * triggerGround: Select which trigger group should the unit | + | * triggerGround: Select which trigger group should the unit lose (primary, secondary, coaxial, machine gun, special, torpedoes) |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 2,288: | Line 2,373: | ||
Available '''trees''' (AI behaviour presets): | Available '''trees''' (AI behaviour presets): | ||
+ | :* defaultCTABot | ||
+ | :* assaultBot | ||
+ | :* captureBot | ||
+ | :* assistCaptureBot | ||
+ | :* defenderBot | ||
+ | :* seekerBot | ||
+ | :* idleBot | ||
+ | :* rearmingBot | ||
+ | :* tankBot | ||
+ | :* shipBot | ||
+ | :* HLBCapture | ||
:* missionFighter | :* missionFighter | ||
:* missionBomber | :* missionBomber | ||
:* missionAssault | :* missionAssault | ||
+ | :* diveBomber | ||
:* missionTransport | :* missionTransport | ||
:* missionKamikaze | :* missionKamikaze | ||
Line 2,315: | Line 2,412: | ||
:* commonFighter | :* commonFighter | ||
:* testAI | :* testAI | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Available '''nodes''': | Available '''nodes''': | ||
− | :* | + | :* taxi_and_takeoff |
+ | :* doPanic | ||
+ | :* doFrontalPanic | ||
+ | :* unitAttackTarget | ||
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 2,358: | Line 2,446: | ||
* formation: Set the formation of spawned units | * formation: Set the formation of spawned units | ||
* resetFormation: Reset formation of spawned units | * resetFormation: Reset formation of spawned units | ||
+ | * shouldKeepFormation: Set false to correctly respawn an armada with a count higher than one, if you keep formation (default) - the aircraft can respawn on their leader | ||
+ | * needStopOnRespawn: Unknown | ||
+ | </div></div> | ||
+ | | Both | ||
+ | | Yes | ||
+ | |- | ||
+ | | unitRespawnAfterTime | ||
+ | |<div class="mw-collapsible mw-collapsed" style="width:100%">Set the respawn time for the units<div class="mw-collapsible-content"> | ||
+ | '''Fields:''' | ||
+ | |||
+ | * object_name: Select units which you want to respawn | ||
+ | * useForTriggerFiltered: Will affect only those areas that meet the '''Conditions''' | ||
+ | * object_type: Allows you to filter any unit in the given list according to the given status | ||
+ | * setObjectMarking: Assign a number (mark/marking) to the spawned units | ||
+ | * setObjectMarkingVar: Assign a number (mark/marking) from selected integer variable to the spawned units | ||
+ | * just_restore: Only repairs the vehicle | ||
+ | * place_to_respawn: Sets the respawn area | ||
+ | * time_to_respawn: Sets the time to respawn | ||
+ | * cycle_respawn: Unknown | ||
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 2,385: | Line 2,492: | ||
|- | |- | ||
| unitPlayAnim | | unitPlayAnim | ||
− | |<div class="mw-collapsible mw-collapsed" style="width:100%">Makes the unit play one of | + | |<div class="mw-collapsible mw-collapsed" style="width:100%">Makes the unit play one of its animations<div class="mw-collapsible-content"> |
'''Notes:''' | '''Notes:''' | ||
Line 2,552: | Line 2,659: | ||
* randomObjectsCount: Select how many unit will be attacked but in random order | * randomObjectsCount: Select how many unit will be attacked but in random order | ||
* playerAttracted: If checked, the AI units will attack the player more often than other AI units | * playerAttracted: If checked, the AI units will attack the player more often than other AI units | ||
− | * playerAttractedCount: | + | * playerAttractedCount: The amount of AI units that is going to attack the player |
− | * playerAttractedEffRate: | + | * playerAttractedEffRate: Accuracy of the AI units against the player |
* fightInArea: Makes the AI attack other units when it is only in selected area | * fightInArea: Makes the AI attack other units when it is only in selected area | ||
* fightAreaRadius: | * fightAreaRadius: | ||
Line 2,564: | Line 2,671: | ||
* attackNumMin: | * attackNumMin: | ||
* fireMode: Sets the fire mode (Auto, salvo or single) | * fireMode: Sets the fire mode (Auto, salvo or single) | ||
− | * attackMissionId: | + | * attackMissionId: Sets the ID for the target, this can be used to override the target with that ID. |
* maxNumAttackersPerTarget: Sets how many objects will attack the same target | * maxNumAttackersPerTarget: Sets how many objects will attack the same target | ||
* groupAttackMode: Makes the AI attack the target by flying one by one (every unit attacking separately), in wings or by the entire group | * groupAttackMode: Makes the AI attack the target by flying one by one (every unit attacking separately), in wings or by the entire group | ||
Line 2,584: | Line 2,691: | ||
'''Notes:''' | '''Notes:''' | ||
− | * It's best to set units that are close to each (5-30 | + | * It's best to set units that are close to each (5-30 metres) in one action, otherwise it can cause issues like ground units driving to some random points on the map instead of using the navmesh or splines |
'''Fields:''' | '''Fields:''' | ||
Line 2,614: | Line 2,721: | ||
* speed: Sets how fast you want to move the unit to selected '''target''' (km/h IAS, default is 300 km/h). This seems to bypass the unit's speed limits | * speed: Sets how fast you want to move the unit to selected '''target''' (km/h IAS, default is 300 km/h). This seems to bypass the unit's speed limits | ||
* tas: If checked, will make the unit keep TAS speed instead of IAS | * tas: If checked, will make the unit keep TAS speed instead of IAS | ||
+ | * afterburner: Forced afterburner enable | ||
* destTimeOnTarget: Works only when you select '''destTimeMode''', Unknown | * destTimeOnTarget: Works only when you select '''destTimeMode''', Unknown | ||
* follow_radius: Works only when you select '''follow_target''', sets the distance between object and target which it follow | * follow_radius: Works only when you select '''follow_target''', sets the distance between object and target which it follow | ||
Line 2,629: | Line 2,737: | ||
* horizontalDirectionForTeleport: | * horizontalDirectionForTeleport: | ||
* velocity: | * velocity: | ||
− | * altRange: Set the altitude range (in | + | * altRange: Set the altitude range (in metres) at which the '''object''' will fly to the '''target''' (so for example if the '''target''' is at sea level and first value is set to 1500 then the '''objects''' will fly at 1,500 m ALT) |
</div></div> | </div></div> | ||
| Both | | Both | ||
Line 2,684: | Line 2,792: | ||
'''Fields:''' | '''Fields:''' | ||
− | Plane | + | Plane - Use it when you want to apply it also to the player's plane, for example the ''thrust_mult'' |
Control | Control | ||
Line 2,694: | Line 2,802: | ||
* task: | * task: | ||
* target: | * target: | ||
− | * targetDeviation: | + | * targetDeviation: Used for editing the unit's accuracy. The '''defaultVal''' is the spread multiplier (0 = no spread), while the '''limits''' sets a variable accuracy/spread. |
* weaponTriggers: Makes the AI use specific weapon group, for example smoke grenades if set to '''gunner2''' when the unit is a Pz III F, works for tanks and ships | * weaponTriggers: Makes the AI use specific weapon group, for example smoke grenades if set to '''gunner2''' when the unit is a Pz III F, works for tanks and ships | ||
Line 2,716: | Line 2,824: | ||
* useAuxWeapon: If checked, will make ground units use secondary weapons (like MGs) | * useAuxWeapon: If checked, will make ground units use secondary weapons (like MGs) | ||
* destroyRIByCollision: | * destroyRIByCollision: | ||
− | * engineFire: | + | * engineFire: Starts an engine fire in the aircraft, with no initial damage to the engine, and increasing engine damage consistent with an engine on fire. Fire behaves like in live matches, spreading to and damaging parts of the aircraft or igniting fuel tanks. Aircraft with multiple engines will see their #1 engine catch fire. |
* hideProb: | * hideProb: | ||
* aimPriorities: | * aimPriorities: | ||
+ | * isFieldRepairEnabled: Makes it possible to turn off the repair functionality for tanks (doesn't affect repairing tracks) | ||
Visibility params | Visibility params | ||
Line 2,729: | Line 2,838: | ||
* forceVisibleOnMap: If checked, will make selected unit always visible on map, regardless of the game mode | * forceVisibleOnMap: If checked, will make selected unit always visible on map, regardless of the game mode | ||
* forceLockTarget: If checked, the game will lock on (the same functionality as '''Lock Target''' controls from '''Common''' tab) selected target | * forceLockTarget: If checked, the game will lock on (the same functionality as '''Lock Target''' controls from '''Common''' tab) selected target | ||
+ | * detectableFromCameraPos: Unknown | ||
Attack params | Attack params | ||
Line 2,735: | Line 2,845: | ||
* targetAir: If checked, the unit will only target air units | * targetAir: If checked, the unit will only target air units | ||
* targetGnd: If checked, the unit will only target ground units | * targetGnd: If checked, the unit will only target ground units | ||
− | * accuracy: Sets the fire accuracy of the selected unit (only applies to AI units) | + | * accuracy: Sets the base fire accuracy of the selected unit (only applies to AI units) and cannot be overrided |
− | * airAccuracy: | + | * gndAccuracy: Overrides weapon accuracy to air enemies (multiplier to the accuracyAir parameter in weapon blk) |
+ | * airAccuracy: Overrides weapon accuracy to ground enemies (multiplier to the accuracyGnd parameterin weapon blk) | ||
* maxDeviationAngle: Affect only visible spread - now guns will no shot to opposite direction on low accuracy (CDK explanation) | * maxDeviationAngle: Affect only visible spread - now guns will no shot to opposite direction on low accuracy (CDK explanation) | ||
* checkVisibilityTarget: Option required for ''visibilityTreeTransparencyThreshold'' to work properly | * checkVisibilityTarget: Option required for ''visibilityTreeTransparencyThreshold'' to work properly | ||
Line 2,743: | Line 2,854: | ||
* airEffShootingRate: Multiplies the unit's base shooting rate by the given amount, for air units | * airEffShootingRate: Multiplies the unit's base shooting rate by the given amount, for air units | ||
* effShootingRateByPlayer: Presumably multiplies the unit's base shooting rate by the amount of players in the battle | * effShootingRateByPlayer: Presumably multiplies the unit's base shooting rate by the amount of players in the battle | ||
+ | * disableProjectileDamage: Disables the projectile damage | ||
* cannotShoot: If checked, will make the selected unit unable to shoot | * cannotShoot: If checked, will make the selected unit unable to shoot | ||
* aiGunnersEnabled: If checked, will enable AI gunners (if unchecked will disable) | * aiGunnersEnabled: If checked, will enable AI gunners (if unchecked will disable) | ||
Line 2,750: | Line 2,862: | ||
* avoidFriendlyFire: If checked, the unit won't attempt to fire if there is a friendly in-between hostile vehicles | * avoidFriendlyFire: If checked, the unit won't attempt to fire if there is a friendly in-between hostile vehicles | ||
* trackingTime: | * trackingTime: | ||
− | * adaptiveAccuracyTime: | + | * adaptiveAccuracyTime: Used to gradually increase the accuracy based on time (makes it possible to set it so the first shell misses the target) |
+ | * increasedCollisionDamage: When enabled the units makes much more damage when they hit physical objects (for example hitting a building at medium speed while driving the tank will break tracks or even damage the crew) | ||
Movement params | Movement params | ||
Line 2,779: | Line 2,892: | ||
* startFullSpeed: Set the speed to cruising speed for ships | * startFullSpeed: Set the speed to cruising speed for ships | ||
* movementTraceRI: Allows units to have collision with redinstances | * movementTraceRI: Allows units to have collision with redinstances | ||
+ | * maxAnglesForFire: Overrides the maxAnglesForFire parameter from the unit's BLK | ||
Infantry params | Infantry params | ||
Line 2,784: | Line 2,898: | ||
* usePosAsCover: Makes the infantry consider current position as a cover | * usePosAsCover: Makes the infantry consider current position as a cover | ||
* dontUseCovers: Makes the infantry not use or look for any cover | * dontUseCovers: Makes the infantry not use or look for any cover | ||
− | * followWaypoints: Makes the infantry follow | + | * followWaypoints: Makes the infantry follow its waypoints |
* alwaysRun: Makes the infantry always run when it's moving | * alwaysRun: Makes the infantry always run when it's moving | ||
AI params | AI params | ||
− | * playerEnabled: | + | * playerEnabled: If applied to the player's vehicle the player will lose the control over the unit |
− | * aiEnabled: | + | * aiEnabled: Makes it possible to disable the AI |
* enemyFireEvasion: Whether the AI will attempt to dodge enemy fire | * enemyFireEvasion: Whether the AI will attempt to dodge enemy fire | ||
* enginesEnabled: Whether the unit's engines are enabled | * enginesEnabled: Whether the unit's engines are enabled | ||
Line 2,808: | Line 2,922: | ||
* targetChangeInterval: Time in seconds at which the AAA gun should switch targets | * targetChangeInterval: Time in seconds at which the AAA gun should switch targets | ||
* targetChangeProb: The probability of the AAA gun to switch targets | * targetChangeProb: The probability of the AAA gun to switch targets | ||
+ | * ignoreGunSpeedLimits: Allows to ignore weapon pointing speeds when aiming | ||
+ | * ChainfireTime: Overrides the chainfireTime value from the unit's BLK | ||
+ | * DelayAfterShoot: Overrides the DelayAfterShoot value from the unit's BLK | ||
Visual params | Visual params | ||
Line 2,814: | Line 2,931: | ||
* disableFallUndergroundAtDestroyed: | * disableFallUndergroundAtDestroyed: | ||
* persistentAerobaticsSmoke: If checked, and the unit is a plane, will permanently enable the plane's aerobatics smoke | * persistentAerobaticsSmoke: If checked, and the unit is a plane, will permanently enable the plane's aerobatics smoke | ||
− | * smokeScreenActive: | + | * persistentAerobaticsSmokeId: Sets the color |
+ | * smokeScreenActive: Unknown | ||
Collision params | Collision params | ||
− | * registerCollisions: | + | * registerCollisions: Used to register contacts for the selected unit (ball), for example to count goals in the football mode |
</div></div> | </div></div> | ||
Line 2,890: | Line 3,008: | ||
* triggerGroup: Sets the weapon group | * triggerGroup: Sets the weapon group | ||
* modificationReset: Removes the modification (?) | * modificationReset: Removes the modification (?) | ||
− | + | </div></div> | |
| Both | | Both | ||
| Yes | | Yes | ||
Line 2,928: | Line 3,046: | ||
* object: Select which units you want to use to create a column (need to be a '''squad''' and even unit in it needs to be set in order in which they will follow each other, for example locomotive needs to be first and then after it carriages) | * object: Select which units you want to use to create a column (need to be a '''squad''' and even unit in it needs to be set in order in which they will follow each other, for example locomotive needs to be first and then after it carriages) | ||
* object_type: Allows you to filter any unit in the given list according to the given status | * object_type: Allows you to filter any unit in the given list according to the given status | ||
− | * useForTriggerFiltered: Will affect only those | + | * useForTriggerFiltered: Will affect only those areas that meet the '''Conditions''' |
* numKilledUnitsToStop: Sets how many units needs to be destroyed to destroy the column | * numKilledUnitsToStop: Sets how many units needs to be destroyed to destroy the column | ||
* killLeaderToStop: Stops all column units when the leader unit is dead (train) | * killLeaderToStop: Stops all column units when the leader unit is dead (train) | ||
Line 3,329: | Line 3,447: | ||
|} | |} | ||
− | + | == In-Depth Notes == | |
This category is for in-depth explanations on how to use certain actions (when the explanation simply doesn't fit in a table) | This category is for in-depth explanations on how to use certain actions (when the explanation simply doesn't fit in a table) | ||
− | + | === Capture Zones === | |
− | + | ==== Drawing the capture zone circle ==== | |
There are some specific things to do in order for a capture zone to work properly and for the capture zone circle to be drawn. | There are some specific things to do in order for a capture zone to work properly and for the capture zone circle to be drawn. | ||
Line 3,348: | Line 3,466: | ||
Don't forget to make sure the "markUnitPreset" parameter is set to the relevant type ("tank_decal" if your capture zone is on the ground for ground vehicles to capture, "ship_buoys" if your capture zone is on the water for ships to capture) | Don't forget to make sure the "markUnitPreset" parameter is set to the relevant type ("tank_decal" if your capture zone is on the ground for ground vehicles to capture, "ship_buoys" if your capture zone is on the water for ships to capture) | ||
− | + | <br><br> | |
− | + | ==== Matching the capture zone circle with the capture area ==== | |
This section is if you're having an issue where the drawn capture circle does not match the actual capture area (so for example, you drive into the circle and it doesn't start capturing until you go much deeper, or it starts capturing before you even drive into the circle). | This section is if you're having an issue where the drawn capture circle does not match the actual capture area (so for example, you drive into the circle and it doesn't start capturing until you go much deeper, or it starts capturing before you even drive into the circle). | ||
Line 3,360: | Line 3,478: | ||
* (Easiest) Select the capture area, open the object properties panel if not already opened, and edit the "Radius" value (see image for reference), changing the radius will edit both the X and Z axis at the same time and make sure they're the same | * (Easiest) Select the capture area, open the object properties panel if not already opened, and edit the "Radius" value (see image for reference), changing the radius will edit both the X and Z axis at the same time and make sure they're the same | ||
* Select the capture area and select the scale tool (the one circled on the image), then edit the X and Z values manually to be the same. | * Select the capture area and select the scale tool (the one circled on the image), then edit the X and Z values manually to be the same. | ||
+ | |||
+ | <br><br> | ||
+ | === Creating a convoy === | ||
+ | |||
+ | To create a convoy consisting of the AI units a few actions are required. | ||
+ | As a start create a few AI units and put them in one line like in the picture below. Set their names to for example t1_convoy_01, t1_convoy_02 etc. | ||
+ | |||
+ | [[File:Convoy 01.PNG|thumb|center]] | ||
+ | |||
+ | Then by using the '''Create way''' [[File:Create way icon.PNG]] icon create a waypoints which will be used by those units. When it is done change the name to for example convoy_route_01. Do not forget to switch the speed of every waypoint point, it is the best to set it ~5 km/h lower than the maximum speed of slowest unit which will added to the squad. | ||
+ | |||
+ | [[File:Convoy 02.PNG|thumb|center]] | ||
+ | |||
+ | The last thing that needs to be done not related to adding actions is to add a string variable, it is required in order to make the convoy work with the action for assigning waypoints and properties. Every squad/convoy needs to have its own name. | ||
+ | |||
+ | [[File:Convoy 03.PNG|thumb|center]] | ||
+ | |||
+ | The last part is adding actions, five of them are needed to make it work correctly: | ||
+ | |||
+ | :1. '''makeSquadFromUnits''' - All that needs to be done there is to add units by using the '''object''' tab, up to 12 units can be added there. | ||
+ | :2. '''setHeadSquad''' - The same objects needs to be added there, options '''removeOnKill''', '''followLowestSpeed''' and '''useCurrentFormation''' needs to be enabled. | ||
+ | :3. '''unitSetRoute''' - An action used for assigning waypoints, the variable name needs to be added there as an '''Object''' (for example @convoy_squad), then the waypoint's name in the '''route''' tab. | ||
+ | :4. '''unitSetFormation''' - Used for changing the formation, works the same way like option in '''Object Properties''' window after selecting some unit. The '''allUnitsInOneFormation''' option needs to be enabled. | ||
+ | :5. '''unitSetProperties''' - The last action, used to give the AI some basic properties, '''destroyRIByCollision''' should be enabled to make the AI destroy trees and other objects, '''ignoreObstaclesAfterTime''' in case when the AI gets stuck, '''allowOvertakeMode''' in case when some units are lagging behind and '''movementTraceIR''' to make the AI register collisions. | ||
+ | |||
+ | If all options were applied correctly then the convoy should work without any issues. | ||
+ | <br>[https://drive.google.com/uc?export=download&id=1Ky8sRbnZJWWokmG9drJvrfqpewKC0VvI Sample file with an AI convoy] | ||
+ | |||
+ | The same method works also for the AI ship units, the only difference is what option needs to be enabled in the '''unitSetProperties''' action. | ||
+ | Required options are the '''shipTurnRadius''' (can be set to for example 500), '''enableShipCollisionAvoidance''' and '''advancedCollisionAvoidance'''. | ||
[[Category:War Thunder CDK]] | [[Category:War Thunder CDK]] | ||
[[Category:Custom missions]] | [[Category:Custom missions]] |
Latest revision as of 12:12, 18 May 2024
Triggers are an integral part of anything but the most basic of User Missions. This article covers the basic operation of triggers and what each available component does.
Contents
Overview
Triggers are a feature of the Mission Editor which allow for vastly more complicated missions to be created, they can be used for scripted events, as well as for enabling more advanced mission features such as capture points, spawn points, visible way-points, and much more. As well as being useful for making more advanced single-player missions an understanding of triggers is a necessity for creating multi-player user missions, as such missions require triggers to function.
Triggers consist of three main components (also known as elements): Events, Conditions, and Actions. An event is what causes the trigger to execute, for example, the "periodicEvent" event will execute the trigger according to the specified interval (for example once a second, or once every 15 seconds). Once a trigger is executed a condition determines whether the trigger should continue to carry out the actions assigned to it, or should not do anything / carry out any else actions assigned to it; for example the "UnitInArea" condition will carry out the triggers actions if the specified unit is within the specified area at the moment the trigger is executed. Finally, actions define what the trigger does once it is executed and the condition is met; for example "playHint" displays a message on the user's screen and "unitDamage" can be used to damage part of, or destroy a unit. Actions can also be assigned as "elseActions" which instead of being carried out when the condition is met, will be carried out when the trigger is executed, but the condition is not met. If there are no elseActions then the trigger will do nothing when the condition is not met. Triggers can be assigned multiple events, conditions and actions. If a trigger is created with no conditions then it will carry out its actions whenever it is executed, this is useful for triggers which always need to run, for example, a trigger to draw various lines on the mini-map at the start of the mission. Be aware that if a trigger is created without conditions and "enableAfterComplete" is ticked then the trigger will run forever, repeatedly every time this event occurs (for a default trigger this means it would carry out its actions once a second, every second for the entirety of the mission, unless it is disabled by another trigger).
Creating Triggers
The Basics
In order to make a trigger you first need to display the trigger window in the mission editor, this can be done by clicking the "Properties and Triggers / Mission Obj. info" button (looks like ) on the mission editor bar at the top of the editor. This will open the "Triggers / Mission Obj. Info" window (from here on known as the "trigger window") at the right-hand edge of your screen, this window is where you can edit triggers and mission objectives (for the time being it will be blank). Now in the properties window (where your mission settings are) scroll down until you reach the Triggers / Mission Ob. Navigation section and expand it if necessary.
This window is where all the triggers and objectives of your mission will be stored, organized under the (currently empty) "Triggers" and "Mission Objectives" folders. There are several buttons at the bottom of this section:
Trigger This button will create a new trigger, either inside the root "Triggers" folder inside the currently selected category.
Category This button will create a new category, either inside the root "Triggers" folder inside the currently selected category. Categories are essentially folders for triggers, functionally they serve no purpose to the mission and exist to allow you to organise your triggers. Categories can be created inside other categories and form folder trees which can be collapsed to hide triggers not currently of interest (collapsing categories will not disable or remove their contents). If a category is disabled all of its contents (including stuff in subcategories) will be disabled.
Mission Obj This button will create a mission objective in the "Mission Objectives" folder. Mission objectives are described in other guides.
Copy and Paste The Copy button will copy the selected trigger or mission objective. If a mission objective is selected and the copy button is pressed then a duplicate mission objective will be created. If a trigger is selected when the copy button is pressed then the Paste button will become available this allows you to select a different category for the trigger to be pasted into, once the destination is selected pressing the Paste button will create a duplicate of the copied trigger there.
Del This button will delete the selected trigger or mission objective.
Up and Down These buttons will move the selected trigger, category or mission objective up or down in the list, this does not affect the behaviour of the mission and is used to keep the lists organised.
To create your first trigger click the "Trigger" button, this will create your first trigger "Trigger_01" and display it in the trigger window. What you see will look similar to the image to the right (you will only have "Trigger_01" whereas the image has several other triggers, categories and objectives for demonstration purposes). At the top of the window is the triggers name, this can be changed to whatever you want (however should not be the same as any other triggers), it is best to pick a descriptive name such as "Setup" or "Teleport Player" to keep it clear what everything does, however, this is completely optional. The next option is an "Enabled" checkbox, by default, all triggers start enabled, disabling a trigger effectively prevents it from being executed. This is useful for triggers than you want to manually activate or execute at specific moments, as triggers can be enabled, disabled and even just executed without enabling it during the mission by other triggers. The next field is a comments box, this has no effect on the trigger's operation and is just for documenting what it does, it is completely optional.
Next is the trigger properties section this contains the following fields:
actionsType By default this is set to "PERFORM_ONE_BY_ONE" meaning the actions will be completed in the order they are present in the actions list of the trigger. This option can be changed to "PERFORM_ALL" where all actions are completed at the same time.
conditionsType By default this is set to "ALL", but can be changed to "ANY". For triggers with multiple conditions, this determines whether all of the conditions need to be met for the trigger to carry out its actions, or if any of the conditions being met is enough for the trigger to carry out its action(s).
enableAfterComplete By default this is set unchecked, meaning that once the trigger has carried out its actions, it becomes disabled. If it is checked then the trigger will carry out its actions every time it is executed and the condition is met, instead of just the first time.
Now we have reached the "Elements" section, and below it the "Element" section (Gaijin could have come up with better names) this is where you build your trigger; the "Elements" section is where you create the events, conditions, actions, and else actions of your trigger, while the "Element" section is where you modify the properties of each component. The elements area consists of a window with four folders where the contents of your trigger will be displayed, and underneath a collection of buttons:
Event, Condition, Action and ElseAction These buttons will display a new window with a list of all the available events, conditions and actions, depending on what button is pressed (the Action and elseAction buttons display the same list of actions, but will insert them into either the Actions or ElseActions area). There is a search box which will find the first item matching the phrase entered, it will only return the first entry in the list however, there may be more matches further down. To insert a component, select it from the list and click "Ok".
Up and Down These buttons will move the selected element up and down in the list. Changing the order of components only affects the Actions and ElseActions area where the actions will be carried out in the order they appear in the list. If actionsType is set to "PERFORM_ONE_BY_ONE" (the default setting) in the trigger properties area.
Delete This button will delete the selected trigger component.
Copy This will copy the selected trigger component, multiple components can be copied from different triggers (or the same one) without needing to press "Paste ..." each time.
Paste ... This button will display a list of all the copied components (grouped by type) and allow you to select one to paste into the currently selected trigger.
The "Element" section at the bottom will update with different fields and buttons depending on the currently selected trigger component.
Worked Example Trigger
In this example, we are going to make a simple trigger which will teleport the player to a new location when the player enters a specific area. For this example the player unit will be in a tank (placed as "tankModels" in the editor) called "Player", there will be an area called "Teleport_Area" and another called "Destination_Area" (exact setup can be seen in the image to the right). When the player tank enters "Teleport_Area" we want it to be teleported to "Destination_Area".
To follow along with this example create a "tankModels" unit type, assign it as the player's vehicle, call it "Player" and set it to a tank you own. Create two box areas for the teleport and destination areas (called "Teleport_Area" and "Destination_Area"). If not already present from reading the previous section create a new trigger.
You should now have a fresh trigger (likely called Trigger_01 or similar), we will begin by renaming the trigger to something more descriptive so if we come back to the mission later it is nice and clear what it does; to do this select the name field, delete the old name and type a new name for the trigger, for example "Teleport Player". We will leave most of the properties as default, however, we will tick "enableAfterComplete" as we want the player to be teleported every time they enter the area, not just the first time. We will then select the "periodicEvent" event and set its time field in the Element area to 0.1, this means the trigger will be executed and check if the player is in the area every 0.1 seconds.
Next, we will click the "Condition" button and look for the "unitWhenInArea" condition and insert it into the trigger, this condition allows us to check whether a chosen unit is within a specified area at the moment the trigger is executed. When the condition is added it should automatically become selected in the "Element" section, scroll down in the trigger window so that all of the settings can be seen. The "object" field is what the condition is going to act on, in our case we want to check the player's unit to see if it is in the area, so we will set this field to the player unit (in this example called "Player"); to do this simply click the field and select the player's unit from the list of available units. The "+ object" button will create another object field, allowing you to check if multiple units are in the area. The target field, in this case, refers to what area we are checking the unit is in, so we will set this to "Teleport_Area". The "+ target" button does the same thing for targets that the "+ objects" button does for objects. We will leave all other settings at defaults, but for future reference here is what they do:
Math allows you to specify how the unit is checked to be in the area; by default it is set to "3D" so the unit must we within the area, if it is set to 2D then along as the unit is within the 2D footprint of the area it doesn't matter how high up the unit is (this setting is mainly useful for triggers aimed at aircraft). This field can also be set to "notNear2D" or "notNear3D", these work the same as "2D" and "3D", but will activate the trigger when the unit is not within the area, instead of when the unit is within the area. The "object_type" and "unit_type_ex" settings allow you to specify criteria about the unit, by default it is set to "isAlive" which means the condition will be met as long as the unit is alive while it is in the area, this can be changed to other settings such as "isDamaged" so the trigger will only activate if the player is both within the area and has damage to their vehicle. Finally, check_objects comes in useful if you have specified multiple units to check, it allows you to say whether the trigger should activate if any of the units are in the area, or if all of the specified units must be in the area for the trigger to carry out its actions. This also works if a squad has been set as the object instead of an individual unit, it let you choose whether a single unit from the squad or the entire squad is required to be in the area.
Next, click the "Action" button and from the list select "unitMoveTo" and insert it into your trigger. This action can be used to do various things relating to units movement (such as telling AI to move to a certain place in a certain way), but we will use it for its ability to teleport units, in this case, the player. Once inserted set the object to the player's unit and target to "Destination_Area", then click the "+ move_type" button to add the move_type field to the trigger and set the field to "teleport". There are a lot of other fields here which will be useful for when you make more advanced missions, but they are outside the scope of this basic guide.
Our trigger is now complete; every 0.1 seconds (10 times a second) it will check if the player's unit is within the "Teleport_Area" area and if it is it will teleport the player to the "Destination_Area" area, if the player is not in the teleport area it won't do anything. Now finish off the mission (give it a name, assign the player unit as the player, set the map to the correct map, that sort of stuff) and test it out in-game.
List of all Events
For each item in the table click [Expand] for more details on implementation and available settings.
Event | Description | Available in SP or MP? |
---|---|---|
periodicEvent | Will execute the trigger repeatedly at a user defined interval
Fields:
|
Both |
timeExpires | Will execute the trigger once after a set number of seconds from mission start
Fields:
|
Both |
initMission | Trigger will be executed once at the start of the mission | Both |
List of all Conditions
For each item in the table click [Expand] for more details on implementation and available settings. Note: This section lists the intended functionality (where known) for each condition, some (a minority) may be legacy features, or just broken, and may not work properly if at all. "SP only", "MP only", "Both" and "Unknown" show whether the trigger component only works in Single-player missions, only works in Multi-player missions, works in both types of missions, or that the component is currently non-function / not enough is known about it to say.
Condition | Description | Available in SP or MP? |
---|---|---|
airfieldIsModuleHP | Checks the amount of HP of selected airfield module
Notes:
Fields:
|
Both |
gameWhenDifficulty | Will check what the current game-mode is (AB, RB, SB or custom)
Fields:
|
Both |
gameWhenControlMode | Will check what the control mode the user has selected (mouse-aim, etc.)
Fields:
|
SP only |
gameWhenControlWarning | Condition does not appear to currently be functional | Unknown |
gameWhenHintIsNotActive | Will check if a hint is currently being displayed on the UI | Both |
gameWhenManualGear | Will activate trigger if the user currently has "Autocontrol of landing gear" turned off in-game controls | SP only |
gameWhenObjectivesNotDisplayed | Will activate trigger if no mission objective is currently being displayed on the screen | Unknown |
infantryTroopWhenKilledByPlayerMatches | Will check if the number of infantry units killed by the player matches a specified value
Fields:
|
SP only |
isAllPlayersInGame | Will activate trigger if all the players are in the game | MP only |
isTargetLocked | Checks if the selected unit is locked using Lock Target controls from Common tab
Fields:
|
SP only |
isTriggerGroupActivated | Checks if player is using weapons
Notes:
Fields:
|
SP only |
misObjStatus | Will activate the trigger if a specified objective's current status matches a specified value
Fields:
|
Both |
missionEnvironment | Will activate the trigger if a mission matches the time set in this condition
Fields:
|
Both |
missionNamePostfix | Checks postfix of your mission
Notes:
Fields:
|
MP only |
missionIsBombingAreaDestroyed | Will activate the trigger if the specified bombing area is destroyed
Fields:
|
Both |
missionIsLZCaptured | Will activate trigger if a specified landing zone is captured by a specified team (unclear if / how LZs currently work)
Fields:
|
Unknown |
missionIsRespawnAllowed | Checks if respawns are allowed in mission settings | Unknown |
missionIsSuccess | Activates trigger if the mission is completed successfully | Both |
missionIsZoneCaptured | Will activate trigger if a specified zone is captured by a specified team
It may be possible to make this trigger work in single-player but requires certain mission settings to be set. Fields:
|
MP only |
missionWhenAdditionalTime | Will activate trigger if a specified amount of time has passed since the successful completion of the mission
When a (singleplayer) mission is marked as completed the player has the option to return to the hangar or continue playing, this condition will activate the trigger once a specified amount of time has passed from the completion of the mission should the player chooses to continue playing. Fields:
|
SP only |
missionWhenInBattleArea | Will activate the trigger if any units are within the defined battle area
Fields:
|
Both |
missionWhenTime | Will activate the trigger if a specified amount of time has passed since the start of the mission
Fields:
|
Both |
objectExists | Checks if there is a selected object in the mission
Notes:
Fields:
|
Both |
objGroupWhenStatus | Checks if selected objectGroups object exists on the map or not (it's related to unitWakeUp and unitPutToSleep actions)
Fields:
|
Both |
objectGroupWhenInArea | Looks for the objectGroups in the selected area
Fields:
|
Both |
playerAddRoundScore | Increases the player's score and spawn points amount during the mission
Fields:
|
Both |
playersDistanceBetween | Will activate the trigger if the player is within a set distance of a set object
Fields:
|
Both |
playersWhenEnemyNear | Will activate the trigger if the player is within a set distance of an enemy
Fields:
|
Both |
playersWhenInArea | Will activate the trigger if the player is within a set area
Fields:
|
Both |
playerWhenSpawn | Will activate when the player spawns
This condition is best used with the "useForTriggerFiltered" option on actions to allow the trigger to act only on units which have just spawned. Fields:
|
Both |
playersWhenOnLZ | Checks if a player is within the landing zone (unclear if / how LZs currently work)
It is currently unclear if this trigger works Fields:
|
Unknown |
playersWhenReachHeight | Checks if a player has reached a specified altitude
Fields:
|
Both |
playersWhenStatus | Checks the status of the player
Fields:
|
Both |
playersWhenManeuver | Checks what manoeuvre the player is carrying out
Fields:
|
SP only |
playersWhenOptions | Checks what options the player is currently has using
This condition has a list of check boxes and drop downs to let you act on the players settings such as if they are currently in cockpit mode, currently zoomed in, are using a touch screen to play, are using mouse aim, are using a joystick, etc. Some or all settings may not work and some such as "currentMissileType" are left over from previous Gaijin games on the same engine and not relevant to War Thunder. |
SP only |
playersWhenOrientation | Checks what orientation the player is currently at
Fields:
|
SP only |
playersWhenCameraState | Checks what orientation the of the camera (in free look mode)
Fields:
|
SP only |
playersWhenCursorIn | Functionality unknown
This appears to relate to how the mouse cursor is being used (mouse-aim, on-screen joystick, control of tank cross-hair etc.), but no functionality has been established after testing. |
SP only |
playersWhenCurrentBullet | Checks which ammo slot the player has selected and activate trigger if it matches set value
As this condition only is believed to only work in single player, this effectively lets you check what ammo type the user is using as in single player missions you assign ammo to the player, so know what slot each shell is in. Fields:
|
SP only |
triggerStatus | Checks the status of another trigger and activates trigger if it matches a set value
Fields:
|
Both |
unitDistanceBetween | Will activate the trigger if a unit is within a set distance of a set object
Fields:
|
Both |
unitFuelLess | Activates the trigger when the specified units remaining fuel is below a specified amount (possibly bugged / non-functional)
Fields:
|
Both |
unitAnyLess | Activates trigger if at least one unit from those specified does not match the given status
Fields:
|
Both |
unitWhenControls | Activates trigger if the units control positions match a given value
Fields:
|
Both |
unitWhenCountMatches | Activates trigger when the number of units meeting the condition is equal to the number set
All units assigned under the object field of this condition are counted together, including units which have had their count increased. For example, if two units have been assigned and one has had its count increased to 5 then the trigger will consider the status of all 5 subunits and the other unit, for a total of 6. If the object_type is set to isAlive with the function less than 3 then the death of any four units will activate the trigger. Fields:
|
Both |
unitWhenEnemyNear | Will activate the trigger if the specified unit is within a set distance of an enemy
Fields:
|
Both |
unitWhenInArea | Will activate the trigger if the specified unit is within the specified area
Fields:
|
Both |
unitWhenOnLZ | Checks if a unit is within the landing zone (unclear if / how LZs currently work)
It is currently unclear if this trigger works Fields:
|
Unknown |
unitWhenPartHp | Checks the health of a part of a unit
Using this trigger requires knowing the names of different parts of a unit's damage model, finding this information is up to you. Fields:
|
Both |
unitWhenProperties | Activates the trigger if a unit's current properties match specified values
Fields:
|
Both |
unitWhenReachHeight | Checks if the specified unit has reached a specified altitude
Fields:
|
Both |
unitWhenStatus | Checks the status of the specified unit
Fields:
|
Both |
unitCheckTag | Checks the tags of a specified unit
Each unit in the game has various tags assigned to it which describe it, such as what unit type it is (fighter, bomber, tank, ship, etc.) and what country it is. Working out what the tags are for a specific unit has is a fairly easy task and is done by just thinking about the unit, e.g. a spitfire will probably have the "type_fighter" and "country_britain" tags. Fields:
|
Both |
unitWhenHit | Will activate the trigger if the specified unit is hit (shot) with the option of specifying which unit hit it
Fields:
|
Both |
unitWhenKilled | Will activate the trigger if the specified unit is killed
Fields:
|
Both |
unitsInLineOfSight | Checks if two units have line of sight with each other
Fields:
|
Both |
unitsInSearchLight | Checks if unit is caught in a search light
Fields:
|
Both |
varCompareBool | Activates the trigger if the specified boolean variable matches the specified value
Fields:
|
Both |
varCompareInt | Activates the trigger if the specified integer variable matches the specified value
Fields:
|
Both |
varCompareReal | Activates the trigger if the specified real (decimal number) variable matches the specified value
Fields:
|
Both |
varCompareString | Activates the trigger if the specified string variable matches the specified value
Fields:
|
Both |
playerShortcutPressed | Activates the trigger if player presses a specified control
Fields:
|
SP only |
playerSeesUnit | Checks if player can see a specified unit
This appears to work like "unitsInLineOfSight", only requiring LOS between the player and the target unit, the player does not need to be looking at the unit. Fields:
|
SP only |
playerAxisValueReached | Checks if player has reached a certain value on a specified control axis
Fields:
|
SP only |
destructibleInArea | Checks the number of objects destroyed within a specified area
Fields:
|
Unknown |
airDropsNear | Checks if an airDrop is near a unit (unclear if / how air drops currently work)
Fields:
|
Unknown |
areaWhenInArea | Checks if an area is within another area
Fields:
|
Both |
List of all Actions
This is a list of all Actions and their known behaviour. Note: This list is user-provided, there could be missing actions or the described behaviour could be incorrect
Action | Description | MP/SP | Working |
---|---|---|---|
addAirfield | Adds a virtual airfield using the given areas
This trigger is used to make an airfield already present as part of the map a functioning airfield in the mission, use of this trigger is not needed for aircraft carriers and airfields made using the "dynaf_" object groups. Fields:
|
Both | Yes |
addTextToUnit | Adds text on the given unit
Fields:
|
Both | Yes |
airfieldSetIndication | Makes airfield flash green on map / radar
Fields:
|
Both | Yes |
airfieldSetVisibility | Changes the airfield's visibility on the map / radar
Fields:
|
Both | Yes |
airfieldGetModuleHP | Gets the HP of a part of a modular airfield and save it to a real (decimal number) variable.
Fields:
|
Both | Yes |
airfieldSetModuleHP | Sets the HP of a part of a modular airfield and save it to a real (decimal number) variable.
Fields:
|
Both | Yes |
airfieldAddModuleHP | Adds a set number to the HP of a part of a modular airfield and save it to a real (decimal number) variable.
Fields:
|
Both | Yes |
airfieldSetProperties | Allows you to change some of settings for selected airfields
Fields:
|
Both | Yes |
awardAchievement | Functionality unknown
Presumably this action is designed to award achievements to the player, but in testing it has had effect. Fields:
|
Unknown | Unknown |
changeUnit | This action does not appear to currently be functional | Unknown | Unknown |
checkEntity | Functionality unknown
Fields:
|
Unknown | Unknown |
comment | Adds comments to the trigger for documentation purposes
This action has no effect, it is coloured green in the editor and is used to simply add text comments to the trigger in the editor to document what it does. Fields:
|
Both | Yes |
countUnitsKilledByTeam | Counts the number of units killed by the specified team and assigns the value to a variable
Fields:
|
Both | Yes |
duplicateAreaAtPos | Counts the number of units killed by the specified team and assigns the value to a variable
Fields:
|
Both | Yes |
beginRaceMode | Starts a plane or tank race with the given settings
Fields:
|
Both | Yes |
bigQueryAddRecord | Functionality unknown | Unknown | Unknown |
getNearestAreaByMask | Used to store the name of areas that are the closest to the selected target
Fields:
|
Both | Yes |
getOwnArea | Used to get the area name where the selected unit is located
Fields:
|
Both | Yes |
getUnitArmy | Used to store the army number of selected unit
Notes:
Fields:
|
Both | Yes |
getUnitsCount | Used to store the number of selected unit
Notes:
Fields:
|
Both | Yes |
getUnitsAttackCount | Functionality unknown
Fields:
|
Unknown | Unknown |
hangarGetCountryNum | Functionality unknown | Unknown | Unknown |
makeSquad | Creates a squad from the given unit
Fields:
|
Both | Unknown |
makeSquadFromUnits | Makes it possible to create a squad of units after the mission is launched in game
Fields:
Note: All object_var options in actions require object_type set to isUnitVar to make them work
|
Both | Unknown |
setHeadSquad | Used to modify squads created by using the makeSquadFromUnits action
Notes:
fields:'
Note: All object_var options in actions require object_type set to isUnitVar to make them work
|
Both | Unknown |
missionAttempts | Allows you to modify how many attempts the player gets at a mission
Each time a player dies in a single-player mission they lose one attempt (by default you get 5, so 4 respawns); this trigger allows you to modify how many they have left. NOTE: The game works by counting deaths, so using "set" and "1" will set the player to 1 death (3 respawns remaining), not set the to 1 attempt left. Fields:
|
SP Only | Yes |
missionBattleArea | Allows you to restrict the battle area to within a specified area
This action is used to either restrict the map to a certain area (make it smaller), or specify areas where players will be killed / spotted if they enter. Notes:
Fields:
|
Both | Yes |
missionComplete | Sets the mission as complete (victory) for the selected team, ends the battle
Fields:
|
Both | Yes |
missionCustomArtillery | Enables custom artillery (which can be set in Mission Settings/Versus params/customSuperArtillery)
Fields:
|
Unknown | Unknown |
missionDebriefing | Forces the player back to the hangar, works only after mission has been completed | SP | Yes |
missionDestroyArea | Removes all physical objects from the selected area
Fields:
|
Both | Yes |
missionGetBalanceLevel | Gets the mission's balance level (1-25) and stores it in the given variable
Fields:
|
Both | Unknown |
missionGetBombingAreaHP | Gets the remaining HP of a bombing area and assigns it to a variable
Fields:
|
Both | Yes |
missionGetMaxPlayers | Gets the maximum amount of players allowed in the game (set before mission is launched) and assigns it to a variable
Fields:
|
MP Only | Yes |
missionGetMaxRespawns | Gets the maximum number of respawns and assigns it to a variable (unclear if working currently)
Fields:
|
SP | Yes |
missionHint | This action does not appear to currently be functional | Unknown | Unknown |
missionEnableMapAutoScale | Enables auto scaling of the in-game map | Unknown | Unknown |
missionFailed | Sets the mission as failed for the selected team, ends the battle
Fields:
|
Both | Yes |
missionKillEffects | Removes effects from the selected areas
Fields:
|
Both | Yes |
missionForceMusic | Forces playing selected sound track
Fields:
|
SP | Yes |
missionForceUpdate | Functionality unknown
Fields:
|
Unknown | Unknown |
missionDisableRadiochat | Disabled in-game radio messages (for example Cover me etc.)
Fields:
|
MP | Yes |
missionMakeTorpedoNet | Creates a torpedo net
Fields:
|
MP | Yes |
missionMarkAsCaptureZone | Creates capture zone in selected area
Notes:
Fields:
|
Both | Yes |
missionMarkAsLandingZone | Creates a landing zone (airfield)
Notes:
Fields:
|
Unknown | Unknown |
missionMarkAsWaypoint | Creates a circle (waypoint) in selected area
Fields:
Notes:
|
Both | Yes |
missionMarkUnitsForStrike | This action does not appear to currently be functional | SP | No |
missionMarkAsRespawnPoint | Creates spawn zones in selected areas
Fields:
|
MP | Yes |
missionMarkAsRearmZone | Creates a rearm zone (only for players)
Fields:
|
Both | Yes |
missionMarkAsExitZone | Creates a zone where the player can safely quit (bailout)
Fields:
|
MP | Yes |
missionSetCrewLock | Functionality unknown
Fields:
|
MP | Yes |
missionShowMapLine | Shows a single line on the map
Fields:
|
Both | Yes |
missionShowMapIcon | Shows a single icon on the map
Fields:
|
Both | Yes |
missionCreatePickUps | Creates a small area where you can rearm your unit with an icon above it for ground units
Fields:
|
MP | Yes |
missionCreateRespawnBasesByTemplate | Creates spawn zones in selected areas using variables
Fields:
|
MP | Yes |
missionPlayDialogue | Play a dialogue
Fields:
|
Both | Yes |
missionSetBattleRoyaleArea | Sets an area for battle royale mode
Notes:
Some other notes from the mission file (I'll leave it there until someone manage to figure out how to make a BR mission that works):
(br_area_div * 2 - 1 = 11) - number of total stages (11 stages - 3 = 8) - so warning will be when 3(1 row * 3 col) or 4(2 row * 2 col) sectors left and artillery will be disabled when 2(1 row * 2 col) sectors left
from 1 to br_area_div included from bottom left corner to up right corner (1,1) - bottom left (5,1) - bottom right (1,5) - up left (5,5) - up right
Fields:
Example:
|
MP | Yes |
missionSetBombingArea | Add a bombing area in selected area
Fields:
|
Both | Yes |
missionBombingAreaDamage | Inflict some damage to selected bombing area
Fields:
|
Both | Yes |
missionSetEndReason | Set the reason of ending the mission
Fields:
|
MP | Yes |
missionSetFade | Add fading in or fading out of screen to the mission
Fields:
|
Both | Yes |
missionSetFailText | Set the text after failing the mission
Fields:
|
SP | Yes |
missionSetProperties | Change some basic mission's properties
Fields:
|
Both | Yes |
missionSetTimeIndicator | Show a time indicator in the bottom left corner
Fields:
|
Both | Yes |
missionSetTimeSpeed | Changes the mission time speed
Fields:
|
Both | Yes |
missionSetTargetsIndicator | Shows icons with a number of remaining units in the bottom left corner
Fields:
|
Both | Yes |
MissionStartCutscene | Starts an in-game cutscene
Fields:
|
Both | Yes |
MissionStartGuiScene | Unknown functionality | SP | Yes |
MissionStopCutscene | Stops the cutscene started by using MissionStartCutscene action
Fields:
|
Both | Yes |
missionStopSpeech | Stops any ongoing dialogues | SP | Yes |
missionTerraform | Used to modify the terrain shape on the high quality maps for the ground forces, works only in the center 2x2km or 4x4km area
Fields:
|
Both | Yes |
missionUnitShootAtLine | Shoots an artillery salvo with shells that are selected for the unit (anything from APCR to smoke). The only rockets that can be shot are 150 mm Wgr.41 Spr rockets from the 15 cm Pz.W.42.
Fields:
|
Both | Yes |
missionControlJIP | Enable or disable join in progress function
Fields:
|
MP | Unknown |
moAddMissionObjective | Adds a new objective (if it haven't been shown yet)
Fields:
Note: All object_var options in actions require target_type set to isUnitVar to make them work
|
Both | Yes |
moSetObjectiveStatus | Change the status of selected objective
Fields:
Note: All object_var options in actions require target_type set to isUnitVar to make them work
|
Both | Yes |
moveRespawnBase | Lets you assign a respawn base to a movable object
Fields:
|
Both | Yes |
objectGroupSetAirfield | Marks selected object as an airfield
Fields:
|
Both | Yes |
playerControls | Enables or Disables selected control keys
Fields:
|
SP | Yes |
playerEmulateShortcut | Presses selected control key
Fields:
|
SP | Yes |
playerForceMoveToRespawnScreen | Forces all players to go back to the respawn screen
Fields:
|
MP | Yes |
playerLockTarget | Locks selected target (it's only related to the UI, not missiles)
Fields:
|
SP | Yes |
playerOptions | Change some basic player's properties
Fields:
|
SP | Yes |
playHint | Shows a message on screen
Notes:
Fields:
Note: All object_var options in actions require target_type set to isUnitVar to make them work
|
Both | Yes |
playerToggleHero | This action does not appear to currently be functional | SP | No |
playSound | Will play a selected sound
Note:
https://github.com/GaijinEntertainment/fmod_studio_warthunder_for_modders/tree/master/Assets Fields:
|
Both | Yes |
raceRangeEnable | Placeholder
Fields:
Note: All object_var options in actions require object_type set to isUnitVar to make them work
|
Unknown | Unknown |
raceParamsModify | Unknown
Fields:
Note: All object_var options in actions require object_type set to isUnitVar to make them work
|
Unknown | Unknown |
spawnOnAirfield | Spawn selected units on the airfield (on the ground)
Fields:
|
Unknown | Yes |
systemLog | Unknown functionality
Fields:
|
Unknown | Unknown |
systemStats | Unknown functionality
Fields:
|
Unknown | Unknown |
systemCommand | Unknown functionality
Fields:
|
Unknown | Unknown |
systemShakeCamera | Unknown functionality
Fields:
|
Unknown | Unknown |
systemPlayRumble | Unknown functionality
Fields:
|
Unknown | Unknown |
triggerActivate | Activates selected trigger
Fields:
|
Both | Yes |
triggerDisable | Disables selected triggers
Notes:
Fields:
|
Both | Yes |
triggerEnable | Enables selected triggers
Fields:
|
Both | Yes |
tutorialArtilleryShootAtPos | Orders the artillery to shoot at selected area
Notes:
Fields:
|
SP | Yes |
tutorialArtilleryShowWarning | Placeholder
Fields:
|
Unknown | Unknown |
tacticalMapForceZoom | Changes the zoom level of your map
Fields:
|
SP | Yes |
tacticalMapSetIconProperty | This action does not appear to currently be functional | Unknown | Unknown |
unitBlinkPart | Shows selected part of the ground unit (can be used to show for example tank crew position)
Fields:
|
SP | Yes |
unitDamage | Damage or destroy selected unit
In order to find names of parts you need to:
Fields:
|
Both | Yes |
unitDestroyMissile | Unknown functionality
Fields:
|
Unknown | Unknown |
unitDoBailout | Select which air units should bailout (doesn't spawn any effects and doesn't destroy the airplane)
Fields:
|
Both | Yes |
UnitDropAmmo | Makes the unit drop all of its bombs, fire all rockets and set its ammunition amount to 0
Fields:
|
Both | Yes |
unitFire | Unknown functionality (probably doesn't work)
Fields:
|
Unknown | Unknown |
unitForceRearmSpeed | Set the rearm speed multiplier for Arcade Battles midair reload mechanics
Fields:
|
Both | Yes |
unitGetDistanceToVar | Placeholder
Fields:
|
Unknown | Unknown |
unitGetRandomNameFromSquad | Saves the name of a squad or specific unit from it in a string variable
Fields:
|
Both | Yes |
unitLandOnAirfield | Orders the AI unit to land on the airfield or water
Fields:
|
Both | Yes |
unitLoadBehTree | Loads specific AI behaviour presets
Fields:
Available trees (AI behaviour presets):
Available nodes:
|
Both | Yes |
unitRespawn | Respawn units in selected area
Note:
Fields:
|
Both | Yes |
unitRespawnAfterTime | Set the respawn time for the units
Fields:
|
Both | Yes |
unitRestore | Rearms or repairs selected units
Fields:
|
Both | Yes |
unitPlayAnim | Makes the unit play one of its animations
Notes:
Fields:
|
Both | Yes |
unitPlayEffect | Shows custom effects in or over selected units
Notes:
Fields:
|
Both | Yes |
unitPutToSleep | Makes the selected unit disappear
Notes:
Fields:
|
Both | Yes |
unitSpawnOnObjectGroup | Unknown functionality | Unknown | Unknown |
unitWakeUp | Makes the selected unit appear again after using unitPutToSleep on them
Fields:
|
Both | Yes |
unitSetControls | Sets the control of an aircraft's gears, control surfaces, throttle and so, to anything between a minimum or maximum value
Fields:
|
Both | Yes |
unitSetIndication | Makes markings and map icons of selected units blink
Fields:
Note: All object_var options in actions require target_type set to isUnitVar to make them work
|
Both | Yes |
unitSetStealth | Turn off any indications, markers and icons over selected units
Notes:
Fields:
|
Both | Yes |
unitSetCalmDetection | Disables or enables blinking of enemy unit marking icon when it's spotted
Fields:
|
Both | Yes |
unitFollowWaypoints | Makes selected units follow their waypoints
Fields:
|
Both | Yes |
unitAttackTarget | Orders AI units attack selected targets
Fields:
|
Both | Yes |
unitMoveTo | Orders AI units to move to selected area or unit
Notes:
Fields:
Note: All object_var options in actions require object_type set to isUnitVar to make them work
Note: move - default move type, stand - orders the unit to stop, teleport - make the unit teleport to selected target, use_splines - orders the unit to use splines (blue lines with blue circles, usually roads), navmesh - orders the unit to move using navigation meshes (can be used only on maps for tanks)
|
Both | Yes |
unitMark | Gives a number to a selected unit
Notes:
Fields:
|
Both | Yes |
unitMarkForEvent | Used to setting up a streak event from AB
Notes:
Fields:
Note: It's possible to use streaks for helicopters but it requires to change the tag manually in mission file, other available tags: helicopter_atgm, helicopter_rocket, helicopter_mguns |
MP | Yes |
unitSetAttachedMenCount | Unknown functionality | Unknown | Unknown |
unitSetDrownProperties | Unknown functionality | Unknown | Unknown |
UnitSetProperties | Provides the option to set multiple types of properties for each unit class, as well as some basic functionalities taken from other actions.
Note:
Fields: Plane - Use it when you want to apply it also to the player's plane, for example the thrust_mult Control
Note: All object_var options in actions require object_type set to isUnitVar to make them work
Unit status params
Visibility params
Attack params
Movement params
Infantry params
AI params
Aircraft params
AAA params
Visual params
Collision params
|
Both | Yes |
unitSetFormation | Changes the formation of ground units
Fields:
|
Both | Yes |
unitSetRoute | Assigns waypoints to units
Fields:
Note: All object_var options in actions require object_type set to isUnitVar to make them work
Note: It's possible to use only those that are created manually (and assigned in waypoints tab in unit properties window), not those that are being created for specific units, it's also possible to use string variables, but in this case it's required to add @ before string variable name
|
Both | Yes |
unitSetVar | Set a custom name and number to selected units
Notes:
Fields:
|
Both | Yes |
unitSetZeroAmmo | Sets the ammunition amount of selected types to zero
Fields:
|
Both | Yes |
unitVulnerableFrom | Makes it so some units can be damaged by other specific units only and indestructible for everything else
Note: To make the action work it is needed to create an unitSetProperties action, then activate isImmortal option for those specific units and then add this action. Fields:
Note: All object_var options in actions require target_type set to isUnitVar to make them work
Note: All player_var options in actions require target_type set to isUnitVar to make them work
|
Both | Yes |
unitsSetColumn | Allows to set trains and following it wagons or carriages
Fields:
|
Both | Yes |
groupFormation | Changes the formation of selected air units
Fields:
|
Both | Yes |
varAddString | Adds a text or number to selected string value
Notes:
Fields:
|
Both | Yes |
varGetIntFromString | Imports an integer value from the selected string variable to a selected integer variable
Notes:
Fields:
|
Both | Yes |
varGetStringValue | Imports all text from the selected string value
Fields:
|
Both | Yes |
varModify | Modify existing real or integer variable
Fields:
|
Both | Yes |
varSetBool | Sets a bool value
Notes:
Fields:
|
Both | Yes |
varSetInt | Sets an integer value
Notes:
Fields:
|
Both | Yes |
varSetReal | Sets a real value
Notes:
Fields:
|
Both | Yes |
varSetString | Sets a string value
Notes:
Fields:
|
Both | Yes |
varSetRandomInt | Sets a random integer value
Notes:
Fields:
|
Both | Yes |
wait | Adds a delay between actions
Fields:
|
Both | Yes |
loop | This action does not appear to currently be functional | Unknown | No |
playerSetAmmo | This action does not appear to currently be functional | Unknown | No |
playerSetMouseAim | Makes player's camera view (mouse aim circle) point at selected unit or area
Fields:
|
SP | Yes |
playerCenterMouseAim | Centers the mouse aim circle position
|
SP | Yes |
gameMPChangeScore | Change the amount of tickets in battle
Notes:
Fields:
|
Both | Yes |
hudElementBlink | Makes selected HUD elements blink
Fields:
|
SP | Yes |
hudElementEnlarge | Makes selected HUD elements larger
Fields:
|
SP | Yes |
hudElementSelectionShade | Makes the screen darker except for selected HUD element
Fields:
|
SP | Yes |
hudElementShow | Used to show tutorial hints
Fields:
|
SP | Yes |
hudWindowsHide | This action does not appear to currently be functional | Unknown | Unknown |
registrationKillCounter | Unknown functionality | Unknown | Unknown |
tacticalMapControl | Change the map settings
Fields:
|
Both | Yes |
showSmartCutscene | Shows an in-game cutscene
Fields:
|
Both | Yes |
showCutsceneInfo | Shows a cutscene text
Fields:
|
Both | Yes |
preloadRendInsts | Unknown functionality | Unknown | Unknown |
waitRendInst | Unknown functionality | Unknown | Unknown |
benchmarkAction | Unknown functionality | Unknown | Unknown |
hideAirDrops | Unknown functionality | Unknown | Unknown |
unitAddAreasForSearchLight | Makes the AI searchlight units search through selected areas
Fields:
|
Both | Yes |
unitFollowSearchLight | Unknown functionality
Fields:
|
Unknown | Unknown |
In-Depth Notes
This category is for in-depth explanations on how to use certain actions (when the explanation simply doesn't fit in a table)
Capture Zones
Drawing the capture zone circle
There are some specific things to do in order for a capture zone to work properly and for the capture zone circle to be drawn.
First, you need to create a capture zone unit, they are found in the "objectGroups" type, under the names of "capture_zone_circle", "capture_zone_circle_color" and "capture_zone_water". Select the one that is the most appropriate for your use case, and put it anywhere on the map (the position really doesn't matter, you can put it outside the battle area if needed).
(You can rename it to something meaningful like "cz_circle_01")
Then, in the "missionMarkAsCaptureZone" action, go to the "markUnit" parameter (all the way down, before the "showBorderOnMap" parameter and after the "markUnitPreset" parameter) and select the capture zone unit you just created.
Don't forget to make sure the "markUnitPreset" parameter is set to the relevant type ("tank_decal" if your capture zone is on the ground for ground vehicles to capture, "ship_buoys" if your capture zone is on the water for ships to capture)
Matching the capture zone circle with the capture area
This section is if you're having an issue where the drawn capture circle does not match the actual capture area (so for example, you drive into the circle and it doesn't start capturing until you go much deeper, or it starts capturing before you even drive into the circle).
If you're using a cylinder area (this issue might also happen with other forms of areas), you need to have the "X" and "Z" scale axis match (see image).
To make them match, you can either:
- (Easiest) Select the capture area, open the object properties panel if not already opened, and edit the "Radius" value (see image for reference), changing the radius will edit both the X and Z axis at the same time and make sure they're the same
- Select the capture area and select the scale tool (the one circled on the image), then edit the X and Z values manually to be the same.
Creating a convoy
To create a convoy consisting of the AI units a few actions are required. As a start create a few AI units and put them in one line like in the picture below. Set their names to for example t1_convoy_01, t1_convoy_02 etc.
Then by using the Create way icon create a waypoints which will be used by those units. When it is done change the name to for example convoy_route_01. Do not forget to switch the speed of every waypoint point, it is the best to set it ~5 km/h lower than the maximum speed of slowest unit which will added to the squad.
The last thing that needs to be done not related to adding actions is to add a string variable, it is required in order to make the convoy work with the action for assigning waypoints and properties. Every squad/convoy needs to have its own name.
The last part is adding actions, five of them are needed to make it work correctly:
- 1. makeSquadFromUnits - All that needs to be done there is to add units by using the object tab, up to 12 units can be added there.
- 2. setHeadSquad - The same objects needs to be added there, options removeOnKill, followLowestSpeed and useCurrentFormation needs to be enabled.
- 3. unitSetRoute - An action used for assigning waypoints, the variable name needs to be added there as an Object (for example @convoy_squad), then the waypoint's name in the route tab.
- 4. unitSetFormation - Used for changing the formation, works the same way like option in Object Properties window after selecting some unit. The allUnitsInOneFormation option needs to be enabled.
- 5. unitSetProperties - The last action, used to give the AI some basic properties, destroyRIByCollision should be enabled to make the AI destroy trees and other objects, ignoreObstaclesAfterTime in case when the AI gets stuck, allowOvertakeMode in case when some units are lagging behind and movementTraceIR to make the AI register collisions.
If all options were applied correctly then the convoy should work without any issues.
Sample file with an AI convoy
The same method works also for the AI ship units, the only difference is what option needs to be enabled in the unitSetProperties action. Required options are the shipTurnRadius (can be set to for example 500), enableShipCollisionAvoidance and advancedCollisionAvoidance.