Initial commit

This commit is contained in:
2023-06-19 00:57:30 -05:00
commit 2caf7cb720
36 changed files with 1696 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# ---> NotepadPP
# Notepad++ backups #
*.bak

95
CHANGELOG.md Normal file
View File

@@ -0,0 +1,95 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project badly attempts [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.2] - 2023-04-23
### Added
- Add CPS metrics to all clients and publish to server
### Fixed
- Update CPS metrics localEvent emitter to emit the current value, not the previous
### Changed
- Force `sideChat` CBA setting to 'disabled' on mission start by default
## [2.1] - 2023-04-12
### Added
- Fortify preset and object area restriction
- Zeus module for grounds cleanup
- `sideChat` restrictions to allow only Zeus and `#admins` to send messages
- Allow `#admin` to enable or disable `sideChat` via CBA setting on a per mission file basis.
`Escape -> Configure -> Addon Options -> Server -> 17th Battalion -> Enable Side Chat`
## [2.0] -2023-04-12
### Added
- Automated calculations-per-second metrics gathering
### Fixed
- mission.jpg to correct dimensions and optimize
## [1.9] - 2023-03-07
### Added
- Tire interaction to allow patching to 80% with toolkit
### Changed
- Zeus resupply box contents
- Command callsigns diary section
- Rotary asset list diary section
- Fixed wing asset list diary section
## [1.8] - 2022-10-22
### Added
- Local environment sunrise and sunset times to diary intel section
## [1.7] - 2022-10-15
### Added
- `#respawn` chat command to respawn player in attempt to fix rare instance of player initializing their spawn at [0, 0, 0]
## [1.6] - 2022-10-06
### Changed
- FBCB2 code now switched to respawn modules instead of old-style respawn marker for BLUFOR base area for asset calculations
## [1.5] - 2022-10-02
### Added
- Map copying code in preparation for disabling of `sideChat`
## [1.4] - 2022-09-19
### Added
- `#saveaar` chat command for `#admin` to initiate OCAP replay upload
### Fixed
- Flak code now accounts for ~~shit~~ RHS vehicles *because they're formatted special*
## [1.3] - 2022-08-17
### Added
- Function for converting an artillery piece into a "flak cannon"
## [1.2] - 2022-07-14
> Initial Public Release

54
README.md Normal file
View File

@@ -0,0 +1,54 @@
# Installation Instructions
Once your mission has been created and saved in the Arma 3 Eden Editor, download the latest mission template zip and copy its contents to the folder where your mission file lives.
The only file which should be pre-existing in your mission folder is `mission.sqm`
Once copied, the final structure should appear similar to the following:
```markdown
├── functions/
├── images/
├── scripts/
├── sounds/
├── description.ext
├── mission.jpg
├── mission.sqm
├── mission_settings.hpp
```
After the requisite configuration file edits have been made, your mission is ready to be packed into a pbo for deployment.
# Files
Almost none of the template files should be edited in anyway as they have been formatted specially and specifically for their purpose.
*The following files however **must** be edited:*
`mission_settings.hpp`
*The following files however **should** be edited:*
`mission.jpg`
## mission_settings.hpp
The contents of this file must be edited to reflect the naming of your mission for display purposes. All variables are self-documented inside the file to clearly identify the purpose of each piece of required text
The contents of the lower half of the file are where the mission maker is able to add/replace/modify the built in `#ace-fortify` preset
## mission.jpg
This file will be displayed the client mission loading screen.
File should remain small *(under 300KiB)* and should optimally be `1024px by 512px` in resolution
## images/
This directory is for organizational purposes for any images you wish to use in your mission
## scripts/
This directory is for organizational purposes for any custom scripts you wish to use in your mission.
> **Note**: Scripts may need to be edited to account for their new location
## sounds/
This directory is for organizational purposes for any custom scripts you wish to use in your mission.
> **Note:** Using custom sounds require adding the proper CfgSounds codeblock into mission_settings.hpp

123
description.ext Normal file
View File

@@ -0,0 +1,123 @@
//-------------------------------------------DESCRIPTION.EXT-----------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////
// //
// DO NOT EDIT THIS FILE //
// //
//////////////////////////////////////
//-------------------------------------------INCLUDES------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "mission_settings.hpp"
//-------------------------------------------MISSION INFO--------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
overviewPicture = "";
OnLoadIntro = "UNUSED";
onLoadMissionTime = 1;
onLoadIntroTime = 1;
//-------------------------------------------GAMETYPE----------------------------------------------------------------------//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class Header
{
gameType = COOP;
minPlayers = 2;
maxPlayers = 80;
};
//-------------------------------------------RESPAWN SETTINGS--------------------------------------------------------------//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
respawn = 3;
respawnDelay = 10;
respawnVehicleDelay = 30;
respawnTemplatesWest[] = {"Counter", "MenuPosition"}; //Templates: "Spectator";"Revive";"Wave";"Tickets";"Counter";"MenuPosition";"EndMission";"MenuInventory";
respawnTemplatesEast[] = {"Counter", "MenuPosition"};
respawnTemplatesGuer[] = {"Counter", "MenuPosition"};
respawnTemplatesCiv[] = {"Counter", "MenuPosition"};
respawnOnStart = 1; //has to always be disabled with startLoadingscreen and waitUntil {alive player};!!
respawnButton = 1; //enables the respawn button
respawnDialog = 1; //enables the score table
//-------------------------------------------MISSION SETTINGS--------------------------------------------------------------//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
enableDebugConsole[] = { "76561198009349760", "76561198013533294" };
aikills = 0; //show ai kills in score table
disabledAI = 1; //disable AI for all playable units
//disableChannels[]={0,1,6}; //0=Global;1=Side;2=Command;3=Group;4=Vehicle;5=Direct;6=System;
disableChannels[]={{0,true,true},{1,false,true},{2,false,true},{3,false,true},{4,false,true},{5,false,true},{6,true,true}};
// {channelID, disableChat<bool>, disableVoice<bool>} for 0=Global;1=Side;2=Command;3=Group;4=Vehicle;5=Direct;6=System;
forceRotorLibSimulation = 0; //0=options based;1=force enable;2=force disable
disableRandomization[] = {};
//-------------------------------------------Clean Up SETTINGS-------------------------------------------------------------//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
corpseManagerMode = 1; //0 = None, 1 = All, 2 = None_But_Respawned, 3 = All_But_Respawned
corpseRemovalMinTime = 600;
corpseRemovalMaxTime = 900;
corpseLimit = 80;
wreckManagerMode = 0; //0 = None, 1 = All, 2 = None_But_Respawned, 3 = All_But_Respawned
wreckRemovalMinTime = 600;
wreckRemovalMaxTime = 900;
wreckLimit = 40;
minPlayerDistance = 600;
//-------------------------------------------BASE SETTINGS---------------------------------------------------------------//
class Params
{
};
class cfgFunctions
{
#include "functions\CfgFunctions.hpp"
};
class cfgRemoteExec
{
// List of script commands allowed to be sent from client via remoteExec
class Commands
{
// State of remoteExec: 0-turned off, 1-turned on, taking whitelist into account, 2-turned on, however, ignoring whitelists (default because of backward compatibility)
mode = 2;
};
// List of script functions allowed to be sent from client via remoteExec
class Functions
{
// State of remoteExec: 0-turned off, 1-turned on, taking whitelist into account, 2-turned on, however, ignoring whitelists (default because of backward compatibility)
mode = 2;
// Ability to send jip messages: 0-disabled, 1-enabled (default)
jip = 1;
class BIS_fnc_effectKilledAirDestruction {};
class BIS_fnc_effectKilledSecondaries {};
class BIS_fnc_objectVar {};
class BIS_fnc_execVM {};
};
};
class CfgDebriefingSections {
class acex_killTracker {
title = "Acex Killed Events";
variable = "acex_killTracker_outputText";
};
};

