Difference between revisions of "Arma 3 Task Enhancements"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (2D texture)
(Redirected page to Arma 3 Tasks Overhaul)
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
#redirect [[Arma_3_Tasks_Overhaul]]
[[Category:Arma_3:_Editing|Task Enhancements]]
'''''This system is actively being developed and is subject to change.'''''
'''''Use at your own risk.'''''
==System Overview==
In addition to the task framework optimizations and improvements that were done through 1.42-1.48 releases there are 4 new extra task related plugins being developed under the ''Task Enhancements'' label:
# Core
# 3D Markers
# Task Sharing
# Task Propagation
The main goal of the task enhancement plugins is to extend the functionality of the task framework and improve the UX by making the interaction with tasks more intuitive, rewarding and quick. The task enhancements are fully SP and MP compatible.
===Controlling plugins===
All enhancements are disabled by default. To override that, add <tt>CfgTaskEnhancements</tt> class into the mission's <tt>description.ext</tt> file and add at least the <tt>enable = 1;</tt> parameter to the class. The <tt>enable = 1;</tt> parameter will activate the core plugin. If you want to add the 3d markers, task sharing or propagation, you need to define the corresponding parameters (check the example below for more info).
class CfgTaskEnhancements
    enable      = 1;            //0: disable new task features (default), 1: enable new task features & add new task markers and task widgets into the map
    3d          = 1;            //0: do not use new 3D markers (default), 1: replace task waypoints with new 3D markers
    3dDrawDist  = 10000;        //3d marker draw distance (default: 2000)
    share        = 1;            //0: do not count assigned players (default), 1: count how many players have the task assigned
    propagate    = 1;            //0: do not propagate (default), 1: propagate shared tasks to subordinates
The ''Core'' plugin, as name suggests, is a prerequisite of all task enhancement plugins. But there are more logical links between the plugins:
* the ''Core'' handles whole task type detection and visualization and because of that, they are required for ''3D Markers''.
* the ''Task Sharing'' gathers and delivers task assignment data to all clients and feeds those data to ''Core'' (its in map visualization) and ''3D Markers''.
* because ''Task Propagation'' works only on task that are shared and that's why having ''Task Sharing'' enabled is required for ''Task Propagation'' to work.
<dependence graph>
==Current and Future State==
The current version is more or less scripted prototype and is still being in active development. There are some limitations due to being scripted system, but it works quite well and its network traffic is optimized.
Because the ''Task Enhancement'' plugins are used and tested in the End Game MP scenarios, the community is more or less aware about their existence. We felt like we should explain how the system works and how it should be properly used in case someone wants to try it even in the early development  phase.
The target state is to move most of the system into the engine while keeping the frontend definition as much intact as possible. We cannot assure there won’t be any changes at all, as there most likely be, but they will most likely be in form of simplifications, improvements and new (optional) features.
The functionality and purpose of ''Core'' plugin can be divided into 2 parts.
First, the plugin creates the shell for all task enhancement plugins to work and visualize properly by tweaking the task related scripts and extending the data structures to accommodate for additional task attributes.
Second, the ''Core'' plugin handles the improved visualization of tasks in 2D - in map, briefing and respawn dialog. This is considered to be a minimal version of tasks enhancements to be used. That’s why it is baked into the functionality of ''Core'' plugin.
If you toggle on the Core plugin, the 2D task markers will be replaced by new task markers with the task type icons. If the task doesn’t have the type associated (see parameters of [BIS_fnc_taskCreate]), the default task type and icon will used. In addition the task tooltip widget will now appear if you mouse over the task marker. The tooltip widget displays up to 3 information about the given task and can be used to quickly assign or unassign the player to resp. from the task.
The new 2D task marker created by the ''Core'' plugin consists of black square background and task type icon colored white, which is displayed over it. This is a default visual state. The state changes according to task and interaction states.
Check the table below for preview of different visual states.
<table with task states preview>
===Task type===
There are several new task attributes, but the most visual and significant attribute is the task type. The task type defines the nature or let’s say category of the task. It is visualized through Core and 3D Markers plugins in 2D resp. 3D environment and it should give player very quick overview what is the particular task most likely about.
====How are the task types defined?====
The task type attribute is defined in <tt>CfgTaskTypes</tt> (see example below) as a class that currently has these 2 attributes:
#icon - path to the task type icon used in 2D
#icon3D - path to the task type icon used in 3D
class CfgTaskTypes
    class Attack
        icon    = \A3\UI_F_MP_Mark\Data\Tasks\Types\Attack_ca.paa;
        icon3D  = \A3\UI_F_MP_Mark\Data\Tasks\Types3D\Attack_ca.paa;
    class Defend
        icon    = \A3\UI_F_MP_Mark\Data\Tasks\Types\Defend_ca.paa;
        icon3D  = \A3\UI_F_MP_Mark\Data\Tasks\Types3D\Defend_ca.paa;
