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

Mini missions #67

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Mini missions #67

wants to merge 14 commits into from

Conversation

nomisum
Copy link
Contributor

@nomisum nomisum commented Feb 10, 2022

adds experimental but working functionality of respawns mid-mission via bodybags.

also fixes some descriptions regarding medical settings.

@@ -54,6 +54,7 @@ class CfgFunctions
#include "functions\events\cfgFunctions.hpp"
#include "functions\external\cfgFunctions.hpp"
#include "functions\groupsettings\cfgFunctions.hpp"
#include "functions\minimissions\cfgFunctions.hpp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "functions\minimissions\cfgFunctions.hpp"
#include "functions\minimissions\cfgFunctions.hpp"

Copy link
Collaborator

@McDiod McDiod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • add to Wiki once merged.

[_bodyBag, 1] call ace_cargo_fnc_setSize;
[_bodyBag, true, [0, 1.6, 0.26], 0] remoteExec ["ace_dragging_fnc_setDraggable", 0];

[_bodyBag] remoteExec ["grad_minimissions_fnc_bodyBagAction"];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[_bodyBag] remoteExec ["grad_minimissions_fnc_bodyBagAction"];
[_bodyBag] remoteExec ["grad_minimissions_fnc_bodyBagAction",0,_bodyBag];

For JIP compatibility.

params ["_target", "_bodyBag"];
diag_log format ["placedInBodyBag _target %1 - bodybag %2", _target, _bodyBag];

private _name = name _target;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this reliable? I think ACE uses ace_common_fnc_getName for everything involving dead units.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies tonal uses of name

// body bag scanner
["ace_placedInBodyBag", {
params ["_target", "_bodyBag"];
diag_log format ["placedInBodyBag _target %1 - bodybag %2", _target, _bodyBag];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
diag_log format ["placedInBodyBag _target %1 - bodybag %2", _target, _bodyBag];
INFO_2("placedInBodyBag _target %1 - bodybag %2", _target, _bodyBag);

@McDiod
Copy link
Collaborator

McDiod commented Feb 27, 2022

Also the name of this component confused me, I thought this was going to add some pre-made semi-random missions for CO_Prometheus style games 🙈

@nomisum
Copy link
Contributor Author

nomisum commented Feb 27, 2022

Also the name of this component confused me, I thought this was going to add some pre-made semi-random missions for CO_Prometheus style games 🙈

haha, hmm any better idea? the first intent was to provide a framework for diwako style "ops-in-a-row" inside one mission.

@McDiod
Copy link
Collaborator

McDiod commented Feb 27, 2022

bodybagRespawn I guess, since it's alternative to waveRespawn?
Just changing the one outward facing setting in USER/respawnSettings.hpp is good enough to prevent some future confusion imo. No need to change anything that's under the hood.

@Fusselwurm
Copy link
Member

Also the name of this component confused me, I thought this was going to add some pre-made semi-random missions for CO_Prometheus style games see_no_evil

haha, hmm any better idea? the first intent was to provide a framework for diwako style "ops-in-a-row" inside one mission.

sub-missions? mission-phases ? mission-stages? sub-scenarios?

Copy link
Member

@DerZade DerZade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On top the suggested changes the inconsistent use of CBA macros should be fixed. :P

private _name = _target getVariable ["grad_minimissions_unitName", ""];
private _unit = objNull;
{
if (name _x == _name) exitWith {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (name _x == _name) exitWith {
if (name _x isEqualTo _name) exitWith {

params ["_target", "_bodyBag"];
diag_log format ["placedInBodyBag _target %1 - bodybag %2", _target, _bodyBag];

private _name = name _target;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This applies tonal uses of name

@@ -0,0 +1,21 @@
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly is the purpose of this file?

// save entire settings array once anything is changed basically
private _fnc_saveSWSettings = {
params ["_unit"];
if (_unit != player) exitWith {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (_unit != player) exitWith {};
if (_unit isNotEuqalTo player) exitWith {};

// same for longrange
private _fnc_saveLRSettings = {
params ["_unit"];
if (_unit != player) exitWith {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (_unit != player) exitWith {};
if (_unit isNotEqualTo player) exitWith {};

"TFAR_event_OnRadiosReceived",
{
params ["_unit","_radio"];
if (_unit != player) exitWith {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (_unit != player) exitWith {};
if (_unit isNotEqualTo player) exitWith {};

[
{
params ["_unit","_backpack"];
backpack _unit == _backpack
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
backpack _unit == _backpack
backpack _unit isEqualTo _backpack

"grad_loadout_loadoutApplied",
{
params ["_unit","_loadout"];
if (_unit != player) exitWith {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (_unit != player) exitWith {};
if (_unit isNotEqualTo player) exitWith {};

@@ -1,5 +1,9 @@
["Terminate"] call BIS_fnc_EGSpectator;

if (([missionConfigFile >> "missionSettings","waveRespawnEnabled",0] call BIS_fnc_returnConfigEntry) == 1) then {
if (([missionConfigFile >> "missionSettings" >> "respawnSettings","waveRespawnEnabled",0] call BIS_fnc_returnConfigEntry) == 1) then {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (([missionConfigFile >> "missionSettings" >> "respawnSettings","waveRespawnEnabled",0] call BIS_fnc_returnConfigEntry) == 1) then {
if (([missionConfigFile >> "missionSettings" >> "respawnSettings","waveRespawnEnabled",0] call BIS_fnc_returnConfigEntry) isEqualTo 1) then {

[] call grad_waverespawn_fnc_onPlayerRespawn;
};

if (([missionConfigFile >> "missionSettings" >> "respawnSettings","miniMissionsEnabled",0] call BIS_fnc_returnConfigEntry) == 1) then {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (([missionConfigFile >> "missionSettings" >> "respawnSettings","miniMissionsEnabled",0] call BIS_fnc_returnConfigEntry) == 1) then {
if (([missionConfigFile >> "missionSettings" >> "respawnSettings","miniMissionsEnabled",0] call BIS_fnc_returnConfigEntry) isEqualTo 1) then {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants