Scenario Framework – Arma Reforger
Pr9inichek (talk | contribs) mNo edit summary |
Pr9inichek (talk | contribs) m (→DeliverWeaponsToCrate: add some readable format) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side | {{TOC|side}} | ||
The goal of the '''Scenario Framework''' is to provide scenario creators simple way how to build their scenarios using World Editor without any scripting knowledge. | The goal of the '''Scenario Framework''' is to provide scenario creators simple way how to build their scenarios using World Editor without any scripting knowledge. | ||
Line 94: | Line 94: | ||
''Update Rate'' - Controls the update rate for the Dynamic Spawn/Despawn on how frequently it is being checked to perform Spawn/Despawn of Areas | ''Update Rate'' - Controls the update rate for the Dynamic Spawn/Despawn on how frequently it is being checked to perform Spawn/Despawn of Areas | ||
{{GVI|armaR|1.2.0|size= 0.75}} Voice Over Data Config - Config with voice over data that is global through the Scenario and can be used for all Voice Over actions | |||
=== Basic Hierarchy Components === | === Basic Hierarchy Components === | ||
Line 130: | Line 132: | ||
==== Example ==== | ==== Example ==== | ||
For starters, here is one of the most simple task you can create within seconds using Scenario Framework. | For starters, here is one of the most simple task you can create within seconds using Scenario Framework. | ||
Here it will be very briefly commented, all the examples are documented in more detail. <!-- (here WIP) --> | Here it will be very briefly commented, all the examples are documented in more detail. <!-- (here WIP) --> | ||
Line 203: | Line 205: | ||
This Category handles debug visuals | This Category handles debug visuals | ||
''Show Debug Shapes During Runtime'' - When enabled, there will be a colored sphere on the position of the layer. In some instances, | ''Show Debug Shapes During Runtime'' - When enabled, there will be a colored sphere on the position of the layer. In some instances, sise of a sphere is set by the trigger range or Dynamic Despawn range. | ||
==== Activation ==== | ==== Activation ==== | ||
Line 227: | Line 229: | ||
*** Min Hour - Minimal day time hour | *** Min Hour - Minimal day time hour | ||
*** Max Hour - Maximal day time hour | *** Max Hour - Maximal day time hour | ||
** | ** Weather Condition | ||
*** Min Wind Speed - Minimal wind speed in meters per second | *** Min Wind Speed - Minimal wind speed in meters per second | ||
*** Max Wind Speed - Maximal wind speed in meters per second | *** Max Wind Speed - Maximal wind speed in meters per second | ||
*** Min Rain Intensity - Minimal rain intensity | *** Min Rain Intensity - Minimal rain intensity | ||
*** Max Rain intensity - Maximal rain intensity | *** Max Rain intensity - Maximal rain intensity | ||
** {{GVI|armaR|1.2.0|size= 0.75}} Variable Value Condition | |||
*** Variable Name - Name of the variable | |||
*** Variable Value To Check - Check if the variable has set this value or not | |||
==== OnActivation ==== | ==== OnActivation ==== | ||
Line 245: | Line 250: | ||
=== Area === | === Area === | ||
See {{Link|#Area}} | See {{Link|#Area}} | ||
This variant can be used to create generic task without any specialised logic and it is expected from the Scenario Creator to control it via other means (Such as Actions). | |||
Same Attributes as {{Link|#Layer}} | Same Attributes as {{Link|#Layer}} | ||
Line 277: | Line 284: | ||
See {{Link|#LayerTask}} | See {{Link|#LayerTask}} | ||
This variant can be used to create generic task without any specialised logic and it is expected from the Scenario Creator to control it via other means (Such as Actions). | |||
No additional attributes | No additional attributes | ||
Line 396: | Line 405: | ||
This Category handles the randomisation of asset that is supposed to be spawned | This Category handles the randomisation of asset that is supposed to be spawned | ||
Randomise Per Faction - Randomise spawned asset(s) per Faction Key Attribute which needs to be filled as well. Overrides Object To Spawn Attribute. | |||
Entity Catalog Type - Select Entity Catalog type for random spawn | Entity Catalog Type - Select Entity Catalog type for random spawn | ||
Line 454: | Line 463: | ||
Slot specialised to spawn trigger prefabs <!-- (enf link here WIP) --> and then be further adjusted via {{Link|#Plugins 2|Plugins}} | Slot specialised to spawn trigger prefabs <!-- (enf link here WIP) --> and then be further adjusted via {{Link|#Plugins 2|Plugins}} | ||
No additional attributes | |||
{{ArgTitle|3|SlotPlayerTrigger|{{GVI|armaR|1.2.0}}}} | |||
Slot specialised to spawn trigger prefab already set to detect players and then be further adjusted via {{Link|#Plugins 2|Plugins}} | |||
No additional attributes | No additional attributes | ||
Line 459: | Line 474: | ||
=== SlotTask === | === SlotTask === | ||
This slot is | This slot is is supposed to spawn generic empty task where Scenario Creators are in control of the whole logic via other means (Such as Actions and so on). | ||
Other SlotTask types are inheriting from it and have specialised behaviour already in place. | |||
No additional attributes | No additional attributes | ||
Line 544: | Line 560: | ||
{{ArgTitle|3|SlotMarker|{{GVI|armaR|1.1.0}}}} | {{ArgTitle|3|SlotMarker|{{GVI|armaR|1.1.0}}}} | ||
SlotMarker is | SlotMarker is specialised to handle map markers. Be aware that we are not using the '''Object To Spawn''' but specialised attribute in the Map Marker category. | ||
No additional attributes | No additional attributes | ||
Line 570: | Line 586: | ||
==== Waypoint ==== | ==== Waypoint ==== | ||
Waypoint - This gives the option to select a waypoint from a huge variety of them. It provides a simple API for all the waypoint Prefabs located in the Waypoints directory ({{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/AI/Waypoints}}). | Waypoint - This gives the option to select a waypoint from a huge variety of them. | ||
It provides a simple API for all the waypoint Prefabs located in the Waypoints directory ({{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/AI/Waypoints}}). | |||
If you want to have Waypoints cycled, just select the Cycle Waypoint. Here you have two options: | If you want to have Waypoints cycled, just select the Cycle Waypoint. Here you have two options: | ||
Line 599: | Line 616: | ||
{{ArgTitle|3|SpawnPoint|{{GVI|armaR|1.1.0}}}} | {{ArgTitle|3|SpawnPoint|{{GVI|armaR|1.1.0}}}} | ||
Spawn Point plugin is used to manipulate Spawn point properties and provide the possibility to execute actions upon it being used. These actions will always carry the player entity that just spawned. | Spawn Point plugin is used to manipulate Spawn point properties and provide the possibility to execute actions upon it being used. | ||
These actions will always carry the player entity that just spawned. | |||
Spawn Radius - Find empty position for spawning within given radius. When none is found, entity position will be used. | Spawn Radius - Find empty position for spawning within given radius. When none is found, entity position will be used. | ||
Line 645: | Line 663: | ||
Conditions are then evaluated in the listed order and if one fails, it will not continue to the other one. | Conditions are then evaluated in the listed order and if one fails, it will not continue to the other one. | ||
* Specific Class Name Count - Used for counting how many times specific class name is inside the trigger. It works similarly like the Specific Class Names attribute but with addition of a Classname count attribute where you can set the desired number. Additionally, this will add the class name to the trigger filter from this condition so you do not have to add it again in the Specific Class Names attribute. | * Specific Class Name Count - Used for counting how many times specific class name is inside the trigger. It works similarly like the Specific Class Names attribute but with addition of a Classname count attribute where you can set the desired number.<!-- | ||
* Specific Prefab Count - Used for counting how many times specific prefab is inside the trigger. It works similarly like the Prefab Filter attribute but with addition of a Prefab count attribute where you can set the desired number. Additionally, this will add the prefab to the trigger filter from this condition so you do not have to add it again in the Prefab Filter attribute. | --> Additionally, this will add the class name to the trigger filter from this condition so you do not have to add it again in the Specific Class Names attribute. | ||
* Specific Prefab Count - Used for counting how many times specific prefab is inside the trigger.<!-- | |||
--> It works similarly like the Prefab Filter attribute but with addition of a Prefab count attribute where you can set the desired number.<!-- | |||
--> Additionally, this will add the prefab to the trigger filter from this condition so you do not have to add it again in the Prefab Filter attribute. | |||
Search Vehicle Inventory - Entities (usually items) that are in inventory of vehicles are not detected by triggers in default. However, this Plugin added the such behavior as it is sometimes needed to detect entities that are situated in inventories of vehicles and this attribute allows just that. | Search Vehicle Inventory - Entities (usually items) that are in inventory of vehicles are not detected by triggers in default. | ||
However, this Plugin added the such behavior as it is sometimes needed to detect entities that are situated in inventories of vehicles and this attribute allows just that. | |||
Once - If set to true, the trigger will be activated only once if conditions are true. If set to false, the trigger will get activated every time its conditions are true. | Once - If set to true, the trigger will be activated only once if conditions are true. If set to false, the trigger will get activated every time its conditions are true. | ||
Line 740: | Line 762: | ||
Return value: <enforce inline>IEntity</enforce> | Return value: <enforce inline>IEntity</enforce> | ||
{{ArgTitle|3|GetArrayOfPlayers|{{GVI|armaR|1.2.0}}}} | |||
This Getter will return array of player entities with the possibility to filter them using Faction Keys. | |||
Return value: <enforce inline>array<IEntity></enforce> | |||
* Faction Keys - (Optional) You can filter players by putting the Faction Key of desired faction(s); if not used, all factions will be eligible | |||
=== GetClosestPlayerEntity === | === GetClosestPlayerEntity === | ||
Line 748: | Line 778: | ||
* Getter - Supposed to be a getter that will return some entity from which position you want to find the closest player | * Getter - Supposed to be a getter that will return some entity from which position you want to find the closest player | ||
* {{GVI|armaR|1.2.0|size= 0.75}} Faction Keys - (Optional) You can filter players by putting the Faction Key of desired faction(s); if not used, all factions will be eligible | |||
=== GetCountEntitiesInTrigger === | === GetCountEntitiesInTrigger === | ||
Line 816: | Line 847: | ||
=== GetTask === | === GetTask === | ||
This is one of the most powerful getter to use as it will allow you to get get access to the task that the LayerTask has attached to it. | This is one of the most powerful getter to use as it will allow you to get get access to the task that the LayerTask has attached to it. | ||
Line 821: | Line 853: | ||
* Layer Task Name - name of the wanted LayerTask from which to get the attached Task | * Layer Task Name - name of the wanted LayerTask from which to get the attached Task | ||
{{ArgTitle|3|GetVoiceOverActorEntity|{{GVI|armaR|1.2.0}}}} | |||
This getter will allow to get Actor enum and Actor Entity intended for Voice Over Actions | |||
Return value: <enforce inline>IEntity</enforce> | |||
* Actor - Actor enum in VO system | |||
* Actor Entity - Entity playing the voiceover. | |||
Line 848: | Line 889: | ||
Getter - Here you have to specify which SlotWaypoint you want to use for the AI (Using GetLayerBase) | Getter - Here you have to specify which SlotWaypoint you want to use for the AI (Using GetLayerBase) | ||
{{GVI|armaR|1.2.0|size= 0.75}} Add On Top Of Queue - True checked, this waypoint will be added on a first position. Otherwise it will append it at the end of the waypoint queue. | |||
{{GVI|armaR|1.2.0|size= 0.75}} Clear Previous Waypoints - True checked, previous waypoints should be cleared. | |||
===== On Waypoint Completed ===== | ===== On Waypoint Completed ===== | ||
Line 856: | Line 901: | ||
Actions On Waypoint Completed - Actions that will get executed upon waypoint completition | Actions On Waypoint Completed - Actions that will get executed upon waypoint completition | ||
{{GVI|armaR|1.2.0|size= 0.75}} Remove On Completed - Remove the event on action completion | |||
===== On Threat State Changed ===== | ===== On Threat State Changed ===== | ||
Line 863: | Line 910: | ||
Actions On Waypoint Completed - Actions that will get executed upon Threat state being changed to desired state | Actions On Waypoint Completed - Actions that will get executed upon Threat state being changed to desired state | ||
{{ArgTitle|4|Set Max Autonomous Distance|{{GVI|armaR|1.2.0}}}} | |||
Set max autonomous distance of AI group. | |||
Investigation Distance - Distance in metres | |||
===== Set Skill ===== | ===== Set Skill ===== | ||
Line 945: | Line 997: | ||
It uses the Prefab Filter (a scripted class) to add prefabs of items and their count into the target inventory | It uses the Prefab Filter (a scripted class) to add prefabs of items and their count into the target inventory | ||
{{GVI|armaR|1.2.0|size= 0.75}} ID - Name of the entity used for identification. If entity with given name exists suffix _numberOfAttemptToNameEntity is added. | |||
=== Append Briefing Entry Text === | === Append Briefing Entry Text === | ||
Line 1,023: | Line 1,077: | ||
* Overriden Game Over Type - If Override Game Over Type is set to true, you can choose which type will be used for the end. | * Overriden Game Over Type - If Override Game Over Type is set to true, you can choose which type will be used for the end. | ||
{{ArgTitle|3|Action Based On Conditions|{{GVI|armaR|1.2.0}}}} | |||
This is intended for advanced usages and it is expected some scripting knowledge. It will allow you to call methods on certain objects with parameters. | This action allows you execute other actions if certain conditions are fullfilled at the time of Action activation. It performs this check only once, not periodically. | ||
* Activation Conditions - Conditions that will be evaluated in given order | |||
* Actions - Which actions will be executed if conditions are fullfilled at the time of Action activation. | |||
=== Execute Function === | |||
This is intended for advanced usages and it is expected some scripting knowledge. It will allow you to call methods on certain objects with parameters. | |||
* Object To Call The Method From - It is basically a getter, but it will limit you with the methods depending on which class you will choose. You can for example trigger a despawn or repeated spawn on Slots if getting them that way and using their methods. | * Object To Call The Method From - It is basically a getter, but it will limit you with the methods depending on which class you will choose. You can for example trigger a despawn or repeated spawn on Slots if getting them that way and using their methods. | ||
Line 1,050: | Line 1,111: | ||
* Counter Name - Name of the target Counter | * Counter Name - Name of the target Counter | ||
{{ArgTitle|3|Decrease Logic Counter|{{GVI|armaR|1.2.0}}}} | |||
This action decreases Logic Counter by 1 | |||
* Counter Name - Name of the target Counter | |||
{{ArgTitle|3|On User Action Event|{{GVI|armaR|1.2.0}}}} | |||
This action allows you to link it to existing user actions on some other entities and based on the User Action Event, you can execute other actions. | |||
* Getter - Target entity that has the UserAction on it (Optional if action is attached on Slot that spawns target entity) | |||
* Action ID - Corresponding to the action attached on ActionsManagerComponent on target entity | |||
* Getter User - Only listen to changes when UserAction is activated by specific Entity (Optional - leave it empty to trigger by anyone) | |||
* User Action Event - On which user action event this ScenarioFramework action will be triggered | |||
* Actions - Which actions will be executed based on User Action Event settings | |||
{{ArgTitle|3|Voice Over Play Line|{{GVI|armaR|1.2.0}}}} | |||
This action allows you to play single line from the Voice Over Data Config. | |||
* Voice Over Data Config - Config with voice over data for this action. | |||
* Line Name - Name of the line as defined in Voice Over Data Config | |||
* Getter - Entity playing the voiceover. If left empty, default will be player character. Reminder: Related .acp needs to be present in the {{Link/Enfusion|armaR|SCR_CommunicationSoundComponent}} of target entity. | |||
* Actions - Actions that will be triggered once Line finishes playing | |||
{{ArgTitle|3|Voice Over Play Sequence|{{GVI|armaR|1.2.0}}}} | |||
This action allows you to play sequence of lines from the Voice Over Data Config | |||
* Voice Over Data Config - Config with voice over data for this action. | |||
* Sequence Name - Name of the sequence as defined in Voice Over Data Config | |||
* Actors - Entities playing the voiceover. If left empty, default will be player character. Reminder: Related .acp needs to be present in the SCR_CommunicationSoundComponent of target entity. | |||
* Actions - Actions that will be triggered once Sequence finishes playing | |||
{{ArgTitle|3|Intro Voiceline Based On Tasks|{{GVI|armaR|1.1.0}}}} | {{ArgTitle|3|Intro Voiceline Based On Tasks|{{GVI|armaR|1.1.0}}}} | ||
Line 1,062: | Line 1,157: | ||
* Getter - Any getter that returns an Entity (see {{Link|#Getters}}) | * Getter - Any getter that returns an Entity (see {{Link|#Getters}}) | ||
* | * Randomise Ragdoll - If target entity is Character, it will randomise ragdoll upon death | ||
=== Lock or Unlock All Target Vehicles In Trigger === | === Lock or Unlock All Target Vehicles In Trigger === | ||
Line 1,189: | Line 1,284: | ||
* Fuel Percentage - Percentage of a fuel to be set | * Fuel Percentage - Percentage of a fuel to be set | ||
{{ArgTitle|3|Set Supply Percentage|{{GVI|armaR|1.2.0}}}} | |||
This action allows you to set specific value to specific signal on target entity. | |||
* Getter - Target entity to manipulate supply (Optional if action is attached on Slot that spawns target entity) | |||
* Supply Percentage - Percentage of a supply to be set. | |||
{{ArgTitle|3|Set Signal|{{GVI|armaR|1.2.0}}}} | |||
This action allows you to set specific value to specific signal on target entity. | |||
* Getter - Entity to set the signal on (Optional if action is attached on Slot that spawns target entity) | |||
* Signal - Signal to set | |||
* Value - Value to set | |||
{{ArgTitle|3|Create Variable|{{GVI|armaR|1.2.0}}}} | |||
* Title - Title of the hint | This action allows you to create specific variable to specific value. | ||
* Text - Text in the body of the hint | |||
* Variable Name - Name of the variable | |||
* Variable Value - Value of the variable | |||
{{ArgTitle|3|Set Variable|{{GVI|armaR|1.2.0}}}} | |||
This action allows you to set specific variable to specific value. | |||
* Variable Name - Name of the variable | |||
* Variable Value - Value of the variable | |||
{{ArgTitle|3|Get Variable Value|{{GVI|armaR|1.2.0}}}} | |||
This action gets the Variable Name. | |||
* Variable Name - Name of the variable | |||
{{ArgTitle|3|Item Safeguard|{{GVI|armaR|1.2.0}}}} | |||
This action allows you to attach Item Safeguard logic on any item that you might regard as important and in case of it being in a car that gets destroyed, or in player inventory and similar cases, it this item will be dropped on the ground. | |||
It also prevents Garbage System from deleting this item. It also allows you to execute actions in situations when item is dropped or possessed. | |||
* Getter - Target entity (Optional if action is attached on Slot that spawns target entity) | |||
* Actions On Item Dropped - Actions that will be executed when target item is dropped | |||
* Actions On Item Possessed - Actions that will be executed when target item is possesed by someone/something | |||
=== Set Mission End Screen === | |||
Sets mission end screen based on the Game Over Type attribute and it can also provide which Subtitle will be used | |||
* Game Over Type - Which Game Over Type will be set upon using this action. | |||
* Subtitle - Which subtitle text will be used | |||
=== Show Hint === | |||
Shows a very simple hint with Title and Text for a certain duration. | |||
* Title - Title of the hint | |||
* Text - Text in the body of the hint | |||
* Timeout - duration in seconds how long will the hint stay before disappearing | * Timeout - duration in seconds how long will the hint stay before disappearing | ||
* Faction Key - For which Faction these hints will be shown | * Faction Key - For which Faction these hints will be shown | ||
Line 1,260: | Line 1,399: | ||
* Delay In Seconds - How long it will wait before activating set actions. | * Delay In Seconds - How long it will wait before activating set actions. | ||
* Delay In Seconds Max - If this is set to a number larger than Delay In Seconds, it will | * Delay In Seconds Max - If this is set to a number larger than Delay In Seconds, it will randomise resulted delay between these two values | ||
* Looped - If true, it will activate actions in looped manner using Delay settings as the frequency. If | * Looped - If true, it will activate actions in looped manner using Delay settings as the frequency. If randomised, it will randomise the time each time it loops. | ||
* Actions - Actions to be activated after the delay has passed. | * Actions - Actions to be activated after the delay has passed. | ||
Line 1,267: | Line 1,406: | ||
== QRF System == | == QRF System == | ||
'''QRF''' stands for '''Q'''uick '''R'''eaction '''F'''orce and is a unit that is capable to respond to certain actions as a response in a manner of minutes or hours depending on the | '''QRF''' stands for '''Q'''uick '''R'''eaction '''F'''orce and is a unit that is capable to respond to certain actions as a response in a manner of minutes or hours depending on the sise and application of that unit. | ||
=== Usage === | === Usage === | ||
Line 1,296: | Line 1,435: | ||
There is a continuous check that is being triggered every 4 seconds in default (can be adjusted on GameMode component called {{Link/Enfusion|armaR|SCR_GameModeCombatOpsManager}}) for all the Areas that have Dynamic Spawn/Despawn enabled. | There is a continuous check that is being triggered every 4 seconds in default (can be adjusted on GameMode component called {{Link/Enfusion|armaR|SCR_GameModeCombatOpsManager}}) for all the Areas that have Dynamic Spawn/Despawn enabled. | ||
Furthermore, when Dynamic Spawn is initiated, it is spawning its children with slight delays between them in order to avoid huge stutters when a lot of different things are spawned at once, so upon successful Dynamic Spawn initiation, it can take few seconds for the Area to completely spawn (depending on the complexity of each Area setup). | Furthermore, when Dynamic Spawn is initiated, it is spawning its children with slight delays between them in order to avoid huge stutters when a lot of different things are spawned at once, so upon successful Dynamic Spawn initiation, it can take few seconds for the Area to completely spawn (depending on the complexity of each Area setup). | ||
Each Area has a range that is then compared to the distance from player characters. | Each Area has a range that is then compared to the distance from player characters. | ||
If just one player is within a range, Area will spawn all of its content that has Activation Type {{hl|SAME_AS_PARENT}} set in workbench or this activation was changed in runtime via ScenarioFrameworkAction. | If just one player is within a range, Area will spawn all of its content that has Activation Type {{hl|SAME_AS_PARENT}} set in workbench or this activation was changed in runtime via ScenarioFrameworkAction. | ||
Runtime change is the case for QRF units in CombatOps on Arland Scenario where they are initially not spawned with the Area but via trigger. | Runtime change is the case for QRF units in CombatOps on Arland Scenario where they are initially not spawned with the Area but via trigger. | ||
Once the trigger spawns these units, it also changes the Activation Type to SAME_AS_PARENT so when said Area would despawn and then spawn again, it will spawn these units as well. | Once the trigger spawns these units, it also changes the Activation Type to SAME_AS_PARENT so when said Area would despawn and then spawn again, it will spawn these units as well. | ||
On layers that are under the Area, there is an option to "Exclude from Dynamic Despawn" which if set to true will prevent said layer to despawn once it is spawned. | On layers that are under the Area, there is an option to "Exclude from Dynamic Despawn" which if set to true will prevent said layer to despawn once it is spawned. | ||
This is used for example for Spawn Points, where we want to spawn them, but then we are not dynamically despawning them using this system. | This is used for example for Spawn Points, where we want to spawn them, but then we are not dynamically despawning them using this system. | ||
Line 1,310: | Line 1,453: | ||
Slots and AI Slots retain their position where their spawned entity was located before Spawn/Despawn, so for example AI units that moved to different position will get their position saved and once respawned, they will be spawned on their previously saved position. | Slots and AI Slots retain their position where their spawned entity was located before Spawn/Despawn, so for example AI units that moved to different position will get their position saved and once respawned, they will be spawned on their previously saved position. | ||
If AI units are killed, their bodies will remain there for the GarbageCollector to handle and for the vehicles, it will remove their wreck and destroyed wreck will not be spawned again. | If AI units are killed, their bodies will remain there for the GarbageCollector to handle and for the vehicles, it will remove their wreck and destroyed wreck will not be spawned again. | ||
== Save and Load == | == Save and Load == | ||
Line 1,521: | Line 1,663: | ||
=== TaskDefendArea === | === TaskDefendArea === | ||
Goal: Create a Task Defend Area for the US Faction. Goal will be to repel enemy forces and have majority at the end of the task countdown. | ''Goal:'' | ||
Create a Task Defend Area for the US Faction. | |||
Goal will be to repel enemy forces and have majority at the end of the task countdown. | |||
''Setup:'' | |||
It is achieved by having an {{Link|#Area 2|Area}} with {{Link|#LayerTaskDefend}} that has two layers under it. | |||
{{hl|Attacker_USSR}} which is defined in '''Attacker Layer Names''' contains three SlotAI that each will spawn Unarmed USSR Soldier on repeated basis. | {{hl|Attacker_USSR}} which is defined in '''Attacker Layer Names''' contains three SlotAI that each will spawn Unarmed USSR Soldier on repeated basis. | ||
Each slot has the Repeated Spawn enabled and the layer has it enabled as well and set it to spawn repeatedly 2x each 15 seconds. | Each slot has the Repeated Spawn enabled and the layer has it enabled as well and set it to spawn repeatedly 2x each 15 seconds. | ||
{{hl|Defender_US}} layer then contains SlotTrigger that will spawn Trigger, Slot1 which spawns M60 machinegun turret and SlotDefend which will not spawn anything but the trigger is set there instead. | {{hl|Defender_US}} layer then contains SlotTrigger that will spawn Trigger, Slot1 which spawns M60 machinegun turret and SlotDefend which will not spawn anything but the trigger is set there instead. | ||
LayerTaskDefend also has Faction Settings set in a way that the attacking faction is considered USSR and it counts all the characters. | LayerTaskDefend also has Faction Settings set in a way that the attacking faction is considered USSR and it counts all the characters. | ||
Defending faction is set to be US and it will count all the characters as well. | Defending faction is set to be US and it will count all the characters as well. | ||
Defend time is set to 60 seconds and Defender percentage ratio is set to 0.51 which means that at the evaluation, there needs to be a majority of defenders in comparison to attackers. | Defend time is set to 60 seconds and Defender percentage ratio is set to 0.51 which means that at the evaluation, there needs to be a majority of defenders in comparison to attackers. | ||
Mechanics: Area spawns LayerTaskDefend which spawns Attacker_USSR layer that will spawn 3 Unarmed USSR Soldiers initially and 15 seconds later, it will spawn additional wave using the Repeated Spawn feature. | ''Mechanics:'' | ||
Area spawns LayerTaskDefend which spawns Attacker_USSR layer that will spawn 3 Unarmed USSR Soldiers initially and 15 seconds later, it will spawn additional wave using the Repeated Spawn feature. | |||
Alongside it, Defender_US layer will spawn SlotTrigger which will spawn trigger that will be used to detect characters inside the designated area. | Alongside it, Defender_US layer will spawn SlotTrigger which will spawn trigger that will be used to detect characters inside the designated area. | ||
Slot1 then spawns M60 machinegun that can be used to quickly eliminate all the attackers. SlotDefend then spawns trigger. | |||
Area needs to be cleared out of the enemy presence in ratio that the majority of the units inside need to be of US faction. If it is below this ratio, task will fail. | Slot1 then spawns M60 machinegun that can be used to quickly eliminate all the attackers. | ||
SlotDefend then spawns trigger. | |||
Area needs to be cleared out of the enemy presence in ratio that the majority of the units inside need to be of US faction. | |||
If it is below this ratio, task will fail. | |||
=== TaskDefendAreaAndTarget === | === TaskDefendAreaAndTarget === | ||
Goal: Create a Task Defend Area and Target for the US Faction. This will be a combination of Defend Area and Defend Target and indeed both conditions will apply at the same time. | ''Goal:'' | ||
Create a Task Defend Area and Target for the US Faction. | |||
This will be a combination of Defend Area and Defend Target and indeed both conditions will apply at the same time. | |||
''Setup:'' | |||
It is achieved by having an {{Link|#Area 2|Area}} with {{Link|#LayerTaskDefend}} that has two layers under it. | |||
Attacker_USSR which is defined in Attacker Layer Names contains three SlotAI that each will spawn Unarmed USSR Soldier on repeated basis. | Attacker_USSR which is defined in Attacker Layer Names contains three SlotAI that each will spawn Unarmed USSR Soldier on repeated basis. | ||
Each slot has the Repeated Spawn enabled and the layer has it enabled as well and set it to spawn repeatedly twice every 15 seconds. | Each slot has the Repeated Spawn enabled and the layer has it enabled as well and set it to spawn repeatedly twice every 15 seconds. | ||
Defender_US layer then contains SlotTrigger that will spawn Trigger, Slot1 which spawns M60 machinegun turret and SlotDefend which spawns Unarmed US Soldier. | Defender_US layer then contains SlotTrigger that will spawn Trigger, Slot1 which spawns M60 machinegun turret and SlotDefend which spawns Unarmed US Soldier. | ||
LayerTaskDefend also has Faction Settings set in a way that the attacking faction is considered USSR and it counts all the characters. | LayerTaskDefend also has Faction Settings set in a way that the attacking faction is considered USSR and it counts all the characters. | ||
Defending faction is set to be US and it will count all the characters as well. | Defending faction is set to be US and it will count all the characters as well. | ||
Defend time is set to 60 seconds and Defender percentage ratio is set to 0.51 which means that at the evaluation, there needs to be majority of defenders in comparison to attackers. | Defend time is set to 60 seconds and Defender percentage ratio is set to 0.51 which means that at the evaluation, there needs to be majority of defenders in comparison to attackers. | ||
Mechanics: Area spawns LayerTaskDefend which spawns Attacker_USSR layer that will spawn 3 Unarmed USSR Soldiers initially and 15 seconds later, it will spawn additional wave using the Repeated Spawn feature. | ''Mechanics:'' | ||
Area spawns LayerTaskDefend which spawns Attacker_USSR layer that will spawn 3 Unarmed USSR Soldiers initially and 15 seconds later, it will spawn additional wave using the Repeated Spawn feature. | |||
Alongside it, Defender_US layer will spawn SlotTrigger which will spawn trigger that will be used to detect characters inside the designated area. | Alongside it, Defender_US layer will spawn SlotTrigger which will spawn trigger that will be used to detect characters inside the designated area. | ||
Slot1 then spawns M60 machinegun that can be used to quickly eliminate all the attackers. SlotDefend then spawns Unarmed US Soldier that is supposed to be defended. | |||
Slot1 then spawns M60 machinegun that can be used to quickly eliminate all the attackers. | |||
SlotDefend then spawns Unarmed US Soldier that is supposed to be defended. | |||
This combines both conditions so the whole time the Unarmed US Soldier needs to be kept alive and at the end of the timer, area needs to be cleared out of the enemy presence in ratio that the majority of the units inside need to be of US faction. | This combines both conditions so the whole time the Unarmed US Soldier needs to be kept alive and at the end of the timer, area needs to be cleared out of the enemy presence in ratio that the majority of the units inside need to be of US faction. | ||
If one of the conditions will fail, it will fail the task. | If one of the conditions will fail, it will fail the task. | ||
=== TaskClearArea === | === TaskClearArea === | ||
Goal: Create a Task Clear Area for US Faction. There is some area that is occupied by enemy forces and you need to clear it out. | ''Goal:'' | ||
Create a Task Clear Area for US Faction. | |||
There is some area that is occupied by enemy forces and you need to clear it out. | |||
''Setup:'' | |||
It is achieved by having an {{Link|Area 2|Area}} with {{Link|#LayerTaskClearArea}} that has two layers under it. | |||
First layer holds SlotClearArea which spawns TriggerDominance <!-- (link WIP) --> trigger that is set in a way that it is activated by Player and detects all {{Link/Enfusion|armaR|SCR_ChimeraCharacter}}. | First layer holds SlotClearArea which spawns TriggerDominance <!-- (link WIP) --> trigger that is set in a way that it is activated by Player and detects all {{Link/Enfusion|armaR|SCR_ChimeraCharacter}}. | ||
Second Layer contains 3x SlotAI that will spawn Unarmed USSR soldiers. | Second Layer contains 3x SlotAI that will spawn Unarmed USSR soldiers. | ||
Mechanics: Area spawns LayerTaskClearArea which spawns Layer that spawns SlotClearArea which spawns TriggerDominance that is used to periodically check the set area for the enemy presence. | ''Mechanics:'' | ||
Area spawns LayerTaskClearArea which spawns Layer that spawns SlotClearArea which spawns TriggerDominance that is used to periodically check the set area for the enemy presence. | |||
Then Layer_AI spawns 3 SlotAIs that each spawns 1 Unarmed USSR Soldier. In order to finish this task, you need to clear out all the enemies in the area. | Then Layer_AI spawns 3 SlotAIs that each spawns 1 Unarmed USSR Soldier. In order to finish this task, you need to clear out all the enemies in the area. | ||
Line 1,601: | Line 1,795: | ||
Upon finishing it, it will also end the mission via OnTaskFinished action End Mission. | Upon finishing it, it will also end the mission via OnTaskFinished action End Mission. | ||
It has the endScreenCounter as well that is set in a way that upon each task finish, it increases its count up until 4. | It has the endScreenCounter as well that is set in a way that upon each task finish, it increases its count up until 4. | ||
OnIncrease actions are then set with Compare Counter And Execute with nested action to Set Mission End Screen. | OnIncrease actions are then set with Compare Counter And Execute with nested action to {{Link|#Set Mission End Screen}}. | ||
Task Kill is very similar to TaskKill Sample and those 4 BrickWall_01_4m_1 surround its target. | Task Kill is very similar to TaskKill Sample and those 4 BrickWall_01_4m_1 surround its target. | ||
Move is the same as TaskMove Sample. | Move is the same as TaskMove Sample. | ||
Line 1,612: | Line 1,806: | ||
=== DynamicDespawn === | === DynamicDespawn === | ||
Goal: | ''Goal:'' | ||
This Sample is here to showcase how to use the Dynamic Spawn/Despawn feature. | |||
''Setup:'' | |||
Goal: Create a Task to Deliver specific vehicle prefabs in specific counts into the trigger for US Faction. | It is achieved by having Area that has three layers in the hierarchy. | ||
Area has Dynamic Despawn attribute enabled and Dynamic Despawn Range set to 30. | |||
Layer "AI" that has several AI slots that each is setup to spawn either group or singular unit. | |||
LayerTaskDestroy "LayerTaskDestroy_1" which has Spawn Children attribute set to ''RANDOM_ONE'' that can spawn either Layer1 or Layer2 which each would spawn SlotDestroy that spawns different vehicle. | |||
Layer "RandomFlag" is set to ''RANDOM_ONE'' as well and it will randomly pick one of three Slots that each has different flag set (US, USSR or FIA). | |||
On a GameMode(SF-Tutorial-Empty -> default -> GameModeSF1) component called SCR_GameModeSFManager, Dynamic Despawn attribute is set to true and Update Rate is lowered to 1 second from 4 seconds for the Sample purposes. | |||
''Mechanics:'' | |||
At first, ''Area'' is Spawned but it does not do anything and does not spawn any children until you move player character inside its Dynamic Despawn Range which is set to 30 meters. | |||
This check is in Sample worlds performed every 1 second, but '''it is recommended to have it set around 4 seconds in real scenarios to save up the performance.''' | |||
''Area'' is also set to visualise this range to make it easier for you to see the range. | |||
Upon entering, Dynamic Spawn will be triggered that will spawn ''Layer "AI"'' with all the AI slots and their groups. | |||
Then ''LayerTaskDestroy "LayerTaskDestroy_1"'' will perform random pick of the child layer and spawn selected task with vehicle to be destroyed. | |||
Lastly, ''RandomFlag layer'' is spawned where again, one of three slots will be spawned. | |||
All the random selections are saved and layers will remember it. | |||
Upon leaving the range, everything inside will get despawned. | |||
Upon reentry, everything will get spawned in back again, random selection will use the saved layers, positions of vehicles/AIs will be also set to where these entites were before and if some of it got killed/destroyed, it will not spawn (see {{Link|#Dynamic Spawn/Despawn}}). | |||
=== DetectPrefabInTrigger === | |||
Goal: Create a Task to Deliver specific vehicle prefabs in specific counts into the trigger for US Faction. | |||
Setup: It is achieved by having Area that spawns Layer1 which spawns Slots that each will spawn vehicles. | Setup: It is achieved by having Area that spawns Layer1 which spawns Slots that each will spawn vehicles. | ||
Line 1,645: | Line 1,862: | ||
=== DeliverWeaponsToCrate === | === DeliverWeaponsToCrate === | ||
Goal: Create a Task Deliver weapons into crate for US Faction. | ''Goal:'' | ||
Create a Task Deliver weapons into crate for US Faction. | |||
''Setup:'' | |||
It is achieved by having Area that spawns Layer1 with Slot1 that is set to detect a prefab of a crate set in Object To Spawn attribute via Use Existing World Asset attribute. | |||
Then It has Plugin On Inventory Change attached to (see in the image below) it and set Actions On Item Added to Count Inventory Items And Execute Action which then can execute Change Task State and Remove Item From Inventory actions. | Then It has Plugin On Inventory Change attached to (see in the image below) it and set Actions On Item Added to Count Inventory Items And Execute Action which then can execute Change Task State and Remove Item From Inventory actions. | ||
LayerTaskMove then spawns SlotMoveTo that spawns trigger which is set to detect a medical crate 10x which will never be in the scenario spawned to create this "dummy" task. | LayerTaskMove then spawns SlotMoveTo that spawns trigger which is set to detect a medical crate 10x which will never be in the scenario spawned to create this "dummy" task. | ||
Then outside of the Scenario Framework, there is a WeaponsCrate spawned and adjusted to have inventory. Lastly there are 5x M9 Handgun spawned around the crate. | Then outside of the Scenario Framework, there is a WeaponsCrate spawned and adjusted to have inventory. Lastly there are 5x M9 Handgun spawned around the crate. | ||
Mechanics: Area spawns Layer1 which spawns Slot1 that finds the WeaponsCrate in the vicinity and attaches the Plugin On Inventory Change to it that is set to detect 5x M9 Handgun inside it and upon reaching desired count, it will finish the objective and remove those weapons from the crate. | |||
''Mechanics:'' | |||
Area spawns Layer1 which spawns Slot1 that finds the WeaponsCrate in the vicinity and attaches the Plugin On Inventory Change to it that is set to detect 5x M9 Handgun inside it and upon reaching desired count, it will finish the objective and remove those weapons from the crate. | |||
LayerTaskMove spawns SlotMoveTo but that is just used as "dummy" task to have some to work with and set in a way that conditions cannot be fulfilled in this scenario any other way than by that Scenario Framework action. | LayerTaskMove spawns SlotMoveTo but that is just used as "dummy" task to have some to work with and set in a way that conditions cannot be fulfilled in this scenario any other way than by that Scenario Framework action. | ||
Line 1,671: | Line 1,900: | ||
Trigger | Trigger | ||
{{ArgTitle|3|GenericTask|{{GVI|armaR|1.2.0}}}} | |||
Goal: Create a Task linked to user action that will display the hint and finish the task - in this case, target user action will be our infamous Flush the toilet to complete the Scenario. | |||
Setup: It is achieved by having an Area with LayerTask which has SlotTask that has On User Action Event added to the Activation Actions under the OnInit category. | |||
This user action is linked to a namedToilet entity that is placed in the world outside the ScenarioFramework hierarchy. | |||
Action ID is set to 0 as the Flush the toilet action has this ID in this case. | |||
Then there are two additional actions in the Actions list that will be activated upon someone using linked user action. | |||
First will display a hint using Show Hint. Second will change the task state to FINISHED for the LayerTask. | |||
Lastly, the OnTaskFinish has Action Wait and Execute that after 2 seconds will activate End Mission Action. | |||
Mechanics: Area spawns the LayerTask which spawns SlotTask that will attach the User Action Event listener on toilet. | |||
Upon someone activating the user action, it will show a hint, then finish a task and then it will finish the mission. | |||
In order to finish this task, you need to flush the toilet. | |||
{{ArgTitle|3|Waypoints|{{GVI|armaR|1.2.0}}}} | |||
Goal: Create a sequence of different waypoints for the AI group to complete. | |||
Setup: It is achieved by having an Area that has Layer Layer1 which has Slot1 that spawns UH-1H helicopter that names it namedHeli for future reference, then Slot3 spawns UAZ-469 and lastly SlotAI1 which spawns US Fire Team. | |||
Then there is Layer Waypoints that contains various SlotWaypoints. | |||
SlotAI1 has modified attribute category OnInit where in the Activation Actions, there are defined actions to assign waypoints to the AI group and upon completing each waypoint, it adds another in said sequence. | |||
Outside the ScenarioFramework hierarchy, there is BarGate. | |||
Mechanics: Area Spawns Layer1 that spawns UAZ-469, UH-1H and US Fire Team. Then Layer Waypoints spawns waypoints. | |||
These waypoints are then assigned to the AI group one by one and next one is assigned after completing the previous one. | |||
First, Fire Team is ordered to get in UH-1H and then get out. After that, they are ordered to move to the crossroad. | |||
Shortly after that, they are ordered to open a bar gate and then get in UAZ-469 and drive on the crossroad where they get out. | |||
There is no end state, this group will finish waypoints in given order. | |||
=== LastStand === | === LastStand === |
Latest revision as of 21:39, 22 July 2024
The goal of the Scenario Framework is to provide scenario creators simple way how to build their scenarios using World Editor without any scripting knowledge.
It is expected that scenario creators are already familiar with the basic usage of World Editor.
However, most of the work is done by drag and dropping components into the world and adjusting the attributes which is the least difficult and with using just that, you can build even more complex scenarios.
As always, people with scripting knowledge can modify and expand the framework to suit their needs.
Contents
|
Prerequisites
In order to properly work with the Scenario Framework, you need to have several things already set in your world that you are already working on.
For this, we have created a very simple way how to setup any functional world on its own using the World Editor Plugin called Game Mode Setup.
Here, you can choose from several Game Mode Templates, but for the Scenario Framework, you will want to use the ScenarioFramework.conf variant.
However if you do not want to use this Prefab, note that it contains the following Prefabs that are needed for an optimal functionality of your scenario:
- GameModeSF.et
- SCR_AIWorld.et
- FactionManager_USxUSSR.et
- LoadoutManager_USxUSSR.et
- RadioManager.et
- PerceptionManager.et
- ScriptedChatEntity.et
- TaskManager.et
and in the Game Mode's Mission Header, SCR_MissionHeaderCombatOps is used.
Basics
Scenario Framework has a hierarchical setup which upon getting familiar with, you will be able to build your scenarios very quickly and do many interesting things.
Once you have your world properly setup with all the requirements listed above, you are ready to build.
GameMode Manager Settings
The core entity of each Scenario is the GameMode entity.
In the case of Scenario Framework, it is recommended to use the GameModeSF.et Prefab.
It has many components already added to it and they can be adjusted according to your needs.
It is recommended to go through them all and explore the possibilities that each component gives you.
The most important component on this GameMode is the SCR_GameModeSFManager which allows you to use the properties listed below.
Tasks
Task Types Available - Setup a random task generation on scenario start by setting which Task Types are available
Max Number Of Tasks - Maximal number of tasks that will get spawned using this system
After Tasks Init Actions - Actions that will be activated after task generation is finished (see Actions)
Here is the example from CombatOps Arland that has 4 possible Task Types set but only 3 of them will be randomly selected upon scenario start
Debug
Debug can easily allow you to pick only certain Area and Layer Tasks for you to debug in the midst of your scenario.
Useful in a scenario with many elements and depending on randomisation.
1.1.0 Core Areas - List of Core Areas that are essential for the Scenario to spawn alongside Debug Areas
1.1.0 Debug Areas - List of Areas that will be spawned (Optionally with desired Layer Task) as opposed to leaving it to random generation
Dynamic Spawn/Despawn
Dynamic Despawn - In default, it is set to false, but upon setting it to true, it will enable the Dynamic Despawn feature
Update Rate - Controls the update rate for the Dynamic Spawn/Despawn on how frequently it is being checked to perform Spawn/Despawn of Areas
1.2.0 Voice Over Data Config - Config with voice over data that is global through the Scenario and can be used for all Voice Over actions
Basic Hierarchy Components
After setting up the GameMode entity and possibly other entities (listed above) we can get creative with the main part of the Scenario Framework and that are all the pieces from which the scenarios are built from.
We will go very briefly over the basic hierarchy of how it works, and detailed information about each component are provided.
Area
At top of the hierarchy stands so called Area.
Idea behind this is that your scenario is divided into several areas (as you can for example see on CombatOps Arland) and each area is handling its own things and has its purpose.
Area has all the other components under it in its own hierarchy and it also serves with the Dynamic Spawn/Despawn as an enclosure.
Layer
Right under the Area is the so-called Layer.
Note that there is a "basic" Layer that serves as a hierarchical tool to further divide things and it can contain other layers or slots.
It is one of the most powerful entities that you will be using when building your scenario because it allows you to set the layout exactly how you will want it and knowing how it works will allow you to create all sorts of scenarios.
LayerTask
One of the types of the Layer is a LayerTask which has many subtypes depending on the task it is focused on and it serves to handle the Task creation and workflow.
Slot
At the bottom of the hierarchy, there is a Slot.
"Basic" Slot allows you to spawn any prefab which is the main purpose of it, but you do not have to spawn anything and attach some components onto it as well (for example smart action component for the AI).
It has other subtypes focused on the AI and also the SlotTask which is designed to work in sync with the corresponding LayerTask.
Logic
There are also Logic entities (LogicCounter, LogicOR and LogicSwitch) that are similar to Slots but their main purpose is to receive inputs and activate actions further down the line to allow you to design more sophisticated workflows
Example
For starters, here is one of the most simple task you can create within seconds using Scenario Framework.
Here it will be very briefly commented, all the examples are documented in more detail.
At the top, there is Area, right under it is LayerTaskMove intended to encapsulate the SlotMoveTo which spawns said task.
In this view, we have three columns.
In the left column, there is an unique name of this entity.
In the middle, there is a name of the Prefab and on the right column, it is the class.
Tutorial
Here is a step-by-step tutorial on how to setup a world from scratch and using functionalities such as a Task Move, going over all the basics: Scenario Framework Setup Tutorial.
Log Messages
Scenario Framework prints messages into the log.
Some of them are there to inform you about the most important things and usually, you do not need to worry about them as much.
They always have Scenario Framework word contained in them.
However, there are two other types of log messages that vary in severity:
- (W) - Warnings - These messages warn you about improper usage of the system and can give you a hint as to why is something not working as you might expect.
- This can help you troubleshoot your scenarios
- (E) - Errors - These messages have high severity and mark that something is technically not working (not necessarily user fault).
- They can help you understanding an issue in configuration
Components
All Scenario Framework components can be found in Prefabs
All of the listed components below contain a lot of shared attributes and we are going to quickly go through them.
Some of those categories are then further expanded by the specific components but that will be explained within them.
Attributes are divided into categories:
Children
This Category contains handling of the child layers that is affecting spawning of them
Spawn Children - Controls how many child layers will get spawned.
It provides 4 different options:
- ALL - Spawns all Children
- RANDOM_ONE - Spawns random child
- RANDOM_MULTIPLE - It spawns random number of children based on the Random Percent attribute setting and number of children according to this equation: NumberOfChildren
/ 100 * RandomPercentAttribute - RANDOM_BASED_ON_PLAYER_COUNT - It spawns number of children based on how many children are there compared to the number of players according to this equation: NumberOfChildren
/ 100 * (CurrentNumberOfPlayers / MaximumNumberOfPlayers) * 100
Random Percent - Sets the random chance for the Spawn Children
Enable Repeated Spawn - Enables repeated Spawn of children layers in hierarchy
Repeated Spawn Number - If Repeated Spawn is enabled, how many times can children be spawned? If set to -1, it is unlimited
Repeated Spawn Timer - If Repeated Spawn is enabled, how frequently it will spawn next wave of children? Value -1 means disabled, thus children will not be spawned by the elapsed time.
Asset
This Category handles the Asset properties.
More specific layers/slots have expanded attributes in this category, but here is the only one for the inheritance purposes
Faction Key - Faction key that corresponds with the SCR_Faction set in FactionManager.
It also applies this attribute to all the child layers unless they override it there with different key
1.1.0 Can Be Garbage Collected - If the spawned entity can be garbage-collected (Default setting is set to true so the Garbage Collector can delete this entity)
Debug
This Category handles debug visuals
Show Debug Shapes During Runtime - When enabled, there will be a colored sphere on the position of the layer. In some instances, sise of a sphere is set by the trigger range or Dynamic Despawn range.
Activation
This Category handles activation type and Dynamic Spawn/Despawn.
Activation Type - Sets how the layer is activated and spawned.
It has the following options:
- SAME_AS_PARENT - It activates the same way how the parent layer gets activated
- ON_TRIGGER_ACTIVATION - It gets activated from the trigger or actions that are using this activation type to activate it
- ON_AREA_TRIGGER_ACTIVATION - It gets activated when the parent area of this layer has trigger and that gets activated
- ON_INIT - It gets activated right after said layer is created (which does not need to happen on scenario start, but for example when said layer is being spawned somehow else)
- ON_TASKS_INIT - It activates after scenario is started and the system for random task generation is triggered
- CUSTOM1, CUSTOM2, CUSTOM3, CUSTOM4 - These are for modders to activate this layer via custom ways and you will not use it in common scenario creating
Exclude From Dynamic Despawn - It excludes this layer from being despawned by Dynamic Spawn/Despawn system. Layer will get spawned, but it will be skipped and will not get despawned, including all the children layers of this layer
1.1.0 Activation Conditions - Conditions that will be checked upon init and based on the result it will let this to finish init or not. Conditions are evaluated in order which they are inserted here. Modders can easily add their own conditions
- Activation Conditions
- Day Time Condition
- Only During Day - If true, this can be activated only during the day. If false, only during the night.
- Day Time Hour Condition - Allows you to limit activation to only a certain time window
- Min Hour - Minimal day time hour
- Max Hour - Maximal day time hour
- Weather Condition
- Min Wind Speed - Minimal wind speed in meters per second
- Max Wind Speed - Maximal wind speed in meters per second
- Min Rain Intensity - Minimal rain intensity
- Max Rain intensity - Maximal rain intensity
- 1.2.0 Variable Value Condition
- Variable Name - Name of the variable
- Variable Value To Check - Check if the variable has set this value or not
- Day Time Condition
OnActivation
This Category handles what happens after this layer is fully spawned and activated
Activation Actions - Executes Scenario Framework actions in listed order (see Actions)
Plugins
This Category handles what happens after this layer is fully spawned and activated
Plugins - Attaches Scenario Framework plugins in listed order (see Plugins)
Area
See Area
This variant can be used to create generic task without any specialised logic and it is expected from the Scenario Creator to control it via other means (Such as Actions).
Same Attributes as Layer
Debug
Show Debug Shapes In Workbench - Due the fact that Area can handle both triggers and Dynamic Spawn/Despawn, this sets whether or not debug sphere is visible in workbench or not
Activation
Dynamic Despawn - Enables/Disables Dynamic Spawn/Despawn feature for particular area - see Dynamic Spawn/Despawn
Dynamic Despawn Range - How close at least one observer camera must be in order to activate spawn/despawn - see Dynamic Spawn/Despawn
OnActivation
Trigger Actions - Executes Scenario Framework actions in listed order when the Trigger attached to this Area is activated (see Actions)
Trigger
This category handles attached trigger spawning. Also check out the Plugins for the Trigger Plugin to have greater control over the trigger
Trigger Resource - Sets which Trigger prefab will be used
Area Radius - Sets the radius of the Area for this trigger
Once - If trigger is activated (conditions are true), it will be activated just one or every time it is true
Layer
See Layer
No additional attributes
LayerTask
See LayerTask
This variant can be used to create generic task without any specialised logic and it is expected from the Scenario Creator to control it via other means (Such as Actions).
No additional attributes
Task
This Category handles setting of task properties
Task Title - Sets name of the task the player Task List
Task Description - Sets text description of the task in the player Task List
Task Prefab - Contains which Task Prefab is going to be spawned. This will differ according to the LayerTask type
Place Marker On Subject Slot - Whether or not the marker should be placed directly on the position of task subject slot
Override Object Display Name - In case of some task having an entity that is named (for example UAZ-469), you can rename it using this attribute
OnTaskFinished
This Category handles what happens after task from this layer task is finished
Trigger Actions On Finish - Executes Scenario Framework actions in listed order after task from this layer task is finished (see Actions)
LayerTaskMove
Layer Task specialised for Task Move. It is expecting to have SlotMove in its spawned hierarchy.
Same Attributes as LayerTask
LayerTaskDestroy
Layer Task specialised for Task Destroy. It is expecting to have SlotDestroy in its spawned hierarchy.
No additional attributes
LayerTaskKill
Layer Task specialised for Task Kill. It is expecting to have SlotKill in its spawned hierarchy.
No additional attributes
LayerTaskDefend
Layer Task specialised for Task Defend. It is expecting to have SlotDefend in its spawned hierarchy.
No additional attributes
Task
This Category is further expanded for the Task Defend by additional attributes:
Trigger Name - Task Defends requires trigger attached to it for it to work in cases where you want to set this task to defend some entity or both entity and area. Input the name of the slot that spawns trigger
Defend Params
This category contains all the Defend parameters that you can set for this type of task
Countdown Title Text - Text that will be displayed above the countdown number
Defend Time - For how long you have to Defend the objective of the task. Value -1 is for indefinitely.
Display Countdown HUD - When enabled, it will display the text and how much time remains for the Task Defend
Countdown HUD - Layout of the Countdown HUD
Faction Settings - Here you set who is considered as a Defender and Attacker for this Task. Each entry then contains these two attributes:
- FactionKey - Faction key that corresponds with the SCR_Faction set in FactionManager
- Count Only Players - When disabled, all units from this faction will be counted with for other Task Defend conditions
Min Defender Percentage Ratio - When compared to the number of attackers, minimum of how much of the characters present in the task area must be from defending side to successfully complete the objective on evaluation
Attacker Layer Names - Layer containing attacker forces. Can be more layers, but these layers must include only AI units/groups and nothing else
Earlier Evaluation - When enabled, it will can finish the task earlier than the countdown when all attackers are eliminated. Can be combined with Delayed Evaluation.
Delayed Evaluation - When enabled, the evaluation will be delayed and defenders will need to eliminate all attackers in order for the task to be successfully completed. Can be combined with Earlier Evaluation.
Display Delayed Evaluation Text - When enabled, it will display the text to inform players that they have to eliminate all attacker units
Delayed Evaluation Text - Text that will be displayed to inform players that they have to eliminate all attacker units
LayerTaskClearArea
Layer Task specialised for Task Clear Area. It is expecting to have SlotClearArea in its spawned hierarchy.
No additional attributes
LayerTaskDeliver
Layer Task specialised for Task Deliver. It is expecting to have SlotPick in its hierarchy spawned and then SlotDelivery spawned somewhere else or to be spawned for full funtionality.
No additional attributes
Task
This Category is further expanded for the Task Deliver by additional attributes:
Task Title Updated - Sets new task title when task gets updated
Task Description Updated - Sets new task description when task gets updated
Intel Map Marker Update Delay - If Place Marker On Subject Slot is true, the task marker will be on position of the task item and this attribute can set a delay between the updates for the position
Slot
See Slot
No additional attributes
Asset
This Category is further expanded by following attributes:
Object To Spawn - Prefab name of the object to be spawned
ID - Unique name of the entity that can be later used for identification and finding via Getters in the scenario
Use Existing World Asset - If enabled, slot will not spawn new object, but it will rather use the object already existing in the world in the vicinity of it
Override Object Display Name - Overrides display name of the spawned object for task purposes
Randomization
This Category handles the randomisation of asset that is supposed to be spawned
Randomise Per Faction - Randomise spawned asset(s) per Faction Key Attribute which needs to be filled as well. Overrides Object To Spawn Attribute.
Entity Catalog Type - Select Entity Catalog type for random spawn
Include Editable Entity Labels - Select Entity Labels which you want to optionally include to random spawn. If you want to spawn everything, you can leave it out empty and also leave Include Only Selected Labels attribute to false.
Exclude Editable Entity Labels - Select Entity Labels which you want to exclude from random spawn
Include Only Selected Labels - If true, it will spawn only the entities that are from Included Editable Entity Labels and also do not contain Label to be Excluded
Composition
This Category handles setting behavior for potential composition to be spawned. It currently has only one attribute:
Ignore Orient Children To Terrain - When disabled orientation to terrain will be skipped for the next composition. This is used for example when placing sandbags and you want "stack" them at top of each other.
SlotAI
SlotAI is specialised to handle AI units. It can spawn both singular units or groups. Using the Waypoints category and Misc AIs can be further directed and adjusted.
No additional attributes
Waypoints
This Category handles the setting of task properties and can override what is set in the parent TaskLayer of this SlotTask
1.1.0 Waypoint Set - Here you can define and set the layer containing waypoints and further adjust how they are going to be used
- Layer Name - Here you put name of the layer that contains SlotWaypoints or directly the name of desired SlotWaypoint. In case you want to have waypoints cycled, just input name of the SlotWaypoint that spawns Cycle Waypoint.
Waypoint Group Names - obsolete since 1.1.0, it will be removed in 1.2.0. Please relocate it to Waypoint Set.
Spawn AI on WP Pos - If true, it will spawn AI on the first WP Slot
WP To Spawn - Default waypoint that will be spawned for the AI if Waypoint Set is not defined or does not contain any waypoints.
Balance
This Category handles the setting of task properties and can override what is set in the parent TaskLayer of this SlotTask
Balance On Players Count - Spawns number of AIs in the group based on the player count according to this equation: TODO
Min Units In Group - Least amount of AIs in the group after balancing occurs. Will not exceed maximum number of units defined in the group prefab.
Common
Contains some common attributes for the AI to be set.
AI Group Formation - AI group formation
AI Skill - AI skill in combat
AI Combat Type - AI combat type
Perception Factor - Sets perception ability. Affects speed at which perception detects targets. Bigger value means proportionally faster detection.
Group Prefab - Each AI needs to have their group and here is the default group prefab defined
SlotTrigger
Slot specialised to spawn trigger prefabs and then be further adjusted via Plugins
No additional attributes
SlotPlayerTrigger
Slot specialised to spawn trigger prefab already set to detect players and then be further adjusted via Plugins
No additional attributes
SlotTask
This slot is is supposed to spawn generic empty task where Scenario Creators are in control of the whole logic via other means (Such as Actions and so on). Other SlotTask types are inheriting from it and have specialised behaviour already in place.
No additional attributes
Task
This Category handles the setting of task properties and can override what is set in the parent TaskLayer of this SlotTask
Task Title - Sets name of the task the player Task List
Task Description - Sets text description of the task in the player Task List
Task Execution Briefing - Here you can put text that can then get written into the Execution part of the Briefing via this action (see Actions)
1.1.0 Task Intro Voiceline - StringID for the Intro Voiceline action to be processed. Processing must be setup after tasks are initialised.
SlotMoveTo
This slot is designed to work with LayerTaskMove and it is supposed to spawn a Trigger prefab with attached Plugin Trigger for the desired functionality of Task Move creation.
No additional attributes
SlotDestroy
This slot is designed to work with LayerTaskDestroy. It attaches listener to the spawned entity which listens whether or not the entity is destroyed. If the target entity is a vehicle, it will also gets triggered by flooding the engine with water.
No additional attributes
SlotKill
This slot is designed to work with LayerTaskKill. It works very similarly as SlotDestroy but this is intended for AI characters.
No additional attributes
SlotDefend
This slot is designed to work with LayerTaskDefend. It can either spawn Trigger to work as a Defend Area task, or it can spawn an entity (can be a character or vehicle, anything that has a DamageManager component) and then the task is about to defend provided entity. Or you can combine it by spawning entity to defend and linking trigger in the LayerTaskDefend from the outside SlotTrigger to expand the possibilities and parameters of this task.
No additional attributes
SlotClearArea
This slot is designed to work with LayerTaskClearArea. It spawns TriggerDominance that is adjusted via Plugin Trigger that needs to be tweaked for each usage and you have to put FactionKey of the faction that will receive the task to Clear Area into the Activated By This Faction Attribute.
No additional attributes
SlotPick
This slot is designed to work with LayerTaskDeliver. It will spawn the desired item that will be used for this task and it handles updates of the task title + description in the Task category.
No additional attributes
Task
Task Title Updated1 - Sets name of the task the player Task List when target Intel is picked up
Task Description Updated1 - Sets text description of the task in the player Task List when target Intel is picked up
Task Title Updated2 - Sets name of the task the player Task List when target Intel is dropped
Task Description Updated2 - Sets text description of the task in the player Task List when target Intel is dropped
SlotDelivery
This slot is designed to work with LayerTaskDeliver. It spawns TriggerCharacterSlow and Plugin Trigger that is used to detect items spawned from SlotPick.
No additional attributes
Task
Associated Task Layers - Here you can define which LayerTaskDeliver is associated with this SlotDelivery in order to deliver Intel there
SlotExtraction
This slot is designed to work with LayerTaskMove. It is just a slightly adjusted variant of SlotMove but with countdown mechanics set in the Plugin Trigger
No additional attributes
SlotTriggerClearArea
SlotMarker
SlotMarker is specialised to handle map markers. Be aware that we are not using the Object To Spawn but specialised attribute in the Map Marker category.
No additional attributes
Map Marker
Map Marker Type - Here a map Marker Type is selected. It serves as an API for the MapMarker system and will be using this config (MapMarkerConfig.conf).
There are currently two types available:
- Marker Custom - Using the PLACED_CUSTOM from the config above
- Map Marker Text - Text which will be displayed for the Map Marker
- Map Marker Icon - You can choose from the dropdown menu
- Map Marker Color - You can choose from the dropdown menu
- Map Marker Rotation - Rotation of the Map Marker (from -180 to 180 degrees)
- Marker Military - Using the PLACED_MILITARY from the config above
- Map Marker Text - Text which will be displayed for the Map Marker
- Map Marker Faction Icon - You can choose from the dropdown menu
- Map Marker Dimension - You can choose from the dropdown menu
- Map Marker Type1 Modifier - You can choose from the dropdown menu
- Map Marker Type2 Modifier - You can choose from the dropdown menu
SlotWaypoint
SlotWaypoint is made to handle AI Waypoints. Be aware that the attribute in the Waypoint category is used, not the Object To Spawn field.
No additional attributes
Waypoint
Waypoint - This gives the option to select a waypoint from a huge variety of them. It provides a simple API for all the waypoint Prefabs located in the Waypoints directory (Waypoints).
If you want to have Waypoints cycled, just select the Cycle Waypoint. Here you have two options:
- input the Layer name that contains the SlotWaypoints you want to be cycled into the "Layers With Waypoints To Cycle" attribute
- or if this waypoint is inserted into the target layer, you can leave it empty and it will get the parent layer where this Cycle Waypoint is located and it will add all the non-cycle waypoints to be cycled.
Plugins
Plugins allow you to add more functionalities, usually to slots, that can further help you creating more specific things. Some of the plugins are already in use, most notably the Plugin Trigger to set attributes to the spawned triggers. You can inherit from the base class of the plugin to script your own plugins to easily add new features to your scenarios.
OnDestroyEvent
Plugin intended to be used on Any slot to activate actions upon asset destruction
Actions On Destroy - Upon asset destruction, it will activate set actions (see Actions)
OnInventoryChange
Plugin intended to be used on Any slot to activate actions upon asset inventory changes in terms of item addition/removal.
Actions On item Added - Once upon an item is added to the inventory of the asset, it will activate set actions (see Actions)
Actions On Item Removed- Once upon an item is removed from the inventory of the asset, it will activate set actions (see Actions)
SpawnPoint
Spawn Point plugin is used to manipulate Spawn point properties and provide the possibility to execute actions upon it being used. These actions will always carry the player entity that just spawned.
Spawn Radius - Find empty position for spawning within given radius. When none is found, entity position will be used.
Faction - Determines which faction can spawn on this spawn point.
Show In Deploy Map Only - If Spawnpoint will be showed just in the Deploy Map
Timed Spawn Point - Use custom timer when deploying on this spawn point. Takes the remaining respawn time from SCR_TimedSpawnPointComponent
Info - Allows to select which Info to use for filling the name or other properties.
Use Nearby Spawn Positions - Allow usage of Spawn Positions in range
Spawn Positions Usage Range - Spawn position detection radius, in metres
Respawn Time - Additional respawn time (in seconds) when spawning on this spawn point
Actions On Spawn Point Used - What to do once Spawn Point is used. These actions will always carry the player entity that just spawned.
Trigger
Trigger Plugin is used to set attributes for the triggers that are being spawned. It is designed to work with trigger prefabs that inherit from the SCR_CharacterTriggerEntity (TriggerCharacterSlow and TriggerAnyPlayerSlow) which has variety of use-cases even though its name would suggest it is mainly used for Characters. With the variety of attributes to set, it allows you to modify the trigger in very interesting way and create a lot of different tasks/scenarios/logics once you understand what each attribute does and what it allows.
One of the most common use-cases for triggers are tasks which are also included in Samples such as Task Move, Task Exfil, Task Clear Area, Deliver Weapons In Vehicle to certain Area or Deliver cars/any other items to certain area.
Area Radius - Radius of the trigger coverage
Activation Presence - This controls the category of presence that can activate this trigger.
- PLAYER - Trigger will require at least 1 player character inside for it to activate
- ANY_CHARACTER - Trigger will require any character inside for it to activate
- SPECIFIC_CLASS - This setting is supposed to be used when you are working with Specific Class Names attribute and it will require to have them inside the trigger for it to activate
- SPECIFIC_PREFAB_NAME - Works similarly as SPECIFIC_CLASS but intended mainly for Prefab Filter. However it will use OR with Specific Class Names and other conditions for the trigger to activate
Specific Class Names - Allows you to set list of classnames that will be detected by the trigger (such as ChimeraCharacter, Vehicle and so on).
Prefab Filter - Allows you to add list of Prefab Filters that each will allow you to specify a prefab name and whether or not it should include child prefabs.
Activated By This Faction - For which faction this trigger is assigned. This also influences the Activation Presence which will additionally check the Faction for all the filtered entities inside.
Custom Trigger Conditions - This allows you to extend the trigger conditions for when the trigger gets activated. There are already two conditions in-place, but this is created in a way that you can create your own conditions in script and you will see them here. Conditions are then evaluated in the listed order and if one fails, it will not continue to the other one.
- Specific Class Name Count - Used for counting how many times specific class name is inside the trigger. It works similarly like the Specific Class Names attribute but with addition of a Classname count attribute where you can set the desired number. Additionally, this will add the class name to the trigger filter from this condition so you do not have to add it again in the Specific Class Names attribute.
- Specific Prefab Count - Used for counting how many times specific prefab is inside the trigger. It works similarly like the Prefab Filter attribute but with addition of a Prefab count attribute where you can set the desired number. Additionally, this will add the prefab to the trigger filter from this condition so you do not have to add it again in the Prefab Filter attribute.
Search Vehicle Inventory - Entities (usually items) that are in inventory of vehicles are not detected by triggers in default. However, this Plugin added the such behavior as it is sometimes needed to detect entities that are situated in inventories of vehicles and this attribute allows just that.
Once - If set to true, the trigger will be activated only once if conditions are true. If set to false, the trigger will get activated every time its conditions are true.
Update Rate - How frequently is the trigger updated and performing calculations. Lower numbers will decrease performance.
Minimum Players Needed Percentage - Minimum players needed to activate this trigger when PLAYER Activation presence is selected
Activation Countdown Timer - For how long the trigger conditions must be true in order for the trigger to activate. If conditions become false, timer resets
Notification Enabled - Whether or not the notification is allowed to be displayed
Player Activation Notification Title - Notification title text that will be displayed when the PLAYER Activation presence is selected
Enable Audio - Whether or not the audio sound is played and affected by the trigger
Countdown Audio - Audio sound that will be playing when countdown is active.
Logic
Logic entities will allow you to create "systems" that can drive scenario logic based on how you build it.
Input
Allows you to set Inputs for this counter via the Input Action - do not confuse with Scenario Framework Actions.
Input Action
These actions if conditions are true, will increase the counter.
On Task Event Increase Counter
Optional, used to increase the counter based on the task event update and Task Layer name
Task Layer Name - optional attribute, to either set specific LayerTask or if left empty, it will be processing all the LayerTasks
Event Name - On Which Task Event update it will increase the counter.
Check Entities In Trigger
Used to increase the counter based on the selected comparison operator on how many entities are there in the trigger. This is supposed to be used for SlotTrigger.
Getter - To link which Trigger will be compared.
Comparison Operator - Which comparison operator will be used. You can choose from: LESS_THAN, LESS_OR_EQUAL, GREATER_THEN, GREATER_OR_EQUAL or EQUAL
Value - To which value will it be compared using the Comparsion Operator attribute and number of entities from trigger linked from Getter attribute
Check Entities In Area Trigger
Same as Check Entities In Trigger but it is supposed to be used directly to Area rather than SlotTrigger.
LogicCounter
Logic Counter allows you to store the count of something and then it can execute actions (see Actions) either on Activation (a.k.a upon reaching certain count) or on Increase. It also has Input that can listen to other events but other Scenario Framework components can also have actions that can increase the counter from their side.
Attribute categories are exactly the same as in Shared Attributes with one category as an addition
Counter
Specific category for the Counter which is keeping the count
Count To - Up until which number it should count towards for it to trigger actions in OnActivate.
LogicOR
Attribute categories are exactly the same as in Shared Attributes
LogicSwitch
Attribute categories are exactly the same as in Shared Attributes
Getters
Getters allow you to retrieve usually entity or a number from something already existing in the Scenario for the purposes of using it usually in some Actions.
GetArea
Area Name - the name of the wanted Area
Return value: IEntity
GetAreaTrigger
Area Name - the name of the Area from which you want the trigger
Return value: IEntity
GetArrayOfPlayers
This Getter will return array of player entities with the possibility to filter them using Faction Keys.
- Faction Keys - (Optional) You can filter players by putting the Faction Key of desired faction(s); if not used, all factions will be eligible
GetClosestPlayerEntity
This Getter will return the closest Player entity you want to work with using another Getter to to get the position of a an object to search from.
Return value: IEntity
- Getter - Supposed to be a getter that will return some entity from which position you want to find the closest player
- 1.2.0 Faction Keys - (Optional) You can filter players by putting the Faction Key of desired faction(s); if not used, all factions will be eligible
GetCountEntitiesInTrigger
Trigger Name - Input name of the trigger to get the entity count inside it
Return value: int
GetEntityByName
This one is one of the most powerful one which will allow you to get any Scenario Framework entity to further work with it.
Return value: IEntity
- Entity Name - the name of the entity you want to obtain (can be be any entity)
GetLastFinishedTaskEntity
This will return the last finished task's entity
Return value: IEntity
GetLayerBase
Layer Base Name - the name of the wanted Layer
Return value: IEntity
GetLayerTask
Layer Base Name - the name of the wanted LayerTask
Return value: IEntity
GetListEntitiesInTrigger
Trigger Name - Input name of the trigger to get array of all the entities inside it
GetPlayerEntity
This will return the first player entity it finds. It is supposed to be used mainly for 1-player scenarios.
Return value: IEntity
GetArrayOfPlayers
This getter will fetch all the players that are currently spawned in-game.
GetRandomLayerBase
This getter will randomly select a layer from provided list
Name Of Layers - From this list, random layer will be selected
GetSpawnedEntity
This is one of the most powerful getter to use as it will allow you to get get access to the entities that Slots are spawning.
Return value: IEntity
- Layer Name - Insert name of the Layer you want to get the Spawned Entity from. This name could be a bit misleading, but main usage is on Slot, SlotAI, SlotTrigger and so on.
GetTask
This is one of the most powerful getter to use as it will allow you to get get access to the task that the LayerTask has attached to it.
Return value: IEntity
- Layer Task Name - name of the wanted LayerTask from which to get the attached Task
GetVoiceOverActorEntity
This getter will allow to get Actor enum and Actor Entity intended for Voice Over Actions
Return value: IEntity
- Actor - Actor enum in VO system
- Actor Entity - Entity playing the voiceover.
Actions
Actions allow you to perform runtime changes to many aspects of the game, alter different states, adjust entities and so much more. In many cases, there are things that you would be able to do in-game as a player or as a Game Master very easily. Currently not everything will be here, but things will be added as time goes on and you can add your own actions as well if you properly inherit from the base class.
All of the actions have one shared attribute that is the Max Number of Activations. In default, it is set to -1, which means infinite number of activations. You can restrict the number of activations of each action if you happen to be in a situation where certain action could be called several times from different sources but you only want it to be activated once or x amount of times.
Many of the Actions are designed in a way that if they have single and empty Getter, the action will automatically be working with the spawned entity of the Slot to which this action is attached. This information is specified in each Getter description.
ActionAI
Allows to perform actions on AIs.
It uses the Getter, but for these actions, the expected target is SlotAI (Using GetLayerBase); or, if this is directly attached on a SlotAI, the Getter can be left empty and will work with the AIs spawned by this slot.
AI actions
Add Waypoint
Adds waypoint for the targer AI
Getter - Here you have to specify which SlotWaypoint you want to use for the AI (Using GetLayerBase)
1.2.0 Add On Top Of Queue - True checked, this waypoint will be added on a first position. Otherwise it will append it at the end of the waypoint queue.
1.2.0 Clear Previous Waypoints - True checked, previous waypoints should be cleared.
On Waypoint Completed
Executes actions if selected waypoint was completed
Getter - Here you have to specify which SlotWaypoint you want to use for the AI (Using GetLayerBase)
Actions On Waypoint Completed - Actions that will get executed upon waypoint completition
1.2.0 Remove On Completed - Remove the event on action completion
On Threat State Changed
Executes actions based on the Threat state change
AI Threat State - On what Threat State will actions be activated
Actions On Waypoint Completed - Actions that will get executed upon Threat state being changed to desired state
Set Max Autonomous Distance
Set max autonomous distance of AI group.
Investigation Distance - Distance in metres
Set Skill
Changes AI Skill in run-time to desired value
AI Skill - AI skill in combat
Set Combat Type
Changes Combat Type in run-time to desired value
Combat Type - AI combat type
Set Hold Fire
Changes Hold Fire behaviour in run-time
Hold Fire - If AI in the group should hold fire
Set Perception Factor
Changes Perception factor in runtime to desired value
Perception Factor - Sets perception ability. Affects speed at which perception detects targets. Bigger value means proportionally faster detection.
Set Formation
Changes Formation in run-time
AI Group Formation - AI formation from available formations
Set Character Stance
Changes character stance in run-time
AI Character Stance - AI character stance from available formations
Set Movement Type
Changes movement type in run-time
AI Movement Type - AI movement type from available formations
ActionMedical
Allows you to change target character medical values or states.
It uses the Getter, but for these actions, expected target is ChimeraCharacter. Usually you will want to use GetSpawnedEntity from some Slot or GetPlayerEntity.
Medical Actions
Add Particular Bleeding
Adds bleeding to the specific Hit Zone according to its name (see SCR_CharacterDamageManagerComponent)
Add Random Bleeding
Adds random bleeding
Remove All Bleedings
Removes all bleedings
Remove Group Bleeding
Removes bleeding from target hit zone group that you can choose from provided ENUM
Set Bleeding Rate
Sets bleeding rate for the target character
Set Blood
Sets blood level for the target character
Set Permit Unconsciousness
Sets whether or not unconsciousness is enabled for target character
Set Regeneration Rate
Sets regeneration rate for the target character
Set Resilience
Sets resilience value (used for unconsciousness) for the target character
Set Saline Bagged Group
Sets whether target hit zone group is saline bagged or not
Set Tourniquetted Group
Sets whether target hit zone group is tourniquetted or not
Add Item To Inventory
It uses the Getter, but for this action, expected target is some entity that has Inventory component (such as GetSpawnedEntity, GetPlayerEntity or GetEntityByName)
It uses the Prefab Filter (a scripted class) to add prefabs of items and their count into the target inventory
1.2.0 ID - Name of the entity used for identification. If entity with given name exists suffix _numberOfAttemptToNameEntity is added.
Append Briefing Entry Text
Appends existing briefing entry texts with the new string on a new line
- Faction Key - Target Faction key
- Custom Entry Name - Name of the entry to be appended
- Target Text - Text that will be appended
Append Briefing Entry Text Based On Task
Appends existing briefing entry texts with the new string on a new line that is based on Task Execution Briefing (see SlotTask's Task)
- Faction Key - Target Faction key
- Custom Entry Name - Name of the entry to be appended
- Getter - Here, it is expected to use the GetTask which will contain the Task Execution Briefing (see SlotTask's Task) attribute that will get appended
Change Layer Activation Type
This will change the Layer Activation Type attribute (see Activation). It is mainly used for example when you have a layer that is set to be activated via trigger and the trigger activates it and when you have Dynamic Despawn Enabled (see Dynamic Spawn/Despawn) and you would like the layer to be respawned with subsequent activations, you will need it to change it to SAME_AS_PARENT
- Getter - the name of the wanted Layer
- Activation Type - Sets the Activation Type (see Activation)
Change Task State
This action changes the state of the Task. It also triggers other things that listen to the task changed events.
- Getter - Designed to work with the GetTask getter
- Task State - Sets the task's new state once this action is activated
Change Trigger Activation Presence
This will change the trigger activation presence for a given trigger.
- Getter - You can either use the GetEntityByName provided that the entity you are searching for is indeed the Trigger, you can also put there a GetSpawnedEntity, or even the Area as this action will try to retrieve the trigger from numerous types of getters
- Activation Presence
Compare Counter And Execute
This will compare Logic Counter value to the set value and if conditions are true, it can execute other actions
- Comparison Operator (see comparison)
- Value - Value that is the counter is to be compared to
- Counter Name - Name of the counter entity
- Actions - Actions that will be executed (see Actions)
Count Inventory Items And Execute Action
This will compare Logic Counter value to the set value and if conditions are true, it can execute other actions
- Comparison Operator (see comparison)
- Value - Value that is the counter is to be compared to
- Counter Name - Name of the counter entity
- Actions - Actions that will be executed (see Actions)
Damage Wheels
This action allows you to set damage to specific wheels on a vehicle.
- Getter - Target entity to manipulate fuel (Optional if action is attached on Slot that spawns target entity)
- Slot Names On Slot Manager - Name of Slots that are defined on the SlotManagerComponent on target vehicle
- Health Percentage - Health Percentage to be set for target wheels
Delete Entity
This will delete provided entity. Be careful as this can be very dangerous action with dire consequences and it cannot be reversed!
- Getter - Any getter that returns an Entity (see Getters)
End Mission
Action to end mission with further adjustments
- Override Game Over Type - If this action should override what is already set as a Game Over Type or not. This can be used to end mission via some specific thing and either let it end with the Game Over Type that is already set there by the flow of the mission previously or you can choose to override it and in the Overriden Game Over Type choose a new type.
- Overriden Game Over Type - If Override Game Over Type is set to true, you can choose which type will be used for the end.
Action Based On Conditions
This action allows you execute other actions if certain conditions are fullfilled at the time of Action activation. It performs this check only once, not periodically.
- Activation Conditions - Conditions that will be evaluated in given order
- Actions - Which actions will be executed if conditions are fullfilled at the time of Action activation.
Execute Function
This is intended for advanced usages and it is expected some scripting knowledge. It will allow you to call methods on certain objects with parameters.
- Object To Call The Method From - It is basically a getter, but it will limit you with the methods depending on which class you will choose. You can for example trigger a despawn or repeated spawn on Slots if getting them that way and using their methods.
- Method to Call - Name of the method to call
- Parameter...Parameter5 - There are the method parameters that you can pass. It is however very limited as it operates with strings.
Fail Task If Vehicles In Trigger Destroyed
This can fail task (even a previously finished one) when vehicles in trigger provided by the Getter attribute will get destroyed.
- Getter - Here you are supposed to link the trigger (see Getters)
- Target Layer Task - Name of the Layer Task of which Task will get failed
- Caused By Player - If set to true, it will fail the task only when player caused the destruction
Feed Param To Task Description
This action allows you to feed Params based on Prefab Filter for the specific Slot Task that will be added to the description (Which needs to have parameters in %1 format)
- Getter - Name of the slot task to influence the description parameter
- Prefab Filter - Which Prefabs and how many of them will be converted to a description string
Increment Counter
This action increments Counter by 1
- Counter Name - Name of the target Counter
Decrease Logic Counter
This action decreases Logic Counter by 1
- Counter Name - Name of the target Counter
On User Action Event
This action allows you to link it to existing user actions on some other entities and based on the User Action Event, you can execute other actions.
- Getter - Target entity that has the UserAction on it (Optional if action is attached on Slot that spawns target entity)
- Action ID - Corresponding to the action attached on ActionsManagerComponent on target entity
- Getter User - Only listen to changes when UserAction is activated by specific Entity (Optional - leave it empty to trigger by anyone)
- User Action Event - On which user action event this ScenarioFramework action will be triggered
- Actions - Which actions will be executed based on User Action Event settings
Voice Over Play Line
This action allows you to play single line from the Voice Over Data Config.
- Voice Over Data Config - Config with voice over data for this action.
- Line Name - Name of the line as defined in Voice Over Data Config
- Getter - Entity playing the voiceover. If left empty, default will be player character. Reminder: Related .acp needs to be present in the SCR_CommunicationSoundComponent of target entity.
- Actions - Actions that will be triggered once Line finishes playing
Voice Over Play Sequence
This action allows you to play sequence of lines from the Voice Over Data Config
- Voice Over Data Config - Config with voice over data for this action.
- Sequence Name - Name of the sequence as defined in Voice Over Data Config
- Actors - Entities playing the voiceover. If left empty, default will be player character. Reminder: Related .acp needs to be present in the SCR_CommunicationSoundComponent of target entity.
- Actions - Actions that will be triggered once Sequence finishes playing
Intro Voiceline Based On Tasks
This action will play voice line based on what tasks were generated and their voice line attribute. Action Process Voiceline Enum And String needs to be called before this action for it to work.
- Sound - Sound to play
- Getter - (Optional) If getter is provided, sound will come from the provided entity
Kill Entity
This action allows you to kill any provided entity. Be careful as this is quite dangerous action and it cannot be reverted back.
- Getter - Any getter that returns an Entity (see Getters)
- Randomise Ragdoll - If target entity is Character, it will randomise ragdoll upon death
Lock or Unlock All Target Vehicles In Trigger
This action will either lock or unlock all target vehicles in trigger provided by the Getter attribute.
- Getter - To get the trigger you want to work with to influence all vehicles inside it (see Getters)
- Lock - If true, it will lock vehicle, if false, it will unlock vehicles
Lock or Unlock Vehicle
This action will either lock or unlock target vehicle provided by the Getter attribute.
- Getter - To get the entity of a vehicle you want to work with (see Getters)
- Lock - If true, it will lock vehicle, if false, it will unlock the vehicle
Loop Over Not Randomly Selected Layers
This action allows you to loop over the layers that were not selected by GetRandomLayerBase
- Getter - Use GetRandomLayerBase
- Action - Which actions will be executed for each layer that was not randomly selected
On Compartment Entered Or Left
This action allows you to trigger actions if someone gets in or out of the vehicle. You can further specify to only listen to certain Slots in the vehicle (Driver, passenger on specific seats) and even listen for some specific entity to enter such slots.
- Entered or Left - If true, we execute actions On Compartmented Entered. Otherwise On Compartment Left
- Getter - Target entity (Optional if action is attached on Slot that spawns target entity)
- Occupant Getter - (Optional) If used, it will get executed only when specific entity enters the compartment
- Slot IDs - (Optional) If used, it will get executed only when specific compartment slots are entered (Inspect each Prefab BaseCompartmentManagerComponent to see the slots. From our observation, driver usually has ID number 2)
- Actions - Actions that will be executed on compartment entered
On Engine Started Or Stop
This action allows you to trigger actions if target entity engine gets started or stops.
- Started Or Stop - If true, we execute actions On Engine Started. Otherwise On Engine Stop
- Getter - Target entity (Optional if action is attached on Slot that spawns target entity)
- Actions - Actions that will be executed on one of these circumstances
Play Sound
This action will play sound on player entity position
- Sound - String of with the name of the sound
Play Sound On Entity
This action will play sound on entity position provided by the Getter Attribute
- Getter - Supposed to be any that will return entity (see Getters)
- Sound - String of with the name of the sound
Prepare Area From Dynamic Despawn
It adds target Area into the Dynamic Spawn/Despawn during runtime.
- Getter - Supposed to be a GetArea (see Getters)
- Stay Spawned - If set to false, area will be despawned upon activation of this action
- Dynamic Despawn Range - How close at least player character must be in order to trigger dynamic spawn/despawn
Process Voiceline Enum And String
This action processes the Voiceline Enum to specific strings that will be then used in Intro Voiceline Based On Tasks action.
- Target Enum - Name of the enum to work with
Remove Area From Dynamic Despawn
It removes target Area from the Dynamic Spawn/Despawn during runtime.
- Getter - Supposed to be a GetArea (see Getters)
- Stay Spawned - If set to false, area will be despawned upon activation of this action
Remove Item From Inventory
This action is used to remove items from target inventory. This can be quite dangerous as it will delete it and it cannot be reversed.
- Getter - target entity that has inventory (see Getters)
- Prefab Filter - Here you can set which items and how many out of each will be removed
Reset Counter
This action will reset the counter back to 0. It is supposed to be activated only from the counter it is to reset.
Set Briefing Entry Text
Sets Briefing category text with the one you provide
- Faction Key - Target Faction key
- Custom Entry Name - Name of the entry to be changed
- Target Text - Text that you want to use
Set Briefing Entry Text Based On Generated Tasks
Sets Briefing category text based on generated tasks. This is used to dynamically the texts based on which tasks are actually spawned.
- Faction Key - Target Faction key
- Custom Entry Name - Name of the entry to be changed based on generated tasks
- Target Text - Text that you want to use. Leave empty if you want to utilise the one set in config.
Set Entity Position
Moves entity to a different position. Similar to setPosASL from previous titles, teleports the entity.
- Entity Getter - Getter of which Entity we want to work with (see Getters)
- Destination - world coordinates
- Destination Entity Getter - (Optional) You can also use some other entity as a destination coordinates
- Destination Entity Relative Position - (Optional) you can further define offset from the destination entity where to move you entity
Set Execution Entry Text Based On Generated Tasks
Sets Execution category text based on generated tasks. This is used to dynamically the texts based on which tasks are actually spawned.
- Faction Key - Target Faction key
- Custom Entry Name - Name of the entry to be changed based on generated tasks
- Target Text - Text that you want to use. Leave empty if you want to utilise the one set in config
Set Fuel
This action allows you to set fuel percentage for target entity.
- Getter - Target entity to manipulate fuel (Optional if action is attached on Slot that spawns target entity)
- Fuel Percentage - Percentage of a fuel to be set
Set Supply Percentage
This action allows you to set specific value to specific signal on target entity.
- Getter - Target entity to manipulate supply (Optional if action is attached on Slot that spawns target entity)
- Supply Percentage - Percentage of a supply to be set.
Set Signal
This action allows you to set specific value to specific signal on target entity.
- Getter - Entity to set the signal on (Optional if action is attached on Slot that spawns target entity)
- Signal - Signal to set
- Value - Value to set
Create Variable
This action allows you to create specific variable to specific value.
- Variable Name - Name of the variable
- Variable Value - Value of the variable
Set Variable
This action allows you to set specific variable to specific value.
- Variable Name - Name of the variable
- Variable Value - Value of the variable
Get Variable Value
This action gets the Variable Name.
- Variable Name - Name of the variable
Item Safeguard
This action allows you to attach Item Safeguard logic on any item that you might regard as important and in case of it being in a car that gets destroyed, or in player inventory and similar cases, it this item will be dropped on the ground. It also prevents Garbage System from deleting this item. It also allows you to execute actions in situations when item is dropped or possessed.
- Getter - Target entity (Optional if action is attached on Slot that spawns target entity)
- Actions On Item Dropped - Actions that will be executed when target item is dropped
- Actions On Item Possessed - Actions that will be executed when target item is possesed by someone/something
Set Mission End Screen
Sets mission end screen based on the Game Over Type attribute and it can also provide which Subtitle will be used
- Game Over Type - Which Game Over Type will be set upon using this action.
- Subtitle - Which subtitle text will be used
Show Hint
Shows a very simple hint with Title and Text for a certain duration.
- Title - Title of the hint
- Text - Text in the body of the hint
- Timeout - duration in seconds how long will the hint stay before disappearing
- Faction Key - For which Faction these hints will be shown
- Getter - (Optional) Getter to get either a specific player or array of player entities to whom the hint will be shown
Show Popup Notification
This action allows you to show Popup notification. You can further filter it to specific faction and players.
- Title - Title of the Popup
- Text - Text of the Popup (Keep it short)
- Faction Key - (Optional) You can filter only specific faction
- Getter - Getter to get either a specific player or array of player entities
Spawn Closest Object From List
This action is used to trigger spawning of certain layers that are set with ON_TRIGGER_ACTIVATION and you are supposed to put their names into the attribute List Of Objects. It will then find the closest one to the entity provided by Getter Attribute.
- Getter - Supposed to be the one that returns any entity you want to look the closest objects from (see Getters)
- List Of Objects - List of the named Scenario Framework components that are supposed to be spawned. In most cases, you just need to put there the top layer which was not activated by other means.
Spawn Objects
This action is used to trigger spawning of certain layers that are set with ON_TRIGGER_ACTIVATION based on their names listed into the Name Of Objects To Spawn On Activation attribute.
- Name Of Objects To Spawn On Activation - List of the named Scenario Framework components that are supposed to be spawned. In most cases, you just need to put there the top layer which was not activated by other means.
Spawn Objects Based On Distance
This action allows you to spawn other objects based on a distance parameters and employ some randomization
- Getter - Measure distance from what - use getter
- Min Distance - It will select only objects that are at least x amount of meters away
- Max Distance - You can also set max distance to setup the hard limit of the max distance - but be aware that there might be a situation where it would not spawn anything
- List Of Objects - List of objects that are to be compared
- Spawn Objects - Spawn all objects, whether only a random one multiple random ones
- Random Percent - If the RANDOM_MULTIPLE option is selected, the chance percentage
Toggle Engine
This action allows you to start/stop engine of target entity.
- Getter - Target entity to turn on/off the engine (Optional if action is attached on Slot that spawns target entity
- Turned On - If true, engine will be turned on. Otherwise it will turn it off
Toggle Light
This action allows you turn on/off specific lights on target entity (usually a vehicle or a lamp).
- Getter - Target entity to manipulate lights with (Optional if action is attached on Slot that spawns target entity)
- Light Type - Which lights to be toggled
- Turned On - If true, light will be turned on. Otherwise it will turn it off.
Wait And Execute
This is used to activate other actions with a timed delay.
- Delay In Seconds - How long it will wait before activating set actions.
- Delay In Seconds Max - If this is set to a number larger than Delay In Seconds, it will randomise resulted delay between these two values
- Looped - If true, it will activate actions in looped manner using Delay settings as the frequency. If randomised, it will randomise the time each time it loops.
- Actions - Actions to be activated after the delay has passed.
QRF System
QRF stands for Quick Reaction Force and is a unit that is capable to respond to certain actions as a response in a manner of minutes or hours depending on the sise and application of that unit.
Usage
In Arma Reforger, the QRF system is responsible for reacting to players' actions, such as killing enemy soldiers, by sending a stronger response force each time a certain threshold is met.
Configuration
As an example of such an application, we can use the Combat Ops scenario on Everon, for which QRF is already configured. The process of adding a new QRF to the area is as follows:
- Create an Area which QRF will be monitoring
- Go to the SCR_ScenarioFrameworkArea component in the Area's "Object Properties" window
- Find the section called "Activation Actions" where you will have to drag and drop pre made config of QRFDispacher or optionally use the action script itself: SCR_ScenarioFrameworkActionQRFDispacher
- (Optional) Configure QRF as wanted by changing the values of all properties, e.g add new or change the cost of existing QRF groups
- In order to define the QRF units's spawn positions, create a QRF spawn point layer for this area by dragging and dropping the Prefab on the area
- Copy the name of the QRF spawn point layer and paste it into the "QRF Layer Name" field in Area's QRFDispatcher
- Place the QRF spawn point at the wanted location by selecting it in and then moving it to desired location using gizmos
- Configure the spawn point: what can be spawned there, what is the minimum distance in metres from the nearest player
If more spawn points are needed, more QRF spawn point Prefabs can be dragged and dropped on the QRF layer, then configured the same way as explained in steps 6 and 7.
Dynamic Spawn/Despawn
This system works on Areas that are then handling their hierarchy and its purpose is to save performance by having spawned only things that need to be spawned.
There is a continuous check that is being triggered every 4 seconds in default (can be adjusted on GameMode component called SCR_GameModeCombatOpsManager) for all the Areas that have Dynamic Spawn/Despawn enabled.
Furthermore, when Dynamic Spawn is initiated, it is spawning its children with slight delays between them in order to avoid huge stutters when a lot of different things are spawned at once, so upon successful Dynamic Spawn initiation, it can take few seconds for the Area to completely spawn (depending on the complexity of each Area setup).
Each Area has a range that is then compared to the distance from player characters.
If just one player is within a range, Area will spawn all of its content that has Activation Type SAME_AS_PARENT set in workbench or this activation was changed in runtime via ScenarioFrameworkAction.
Runtime change is the case for QRF units in CombatOps on Arland Scenario where they are initially not spawned with the Area but via trigger.
Once the trigger spawns these units, it also changes the Activation Type to SAME_AS_PARENT so when said Area would despawn and then spawn again, it will spawn these units as well.
On layers that are under the Area, there is an option to "Exclude from Dynamic Despawn" which if set to true will prevent said layer to despawn once it is spawned.
This is used for example for Spawn Points, where we want to spawn them, but then we are not dynamically despawning them using this system.
Furthermore, all of the Slots that are spawning vehicles are set in a way that once someone gets inside of them, it will "Exclude" them from the Dynamic Despawn as well to prevent vehicle deletion upon moving away from Area range.
Slots and AI Slots retain their position where their spawned entity was located before Spawn/Despawn, so for example AI units that moved to different position will get their position saved and once respawned, they will be spawned on their previously saved position.
If AI units are killed, their bodies will remain there for the GarbageCollector to handle and for the vehicles, it will remove their wreck and destroyed wreck will not be spawned again.
Save and Load
Scenario Framework offers a Save and Load feature for all Scenarios created using this system. In the current state, it is very rudimentary and it is taking advantage of the structured hierarchical setup of the whole system.
In order for this Serialisation to work, you need to setup the SCR_SaveLoadComponent on your GameMode and add a SCR_ScenarioFrameworkStruct into it. Here is the example of how it is setup for the CombatOps on Arland:
Serialised Data
Scenario Framework Serialisation saves and loads numerous things. We will start with basics and then describe all Scenario Framework serialised components. It works on a premise that what it saves only the changes performed from the attributes already set by you in Workbench and differences from this initial status. If there is a change, it will be saved, if there is not, no need to save it as it it just loads the initial status anyway.
Basics
This Category will contain very basic of the world state that usually is not even Scenario Framework related:
- In-game time
- Weather state
- If Scenario ended
Layer
As a first serialised Scenario Framework component, we will start with Layer even though Area is in the Scenario Framework hierarchy higher, it inherits all the serialised values.
- Randomly Spawned Objects - Each Layer will remember which object got randomly spawned
- Randomly spawned child layers - It will remember which layers got spawned using random spawn
- Task states - If it is a LayerTask, it will remember the Task state (Finished, Progressed etc.)
- Termination status - If said layer was deleted (for example using an action) or if it is a Slot or Layer with slots and all the AI spawned from the slot would be dead, it will mark said layer as terminated so the AI will not get spawned at all
- Repeated Spawn Number - It will remember the status of the Repeated Spawn Number
Area
Areas are serialised similarly to Layers and have few expanded values that are saved.
It inherits all the saved attributes from the Layer (see Layer)
- If Area was selected by ON_TASKS_INIT (see Activation)
- Delivery point for possible Task Deliver
- Layer Task this Area has attached if selected by ON_TASKS_INIT (see Activation)
Logic
Logics are also serialised to keep their values in sync with the last state.
- Counter value
- Termination status - If said layer was deleted (for example using an action)
Samples
Samples are simple "scenarios" that usually focus on one particular feature of the Scenario Framework or a goal to show how it could be done.
There are many ways how to achieve things and here will be the small selection of endless possibilities that this system can provide.
You can use it to learn from it, copy it and adapt it as you please.
All the samples already have prepared necessary entities for the Framework to work so if you would just copy-pasted it into the empty world, it would not straight up work.
You need to setup your worlds according to the Scenario Framework Setup Tutorial.
They are located in the
Task Move is one of the most simple tasks to have presented here and recommended to start learning the Framework with it.
TaskMove
Goal:
Create a Task Move for the US Faction.
Setup:
It is achieved by having an Area with LayerTaskMove and the SlotMoveTo placed in the hierarchy as seen in the image below.
Everything is set basically in default.
Mechanics:
Area spawns LayerTaskMove which Spawns SlotMoveTo that spawns Task Move and assigns it to the default US faction and the slot also spawns trigger that is used to detect if some player entered it in order to finish the Task.
Here the radius set to 10 meters and it will require at least 1 player to enter for it to finish this task.
TaskKill
Goal:
Create a Task Kill for the US Faction.
Setup:
It is achieved by having an Area with LayerTaskKill and the SlotKill placed in the hierarchy as seen in the image below.
LayerTaskKill has set Task Title and Task Description attributes and SlotKill has Object To Spawn attribute set to spawn Unarmed soldier.
This is done for the sample purposes, having Unarmed soldiers as targets for SlotKill is a war crime.
Mechanics:
Area spawns LayerTaskKill which Spawns SlotKill that spawns Task Move and assigns it to the default US faction and the slot also spawns Unarmed soldier which is the target of the Task Kill.
LayerTaskKill will also process display name of the entity and can display it in provided description, in this case: Unarmed.
In order to finish this task, target entity must be killed.
TaskExfil
Goal:
Create a Task Exfil for the US Faction.
Setup:
It is achieved by having an Area with LayerTaskMove and the SlotExtraction placed in the hierarchy as seen in the image below.
Everything is set basically in default apart from the SlotExtraction timer set to 20 seconds.
Mechanics:
Area spawns LayerTaskMove which Spawns SlotExtraction that spawns Task Exfil (which is basically the Task Move) and assigns it to the default US faction and the slot also spawns trigger that is used to detect if some player entered it and been there for 20 seconds in order to finish the Task.
Here the radius set to 10 meters and it will require at least 1 player to stay inside for 20 seconds to finish this task.
After finishing the task, mission is ended via the End Mission action that is attached in OnTaskFinished in LayerTaskMove.
TaskDestroyRock
Goal:
Create a Task Destroy Rock for the US Faction.
This example is here to show how to link entities either already in world or newly spawned before the Slot will be spawned and then being able to work with them.
Setup:
It is achieved by having an Area with LayerTaskDestroy which has Layer that contains normal Slots that will spawn RPG-7 and SlotDestroy that in this case will not spawn anything but it will search in the vicinity for the prefab that was set in the Object To Spawn attribute thanks to Use Exsiting World Asset attribute being set to true.
Outside of the Scenario Framework, there is a Granite_Boulder_01 prefab put into the world and named RockToDestroy.
It was modified in a way that we have added destruction to it via the SCR_DestructionMultiPhaseComponent and also the RplComponent so it can be properly destroyed.
Mechanics:
First the RockToDestroy is placed in the world and then the Area spawns the LayerTaskDestroy which spawns Layer that spawns all the Slots with RPG-7 and SlotDestroy that will search for the Granite_Boulder_01 and then it will use it as target entity for the Task.
Task is then finished upon destroying target entity, in this case, the rock.
TaskDestroy
Goal:
Create a Task Destroy for the US Faction - in this case, target will be a vehicle.
Setup:
It is achieved by having an Area with LayerTaskDestroy which has Layer that contains normal Slots that will spawn RPG-7 and SlotDestroy that spawns UAZ-469 which is linked to the created Task.
Mechanics:
Area spawns the LayerTaskDestroy which spawns Layer that spawns all the Slots with RPG-7 and SlotDestroy that spawns UAZ-469.
LayerTaskKill will also process display name of the entity and can display it in provided description, in this case: UAZ-469.
In order to finish this task, you need to destroy the vehicle (you can also drown it in the water).
TaskDeliverIntel
Goal:
Create a Task Deliver Intel for the US Faction.
In this case, we want a specific item to be delivered there it cannot be interchanged with the same prefab.
Setup:
It is achieved by having an Area with LayerTaskDeliverIntel and the SlotPick together with SlotDelivery placed in the hierarchy as seen in the image below.
Everything is set basically in default, but SlotPick has texts filled in the Task category and it is supposed to spawn IntelligenceFolder_E_01.et from the Object To Spawn attribute.
SlotDelivery then spawns Trigger and LayerTaskDeliver is linked there in Associated Task Layers attribute.
Mechanics:
Area spawns the LayerTaskDeliverIntel which spawns SlotPick that will spawn the intelligence folder for you to pick it up and carry.
In this particular example, SlotDelivery is also spawned from thy LayerTask right from the start and it spawns trigger that is used to detect player character and search for the folder in it.
The spawned asset from SlotPick is linked to this task so truly have to deliver this specific item.
In order to finish the task, deliver the intel to the trigger with the player character.
TaskDefendTarget
Goal:
Create a Task Defend Target for the US Faction.
It can be any entity that can be destroyed, in this case, we chose unarmed US Soldier.
Setup:
it is achieved by having an Area with LayerTaskDefend that spawns SlotDefend that will further spawn the Unarmed US Soldier.
Mechanics:
Area spawns LayerTaskDefend which spawns SlotDefend which spawns target to defend, in our case Unarmed US Soldier.
There is a timer set for 15 seconds and in order to finish this scenario successfully, you just have to wait whilst Unarmed Soldier still being alive. If he dies, the task will fail.
TaskDefendArea
Goal:
Create a Task Defend Area for the US Faction.
Goal will be to repel enemy forces and have majority at the end of the task countdown.
Setup:
It is achieved by having an Area with LayerTaskDefend that has two layers under it.
Attacker_USSR which is defined in Attacker Layer Names contains three SlotAI that each will spawn Unarmed USSR Soldier on repeated basis.
Each slot has the Repeated Spawn enabled and the layer has it enabled as well and set it to spawn repeatedly 2x each 15 seconds.
Defender_US layer then contains SlotTrigger that will spawn Trigger, Slot1 which spawns M60 machinegun turret and SlotDefend which will not spawn anything but the trigger is set there instead.
LayerTaskDefend also has Faction Settings set in a way that the attacking faction is considered USSR and it counts all the characters.
Defending faction is set to be US and it will count all the characters as well.
Defend time is set to 60 seconds and Defender percentage ratio is set to 0.51 which means that at the evaluation, there needs to be a majority of defenders in comparison to attackers.
Mechanics:
Area spawns LayerTaskDefend which spawns Attacker_USSR layer that will spawn 3 Unarmed USSR Soldiers initially and 15 seconds later, it will spawn additional wave using the Repeated Spawn feature.
Alongside it, Defender_US layer will spawn SlotTrigger which will spawn trigger that will be used to detect characters inside the designated area.
Slot1 then spawns M60 machinegun that can be used to quickly eliminate all the attackers.
SlotDefend then spawns trigger.
Area needs to be cleared out of the enemy presence in ratio that the majority of the units inside need to be of US faction.
If it is below this ratio, task will fail.
TaskDefendAreaAndTarget
Goal:
Create a Task Defend Area and Target for the US Faction.
This will be a combination of Defend Area and Defend Target and indeed both conditions will apply at the same time.
Setup:
It is achieved by having an Area with LayerTaskDefend that has two layers under it.
Attacker_USSR which is defined in Attacker Layer Names contains three SlotAI that each will spawn Unarmed USSR Soldier on repeated basis.
Each slot has the Repeated Spawn enabled and the layer has it enabled as well and set it to spawn repeatedly twice every 15 seconds.
Defender_US layer then contains SlotTrigger that will spawn Trigger, Slot1 which spawns M60 machinegun turret and SlotDefend which spawns Unarmed US Soldier.
LayerTaskDefend also has Faction Settings set in a way that the attacking faction is considered USSR and it counts all the characters.
Defending faction is set to be US and it will count all the characters as well.
Defend time is set to 60 seconds and Defender percentage ratio is set to 0.51 which means that at the evaluation, there needs to be majority of defenders in comparison to attackers.
Mechanics:
Area spawns LayerTaskDefend which spawns Attacker_USSR layer that will spawn 3 Unarmed USSR Soldiers initially and 15 seconds later, it will spawn additional wave using the Repeated Spawn feature.
Alongside it, Defender_US layer will spawn SlotTrigger which will spawn trigger that will be used to detect characters inside the designated area.
Slot1 then spawns M60 machinegun that can be used to quickly eliminate all the attackers.
SlotDefend then spawns Unarmed US Soldier that is supposed to be defended.
This combines both conditions so the whole time the Unarmed US Soldier needs to be kept alive and at the end of the timer, area needs to be cleared out of the enemy presence in ratio that the majority of the units inside need to be of US faction.
If one of the conditions will fail, it will fail the task.
TaskClearArea
Goal:
Create a Task Clear Area for US Faction.
There is some area that is occupied by enemy forces and you need to clear it out.
Setup:
It is achieved by having an Area with LayerTaskClearArea that has two layers under it.
First layer holds SlotClearArea which spawns TriggerDominance trigger that is set in a way that it is activated by Player and detects all SCR_ChimeraCharacter.
Second Layer contains 3x SlotAI that will spawn Unarmed USSR soldiers.
Mechanics:
Area spawns LayerTaskClearArea which spawns Layer that spawns SlotClearArea which spawns TriggerDominance that is used to periodically check the set area for the enemy presence.
Then Layer_AI spawns 3 SlotAIs that each spawns 1 Unarmed USSR Soldier. In order to finish this task, you need to clear out all the enemies in the area.
PatrollingGroup
Goal: Create a AI group that will be patrolling in set patern indefinitely.
Setup: It is achieved by having an Area that has Layer AI_group which has Layer Patrol1 that has SlotAI1 which spawns US Sentry group. Then there is Layer Patrol_Waypoints that contains three slots, each spawning Patrol waypoint. SlotAI1 has modified attribute category Waypoints where in the Wypoint Group Names, there was added a WaypointSet which contains Patrol_Waypoints and attribute Cycle Waypoints is set to true. Also Spawn AI On WP Pos is enabled for the SlotAI1.
Mechanics: Area Spawns AI_group which spawns Patrol1 which Spawns SlotAI1 which spawns US Sentry group that has link to the Patrol_Waypoints Layer that is spawned right after it which spawns 3 Patrol waypoints. These waypoints are then assigned to the AI group and are being cycled indefinitely. There is no end state, this group will conduct patrol for eternity.
FinishTaskToCreateTask
Goal: Create simple sequence of tasks that once one is completed, next one is spawned upon finishing it showing one possible way how to create this workflow.
Setup: It is achieved by having 3 distinct Areas. Each Area has LayerTaskMove with SlotMoveTo in their hierarchy that works exactly the same as TaskMove sample. Additionally, Area_A and Area_B also has LogicCounter. Each listen to their respective TaskMove set in the Input for the task finish via OnTaskEventIncreaseCounter (see On Task Event Increase Counter) action and then OnActivate, there is an action Spawn Objects which will spawn next LayerTask. There are many ways how to create this sequence, Here, we used Counters to showcase them, but it can be achieved without them just by putting the action Sapwn Objects to the LayerTask OnTaskFinished action. LayerTaskMove in Area_B and Area_C both have Activation Type attribute set to ON_TRIGGER_ACTIVATION which prevents these layers being spawned on scenario start of task generation init. These Layers will be able to spawn only when called with ON_TRIGGER_ACTIVATION action, such as is set in LogicCounter.
Mechanics: All Areas spawn in, but only the Area_A will spawn the LayerTaskMove with the SlotMoveTo and LogicCounter. Upon entering trigger that the SlotMoveTo spawns, finishing the objective will increase the counter which will trigger spawning of next LayerTaskMove from Area_B. That will do the same as in Area_A and spawning LayerTaskMove in Area_C as a final objective.
EndScreenBasedOnCompletedTasks
Goal: Create a workflow that will alter end screen based on the completed tasks.
Setup: There are 4 areas each containing their respective tasks. Documents have similar setup to TaskDeliverIntel Sample, but SlotPick 2 upon picking up documents ends the scenario via OnTaskProgress action End mission. Extraction bears similarities from TaskExfil, but additionaly, it has SlotDelivery_01 there that is linked for the D_Documents and Slot_1 which spawns american flag. Upon finishing it, it will also end the mission via OnTaskFinished action End Mission. It has the endScreenCounter as well that is set in a way that upon each task finish, it increases its count up until 4. OnIncrease actions are then set with Compare Counter And Execute with nested action to Set Mission End Screen. Task Kill is very similar to TaskKill Sample and those 4 BrickWall_01_4m_1 surround its target. Move is the same as TaskMove Sample.
Mechanics: All of the Areas spawn their tasks as you may know it from samples mentioned above with minor tweaks to them. Under the USSR flag, the folder with intel can end the scenario right away and you will get end screen where you did not manage to complete any of the tasks if you do just that. If you finish at least one, you will get different ending and this goes on and on according to what is set in the endScreenCounter. In order to finish the scenario completely, you need to finish all the objectives and then end the scenario by exfilling under the US flag an not picking up the intel under the USSR flag.
DynamicDespawn
Goal:
This Sample is here to showcase how to use the Dynamic Spawn/Despawn feature.
Setup:
It is achieved by having Area that has three layers in the hierarchy.
Area has Dynamic Despawn attribute enabled and Dynamic Despawn Range set to 30.
Layer "AI" that has several AI slots that each is setup to spawn either group or singular unit.
LayerTaskDestroy "LayerTaskDestroy_1" which has Spawn Children attribute set to RANDOM_ONE that can spawn either Layer1 or Layer2 which each would spawn SlotDestroy that spawns different vehicle.
Layer "RandomFlag" is set to RANDOM_ONE as well and it will randomly pick one of three Slots that each has different flag set (US, USSR or FIA).
On a GameMode(SF-Tutorial-Empty -> default -> GameModeSF1) component called SCR_GameModeSFManager, Dynamic Despawn attribute is set to true and Update Rate is lowered to 1 second from 4 seconds for the Sample purposes.
Mechanics:
At first, Area is Spawned but it does not do anything and does not spawn any children until you move player character inside its Dynamic Despawn Range which is set to 30 meters.
This check is in Sample worlds performed every 1 second, but it is recommended to have it set around 4 seconds in real scenarios to save up the performance.
Area is also set to visualise this range to make it easier for you to see the range.
Upon entering, Dynamic Spawn will be triggered that will spawn Layer "AI" with all the AI slots and their groups.
Then LayerTaskDestroy "LayerTaskDestroy_1" will perform random pick of the child layer and spawn selected task with vehicle to be destroyed.
Lastly, RandomFlag layer is spawned where again, one of three slots will be spawned.
All the random selections are saved and layers will remember it.
Upon leaving the range, everything inside will get despawned.
Upon reentry, everything will get spawned in back again, random selection will use the saved layers, positions of vehicles/AIs will be also set to where these entites were before and if some of it got killed/destroyed, it will not spawn (see Dynamic Spawn/Despawn).
DetectPrefabInTrigger
Goal: Create a Task to Deliver specific vehicle prefabs in specific counts into the trigger for US Faction.
Setup: It is achieved by having Area that spawns Layer1 which spawns Slots that each will spawn vehicles. Then LayerTaskMove that spawns SlotMoveTo which has adjusted Plugin Trigger attributes (see image below) to detect specific prefabs in specific numbers.
Mechanics: Area spawns Layer1 which spawns Slots that each spawn vehicles. Then LayerTaskMove spawns SlotMoveTo that has adjusted Plugin Trigger to be activated by SPECIFIC_PREFAB_NAME and using Custom Trigger Conditions, in order to activate this trigger, there needs to be at least two Ural-4320 vehicles or any of their child prefabs aka variants of Ural. UAZ-469 is requiered to be there in number of three but there needs to be this specific one, not any other variants. Otherwise, the trigger will not get activated and the Task will never finish. This setup can be used for any prefabs or even classnames to create variety of different tasks and logics.
Attributes of SlotMoveTo1 for Plugin Trigger
DeliverWeaponsToCrate
Goal:
Create a Task Deliver weapons into crate for US Faction.
Setup:
It is achieved by having Area that spawns Layer1 with Slot1 that is set to detect a prefab of a crate set in Object To Spawn attribute via Use Existing World Asset attribute.
Then It has Plugin On Inventory Change attached to (see in the image below) it and set Actions On Item Added to Count Inventory Items And Execute Action which then can execute Change Task State and Remove Item From Inventory actions.
LayerTaskMove then spawns SlotMoveTo that spawns trigger which is set to detect a medical crate 10x which will never be in the scenario spawned to create this "dummy" task.
Then outside of the Scenario Framework, there is a WeaponsCrate spawned and adjusted to have inventory. Lastly there are 5x M9 Handgun spawned around the crate.
Mechanics:
Area spawns Layer1 which spawns Slot1 that finds the WeaponsCrate in the vicinity and attaches the Plugin On Inventory Change to it that is set to detect 5x M9 Handgun inside it and upon reaching desired count, it will finish the objective and remove those weapons from the crate.
LayerTaskMove spawns SlotMoveTo but that is just used as "dummy" task to have some to work with and set in a way that conditions cannot be fulfilled in this scenario any other way than by that Scenario Framework action.
Attributes of Slot1 for Plugin On Inventory Change
DeliverWeaponsInVehicle
Goal: Create a Task to Deliver weapons in a vehicle for the US Faction.
Setup: It is achieved by having Area that Spawns Layer1 which spawns Slot1 that will spawn M1025 Humvee that has OnActivation action set with Add Item To Inventory that will add 10x M16A2 into its inventory after spawning. Then LayerTaskMove has OnTaskFinished action set to Remove Item From Inventory that will target the Slot1 spawned entity and attempt to remove it from there. Lastly, this Layer will spawn SlotMoveTo that has adjusted Plugin Trigger to search for M16A2 inside of it (see second image below) - it is important to set the Specific Class Names for this use case to the Vehicle so it can search vehicle inventories. In default cases, items in inventory are not searched by the trigger.
Mechanics: Area spawns Layer1 which spawns Slot1 that spawns M1025 Humvee and adds 10x M16A2 to its inventory. Then gets spawned LayerTaskMove which spawns SlotMove to that spawns trigger which is responsible for searching all for the M16A2 inside it and set in a way that it also searches inventory of vehicles. This task can be finished either by driving the vehicle straight to the trigger or putting 10x M16A2 by any means. If they are delivered via provided vehicle, weapons will be removed from said vehicle to showcase this action here.
Trigger
GenericTask
Goal: Create a Task linked to user action that will display the hint and finish the task - in this case, target user action will be our infamous Flush the toilet to complete the Scenario.
Setup: It is achieved by having an Area with LayerTask which has SlotTask that has On User Action Event added to the Activation Actions under the OnInit category. This user action is linked to a namedToilet entity that is placed in the world outside the ScenarioFramework hierarchy. Action ID is set to 0 as the Flush the toilet action has this ID in this case. Then there are two additional actions in the Actions list that will be activated upon someone using linked user action. First will display a hint using Show Hint. Second will change the task state to FINISHED for the LayerTask. Lastly, the OnTaskFinish has Action Wait and Execute that after 2 seconds will activate End Mission Action.
Mechanics: Area spawns the LayerTask which spawns SlotTask that will attach the User Action Event listener on toilet. Upon someone activating the user action, it will show a hint, then finish a task and then it will finish the mission. In order to finish this task, you need to flush the toilet.
Waypoints
Goal: Create a sequence of different waypoints for the AI group to complete.
Setup: It is achieved by having an Area that has Layer Layer1 which has Slot1 that spawns UH-1H helicopter that names it namedHeli for future reference, then Slot3 spawns UAZ-469 and lastly SlotAI1 which spawns US Fire Team. Then there is Layer Waypoints that contains various SlotWaypoints. SlotAI1 has modified attribute category OnInit where in the Activation Actions, there are defined actions to assign waypoints to the AI group and upon completing each waypoint, it adds another in said sequence. Outside the ScenarioFramework hierarchy, there is BarGate.
Mechanics: Area Spawns Layer1 that spawns UAZ-469, UH-1H and US Fire Team. Then Layer Waypoints spawns waypoints. These waypoints are then assigned to the AI group one by one and next one is assigned after completing the previous one. First, Fire Team is ordered to get in UH-1H and then get out. After that, they are ordered to move to the crossroad. Shortly after that, they are ordered to open a bar gate and then get in UAZ-469 and drive on the crossroad where they get out. There is no end state, this group will finish waypoints in given order.
LastStand
Goal: Create a sequence of Task Defend to hold off enemy waves of attack for the US faction.
Setup: It is split into 4 Areas called Stages. Stage_0 contains LayerTaskMove with SlotMoveTo and Slot2 that spawns an M60 machinegun. Each of the following Stage is then set to be activated by previous stage finishing task and it contains slightly modified version of DefendArea Sample where most notable differences are in Title, different timer and not requiering to having majority in said area.
Mechanics: Area Stage_0 spawns LayerTaskMove with SlotMoveTo that spawns Task prompting you to move to said area. It also Spawns M60 machinegun from Slot2. Upon moving to the designated area and finishing the task, LayerTaskDefend from Stage_1 will spawn and alongside it the AIs from attached Attacker Layer. Once the timer runs out, it will spawn contents of Stage_2 and similarly for the Stage_3 which then ends the scenario after 4 seconds via the Wait And Execute action to then End Mission.
TutorialFull
Goal: Create a small show-case mission that can serve as a tutorial for a bit more advanced workflow than it is shown in Samples. It expects knowledge of the basic Scenario Framework samples.
Setup: It is achieved by having several areas that splits the parts of the scenario. Area_1_island spawns LayerTaskDeliver with spawns SlotDelivery that is set to detect Barrel.et and SlotPick which is set to find the nearest barrel and link it as an item to be delivered. It also spawns two SlotTriggers that upon entry, they will display a hint, play sound and TriggerHintNoFuel spawns TaskMoveToFacility. Area_2_Facility holds previously mentioned task layer that has ON_TRIGGER_ACTIVATION. Once that is activated, it spawns SlotMoveTo which spawns Task Move To and it also spawns SlotTrigger that is set to check for Vehicles in order to display a hint. Upon finishing the Task Move from the TaskMoveToFacility, it will display a hint to Search for the barrels with oil. You then need to move to the Area_3_Garage near the rock where LayerTaskDestroy spawns SlotDestroy that has in target nearest rock. Upon task Destroy rock being spawned, it will provide a hint. After the rock being destroyed, Ural-4320 that is spawned there outside of the Framework can be moved to the previously mentioned trigger that is set to check vehicles - the TriggerHintLoadBarrels. Once there, upon loading barel into the truck and then moving it to the SlotDelivery_1 trigger, it will finish this task and display hint set in TaskDeliverFuel. Then it will spawn contents of the Area_4_Landing that will spawn ClearAreaAI which will spawn SlotAI that spawns a group and WPInvasion Slot that spawns attack waypoint. It also spawns TaskClearArea similar to what you know from the Samples. Upon clearing the Area, the TaskClearArea sets the Mission End Screen and Ends the mission via actions attached in OnTaskFinished.
Mechanics: Area_1_island spawns LayerTaskDeliver with Pickup and Delivery points and two SlotTriggers. Player is spawned directly to the TriggerHintWelcome which issues a hint saying: Your primary task is to activate the radar located on top of the hill. Check your tasks.
After that, you are supposed to go to the hill where the radar is located and here TriggerHintNoFuel says: The radar is not working since the generator lacks the fuel. Find it and transport it to here.
This leads you to the Area_1_Facility to finish the LayerTaskMove and then going to the Area_3_Garage where the Ural-4320 behind the rock is located. Upon destroying the rock, you are supposed to move the Ural-4320 back to the facility where oil barrels are located and there you are prompted with another hint telling you to load the barrel. Upon loading the barel to the truck, move it to the SlotDelivery_1 and unload it there. This will spawn enemy AI going to attack your position with TaskClearArea. Upon finishing it, it ends the scenario.
Compositions
Scenario Framework Compositions are just Scenario Framework components put together for easier and quicker use when creating your scenarios.
In fact, many of these are directly taken from the Scenario Framework Samples so you do not have to reopen those and you can easily put them into your scenarios, perform few adjustments and you are good to go.
- TaskMove sample
- TaskKill sample
- TaskExfil sample
- TaskDestroy sample
- TaskDeliverVehicles sample (if the prefab is in the trigger, it is delivered)
- TaskDeliverIntel sample
- TaskDefendTarget sample
- TaskDefendAreaAndTarget sample
- TaskDefendArea sample
- TaskClearArea sample
1.1.0 Structural Changes
Update 1.1.0 brought many changes to the Scenario Framework structure from 1.0.0.
The main difference is the switch from normal Slots spawning prefabs of waypoints to the specialised SlotWaypoint that has the necessary API for you to have full control over the waypoint attributes and their behaviour. This includes a new waypoint management that allows to customise the attributes of waypoints that are about to be spawned, making it easier to influence AI units movement, allowing for more control overall. Waypoints also have a new visualisation in the World Editor to better see the position of each one.
This aside many new options have had a few changes, the most important one being the switch from Waypoint Group Names (deprecated and unused) attribute to Waypoint Set.
If Waypoints have to be cycled, just select the Cycle Waypoint. Two methods are available:
- Either input the Layer name that contains the SlotWaypoints to be cycled into the "Layers With Waypoints To Cycle" attribute
- Or, if this waypoint is inserted into the target layer, leave the field empty and the parent layer where this Cycle Waypoint is located will automatically cycle all the (non-cycle) waypoints in it.