====What task types are available?====
#There are currently these 8 archetype task types defined:
And there is a pre-defined task type for every capital letter in latin alphabet.
====How to extend the list of task types?====
The list of available task types can be extended through new <tt>CfgTaskTypes</tt> definition in mission description.ext, campaign description.ext or global (addon) config.
*Even if the system was designed to be easy to extend, be careful with adding and using too many task types. If there will be 20 different task types used in the scenario, players might get confused by all the different icons in the map/on the screen.
====How to create the new task type textures?====
There are currently 2 textures needed to define a task type. This is due to limitation of the scripted solution. When the feature will be moved into the engine, only single texture will most likely be needed.
====2D texture====
* texture size is 64x64
* format .paa
* texture is centered, positioned in the middle of the canvas area, with approx. 4 px margins
* foreground (texture) color is white
* alpha 100%
* background transparent
<gallery perrow="1" style="border:1px solid #f3f1bd; background-color:#fffdc6;">
Image:TaskEnhancements_3Dmarker_texture.png|Sample texture for 3D marker
====3D texture====
suggested texture size is 128x128
format .paa
texture is positioned in the top half of the canvas area, bottom half is empty
vertical distance from the middle and top of the picture are should be approx. 4 px margins
texture color is white, alpha 100%
the 2D texture can be used, just the canvas is 2x bigger and the texture is moved to the top half of the canvas area
<sample of 3D task type texture>
System, network traffic & BattlEye filters
The system doesn’t create any network traffic, all is done locally. If Task Sharing is used, the system reuses the data provided by the Task Sharing plugin.
==3D Markers==
The ''3D Markers'' plugin extends functionality of the ''Core'' plugin by bringing the new task markers with task type icons into 3D environment. The ''3D Markers'' if active replace the classic task waypoints with markers consisting of task type texture and distance indicator.
The goal of ''3D Markers'' is to provide player with more useful, functional and visually appealing info about the tasks around him.
The current visualization is subject to change and some extra control mechanics can be put on top of it. Currently the system shows all tasks in set radius, define by config parameter <tt>3dDrawDist=10000;</tt> (default 10km). Depending on the circumstances, this can feel like too much of the screen clutter. To counter that the draw distance can be lowered or even set to 0.
*The currently assigned task is always visible. The draw distance doesn't matter.
<preview of the 3d markers>
===System, network traffic & BattlEye filters===
The system doesn’t create any network traffic, all is done locally. If ''Task Sharing'' is used, the system reuses the data provided by the ''Task Sharing'' plugin.
==Task Sharing (MP)==
The goal of Task sharing is to handle gathering and distribution of information about task assignments - who is assigned to what task.
This information is visualized in 2 ways:
#by 2D markers as the counter of players assigned to particular task in its map widget
#by 3D markers by colorizing task 3D marker icon, if the task is assigned to at least one friendly player
===Controlling task sharing===
Task sharing is controlled in two levels:
#global level - by setting the config property
#local level - by flagging the task for sharing when it is created (see the BIS_fnc_taskCreate)
The global settings takes the precedence. If the description.ext param <tt>share=0;</tt>, the task sharing will be completely disabled. If <tt>share=1;</tt> sharing will be unlocked and the local - per task - setting kicks in.
By default all tasks are allowed for sharing, so all what is needed is to set the global config property.
===System, network traffic & BattlEye filters===
The information about player’s assigned task is stored in the player’s namespace under variable <tt>@</tt>. This variable get broadcasted every time player’s assigns himself or is assigned to different task.
* All changes of assigned tasks are processed immediately, but the broadcast is slightly postponed and only the last/final value is being send.
* The variable used for storing and broadcasting of the player’s assigned task is only 1 char long to save the network data size.
* Processing of information about who and how many people are assigned to given task is handled locally.
* If the task sharing is being used, server admins should setup a filter exception for the player’s variable <tt>@</tt> to allow broadcast of the task assignment data.
==Task Propagation (MP)==
The goal of Task Propagation plugin is to support the squad based team play by allowing only the squad leader to assign tasks.
If squad leader assigned task changes, the plugin automatically updates the assigned task on all his subordinates.
'''Known issues:'''<br/>
* Subordinates can assign tasks to them from the task description panel by clicking the ''“Assign as current”'' link.
===System, network traffic & BattlEye filters===
The system doesn’t create any network traffic, all is done locally. If ''Task Sharing'' is used, the system re-uses the data provided by the ''Task Sharing'' plugin.

Revision as of 11:00, 25 July 2016