Jump to content

Recommended Posts

How to make a basic Briefing in ArmA 2

In ArmA 2 BIS has decided redo the briefing system. The well known 'briefing.html' is still being used, but only for the debriefing.

The actual briefing is added by script commands, which I advise you to put in a 'briefing.sqf', and give you the ability to add 'Notes' and 'Tasks' to the briefing menu.

Ok, let's start with the simple stuff. Make a file called 'briefing.sqf' and make sure this gets executed through the 'init.sqf'. Add the following to your init.sqf:

execVM "briefing.sqf";

Now we can add the briefing commands to the briefing.sqf file, and keep the other files of your mission clean.

Adding Notes:

player createDiaryRecord ["Diary", ["Title 1", "Message 1"]];

This adds a note called 'Title 1', and when you click on that a bigger message screen comes up with 'Message 1'. This is great, but we really need some formatting and ability to add links and pictures.

Linebreak/newline: <br/>

Ampersand: &

Link to marker: <marker name='obj1'>Link to Marker</marker>

Show an image: <img image='somePic.jpg'/>

Show an image and manipulate the image width and height: <img image='somePic.jpg' width='200' height='200'/>

Some examples:

player createDiaryRecord ["Diary", ["Title 2", "Isn't whitespace awesome? <br/><br/><br/>Yes it totally is!"]];

