Comrades in Arms Discussion Board
The FHQ Mission Template - Printable Version

+- Comrades in Arms Discussion Board (http://forum.ciahome.net)
+-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3)
+--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8)
+--- Thread: The FHQ Mission Template (/showthread.php?tid=3906)



The FHQ Mission Template - Alwarren - 01-23-2020

I was recently asked whether we would release the FHQ Mission Template. Here it is then, and a few hints and tips on how to use it:


HOW TO USE THE FHQ TEMPLATE



0. Introduction

This template has grown over the years, and we're making it available without any implied support. If you want to use it, feel free, and it would be nice if you mentioned it in the mission briefing or on your workshop page.

The template supports two headless clients out of the box, as well as provide some visually interesting quote/intro screen and a vast library of functions ready-to-use. By default, if you copy the mission.sqm, it also supports several spectator slots as well as three Zeus slots. Furthermore, it allows the users (if CBA is loaded) to adjust view distance based on the map the mission is taking place on; this setting is saved and applies to all missions using the FHQ framework.


1. Items not provided


The template can use AIS Wounding System by Psychobastard. Since that is a moving target, it's not included here. Grab it from the BIS forum or from the workshop:
  • https://forums.bohemia.net/forums/topic/161291-a3-wounding-system-ais-by-psycho/
  • https://steamcommunity.com/sharedfiles/filedetails/?id=954149033
2. Items you will want to replace permanently

Inside the "images" folder, there are two images you might want to replace
  • cia_large.paa is the clan logo, in our case it is the CiA logo
  • logo_ca.paa is the Team/Author logo, in our case the FHQ logo
Both must be square, transparent PAA files. You can generate PAA files using the Arma 3 Tools "TexView" program. The file resolution must be a power of two, i.e. 512x512 or 256x256

3. Moving parts Per Mission

3.1 Load screen

In images there is a file loadScreen.jpg which is usually mission dependent, unless you are boring. Make a screenshot, cut it to 1024x512, and save it over loadScreen.jpg for a personal touch per mission.

3.2 description.ext

Description.ext can be modified in several places. Some stuff is off-limits, so here is a run-down of what you could be changing:

FHQ_AUTHOR, FHQ_MISSIONNAME, and FHQ_MISSIONDESCRIPTION are three macro definition at the head of the file. Replace the strings with your name, the name of your mission and a short one-liner description. However, since a couple of patches the description doesn't appear in the lobby anymore, and must be placed in Attributes -> Multiplayer -> Lobby -> Summary

Edit CfgDebriefing according to your wishes. There are comments in the code that gives you an idea on what to change.

Also, if you want to use AIS, unpack it into the mission folder and uncomment the appropriate lines in RscTitles and CfgFunctions.

If your missions has parameters, then add them at the bottom of the Params class. Do not remove the params that are already in, unless you know what you are doing.

3.3 flow.fsm

flow.fsm is an FSM (Finite State Machine) that controls mission flow and is automatically started by init.sqf. You can opt to use the FSM; in its current form it doesn't do anything. If you know FSM's, then it is easy to adjust it to your mission's flow, but you can do this in the traditional way as well, or use the FHQ Task Tracker's facilities. Your call. 

3.4 scripts\briefing.sqf

There is a complete FHQ standard briefing already defined in briefing.sqf, and this file is automatically run by init.sqf. If you prefer to use the FHQ EdenTT plugin, delete everything in the first FHQ_fnc_ttAddBriefing call as well as the first FHQ_fnc_ttAddTasks. If you leave the rest of the file beneath the "Zeus menu" in, you will get some extra stuff for Zeus, and you can adjust the entries to your requirements. Obviously, this requires knowledge of what you are doing Smile As it is right now, you get a menu with all existing tasks and buttons to fail or succeed them.

3.5 scripts\intro.sqf

intro.sqf contains the opening "quote" screen as well as the logo/mission overview text screen. FHQ_fnc_tickerTickeredQuote displays the quote, one line at a time, with the last line being highlighted in orange. FHQ_fnc_tickerTickeredOverview displays the overview once the game scene is visible, and is restricted to these four lines. The first line is supposed to be the mission name, and is displayed in a larger font. The rest is free-form. The last line can contain %1 and %2 (but doesn't have to), which is dynamic text, with %1 being the current time and %2 being some vague daytime description like "Early Morning", "Evening" etc. Time is automatically ticked, i.e. it will update the seconds while the text is visible. 

3.6 scripts\initUser.sqf

initUser.sqf, for all intent and purpose, replaces your init.sqf for this template. Any mission-specific setup should go here. This file runs on the server as well as all the clients, so if you want to have something server-specific, make sure to add an appropriate if statement.

3.7 init.sqf

There is virtually nothing in init.sqf that you should even touch - in fact, if you don't know what you are doing, you can make the template non-functional. The only exception is line 99, which you must uncomment if you want to use AIS.

4. Conclusion

The function library is largely undocumented, although some functions have comments in them that describe the function. Feel free to poke around. Some of the stuff is outdated and/or obsolete. 

This template comes without any warranties, if it manages to kill your cat it's not our fault. You are free to use it, credit given would be appreciated but is not strictly required (we will reserve the right to hate you, though). 

Enjoy!