View File

@@ -0,0 +1,46 @@
class milsim
{
tag = "milsim";
class init
{
class initManager { postInit = 1; };
class init {};
class initPlayerLocal {};
class initPlayerCPS {};
class initDNI_PlayerFPS {};
class initServer {};
};
class userSettings
{
};
class intel {
class initFBCB2 {};
class MDS_callsigns {};
class MDS_fixedAssets {};
class MDS_rotaryAssets {};
class MDS_smokeColors {};
class MDS_radioFrequencies {};
class MDS_environment {};
class messageAssetStatus {};
};
class client {
class zenModules { postInit = 1; };
};
class resupply {
class createAmmoBox {};
class createWeaponsBox {};
class createMedicalBox {};
}
class ambience {
class flakInitVehicle {};
class flakEH {};
};
class map
{
class copyMapFromPlayer {};
class getPlayerMapMarkers {};
class loadMapMarkers {};
class mapMarkerToString {};
class stringToMapMarker {};
};
};

View File

@@ -0,0 +1,101 @@
params [
["_event", [], []],
["_maximumDistance", 2000, [0]],
["_minimumAltitude", 0, [0]],
["_primaryTurret", 0, [0]],
["_fullAmmoCount", 2000, [0]],
["_flakRoundsEvery", 2, [0]],
["_speedDispersion", 20, [0]],
["_distanceDispersion", 30, [0]]
];
// diag_log("flakEH running");
// diag_log(_event);
_unit = _event select 0;
// diag_log(format["i have a unit: %1", _unit]);
_projectile = _event select 6;
// diag_log(format["i have a projectile in flight: %1", _projectile]);
deleteVehicle _projectile;
// diag_log("i have deleted the projectile");
// diag_log(_unit weaponsTurret [0] select _primaryTurret);
_weapon = _unit weaponsTurret [0] select _primaryTurret;
_munitionConversionRate = _fullAmmoCount - _flakRoundsEvery;
// diag_log(format["munition count: %1", _unit ammo _weapon]);
// diag_log(format["munition replacement at: %1", _munitionConversionRate]);
if (_unit ammo _weapon < _munitionConversionRate) then {
_unit setAmmo [_weapon, _fullAmmoCount];
// diag_log(format["replacing ammo count to: %1", _fullAmmoCount]);
_targetPosition = [];
_target = 0;
if (isPlayer (assignedGunner _unit)) then {
_target = cursorTarget;
if (_unit distance _target < _maximumDistance) then {
_targetPosition = getPos _target;
};
} else {
_possibleTargets = _unit nearTargets _maximumDistance;
diag_log(format["ai has %1 possible targetting solutions", count _possibleTargets]);
if ((count _possibleTargets) > 0) then {
_i = 0;
_hold = 0;
{
_i = _unit aimedAtTarget [_x select 4, _weapon];
if (_i > _hold && (_x select 3) > 0) then {
_target = _x select 4;
diag_log(format["setting target to %1", _target]);
_targetPosition = _x select 0;
_hold = _i;
};
} forEach _possibleTargets;
};
};
// diag_log(format["i have found target coordinates: %1", _targetPosition]);
if ((count _targetPosition) > 0) then {
// diag_log("calculating new projectile placement");
_targetX = _targetPosition select 0;
_targetY = _targetPosition select 1;
_targetZ = _targetPosition select 2;
// diag_log(format["checking target altitude: %1", _targetZ]);
if (_targetZ > _minimumAltitude) then {
// diag_log("target is above minimum height, proceeding");
if !(lineIntersects [getPos _unit, _targetPosition, _unit, _target]) then {
// diag_log("intersection calculated");
_flakDistance = ((speed _target * 0.8) * (_speedDispersion / 100)) + ((_unit distance _target) * (_distanceDispersion / 500));
_distanceX = ((random (_flakDistance * 2)) - _flakDistance) + _targetX;
_distanceY = ((random (_flakDistance * 2)) - _flakDistance) + _targetY;
_distanceZ = ((random (_flakDistance * 2)) - _flakDistance) + _targetZ;
// diag_log( format["target is distance: %1 / distance2D %2 from me, creating munition distance %3, distance2D %4 from me", _unit distance _targetPosition, _unit distance2D _targetPosition, _unit distance [_distanceX, _distanceY, _distanceZ], _unit distance2D [_distanceX, _distanceY, _distanceZ]]);
_flak = createVehicle ["SmallSecondary", [_distanceX, _distanceY, _distanceZ], [], 0, "CAN_COLLIDE"];
};
};
};
};

View File