player createDiaryRecord ["Diary", ["Title 1", "We have an objective <marker name=mkrObj1'>here</marker> and one <marker name='mkrObj2'>there</marker&gt]];

Ok, you should now understand how to make a note, and what the possibilities are in the briefing message window, so let's add some tasks.

Adding Tasks

You can make tasks whenever you want (at mission start, or at any time you like duing a mission), and you can customize them a lot, but let's start with a simple one:

tskExample1 = player createSimpleTask ["Task Title 1"];

This add only adds a task called 'Task Title 1', but the message box is empty. We fix this with the following command:

tskExample1 setSimpleTaskDescription ["Task Message 1", "Task Title 1", "Task HUD Title 1"];

This sets a description to the task. The first array element is the message (like the message from the notes), the second element is the title (yes, we already defined that, but we have to redefine it here), and the third element is what gets shown on the HUD.

Note: The formatting tags that I've shown you earlier work with tasks as well.

So now that we have a task with a title and message, we can also add an objective marker to the task so we know where the objectives actually are:

tskExample1 setSimpleTaskDestination (getMarkerPos "mkrObj1");

Make sure you have an empty marker called 'mkrObj1', and you'll see a semi-transparant circular marker which will light up when you set the task as active.

Other commands

Well,now you know how to make notes and tasks, but we also need to control those tasks during the mission.

We force a task upon a player by executing this on his machine:

player setCurrentTask tskExample1;

This will highlight the objective marker, and show him the through the HUD where the objective is.

Now all that there's left, is setting the task status:

tskExample1 setTaskState "SUCCEEDED";

tskExample1 setTaskState "FAILED";

tskExample1 setTaskState "CANCELED";

tskExample1 setTaskState "CREATED";

"SUCCEEDED" = Makes the checkbox green

"FAILED" = Puts a red cross in the checkbox

"CANCELED" = Puts a grey diagonal line through the checkbox

"CREATED" = Clears the checkbox (makes it look like you've just created it)

You can also show the state of the task with the taskHint command, but since that command is kinda hard to use, we're gonna use a function that I've made to make a lot easier to show the task state.

How to make task hints

If you wanna make taskHints that look like this:

taskstatus.png

then go and grab my taskHint function at http://www.ofpec.com/forum/index.php?topic=33768.0

And that's pretty much it for a basic briefing. I'll try to add more advanced stuff to it when I have some more time.

Templates

I've made briefing.sqf and briefing.html templates. Grab them at ofpec:

http://www.ofpec.com/forum/index.php?topic=33468.0

Edited by Mike84

Share this post


Link to post
Share on other sites

Quite useful, but should'nt stuff like this be posted in the community wiki though?

Share this post


Link to post
Share on other sites
When you select this task as current task, the marker will light up.

Hmm, is there a way to not make it 'light up', since often we will use separate markers for different types of tasks (attack, defend)?

Share this post


Link to post
Share on other sites

well, if you put a destination to the task it will create a marker. So if you dont want the game-engine to add a marker there, just omit the setSimple taskDestination command

Share this post


Link to post
Share on other sites
Hmm, is there a way to not make it 'light up', since often we will use separate markers for different types of tasks (attack, defend)?

True, use an invisible marker to get the same effect you saw in the campaign, ie. the orange marker thing. I was wondering why BIS had put the invis marker on top until i figured that out.

Share this post


Link to post
Share on other sites

Thanks for the guide mate! Did you figure out how to use links inside the briefing and is it possible to add something to the map section of the briefing as well?

greetings

Share this post


Link to post
Share on other sites

Thank god! I've been racking my brains over getting a briefing to work for the last couple of hours and was just about to start another thread.

Edit- Not working for me, guess I'll have to wait for something more idiot proof.

Edit edit- Finally got it :)

Edited by froggyluv

Share this post


Link to post
Share on other sites

Finally! I couldn't find anything about new briefings, thanks!

Share this post


Link to post
Share on other sites

How can I hide a task at start and make it active (visible) later? Or is it possible to add tasks in middle of the other tasks during the mission? Having the tasks in right order would be important in bigger and complex missions.

Share this post


Link to post
Share on other sites

Thanks - that works great. :)

Share this post


Link to post
Share on other sites

Ok, I'm new to scripting and such. I'm trying to build a basic mission of clearing a town. How do I add a briefing?Just something simple that says "The town of xyz is held by insurgents. Your task is to take your team along with the support of xyz team and eliminate them"

Share this post


Link to post
Share on other sites

please check my code thanks

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<!--------------------------------------------------------->

<!-- Briefing file for Armed Assault -->

<!-- Created with ArmA Edit - Version 1.3.4000 -->

<!-- -->

<!-- DO NOT edit this file manually to guarantee it can -->

<!-- be re-opened by the Briefing Wizard. Click the -->

<!-- "Edit Briefing" button on the toolbar to edit. -->

<!--------------------------------------------------------->

</head>

<body>

<!-- [bRIEFING_WIZARD_30] -->

<!---------------------------------------------------->

<!-- Plans -->

<!---------------------------------------------------->

<p><a name="plan"></a>

<!-- [PLAN] -->

Your mission tonight is to eradicate all 3 radar and radio Towers from the towns of Parlovo,Zelengorsk,Komarovo which is currently under Russia control.<br><br>Good luck!

<!-- [END] -->

</p><hr>

<!---------------------------------------------------->

<!-- Notes (in handwriting) -->

<!---------------------------------------------------->

<h6><a name="main"></a>

<!-- [NOTES] -->

Mission by Lightninguk<br><br>Uses Ambient Civillian,Civiilian Vehicles,First AId,

<!-- [END] -->

</h6><hr>

<!---------------------------------------------------->

<!-- Objectives -->

<!---------------------------------------------------->

<!-- Objective 1 -->

<p><a name="obj_1"></a>

<!-- [OBJ_1] -->

<a href = "marker:obj1">you will Start on USS Iwo Jima LHD7</a>

<!-- [END] -->

</p><hr>

<!-- Objective 2 -->

<p><a name="obj_2"></a>

<!-- [OBJ_2] -->

<a href = "marker:obj2">USMC Has made a beach landing near the town of Kamenka and is under it control</a>

<!-- [END] -->

</p><hr>

<!-- Objective 3 -->

<p><a name="obj_3"></a>

<!-- [OBJ_3] -->

<a href = "marker:obj3">Search and destroy the radio tower in Parlovo</a>

<!-- [END] -->

</p><hr>

<!-- Objective 4 -->

<p><a name="obj_4"></a>

<!-- [OBJ_4] -->

<a href = "marker:obj4">Destroy the Radar Tower in the town of Zelengorsk</a>

<!-- [END] -->

</p><hr>

<!-- Objective 5 -->

<p><a name="obj_5"></a>

<!-- [OBJ_5] -->

<a href = "marker:obj5">Move to the town of Komarovo and blow up the last radio Tower</a>

<!-- [END] -->

</p><hr>

<!---------------------------------------------------->

<!-- Debriefing -->

<!---------------------------------------------------->

<!-- End #1 -->

<h2><a name="debriefing:end1"></a><br>

<!-- [TITLE_1] -->

Missiom Complete

<!-- [END] -->

</h2><br><p>

<!-- [TEXT_1] -->

Good Work

<!-- [END] -->

</p><br><hr>

</body>

</html>

briefing SQF

player createDiaryRecord["Diary", ["Briefing", "Your mission today is to eradicate all radio and radar Staion in the east part of the map

tskobj1 = player createSimpleTask["Start at USS IWO JIMA LHD7"];

tskobj2 = player createSimpleTask["If you are kill you will spawn in USMC Town Kamenka"];

tskobj3 = player createSimpleTask["Destroy Radio Station in Parlovo"];

tskobj3 = player createSimpleTask["Seach and Destroy Radar Station in Zelengorsk"];

tskobj4 = player createSimpleTask["Find and Destroy Radar Station in Komarovo"];

tskobj1 setSimpleTaskDestination (getMarkerPos "obj1");

tskobj2 setSimpleTaskDestination (getMarkerPos "obj2");

tskobj3 setSimpleTaskDestination (getMarkerPos "obj3");

tskobj4 setSimpleTaskDestination (getMarkerPos "obj4");

tskobj5 setSimpleTaskDestination (getMarkerPos "obj5");

Share this post


Link to post
Share on other sites

Your player createDiaryRecord is missing the closing brackets and semi-colon at the end. :)

player createDiaryRecord["Diary", ["The title", "The message"]];

Share this post


Link to post
Share on other sites

What kind of string can use setTaskState command, exept "SUCCEEDED" and "FAILED"?

Share this post


Link to post
Share on other sites

Newb question. Where do I find the Init.sqf file?

I've checked C:\Users\matt\Documents\ArmA 2 Other Profiles\[RIP]Bear_Pack\missions\test1.utes

The only thing in this folder is the mission.sqm and the description.ext that I placed there. Do I need to create one?

Share this post


Link to post
Share on other sites
Newb question. Where do I find the Init.sqf file?

I've checked C:\Users\matt\Documents\ArmA 2 Other Profiles\[RIP]Bear_Pack\missions\test1.utes

The only thing in this folder is the mission.sqm and the description.ext that I placed there. Do I need to create one?

Yes and a briefing.sqf if you are following these instructions.

Alright, I gotta a dumb question. I've got the tasks, notes, etc setup in game but I'm not sure how to get the tasks to checkoff when it's complete. Where do I insert the trigger name, like I did in the briefing.html in A1.

Thanks for the tutorial by the way. There's no way in hell I would've ever figured this one out.

Edited by Manzilla

Share this post


Link to post
Share on other sites

Hi,

I've got a question. My briefing is working so far but after respawn in multiplayer games the briefing entries are gone. How can I fix this without screwing around much? What about JIP compatibility?

Share this post


Link to post
Share on other sites
Yes and a briefing.sqf if you are following these instructions.

Alright, I gotta a dumb question. I've got the tasks, notes, etc setup in game but I'm not sure how to get the tasks to checkoff when it's complete. Where do I insert the trigger name, like I did in the briefing.html in A1.

Thanks for the tutorial by the way. There's no way in hell I would've ever figured this one out.

You can create a trigger that runs

task1 setTaskState "SUCCEEDED"

in the on act. field when you have completed a certain condition, such as killing an officer or something.

Share this post


Link to post
Share on other sites
What kind of string can use setTaskState command, exept "SUCCEEDED" and "FAILED"?

"Succeeded", "Failed", "Created", "Canceled".

Share this post


Link to post
Share on other sites
"Succeeded", "Failed", "Created", "Canceled".

Thanks :)

Share this post


Link to post
Share on other sites
You can create a trigger that runs

task1 setTaskState "SUCCEEDED"

in the on act. field when you have completed a certain condition, such as killing an officer or something.

This is what I've been doing, I think. But when I add

obj_1 setTaskState "SUCCEEDED";

to a trigger the corresponding task is already checked as complete when the game starts up.

I have a trigger with an OPFOR activation, not present, name " obj_1 ", condition " !(alive off1); ", On Act " obj_1 setTaskState "SUCCEEDED"; ".

Then I have a unit on the map marked " off1 ".

Share this post


Link to post
Share on other sites

@manzilla

Try it with a radio trigger first (for example radio alpha, and press 0-0-1 ingame). If that works, something else must be wrong.

@Jezuro

Thnx (although I would've preferred 2 L's in canceled/cancelled) :)

And a possible bug Jezuro, "ASSIGNED" is a valid taskState as well, but it will only cause confusion if players set their own tasks active, or when mission makers use setCurrentTask.

Edited by Mike84

Share this post


Link to post
Share on other sites
@manzilla

Try it with a radio trigger first (for example radio alpha, and press 0-0-1 ingame). If that works, something else must be wrong.

@Jezuro

Thnx (although I would've preferred 2 L's in canceled/cancelled) :)

Thanks mike 84, I'll give it a try.

EDIT:

Can't seem to get it to work. Not sure what I'm doing wrong here. I'll have to find a simple mission with it set up and check what was done. Hopefully once this is figured out I'll be ready to release the mission.

EDIT2:

Figured it out. But now the tasks will get marked as complete but no Objective complete message appears on the screen.

Edited by Manzilla

Share this post


Link to post
Share on other sites

EDIT2:

Figured it out. But now the tasks will get marked as complete but no Objective complete message appears on the screen.

add a hint message

tskObj1 setTaskComplete "SUCCEEDED"; hint "You've completed obj1!";

Use that for now, I just found the taskHint command which might be better, but the documentation on the comref is faulty, so it will take some time to figure it out.

Edited by Mike84

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

×