Home   Help Search Login Register  

Author Topic: Arma II Briefing Manager (ACCEPTED)  (Read 21153 times)

0 Members and 2 Guests are viewing this topic.

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Arma II Briefing Manager (ACCEPTED)
« on: 02 Aug 2009, 12:56:49 »
Hi,

This is a little tool that I think might be very usefull to some of you.

Here's part of the readme file

Code: [Select]
========================
Arma II Briefing Manager
Author: alimag
Version 1.0
========================

Since Arma II is out, I've seen numerous post on different forums from people asking how to create briefings for their missions.

In OFP, some HTML format knowledge was necessary to pull it out but in Arma II BIS as reduced the process to a few scripting commands more accessible for experience scripters but still a bit difficult for new users.

But it's not until I found Mikey's briefing template that the idea of facilitating the process crossed my mind. His template, and the description he gave, were so clear and well organized that I instantly saw the basic of the program that would output such a file. The version I found is 0.02 and this is the one that I've used. Good work Mikey!

So, how does it work ?

The Briefing Manager facilitates the creation and maintenance of your briefing file. More precisely, it will help you create and maintain the two main entities that are the core of the new briefing format, the tasks and the notes sections. It will also manage the HTML code needed to attach markers to text, insert pictures in your briefing, and define the current task. All this using a very simple GUI interface accessible to anyone.

The command buttons are self-explained and have tool tips briefly explaining what they do. If you know how to use Windows, using the manager will be very easy.

Any feedback will be appreciated.

Have fun and good missions

Cheers

Updated version uploaded

Updated version 1.1 uploaded - 1/9/2009
Added the possibility to convert OFP/Arma briefings (HTML) to Arma II format (SQF)
No install. Unzip and run the exe.

Corrected version uploaded - 3/9/2009
Prevention of possible bug (nasty).

Get Briefing Manager v1.1 at ED
« Last Edit: 04 Sep 2009, 18:23:48 by Mandoble »

Offline mikey

  • Former Staff
  • ****
  • Whitespace Whore
Re: Arma II Briefing Manager
« Reply #1 on: 02 Aug 2009, 13:34:42 »
Wow dude, this is seriously awesome. Even my grandma could make briefings with this  ;)

I did have some issues though, I'll just list them:

Bugs:
- I couldnt open my own briefing files (Err #5 - Invalid Procedure call or argument), but I can open the files I've created with your program (it depends on the comment you put on the top perhaps?).

Feature reqs:
- Support for createDiarySubject (to make your own subjects in the briefing like this)
- Change from side player to faction player. I'm planning to do that in my template as well
- Support for setSimpleTaskDestination (you know the orange objective markers)


All those things aside, this is great stuff. If you ever need any help, or are planning to port it to c# .net, don't hesitate to pm me  :good:





Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Arma II Briefing Manager
« Reply #2 on: 02 Aug 2009, 13:51:56 »
Nice work. :)

Do you think it is possible to parse an OFP/A1 briefing and create an a2 briefing format out of it?
To what degree this may or may not be possible?

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re: Arma II Briefing Manager
« Reply #3 on: 02 Aug 2009, 15:08:14 »
Hi,

Thanks for the remarks

@kju

I'm not sure how much work would be involved or if it's even possible. But I'll have a look.

@Mikey

Not beeing able to open other files but the ones created by the program is not a bug but it was the fastest way to open the files. And yes, I use the header comments to put informations that accelerate the file reading process. It can be done differently. It will involve more coding and a more global approach but I might consider it.

About the features that you requested. Since I used your template v0.02 to make the program, only what was in the template was considered. I didn't really have time yet to look into the new scripting commands so it's much easier for me to base my work on an already existing template.

I'll make a deal with you. Give me a template with all the features you think should be in the program and I'll see what I can do to incorporate them. If it is well written and explain as the first one, half of my work will already be done.

Cheers

PS: I just attach a copy of your briefing in the manager format...

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Arma II Briefing Manager
« Reply #4 on: 02 Aug 2009, 15:24:03 »
Thanks alimag. :)

Just to give you a little background.
With project OAC we have been porting OFP missions to A1.
Now we are doing OPF and A1 to A2.

We have automated the process to large degree based on simple and complex
regular expression search and replacement statements.

So for us it would be already very helpful to see what needs to be done in
a short bullet point list in terms of the very technical part.  :)

Offline Dazakiwi

  • Members
  • *
Re: Arma II Briefing Manager
« Reply #5 on: 13 Aug 2009, 01:36:34 »
After having problems with using a briefing template from another mission i made (which does show the briefing/tasks ingame). My new mission im getting no joy in making the briefing show.  :dry:
Ive compared it to the previous mission briefing and i do not see any syntax errors.

So i was glad to discover your Briefing Manager is available.
But alas, i created a briefing in one pass (ie. no edits or alterations made)and i still having the same problem.

Here is my briefing.sqf
Quote
// A2BM W    100
// DO NOT EDIT THIS FILE

waitUntil {!(isNull player)};
waitUntil {player==player};
switch (side player) do
{
case WEST:
{
player createDiaryRecord ["Diary",["Situation","They will be well defended, there are initial reports of a T90 and two BMP3's in the area. Also there are some 256 Tunguska's in the area. <br/>Although not confirmed it is possible Russian Special forces are part of its security, so look sharp. Once the alarm is raised at main objective, reinforcements will arrive, and possibly more as time goes on. So dont hang around. "]];
player createDiaryRecord ["Diary",["Mission","This is a straight forward OP. However the tricky bit will be flying one of the choppers from out of the hanger. Best not to destory the other one until one is safely out."<br/>The other chopper can be destroyed, if its not, the mission will be a failure.<br/><img image='missionpic1.jpg' width='200' height='200'/>"]];
player createDiaryRecord ["Diary",["Intel: Operation Shark","Two new prototype <marker name='obj1'>KA50s</marker> straight out of R&D are here for some advanced testing. Which likely will be on us. We need to steal of one these choppers, the other one has to be destroyed."]];
tskObj1=player createSimpleTask ["Destroy the other KA50"];
tskObj1 setSimpleTaskDescription ["What else is there needed to say? turn it into scrap metal!","Destroy the other KA50","Destroy the other KA50"];
tskObj0=player createSimpleTask ["Capture One Ka50"];
tskObj0 setSimpleTaskDescription ["Capture and fly this helicopter out of the hanger and back to <marker name='LZKA'>base</marker>,","Capture One Ka50","Capture One Ka50"];
player setCurrentTask tskObj0;
};
case EAST:
{
};
case RESISTANCE:
{
};
case CIVILIAN:
{
};
};
if (isNil {player getVariable "mk_briefingEH"}) then
{
player addEventHandler ["killed",{[] spawn {waitUntil {alive player};execVM"briefing.sqf";};}];
player setVariable ["mk_briefingEH",true];
};

A general Question about the briefing file itself. If i try to add some lines or manually edit the file in say notepad, then save it. Will that stuff it up? and when i save it do i need to again have .sqf at the end of the file, even though the original file has correct extension? I take it you will recommend to load the briefing file into the manager and click on edit.

I just want to work out why the briefing.sqf is seemly so temperamental in general....its very frustrating.

Thanks for any light thrown on this problem.

Dazakiwi

Offline ArMaTeC

  • Members
  • *
  • City Life 2
    • armatechsquad.com
Re: Arma II Briefing Manager
« Reply #6 on: 13 Aug 2009, 10:26:02 »
would be nice if you added justification (left, right, center)
and maybe a live preview of what it will look like ingame
« Last Edit: 13 Aug 2009, 13:28:45 by ArMaTeC »

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re: Arma II Briefing Manager
« Reply #7 on: 13 Aug 2009, 13:29:59 »
Hi,

@kju
I did not forget you but real life has taken to much of my time recently. I'll be back to you.

@Dazakiwi
If your briefing is not showing at all then your problem is probably the way you call it.
A brief reminder:

1 - Save the file as briefing.sqf

2 - In your init.sqs (if you dont have one, create it) add the line [] execVM "briefing.sqs". Now, there is no way it will not show.

3 - If you want to start with the briefing open, you'll need also a briefing.html file in your mission directory.

As for your other question, yes there are places that you could correct or add things without messing the file for the editor but I would NOT recommend it. Stay on the safe side and use the editor to modify your briefing file.

@ArMaTeC
You're right. I tought of it but since the file is not supposed to be manually modified I did not see the necessity to make it easier to read. People might be tempted to modify it themselves...

Cheers

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Arma II Briefing Manager
« Reply #8 on: 13 Aug 2009, 14:27:31 »
no worries mate. too busy with other stuff too.
still to see this process simplified would be a huge help  :good:

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Arma II Briefing Manager
« Reply #9 on: 13 Aug 2009, 14:57:00 »
Whilst a very good idea, I do have two points to raise with the execution of the idea. Please don't think I'm being overly critical, the good points have already been raised in the above posts, and I'm simply trying to offer insight from years in software development and usability audits/testing:

1) Firstly, distribution method: why do you need an installer for this?  Installers are simply bloat when you have nothing but an EXE.  You're not modifying the registry (and if you are, why?) - it simply complicates things.  It's not like you're trying to keep users out of doing any scripting manually, as you're requiring them (as you need to) to create/add to "init.sqf" to call your generated script.  Additionally, if you absolutely have to provide an installer... at least provide an uninstall link in the start menu folder, too.  ;)

You might also want to consider either packing the installer into a single file, or making WinRAR extract silently.  At first, I thought that you were simply using a WinRAR SFX archive to distribute the program (rather than just the installer).  Also, the set-up files are not removed after the installer has run (which, given the above confusion, could be a bit annoying for users with less technical knowledge).

To combat this, you can cause an SFX to extract silently to the temporary directory (and clean up after itself) by putting this in the SFX's comment (the first line MUST be present):
Code: [Select]
;The comment below contains SFX script commands
Silent=1
Overwrite=1
Setup=setup.exe
TempMode

Of course, this is largely a moot point, as there's little benefit to be gained from archiving an installer (as, if you've selected decent settings in your installer generator, it'll already be compressed in some way).  It might be worth you reading up a little more on the Bootstrap installer for VB (which you've used) to see if it enables you to package an installer into a single EXE.  If not, most archive software (e.g. WinZip, WinRAR, 7zip, etc.) will automatically extract a zip file's contents when a user opens a setup.exe (or install.exe) file from an archive.

As an aside: if you feel the need to compress your installation, I'd suggest you compress the application EXE itself with UPX (or a similar solution), rather than use an SFX (which has a significant overhead).

Additionally, the uninstaller doesn't remove the start menu program group.


2) Secondly, what about clashes between variable names (either in other scripts, or simply through user-added tasks later on)?  As you've used non-local variables (and rightly so), why don't you account for (or at least, drastically reduce the incidence of) naming conflicts by prefixing the variable names with your OFPEC tag:)


Overall, though, I think you've made a good start - it'll be good if you can tidy up the interface, and make the application handle the other aspects of briefings/tasks that were mentioned, in the future.  :good:

Offline Camus255

  • Members
  • *
Re: Arma II Briefing Manager
« Reply #10 on: 14 Aug 2009, 02:52:11 »
i don't know if im doing something wrong but i ve got a problem with my coop mission

example

before death:
task: 1- kill a cow
        2- eat a cow
note: briefing


first respawn:
task: 1- kill a cow
        2- eat a cow
        1- kill a cow
        2- eat a cow
note: briefing
        briefing

second respawn
task: 1- kill a cow
        2- eat a cow
        1- kill a cow
        2- eat a cow
        1- kill a cow
        2- eat a cow
note: briefing
        briefing
        briefing

and so on....

init
Quote
execVM "briefing.sqf";


briefing.sqf made with briefing manager
Quote
// A2BM W    100
// DO NOT EDIT THIS FILE

