Jump to content

Recommended Posts

Hey all,

I've decided to release a script that I mainly wrote for my own missions but since I was told that it could be interesting for others, I decided to release it.

The script is the FHQ TaskTracker, as the name implies, it's used to handle and maintain mission tasks and briefings. It can automatically keep track of task states, briefing text, dynamically add both tasks and briefings, and distribute them over the network to clients that join in progress. Also supports the use of parented tasks, and is compatible to both ArmA 2 and Arma 3 (it will take care to add the tasks and briefing entries in the correct order as specified)

The archive also contains documentation on it's use.

New version available:
V1.1 - Adds Arma 3 notification support, as well as a demo mission to explain the use of the script in a practical example
V2.0 - Complete rewrite. Adds support for JIP into disabled units/respawn
V2.1 - Fixed a bug in task creation notifications
V2.2 - Fixed a bug in task creation notification (for real this time). Thanks to FortuN for pointing this out.

V4.0 - Now supports 1.58 task overhaul, rewritten as a function library, and now directly accessible through an Eden Mod

Feedback welcome.

Download:
FriedenHQ

Armaholic

withSIX

 

 

The Eden Editor Plugin can also be directly subscribed on the Steam Workshop

A demo mission is also available on the Workshop

Edited by Varanon
Added link to modified version
  • Like 2

Share this post


Link to post
Share on other sites

Great, thanks Foxhound

Share this post


Link to post
Share on other sites

I highly recommend this script for people who want to create task and briefing a fool-proof way without JIP problems of people not being able to see briefings and tasks. It's not that hard to use either.

Share this post


Link to post
Share on other sites

Congrats on the release, I hope that we will see proper briefings and properly ordered tasks in missions from now on!

Share this post


Link to post
Share on other sites

I am stuck even after reading through the .pdf file, can you upload a example mission please ?

Dirty Haz

Edited by Dirty Haz

Share this post


Link to post
Share on other sites
I am stuck even after reading through the .pdf file, can you upload a example mission please ?

What are you stuck with?

Share this post


Link to post
Share on other sites

Setting up the tasks... I learn better from example missions.

Dirty Haz

Edited by Dirty Haz

Share this post


Link to post
Share on other sites

I'm about to make a new release (with the new A3 notification mechanism) and I'll include a sample mission.

You may also want to look at Phantom's site (see his signature), ha has a tutorial on creating missions and his examples use the TaskTracker

Share this post


Link to post
Share on other sites

It's pretty helpful but could you possible provide the briefing.sqf you talk about and show off in your little tutorial Phantom as I'm finding it difficult setting up one myself correctly.

Share this post


Link to post
Share on other sites
It's pretty helpful but could you possible provide the briefing.sqf you talk about and show off in your little tutorial Phantom as I'm finding it difficult setting up one myself correctly.

Huh? It's all there:

/*
* some comments you see on the picture
*/
[
 west,
    ["Mission", 
          "Kill everything that moves"],
    ["Situation",
         "If it moves, shoot it!"]
] call FHQ_TT_addBriefing;

Just create a briefing.sqf, put the code from the tutorial page in it, and that's it.

Share this post


Link to post
Share on other sites
It's pretty helpful but could you possible provide the briefing.sqf you talk about and show off in your little tutorial Phantom as I'm finding it difficult setting up one myself correctly.

You can basically retype it from Phantom's page. I don't understand what the problem is and what should be difficult to set up ?

/* Briefing
* The briefing can be defined by calling FHQ_TT_addBriefing.
* The array is built like this.
* The first element should be a filter (side, group, faction, or a piece of script)
* This is followed by pairs of strings, a head line, and an actual text.
* Briefings are added in the order in which they appear for any unit that matches
* the last filter.
*/
[
west, 
	["Mission",
		"*** Describe the player's mission in few words ***"],

	["Situation",
		"*** Describe the situation, what lead to the current mission, and the current theatre of war ***"],

	["Execution",
		"*** Describe the intended way the mission should be carried out ***"],

	["Allied forces",
		"*** Describe additional stuff, like allied forces, intel, etc ***"],

	["Weather",
		"*** Describe the current and expected weather ***"],

	["Credits",
		"Mission by    <br/>"],

       ["Current Settings",
       	_currentMissionSettings]
] call FHQ_TT_addBriefing;

[
FHQ_playerGroup,
  		["taskDestroy", "Got to two things", "Go to two things", ""],
       [["taskTarget1", "taskDestroy"], "Thing #1", "Thing #1", "", getMarkerPos "markTarget1", "assigned"],
       [["taskTarget2", "taskDestroy"], "Thing #2", "Thing #2", "", getMarkerPos "markTarget2"],
       ["taskExfil", "Get out", "Get out", "", getMarkerPos "markExfil"]        
] call FHQ_TT_addTasks;