@@ -0,0 +1,83 @@
params [
["_unit", objNull, [objNull]],
["_maximumDistance", 2000, [0]],
["_minimumAltitude", 0, [0]],
["_flakRoundsEvery", 2, [0]],
["_speedDispersion", 20, [0]],
["_distanceDispersion", 30, [0]],
["_removeMissiles", true, [true]]
];
diag_log("initializing flak v16");
_primaryTurret = objNull;
if (_removeMissiles) then {
diag_log("removing missiles");
_magazines = magazinesAllTurrets _unit;
{
_magazine = _x select 0;
diag_log( format["Checking: %1", _magazine]);
_ammo = gettext( configfile >> "CfgMagazines" >> _magazine >> "ammo");
diag_log( format["ammo: %1", _ammo]);
_type = gettext(configFile >> "CfgAmmo" >> _ammo >> "simulation");
diag_log( format["ammo type: %1", _type]);
if (_type == "shotMissile") then {
_unit removeMagazinesTurret [_magazine, [0]];
diag_log(format["removing ammo: %1", _ammo]);
};
if ((_type == "shotBullet") && (_primaryTurret isEqualTo objNull)) then {
_primaryTurret = _forEachIndex;
diag_log(format["found primary turret: %1", _unit weaponsTurret [0] select _primaryTurret]);
};
} foreach _magazines;
};
_weapon = _unit weaponsTurret [0] select _primaryTurret;
_fullAmmoCount = _unit ammo _weapon;
_unit setVariable["feh_maximumDistance", _maximumDistance];
_unit setVariable["feh_minimumAltitude", _minimumAltitude];
_unit setVariable["feh_primaryTurret", _primaryTurret];
_unit setVariable["feh_fullAmmoCount", _fullAmmoCount];
_unit setVariable["feh_flakRoundsEvery", _flakRoundsEvery];
_unit setVariable["feh_speedDispersion", _speedDispersion];
_unit setVariable["feh_distanceDispersion", _distanceDispersion];
diag_log( format[
"{[_this, maximumDistance: %1, minimumAltitude: %2, primaryTurret: %3, fullAmmoCount: %4, flakRoundsEvery: %5, speedDispersion: %6, distanceDispersion: %7] call milsim_fnc_flakEH;}",
_maximumDistance,
_minimumAltitude,
_primaryTurret,
_fullAmmoCount,
_flakRoundsEvery,
_speedDispersion,
_distanceDispersion
]
);
_unit addEventHandler [
"Fired",
format[
"diag_log('firing'); [_this, %1, %2, %3, %4, %5, %6, %7] call milsim_fnc_flakEH",
_maximumDistance,
_minimumAltitude,
_primaryTurret,
_fullAmmoCount,
_flakRoundsEvery,
_speedDispersion,
_distanceDispersion
]
];

View File