waitUntil {!(isNull player)};
waitUntil {player==player};
switch (side player) do
{
case WEST:
{
player createDiaryRecord ["Diary",[""]];
player createDiaryRecord ["Diary",[""]];
player createDiaryRecord ["Diary",["]];
tskres = player createSimpleTask [""];
tskres setSimpleTaskDescription [""];
player setCurrentTask tskres;
};
case EAST:
{
};
case RESISTANCE:
{
};
case CIVILIAN:
{
};
};
if (isNil {player getVariable "mk_briefingEH"}) then
{
player addEventHandler ["killed",{[] spawn {waitUntil {alive player};execVM"briefing.sqf";};}];
player setVariable ["mk_briefingEH",true];
};

description.ext
Quote
// Respawn Settings
respawn = "BASE";
respawndelay = 30;

Offline Dazakiwi

  • Members
  • *
Re: Arma II Briefing Manager
« Reply #11 on: 14 Aug 2009, 09:51:40 »

@Dazakiwi
If your briefing is not showing at all then your problem is probably the way you call it.
A brief reminder:

1 - Save the file as briefing.sqf

2 - In your init.sqs (if you dont have one, create it) add the line [] execVM "briefing.sqs". Now, there is no way it will not show.

3 - If you want to start with the briefing open, you'll need also a briefing.html file in your mission directory.

As for your other question, yes there are places that you could correct or add things without messing the file for the editor but I would NOT recommend it. Stay on the safe side and use the editor to modify your briefing file.

Yeah i got briefing.html file as well as an init.sqs. And using the right call code for the briefing. Shouldnt it be briefing.sqf. You had briefing.sqs (perhaps a typo?). I have a working briefing for another mission i created, and i used that as my template for this new one. It seems how both the briefing and the init files are saved seems important.

I used Briefing Manager a second time to see if i had done something wrong. With the init.sqs file, whats the best way to save it? i usually use notepad and choose all file types and choose unicode.
Its possible the init isnt being recognised or something. It would also be nice if the briefing manager could highlight lines that are missing code or needs changes made etc..



Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Arma II Briefing Manager
« Reply #12 on: 17 Aug 2009, 12:01:28 »
Hi alimag, nice and useful tool  :good:, should we consider it ready for submission to the Editors Depot?

Offline Pirin

  • Members
  • *
Re: Arma II Briefing Manager
« Reply #13 on: 22 Aug 2009, 03:53:03 »
i don't know if im doing something wrong but i ve got a problem with my coop mission

example

before death:
task: 1- kill a cow
        2- eat a cow
note: briefing


first respawn:
task: 1- kill a cow
        2- eat a cow
        1- kill a cow
        2- eat a cow
note: briefing
        briefing

second respawn
task: 1- kill a cow
        2- eat a cow
        1- kill a cow
        2- eat a cow
        1- kill a cow
        2- eat a cow
note: briefing
        briefing
        briefing

and so on....


This is due to a bug fix in 1.03.  After ArmA2 1.03 you no longer lose tasks/notes after respawn (unless you're using TeamSwitch) so what's happening is the player workaround (built into this program) of using a killed eventhandler to rerun the briefing.sqf ends up repeating it each death.

The "fix" is to simply not re-run the briefing.sqf after death.  Due to how this program is designed however it's not an end user fix at this time.  But manually removing the following lines from your briefing.sqf should fix it:

Code: [Select]
if (isNil {player getVariable "mk_briefingEH"}) then
{
player addEventHandler ["killed",{[] spawn {waitUntil {alive player};execVM"briefing.sqf";};}];
player setVariable ["mk_briefingEH",true];
};

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re: Arma II Briefing Manager
« Reply #14 on: 22 Aug 2009, 11:23:15 »
Hi,

Thanks Pirin. I know about the change in 1.03 I just didn't have the time to upload the corrected version. Done now! (see first post)

Real life is all over me these days. I dont even have time to finish my dialog manager...

@Mandoble

It's all yours. Thank you.

Cheers