Share this post


Link to post
Share on other sites

A quick question. Sorry if it has been answered before.

Does this script need to be installed on all clients to work?

Just double checking.

Sent from my phone

Share this post


Link to post
Share on other sites

No, it's not an addon. You copy it into your mission folder. When you're done with the mission and want to publish it, you save with "export to Multiplayer" or "Export to singleplayer", and it will become part of the .pbo file that you created in the process. So there is no need to distribute it, it will become part of the mission.

Share this post


Link to post
Share on other sites

Now that I've got the hang off using it I'd like to thank you Varanon and you too Phantom for the script and help respectively. It's fantastically easy now to set up those briefings and tasks for someone like me who's new to the scripting side of Arma. I do have one question though if your willing to help me out.

I'm trying to detect if if task2 has been Assigned and if so to complete it. As I mentioned I'm new to this so forgive me if it's something easy or I'm simply going about this the wrong way. I've read various resources and tutorials but just can't find anything detailed on 'if' checks.

//Escaped in the Zodiac.
_res = ["task2"] call FHQ_TT_getTaskState;
if (toString _res == "Assigned") then
{
	["task2", "Succeeded"] call FHQ_TT_setTaskState; 
}
else
{
	""
};

Share this post


Link to post
Share on other sites
Now that I've got the hang off using it I'd like to thank you Varanon and you too Phantom for the script and help respectively.

Good to hear!

Regarding your problem:

You don't need the "toString", the result of FHQ_TT_getTaskState is a string already. Note though that it's always all lower case, so the following would work:

if ( (["task2"] call FHQ_TT_getTaskState) == "assigned") then 
{
   ["task2", "succeeded"] call FHQ_TT_setTaskState;
};

I don't understand, though, why you want to make completion depend on the "assigned" state, though. Usually, you'd use a trigger and/or other checks for that.

Share this post


Link to post
Share on other sites
Good to hear!

Regarding your problem:

You don't need the "toString", the result of FHQ_TT_getTaskState is a string already. Note though that it's always all lower case, so the following would work:

if ( (["task2"] call FHQ_TT_getTaskState) == "assigned") then 
{
   ["task2", "succeeded"] call FHQ_TT_setTaskState;
};

I don't understand, though, why you want to make completion depend on the "assigned" state, though. Usually, you'd use a trigger and/or other checks for that.

Thank you that work's perfectly. The reason I'm checking for assignment of the task is due to being an optional, hidden, task. It will only appear if you've hit the right trigger for it. I want to move it to succeeded once you've hit another trigger. So I check to make sure the player has it, and if so, to complete it. If that make's sense.

Share this post


Link to post
Share on other sites

Note also that I just uploaded a new version featuring Arma 3 notification, as well as a demo mission to illustrate the use of the script (plus, the demo mission also illustrates some way of handling slightly more complex tasks with game logics, tiggers and waypoints without too much scripting involved)

Share this post


Link to post
Share on other sites

Varanon, how would I write this correctly?

[
       west,
       [format ["%1%2", _taskType, _taskNum], format ["%1 Target %2", _taskType, _taskNum], format ["%1 %2", _taskType, _taskNum], format ["%1", _taskType], getMarkerPos _markerNum]
] call FHQ_TT_addTask;

I'm not sure how to implement "format" into the code, keep getting missing bracket errors.

Share this post


Link to post
Share on other sites
Varanon, how would I write this correctly?

If you insert a few line breaks, you'll see:

[
       west,
       [
           format ["%1%2", _taskType, _taskNum], 
           format ["%1 Target %2", _taskType, _taskNum], 
           format ["%1 %2", _taskType, _taskNum], 
           format ["%1", _taskType], getMarkerPos _markerNum]
   --> ] <---
] call FHQ_TT_addTask;

You are missing the last bracket

Share this post


Link to post
Share on other sites

Ah doh! Thanks mate, great script.

Edit nvm, look at the end of the getMarkerPos line, there's that last bracket. Is there a special way to do brackets inside of brackets?

Edited by zuff
Wasn't missing bracket after all.

Share this post


Link to post
Share on other sites

[
       west,
       [
           format ["%1%2", _taskType, _taskNum], 
           format ["%1 Target %2", _taskType, _taskNum], 
           format ["%1 %2", _taskType, _taskNum], 
           format ["%1", _taskType], getMarkerPos _markerNum]
   --> ] <---
] call FHQ_TT_addTask;

If you look at how many [ ] brackets you have your missing one.

format ["%1", _taskType], getMarkerPos _markerNum]

You have one open bracket and two close bracket. Looking through the whole thing you have 6 open's and 7 closes. That leave's you one extra. Hence the missing bracket warning.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×