@@ -0,0 +1,70 @@
[
"17th Battalion",
"Create Resupply Box",
{
params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]];
[
"Resupply Box Options",
[
[ "COMBO", "Box Type", [[1,2,3], [["Ammo"],["Weapons"],["Medical"]],0] ]
],
{
params ["_dialog", "_args"];
_dialog params ["_type"];
_args params ["_pos", "_target"];
switch (_type) do {
case 1: {
[_target, _pos] call milsim_fnc_createAmmoBox;
};
case 2: {
[_target, _pos] call milsim_fnc_createWeaponsBox;
};
case 3: {
[_target, _pos] call milsim_fnc_createMedicalBox;
};
};
},
{},
[_pos, _target]
] call zen_dialog_fnc_create;
}
] call zen_custom_modules_fnc_register;
[
"17th Battalion",
"Grounds Cleanup2",
{
params [["_pos", [0,0,0], [[]], 3], ["_target", objNull, [objNull]]];
_pos = [_pos#0, _pos#1, 0];
[
"Cleanup Area",
[
[ "SLIDER:RADIUS", "Radius (meters)", [50, 500, 100, 0, _pos, [0.8, 0.2, 0.2, 1.0]], true ]
],
{
params ["_dialog", "_args"];
_dialog params ["_radius"];
_args params ["_pos", "_target"];
_objects = _pos nearObjects ["GroundWeaponHolder", _radius];
{
deleteVehicle _x;
} forEach _objects
},
{},
[_pos, _target]
] call zen_dialog_fnc_create;
}
] call zen_custom_modules_fnc_register;

View File

@@ -0,0 +1,60 @@
// Disable saving
enableSaving[false, false];
// Disable radio chatter and sentences
enableRadio false;
enableSentences false;
// update ace weight settings since arma quadruples the value when an object is loaded into another object
missionNamespace setVariable ["ACE_maxWeightDrag", 2400];
missionNamespace setVariable ["ACE_maxWeightCarry", 1800];
// Disable RHS radio chatter (if RHS is present)
if(isClass(configfile >> "CfgPatches" >> "rhs_main")) then {
rhs_vehicleRadioChatter = 0;
};
// Disable ambient life (rabbits & snakes) once the mission starts
waitUntil {time > 0};
enableEnvironment[false, true];
diag_log text "[MILSIM] (init) ambient life disabled";
[
"saveaar",
{
[] remoteExec["ocap_fnc_exportData", 2];
},
"admin"
] call CBA_fnc_registerChatCommand;
[
"respawn",
{
_clientID = _thisArgs select 0;
player setDamage 1;
format["[MILSIM] (init) %1 claims they were glitched and respawned - %2", name player, netID player] remoteExec["diag_log", 2];
format["%1 claims they were glitched and respawned (%2)", name player, netID player] remoteExec["systemChat", -_clientID];
},
"all",
[clientOwner]
] call CBA_fnc_registerChatCommand;
diag_log text "[MILSIM] (init) OCAP chat handler registered";
[
"milsim_sideChat",
"CHECKBOX",
"Enable Side Chat Text",
"17th Batallion",
false,
true,
{
params ["_value"];
missionNamespace setVariable["milsim_sideChat", _value];
}
] call CBA_fnc_addSetting;
["milsim_sideChat", false] call CBA_settings_fnc_set;
diag_log text "[MILSIM] (init) Custom CBA settings initialized";

View File

@@ -0,0 +1,85 @@
diag_log text "[MILSIM] (DNI) writing variable loop";
[] spawn {
while {true} do {
player setVariable ["DNI_PlayerFPS", floor diag_fps, true];
sleep 1
};
};
diag_log text "[MILSIM] (DNI) variable loop complete";
/////////////////////////////////////////////////////////
//Waits until curators are initalized in order to check//
//if player is zeus to run the fps scripts //
/////////////////////////////////////////////////////////
diag_log text "[MILSIM] (DNI) waiting for curators";
waitUntil {
private _hasCurators = (count allcurators) > 0;
private _hasInitializedCurators = (count (call BIS_fnc_listCuratorPlayers)) > 0;
private _curatorsInitialized = !_hasCurators || _hasInitializedCurators;
((time > 2) || _curatorsInitialized)
};
diag_log text "[MILSIM] (DNI) curator init complete";
/////////////////////////////////////////////////////////
//If player is a curator it will run the script and each/
//player will have their FPS appear beneath them //
/////////////////////////////////////////////////////////
if (player in (call bis_fnc_listcuratorplayers)) then {
diag_log text "[MILSIM] (DNI) player is in curator list, adding Draw3D handler";
addMissionEventHandler ["Draw3D", {
{
_distance = position curatorCamera distance _x;
//if zeus camera is farther than 1200 meters away from the targets the text will not display
if (_distance < 1200) then {
_playerFPS = _x getVariable ["DNI_PlayerFPS",50];
//if the FPS is below 20 it turns red and becomes more visible for zeus to see so they are aware
if (_playerFPS <20) then
{
drawIcon3D
[
"",//Path to image displayed near text
[1,0,0,0.7],//color of the text using RGBA
position _x,//position of the text _x referring to the player in 'allPlayers'
1,//Width
2,//height from position, below
0,//angle
format["%1 FPS: %2", name _x, str _playerFPS],//text to be displayed
0,//shadow on text, 0=none,1=shadow,2=outline
0.05,//text size
"PuristaMedium",//text font
"center"//align text left, right, or center
];
}
//if the FPS is above 20 text is smaller and less visible as to not conern zeus as much
else
{
drawIcon3D
[
"",//Path to image displayed near text
[1,1,1,0.3],//color of the text using RGBA
position _x,//position of the text _x referring to the player in 'allPlayers'
1,//Width
2,//height from position, below
0,//angle
format["%1 FPS: %2", name _x, str _playerFPS],//text to be displayed
0,//shadow on text, 0=none,1=shadow,2=outline
0.03,//text size
"PuristaMedium",//text font
"center"//align text left, right, or center
];
};
};
} forEach allPlayers;
//Here is the array of units you wish to display the FPS text for, it can be
//changed to be an array of specific units or players if you wish
}];
};
/////////////////////////////////////////////////////////
/////////////////////End FPS Script//////////////////////
/////////////////////////////////////////////////////////

View File

@@ -0,0 +1,11 @@
[] spawn milsim_fnc_init;
if (isServer) then {
[] spawn milsim_fnc_initServer;
};
if (hasInterface) then {
[] spawn milsim_fnc_initPlayerLocal;
};
nil

View File

@@ -0,0 +1,45 @@
diag_log text "[MILSIM] (initPlayerCPS) writing variable loop";
_cpsPFH = [
{
[] spawn {
// warning: while loop without suspension executes multiple times per frame
private _counter = 0;
private _endTime = diag_tickTime + 5;
private _frameNo = diag_frameNo;
while { diag_tickTime < _endTime } do
{
_counter = _counter + 1;
};
// in an empty mission, the _counter may go well over 2000 times per frame!
diag_log text format ["[MILSIM] (initPlayerCPS) Average Execution: %1 times per frame", _counter / (diag_frameNo - _frameNo)];
player setVariable["milsim_player_raw_cps", _counter / (diag_frameNo - _frameNo), true];
// with suspension
private _counter = 0;
private _endTime = diag_tickTime + 5;
private _frameNo = diag_frameNo;
while { diag_tickTime < _endTime } do
{
_counter = _counter + 1;
uiSleep 0.001; // waits at least 1 frame
};
// _counter says one per frame, as expected
diag_log text format ["[MILSIM] (initPlayerCPS) Average Execution: %1 times per frame", _counter / (diag_frameNo - _frameNo)];
player setVariable["milsim_player_cps", _counter / (diag_frameNo - _frameNo), true];
};
},
300,
[],
{ diag_log text "[MILSIM] (initPlayerCPS) CPS PFH loaded" },
{ diag_log text "IF YOU SEE THIS CPS PFH FUCKED UP" },
{ true },
{ false },
[]
] call CBA_fnc_createPerFrameHandlerObject;
player setVariable ["milsim_player_cps_handler", _cpsPFH];

View File

@@ -0,0 +1,133 @@
if (!hasInterface) exitWith {};
waitUntil {player == player};
player createDiarySubject["Status","FBCB2 - Status"];
player createDiarySubject["Intel","FBCB2 - Combat Msgs"];
player createDiarySubject["Messages","FBCB2 - Messages"];
diag_log text "[MILSIM] (initPlayerLocal) diaries created";
waitUntil {time > 0};
[] spawn milsim_fnc_initDNI_PlayerFPS;
[] spawn milsim_fnc_initPlayerCPS;
_action = [
"CheckFuel",
"Check Fuel",
"",
{
hint format ["Fuel: %1", (fuel _target *100)]
},
{true}
] call ace_interact_menu_fnc_createAction;
["LandVehicle", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass;
_action = [
"Unfuck",
"Flip Vehicle",
"",
{
_target setpos [(getpos _target) select 0,(getpos _target) select 1, 0.5];
_target setVectorUp surfaceNormal position _target;
},
{true}
] call ace_interact_menu_fnc_createAction;
["LandVehicle", 0, ["ACE_MainActions"], _action, true] call ace_interact_menu_fnc_addActionToClass;
_action = ["CheckExtTank","Check External Tank","",{hint format ["Ext Tank: %1", 5]},{true}] call ace_interact_menu_fnc_createAction;
["Tank_F", 0, ["ACE_MainActions", "CheckFuel"], _action, true] call ace_interact_menu_fnc_addActionToClass;
_map_copy_condition = {
('ItemMap' in (assignedItems _player)) && ('ItemMap' in (assignedItems _target)) && ([_player, _target, []] call ace_common_fnc_canInteractWith)
};
_map_copy_action = [
"MilSimCopyMap",
"Copy Map",
// "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
"\a3\ui_f\data\igui\cfg\actions\talk_ca.paa",
{[_target,_player] call milsim_fnc_copyMapFromPlayer},
_map_copy_condition
] call ace_interact_menu_fnc_createAction;
["Man", 0, ["ACE_MainActions"], _map_copy_action, true] call ace_interact_menu_fnc_addActionToClass;
_patchTire =
[
"patchTire",
"Patch Tire",
"\a3\ui_f\data\IGUI\Cfg\Actions\repair_ca.paa",
{
[_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call ace_common_fnc_doAnimation;
[
30,
[_player, _target],
{
params ["_args"];
_args params ["_player", "_target"];
hint "Tire Patched";
_target setDamage 0.2;
_target setVariable["milsim_ace_repair_wheel_canPatch", false];
},
{
params ["_args"];
_args params ["_player", "_target"];
hint "Stopped repair";
[_player, "", 0] call ace_common_fnc_doAnimation;
},
"Patching"
] call ace_common_fnc_progressBar
},
{ ( alive _target ) && ( [_player, "ToolKit"] call ace_common_fnc_hasItem ) && ( getDammage _target > 0.2 ) && ( _target getVariable["milsim_ace_repair_wheel_canPatch", true] ) }
] call ace_interact_menu_fnc_createAction;
["ACE_Wheel", 0, ["ACE_MainActions"], _patchTire, true] call ace_interact_menu_fnc_addActionToClass;
player addEventHandler["Respawn",
{
params ["_unit", "_corpse"];
_killer = _corpse getVariable ["ace_medical_causeOfDeath", "#scripted"];
if (_killer == "respawn_button") then {
format["[MILSIM] (initPlayerLocal) %1 was unconscious then clicked the respawn button", name _unit] remoteExec["diag_log", 0];
// format["%1 was unconscious then clicked the respawn button", name _unit] remoteExec["systemChat", 0];
};
}];
[{
params ["_unit", "_object", "_cost"];
private _return = (count nearestObjects [_unit, ["B_APC_Tracked_01_CRV_F", "rhsusf_M1239_M2_Deploy_socom_d", "rhsusf_stryker_m1132_m2_wd", "rhsusf_m113_usarmy_supply", "rhsusf_M1078A1P2_B_WD_CP_fmtv_usarmy", "B_Slingload_01_Cargo_F"], 120]) > 0;
_return
}] call ace_fortify_fnc_addDeployHandler;
addMissionEventHandler ["HandleChatMessage", {
params ["_channel", "_owner", "_from", "_text", "_person", "_name", "_strID", "_forcedDisplay", "_isPlayerMessage", "_sentenceType", "_chatMessageType"];
if ( missionNamespace getVariable ["milsim_sideChat", false] ) exitWith{ false };
if (_channel != 1) exitWith { false };
if ( ( admin _owner ) != 0 ) exitWith { false };
if ( !isNull ( getAssignedCuratorLogic _person ) ) exitWith { false };
true;
}];
waitUntil {!isNil "milsim_complete"};
[] spawn milsim_fnc_initFBCB2;
// Initializes the player/client side Dynamic Groups framework and registers the player group
["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups;

View File

@@ -0,0 +1,140 @@
if (isServer) then {
_fixedAssets = [
["Ares", "USAF_A10", 0],
["Odyssey", "RHSGREF_A29B_HIDF", 0],
["Hercules", "USAF_C130J", 0]
];
_rotaryAssets = [
["Apollo", "RHS_MELB_MH6M", 0],
["Artemis", "RHS_MELB_AH6M", 0],
["Icarus", "RHS_MELB_H6M", 0],
["Achilles", "RHS_CH_47F", 0],
["Hades", "ej_MH60MDAP4", 0],
["Griffin", "RHS_UH60M", 0],
["Dustoff", "RHS_UH60M_MEV2", 0],
["Pegasus", "B_T_VTOL_01_INFANTRY_F", 0],
["Spartan", "B_T_VTOL_01_ARMED_F", 0],
["Orion", "RHS_AH64D", 0],
["Athena", "RHS_AH1Z", 0],
["Homer", "RHS_UH1Y", 0],
["Atlas", "rhsusf_CH53E_USMC", 0]
];
_homes = allMissionObjects "ModuleRespawnPosition_F";
{
_home = _x;
{
_a = _home nearEntities [ _x select 1, 750];
_x set [2, (_x select 2) + count _a];
} forEach _fixedAssets;
} forEach _homes;
missionNamespace setVariable ["milsim_var_fixedAssets", _fixedAssets];
{
_home = _x;
{
_a = _home nearEntities [ _x select 1, 750];
_x set [2, (_x select 2) + count _a];
} forEach _rotaryAssets;
} forEach _homes;
missionNamespace setVariable ["milsim_var_rotaryAssets", _rotaryAssets];
publicVariable "milsim_var_fixedAssets";
publicVariable "milsim_var_rotaryAssets";
// Initializes the Dynamic Groups framework and groups
["Initialize", [true]] call BIS_fnc_dynamicGroups;
missionNamespace setVariable["milsim_raw_cps", 0];
missionNamespace setVariable["milsim_cps", 0];
publicVariable "milsim_raw_cps";
publicVariable "milsim_cps";
_cpsPFH = [
{
[] spawn {
// warning: while loop without suspension executes multiple times per frame
private _counter = 0;
private _endTime = diag_tickTime + 5;
private _frameNo = diag_frameNo;
while { diag_tickTime < _endTime } do
{
_counter = _counter + 1;
};
// in an empty mission, the _counter may go well over 2000 times per frame!
diag_log text format ["[MILSIM] (initServer) Average Server Execution: %1 times per frame", _counter / (diag_frameNo - _frameNo)];
missionNamespace setVariable["milsim_raw_cps", _counter / (diag_frameNo - _frameNo)];
publicVariable "milsim_raw_cps";
// with suspension
private _counter = 0;
private _endTime = diag_tickTime + 5;
private _frameNo = diag_frameNo;
while { diag_tickTime < _endTime } do
{
_counter = _counter + 1;
uiSleep 0.001; // waits at least 1 frame
};
// _counter says one per frame, as expected
diag_log text format ["[MILSIM] (initServer) Average Server Execution: %1 times per frame", _counter / (diag_frameNo - _frameNo)];
missionNamespace setVariable["milsim_cps", _counter / (diag_frameNo - _frameNo)];
publicVariable "milsim_cps";
["milsim_serverEfficiency", [ [ ["float", "milsim_raw_cps", missionNamespace getVariable ["milsim_raw_cps", -1]], ["float", "milsim_cps", missionNamespace getVariable ["milsim_cps", -1]] ] ] ] call CBA_fnc_localEvent;
};
},
300,
[],
{ diag_log text "[MILSIM] (initServer) CPS PFH loaded" },
{ diag_log text "IF YOU SEE THIS CPS PFH FUCKED UP" },
{ true },
{ false },
[]
] call CBA_fnc_createPerFrameHandlerObject;
missionNamespace setVariable ["milsim_cps_handler", _cpsPFH];
_playerCpsPFH = [
{
diag_log text "[MILSIM] (initServer) ** Player Executions **";
{
diag_log ( format ["%1: ( %2, %3 )", name _x, _x getVariable ["milsim_player_raw_cps",-1], _x getVariable ["milsim_player_cps",-1] ] )
} forEach allPlayers;
diag_log text "[MILSIM] (initServer) ***********************";
},
300,
[],
{ diag_log text "[MILSIM] (initServer) Player CPS PFH loaded" },
{ diag_log text "IF YOU SEE THIS CPS PFH FUCKED UP" },
{ true },
{ false },
[]
] call CBA_fnc_createPerFrameHandlerObject;
missionNamespace setVariable ["milsim_player_cps_handler", _playerCpsPFH];
missionNamespace setVariable ["milsim_complete", true];
diag_log text "[MILSIM] (initServer) milsim_complete";
publicVariable "milsim_complete";
};

View File

@@ -0,0 +1,22 @@
_text = "
<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>
<br/><br/>
<font color='#00FF00' size='16'>RIPTIDE</font><br/>
Command
<br/><br/>
<font color='#00FF00' size='16'>ONI</font><br/>
Alpha Platoon
<br/><br/>
<font color='#00FF00' size='16'>GOLIATH</font><br/>
Echo
<br/><br/>
<font color='#00FF00' size='16'>TIGER</font><br/>
RRC
<br/><br/>
<font color='#00FF00' size='16'>BLACKFOOT/font><br/>
Weapons Squad
<br/><br/>
";
player createDiaryRecord ["Status", ["MDS - COMMAND - CALLSIGNS", _text]];

View File

@@ -0,0 +1,16 @@
_sunTimes = date call BIS_fnc_sunriseSunsetTime;
_text = "
<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>
<br/><br/>
<font size='16' color='#4A86E8'>Local Sunrise</font>
<br/>
<font size='20' color='#FF0000'>" + ([_sunTimes select 0, "HH:MM"] call BIS_fnc_timeToString) + "</font>
<br/><br/>
<font size='16' color='#6AA84F'>Local Sunset</font>
<br/>
<font size='20' color='#FF0000'>" + ([_sunTimes select 1, "HH:MM"] call BIS_fnc_timeToString) + "</font>
<br/><br/>
";
player createDiaryRecord ["Status", ["MDS - INTEL - ENVIRONMENT", _text]];

View File

@@ -0,0 +1,19 @@
_assetList = missionNamespace getVariable "milsim_var_fixedAssets";
_text = "<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>";
{
_callSign = _x select 0;
_asset = _x select 1;
_assigned = _x select 2;
_name = getText(configFile >> "CfgVehicles" >> _asset >> "displayName");
_data = "<t size='2'>Callsign: " + _callsign + "</t><br/><t size='1'>Asset: " + _name + "</t><br/><t size='1'>Assigned: " + str _assigned + "</t>";
_text = _text + "<br/><br/>" + _data;
} foreach _assetList;
_text = _text + "<br/><br/><execute expression='[missionNamespace getVariable ""milsim_var_fixedAssets""] call milsim_fnc_messageAssetStatus'>Run Report on local node?</execute>";
player createDiaryRecord ["Status", ["MDS - ASSETS - FIXED", _text]];

View File

@@ -0,0 +1,35 @@
_text = "
<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>
<br/><br/>
<font size='16' color='#4A86E8'>EXODUS</font>
<br/>
<font color='#FF0000'>6 - 45</font>
<br/>
<font color='#FF0000'>RTO - 45 / 35</font>
<br/><br/>
<font size='16' color='#6AA84F'>RIPTIDE</font>
<br/>
<font color='#FF0000'>Actual - 45 / 100</font>
<br/>
<font color='#FF0000'>Romeo - 45 / 35</font>
<br/>
<font color='#FF0000'>1 - 110 / 100</font>
<br/>
<font color='#FF0000'>2 - 120 / 100</font>
<br/>
<font color='#FF0000'>3 - 130 / 110</font>
<br/>
<font color='#FF0000'>Blackfoot - 150 / 100</font>
<br/><br/>
<font size='16' color='#F1C232'>ECHO</font>
<br/>
<font color='#FF0000'>Impaler - 45 / 35</font>
<br/>
<font color='#FF0000'>JTAC - 35 / 82</font>
<br/>
<font color='#FF0000'>IDF - 82 / 100</font>
<br/><br/>
";
player createDiaryRecord ["Status", ["MDS - INTEL - RADIO FREQS", _text]];

View File

@@ -0,0 +1,19 @@
_assetList = missionNamespace getVariable "milsim_var_rotaryAssets";
_text = "<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>";
{
_callSign = _x select 0;
_asset = _x select 1;
_assigned = _x select 2;
_name = getText(configFile >> "CfgVehicles" >> _asset >> "displayName");
_data = "<t size='2'>Callsign: " + _callsign + "</t><br/><t size='1'>Asset: " + _name + "</t><br/><t size='1'>Assigned: " + str _assigned + "</t>";
_text = _text + "<br/><br/>" + _data;
} foreach _assetList;
_text = _text + "<br/><br/><execute expression='[missionNamespace getVariable ""milsim_var_rotaryAssets""] call milsim_fnc_messageAssetStatus'>Run Report on local node?</execute>";
player createDiaryRecord ["Status", ["MDS - ASSETS - ROTARY", _text]];

View File

@@ -0,0 +1,30 @@
_text = "
<font size='24' color='#ff0000'>=======------ Mission Data Set ------=======</font>
<br/><br/>
Smoke is a Guideline Not a Rule
<br/><br/>
<font color='#FFFFFF' size='16'>WHITE</font><br/>
Concealment
<br/><br/>
<font color='#008800' size='16'>GREEN</font><br/>
Friendly Forces
<br/><br/>
<font color='#0000FF' size='16'>BLUE</font><br/>
LZ Markers
<br/><br/>
<font color='#FF0000' size='16'>RED</font><br/>
Enemy Location
<br/><br/>
<font color='#FFA500' size='16'>ORANGE</font><br/>
Resupply Marker
<br/><br/>
<font color='#FFFF00' size='16'>YELLOW</font><br/>
Medical Emergency
<br/><br/>
<font color='#800080' size='16'>PURPLE</font><br/>
Broken Arrow - 100m radius
<br/><br/>
";
player createDiaryRecord ["Status", ["MDS - INTEL - SMOKES", _text]];

View File

@@ -0,0 +1,8 @@
waitUntil {player == player && !isNil "milsim_complete"};
[] spawn milsim_fnc_MDS_callsigns;
[] spawn milsim_fnc_MDS_fixedAssets;
[] spawn milsim_fnc_MDS_rotaryAssets;
[] spawn milsim_fnc_MDS_radioFrequencies;
[] spawn milsim_fnc_MDS_smokeColors;
[] spawn milsim_fnc_MDS_environment;

View File

@@ -0,0 +1,31 @@
_assetList = param [0, [objNull], [[objNull]]];
_text = parseText "<t size='4'>MESSAGE</t>";
_text = composeText [_text, lineBreak ];
_text = composeText [_text, parseText "<t align='left' size='2'>Asset</t><t align='right' size='2'>Available</t>", lineBreak ];
{
_callSign = _x select 0;
_asset = _x select 1;
_assigned = _x select 2;
_available = 0; //count (getMarkerPos "respawn_west" nearEntities [ _asset, 2000] );
_homes = allMissionObjects "ModuleRespawnPosition_F";
{
_home = _x;
_available = _available + count( _home nearEntities [ _asset, 750] );
} forEach _homes;
_image = getText(configFile >> "CfgVehicles" >> _asset >> "picture");
_name = getText(configFile >> "CfgVehicles" >> _asset >> "displayName") select [0, 24];
_data = "<img size='1' align='left' image='" + _image + "'/><t size='1' align='left'> " + _name + "</t><t size='1' align='right'>" + str _available + " [ " + str _assigned +" ]</t>";
_text = composeText[ _text, parseText _data, lineBreak ];
} foreach _assetList;
hint _text;

View File

@@ -0,0 +1,5 @@
params ["_sourcePlayer","_destinationPlayer"];
hint format["Copying map markers from %1", name _sourcePlayer];
[_destinationPlayer] remoteExecCall ["milsim_fnc_getPlayerMapMarkers",_sourcePlayer];

View File

@@ -0,0 +1,16 @@
params ["_destinationPlayer"];
_markerData = [];
hint format["Your map is being copied by %1", name _destinationPlayer];
{
_marker = toArray _x;
_marker resize 15;
if ( toString _marker == "_USER_DEFINED #" ) then {
_marker = _x call milsim_fnc_mapMarkerToString;
_markerData pushBack _marker;
};
} forEach allMapMarkers;
[_markerData] remoteExecCall ["milsim_fnc_loadMapMarkers",_destinationPlayer];

View File

@@ -0,0 +1,10 @@
params ["_markerList"];
if ('ItemMap' in (assignedItems player)) then {
{
_x call milsim_fnc_stringToMapMarker;
} foreach _markerList;
hint format["Map copied!"];
} else {
hint format["You need a map to copy onto!"];
};

View File

@@ -0,0 +1,52 @@
/*
Author:
Killzone_Kid, modified by LAxemann
Description:
Serializes marker to string for storage
Parameter(s):
0: STRING - existing marker name
1: STRING (Optional) - a single data delimiter character. Default "|"
Returns:
STRING - serialized marker to be used with BIS_fnc_stringToMarker or BIS_fnc_stringToMarkerLocal
or
"" on error
Example:
["marker_0"] call RR_mapStuff_fnc_markerToString;
["marker_1", ":"] call RR_mapStuff_fnc_markerToString;
*/
params [["_markerName", "", [""]], ["_delimiter", "|", [""]]];
private _markerShape = markerShape _markerName;
private _polyLineArray = [];
private _markerType = "none";
if (_markerShape isEqualTo "POLYLINE") then {
_polyLineArray = markerPolyline _markerName;
} else {
_markerType = markerType _markerName;
};
toFixed 4;
private _markerPosition = str markerPos [_markerName, true];
toFixed -1;
[
"",
_markerName,
_markerPosition,
_markerType,
_markerShape,
markerSize _markerName,
markerDir _markerName,
markerBrush _markerName,
markerColor _markerName,
markerAlpha _markerName,
str _polyLineArray,
markerText _markerName
] joinString _delimiter;

View File

@@ -0,0 +1,70 @@
/*
Author:
Killzone_Kid, modified by LAxemann
Description:
Creates marker from serialized data
Parameter(s):
0: STRING - marker data from BIS_fnc_markerToString
Returns:
STRING - created marker
or
"" on error or if marker exists
Example:
["|marker_0|[4359.1,4093.51,0]|mil_objective|ICON|[1,1]|0|Solid|Default|1|An objective"] call RR_mapStuff_fnc_stringToMarker;
*/
params [["_markerData","",[""]]];
if (_markerData isEqualTo "") exitWith
{
["Marker data is empty"] call BIS_fnc_error;
""
};
_markerData splitString (_markerData select [0,1]) params
[
"_markerName",
"_markerPos",
"_markerType",
"_markerShape",
"_markerSize",
"_markerDir",
"_markerBrush",
"_markerColor",
"_markerAlpha",
"_polyLineArray",
["_markerText",""]
];
if ((count _polyLineArray) > 0) then {
_polyLineArray = parseSimpleArray _polyLineArray;
};
_markerNameData = _markerName splitString "#" select 1;
_markerNameData splitString "/" params ["_markerCreator", "_markerID", "_markerChannel"];
_markerName = "_USER_DEFINED #" + _markerCreator + "/" + _markerCreator + _markerID + "/" + _markerChannel;
private _marker = createMarkerLocal [_markerName, parseSimpleArray _markerPos];
_marker setMarkerColorLocal _markerColor;
_marker setMarkerShapeLocal _markerShape;
_marker setMarkerAlphaLocal parseNumber _markerAlpha;
if ((count _polyLineArray) > 0) then {
_marker setMarkerPolylineLocal _polyLineArray;
} else {
_marker setMarkerTypeLocal _markerType;
_marker setMarkerSizeLocal parseSimpleArray _markerSize;
_marker setMarkerBrushLocal _markerBrush;
_marker setMarkerTextLocal _markerText;
_marker setMarkerDirLocal parseNumber _markerDir;
};
_marker

View File

@@ -0,0 +1,111 @@
/*
* Author: Hizumi
*
* Create Ammo resupply box for the 17th Batallion
*
* Arguments:
* 0: Vehicle - <OBJECT>
* 1: Position - <ARRAY>
*
* Return Value:
* Function executed <BOOL>
*
* Example:
* [box] call milsim_fnc_createAmmoBox; // create ammo box via init line of editor object
* [objNull, pos] call milsim_fnc_createAmmoBox // create ammo box via zeus module
*
* Public: Yes
*/
params [
["_box", objNull, [objNull]],
["_pos", [0,0,0], [[]], 3]
];
if (isNull _box) then {
_box = "Box_Syndicate_Ammo_F" createVehicle _pos;
};
clearBackpackCargoGlobal _box;
clearItemCargoGlobal _box;
clearMagazineCargoGlobal _box;
clearWeaponCargoGlobal _box;
_packs = [];
_items = [];
_magazines = [
["1Rnd_SmokePurple_Grenade_shell",12],
["1Rnd_SmokeBlue_Grenade_shell",24],
["1Rnd_SmokeOrange_Grenade_shell",12],
["rhs_mag_M441_HE",25],
["rhs_mag_M433_HEDP",15],
["ACE_40mm_Flare_ir",12],
["rhsusf_200Rnd_556x45_mixed_soft_pouch_coyote",25],
["rhsusf_20Rnd_762x51_m993_Mag",25],
["SmokeShell",12],
["rhs_mag_m67",12],
["1Rnd_Smoke_Grenade_shell",24],
["1Rnd_SmokeRed_Grenade_shell",24],
["1Rnd_SmokeGreen_Grenade_shell",24],
["1Rnd_SmokeYellow_Grenade_shell",12],
["Tier1_30Rnd_556x45_M856A1_EMag",25],
["Tier1_30Rnd_556x45_Mk318Mod0_EMag",75],
["ACE_30Rnd_65_Creedmor_mag",25],
["SMA_30Rnd_762x35_BLK_EPR",25],
["Tier1_30Rnd_762x35_300BLK_SMK_PMAG",25],
["SMA_30Rnd_68x43_SPC_FMJ",25],
["SMA_30Rnd_68x43_SPC_FMJ_Tracer",25],
["SMA_20Rnd_762x51mm_M80A1_EPR",25],
["SMA_20Rnd_762x51mm_M80A1_EPR_Tracer",25],
["SMA_20Rnd_762x51mm_Mk316_Mod_0_Special_Long_Range",25],
["SMA_20Rnd_762x51mm_Mk316_Mod_0_Special_Long_Range_Tracer",25],
["Tier1_250Rnd_762x51_Belt_M993_AP",15],
["ACE_20Rnd_762x51_Mag_Tracer",25],
["ACE_20Rnd_762x51_M993_AP_Mag",25],
["rhsusf_20Rnd_762x51_SR25_m993_Mag",25],
["Tier1_20Rnd_762x51_M993_SR25_Mag",25],
["Tier1_20Rnd_65x48_Creedmoor_SR25_Mag",25],
["rhssaf_30rnd_556x45_EPR_G36", 25],
["DemoCharge_Remote_Mag",16]
];
_weapons = [
["rhs_weap_M136",4],
["rhs_weap_M136_hp",4],
["rhs_weap_m72a7",2]
];
{
_x params ["_class", "_qty"];
_box addBackpackCargoGlobal [_class, _qty]
} foreach _packs;
{
_x params ["_class", "_qty"];
_box addItemCargoGlobal [_class, _qty]
} foreach _items;
{
_x params ["_class", "_qty"];
_box addMagazineCargoGlobal [_class, _qty]
} foreach _magazines;
{
_x params ["_class", "_qty"];
_box addWeaponCargoGlobal [_class, _qty]
} foreach _weapons;
[_box,1] call ace_cargo_fnc_setSize;
true;

View File

@@ -0,0 +1,86 @@
/*
* Author: Hizumi
*
* Create Ammo resupply box for the 17th Battalion
*
* Arguments:
* 0: Vehicle - <OBJECT>
* 1: Position - <ARRAY>
*
* Return Value:
* Function executed <BOOL>
*
* Example:
* [box] call milsim_fnc_createMedicalBox; // create ammo box via init line of editor object
* [objNull, pos] call milsim_fnc_createMedicalBox // create ammo box via zeus module
*
* Public: Yes
*/
params [
["_box", objNull, [objNull]],
["_pos", [0,0,0], [[]], 3]
];
if (isNull _box) then {
_box = "ACE_medicalSupplyCrate_advanced" createVehicle _pos;
};
clearBackpackCargoGlobal _box;
clearItemCargoGlobal _box;
clearMagazineCargoGlobal _box;
clearWeaponCargoGlobal _box;
_packs = [];
_items = [
["ACE_packingBandage",100],
["ACE_elasticBandage",100],
["ACE_tourniquet",48],
["ACE_splint",48],
["ACE_morphine",50],
["ACE_epinephrine",50],
["ACE_bloodIV",75],
["ACE_bloodIV_500",50],
["ACE_bloodIV_250",25],
["ACE_quikclot",75],
["ACE_personalAidKit", 5],
["ACE_surgicalKit", 5]
];
_magazines = [];
_weapons = [];
{
_x params ["_class", "_qty"];
_box addBackpackCargoGlobal [_class, _qty]
} foreach _packs;
{
_x params ["_class", "_qty"];
_box addItemCargoGlobal [_class, _qty]
} foreach _items;
{
_x params ["_class", "_qty"];
_box addMagazineCargoGlobal [_class, _qty]
} foreach _magazines;
{
_x params ["_class", "_qty"];
_box addWeaponCargoGlobal [_class, _qty]
} foreach _weapons;
[_box,1] call ace_cargo_fnc_setSize;
true;

View File

@@ -0,0 +1,82 @@
/*
* Author: Hizumi
*
* Create Ammo resupply box for the 17th Battalion
*
* Arguments:
* 0: Vehicle - <OBJECT>
* 1: Position - <ARRAY>
*
* Return Value:
* Function executed <BOOL>
*
* Example:
* [box] call milsim_fnc_createWeaponsBox; // create ammo box via init line of editor object
* [objNull, pos] call milsim_fnc_createWeaponsBox // create ammo box via zeus module
*
* Public: Yes
*/
params [
["_box", objNull, [objNull]],
["_pos", [0,0,0], [[]], 3]
];
if (isNull _box) then {
_box = "Box_NATO_Wps_F" createVehicle _pos;
};
clearBackpackCargoGlobal _box;
clearItemCargoGlobal _box;
clearMagazineCargoGlobal _box;
clearWeaponCargoGlobal _box;
_packs = [];
_items = [];
_magazines = [
["MRAWS_HEAT_F",35],
["MRAWS_HE_F",15],
["Tier1_250Rnd_762x51_Belt_M993_AP",50],
["Tier1_30Rnd_556x45_M856A1_EMag",25],
["Tier1_30Rnd_556x45_Mk318Mod0_EMag",50],
["Titan_AA",10],
["Titan_AT",10],
["200Rnd_65x39_cased_Box_Tracer_Red",50]
];
_weapons = [];
{
_x params ["_class", "_qty"];
_box addBackpackCargoGlobal [_class, _qty]
} foreach _packs;
{
_x params ["_class", "_qty"];
_box addItemCargoGlobal [_class, _qty]
} foreach _items;
{
_x params ["_class", "_qty"];
_box addMagazineCargoGlobal [_class, _qty]
} foreach _magazines;
{
_x params ["_class", "_qty"];
_box addWeaponCargoGlobal [_class, _qty]
} foreach _weapons;
[_box,1] call ace_cargo_fnc_setSize;
true;

2
images/.gitkeep Normal file
View File

@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

BIN
mission.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

26
mission_settings.hpp Normal file
View File

@@ -0,0 +1,26 @@
author = "MISSION AUTHOR";
onLoadName = "THIS APPEARS ON TOP OF THE LOADING SCREEN IMAGE";
loadScreen = "mission.jpg";
onLoadMission = "THIS APPEARS BELOW THE LOADING SCREEN IMAGE";
briefingName = "THIS IS THE NAME ON THE #MISSIONS LIST";
overviewText = "THIS IS WHERE YOU DESCRIBE THE MISSION IN THE #MISSION LIST";
// activate via #ace-fortify west base 2000
class ACEX_Fortify_Presets {
class base {
displayName = "Ken Custom";
objects[] = {
{"Land_BagFence_Round_F", 5},
{"Land_BagFence_Short_F", 5},
{"Land_BagFence_Long_F", 10},
{"Land_Plank_01_4m_F", 10},
{"Land_BagBunker_Small_F", 25},
{"Land_HBarrierTower_F", 100},
{"Land_HBarrierWall4_F", 25},
{"Land_HBarrierWall_corner_F", 25},
{"Land_HBarrier_1_F", 5}
};
};
};

2
scripts/.gitkeep Normal file
View File

@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

2
sounds/.gitkeep Normal file
View File

@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto