Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mission template #5

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
224 changes: 224 additions & 0 deletions compositions/AF-Mission-Template/composition.sqe
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
version=1;
center[]={2696.9934,5,7575.2202};
class items
{
items=1;
class Item0
{
dataType="Layer";
name="ArmaForces";
class Entities
{
items=7;
class Item0
{
dataType="Object";
class PositionInfo
{
position[]={1.8867188,1.0489998,0.016601563};
angles[]={0,3.1415927,0};
};
side="Empty";
flags=5;
class Attributes
{
name="respawn";
};
id=2;
type="VR_3DSelector_01_default_F";
};
class Item1
{
dataType="Logic";
class PositionInfo
{
position[]={-2.3146973,0,0.99658203};
angles[]={0,3.1415927,0};
};
name="HC1";
isPlayable=1;
description="HC1";
id=6;
type="HeadlessClient_F";
};
class Item2
{
dataType="Logic";
class PositionInfo
{
position[]={-2.3146973,0,-1.003418};
angles[]={0,3.1415927,0};
};
name="HC2";
isPlayable=1;
description="HC2";
id=7;
type="HeadlessClient_F";
};
class Item3
{
dataType="Logic";
class PositionInfo
{
position[]={-0.31469727,0,0.99658203};
angles[]={0,3.1415927,0};
};
name="HC3";
isPlayable=1;
description="HC3";
id=8;
type="HeadlessClient_F";
};
class Item4
{
dataType="Logic";
class PositionInfo
{
position[]={-0.31469727,0,-1.003418};
angles[]={0,3.1415927,0};
};
name="HC4";
isPlayable=1;
description="HC4";
id=9;
type="HeadlessClient_F";
};
class Item5
{
dataType="Logic";
class PositionInfo
{
position[]={-1.3146973,0,-0.0034179688};
angles[]={0,3.1415927,0};
};
id=5;
type="acex_headless_module";
class CustomAttributes
{
class Attribute0
{
property="acex_headless_module_delay";
expression="_this setVariable ['delay',_value,true];";
class Value
{
class data
{
singleType="SCALAR";
value=15;
};
};
};
class Attribute1
{
property="acex_headless_module_log";
expression="_this setVariable ['log',_value,true];";
class Value
{
class data
{
singleType="BOOL";
value=1;
};
};
};
class Attribute2
{
property="acex_headless_module_enabled";
expression="_this setVariable ['enabled',_value,true];";
class Value
{
class data
{
singleType="BOOL";
value=1;
};
};
};
class Attribute3
{
property="acex_headless_module_endMission";
expression="_this setVariable ['endMission',_value,true];";
class Value
{
class data
{
singleType="SCALAR";
value=0;
};
};
};
nAttributes=4;
};
};
class Item6
{
dataType="Logic";
class PositionInfo
{
position[]={4.6853027,0,-0.0034179688};
angles[]={0,3.1415927,0};
};
name="adminzeus";
id=4;
type="ModuleCurator_F";
class CustomAttributes
{
class Attribute0
{
property="ModuleCurator_F_Owner";
expression="_this setVariable ['Owner',_value,true];";
class Value
{
class data
{
singleType="STRING";
value="#adminLogged";
};
};
};
class Attribute1
{
property="ModuleCurator_F_Forced";
expression="_this setVariable ['Forced',_value,true];";
class Value
{
class data
{
singleType="SCALAR";
value=0;
};
};
};
class Attribute2
{
property="ModuleCurator_F_Name";
expression="_this setVariable ['Name',_value,true];";
class Value
{
class data
{
singleType="STRING";
value="";
};
};
};
class Attribute3
{
property="ModuleCurator_F_Addons";
expression="_this setVariable ['Addons',_value,true];";
class Value
{
class data
{
singleType="SCALAR";
value=3;
};
};
};
nAttributes=4;
};
};
};
id=13;
};
};
11 changes: 11 additions & 0 deletions compositions/AF-Mission-Template/header.sqe
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version=1;
name="AF-Mission-Template";
author="3Mydlo3";
category="EdSubcat_Default";
requiredAddons[]=
{
"A3_Structures_F_Bootcamp_VR_Helpers",
"A3_Characters_F",
"ace_headless",
"A3_Modules_F_Curator_Curator"
};
19 changes: 19 additions & 0 deletions compositions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Compositions

## How to use these?

Copy and paste folders to your Arma 3 profile `compositions` folder.

`C:\Users\<you>\Documents\Arma 3\compositions`

If using custom profile:
`C:\Users\<you>\Documents\Arma 3 - Other Profiles\<profileName>\compositions`

If using Linux:
`TODO someone`

## Available compositions

### AF-Mission-Template

Contains respawn helper (named `respawn`), zeus module and HC slots.
16 changes: 16 additions & 0 deletions template/CfgFunctions.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class CfgFunctions
{
class ADDON
{
tag = QUOTE(ADDON);
class gui
{
// For ViewDistance and GroupRename GUIs
class groupRenameGUI {};
class groupRenameList {};
class setViewDistance {};
class viewDistanceGUI {};
class playerActions {};
};
};
};
3Mydlo3 marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions template/CfgTasks.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class CfgTasks
{
// Put your tasks here
};
6 changes: 6 additions & 0 deletions template/OnPlayerRespawn.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "script_component.hpp"

[{alive player}, {
// Add action to change view distance and group names
call FUNC(playerActions);
}, [], -1] call CBA_fnc_waitUntilAndExecute;
5 changes: 5 additions & 0 deletions template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Mission Template

Copy and paste scripts into your mission folder. Keep in mind to not overwrite your work accidentally.

You might need to create a respawn helper or a map marker named `respawn` for respawn to work correctly. When in doubt, use [compositions](..\compositions\README.md).
44 changes: 44 additions & 0 deletions template/description.ext
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#include "script_component.hpp"
#include "gui\gui_init.hpp"

/* Respawn stuff */
respawn = 3;
respawnDelay = 1e10;
respawnOnStart = -1; // Dont respawn on start. Don't run OnPlayerRespawn.sqf on start.
respawnTemplates[] = {"afm_respawn_default", "Counter"};
// If mission doesn't feature standard respawn timer, "Counter" option should be removed.
// This applies to permadeath missions and when using custom respawn based on events or whatever.

/* Mission description and stuff */
author = "3Mydlo3, ArmaForces";
onLoadIntro = CSTRING(Mission_ShortDescription);
briefingName = CSTRING(DisplayName); // Visible in the mission selection menu
onLoadMission = CSTRING(Mission_ShortDescription);
onLoadName = CSTRING(Mission_Title); // Visible when loading mission
overviewText = CSTRING(Mission_Description); // Visible in the mission selection menu

class Header {
gameType = Coop;
minPlayers = 20; // Minimum viable number of players
maxPlayers = 51; // Maximum possible number of players (inc. zeus), setting too low might prevent people from joining server
};

/* Other stuff */
disableChannels[] = {1, 2, 3, 4, 5}; // 0 - Global, 1 - Side, 2 - Command, 3 - Group, 4 - Vehicle, 5 - Direct
disabledAI = true;

// Mission CBA settings must be added through CBA XEH PreInit, otherwise they won't be visible in 3den
class Extended_PreInit_EventHandlers {

};

// https://github.com/acemod/ACEX/tree/master/addons/killtracker
class CfgDebriefingSections {
class acex_killTracker {
title = "Acex Killed Events";
variable = "acex_killTracker_outputText";
};
};

#include "CfgFunctions.hpp"
#include "CfgTasks.hpp"
19 changes: 19 additions & 0 deletions template/functions/gui/fn_groupRenameGUI.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "..\script_component.hpp"
/*
* Author: Madin
* Konsola zulu do zmiany nazw grup
*
* Arguments:
* None
*
* Return Value:
* None
*
* Public: No
*/

disableSerialization;
createDialog QGVAR(dlg_groupRename);
[{!isNull (findDisplay 9991)},{
call FUNC(groupRenameList);
}, [], -1] call CBA_fnc_waitUntilAndExecute;
Loading