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

[Refactor] Change to an event-driven radio system. #162

Merged
merged 18 commits into from
Jun 17, 2023

Conversation

Bubbus
Copy link
Collaborator

@Bubbus Bubbus commented Jun 8, 2023

Pull Request Description

When merged this pull request will:

  • Move to a more expressive radio config system.
  • Make radio assignment more reliable.
  • Allow SLs to push radio channels to subordinates.
  • Add a nicer radio list in the map screen.
  • Made creating multi-language roles easier.

Release Notes

A new radio system has been added which should make it easier and quicker to set up radios for missions. For more information, check the new acre_radio_configuration.sqf file in the configuration folder.

In addition, squad leaders can now manage the radio channels for the whole group and automatically push the radio channels onto their squad members - this should allow SLs to solve radio issues without having to ask everyone what net they're on.

Finally, a new radio list has been added which should make it easier to see radio information, and hide it away when not needed.

IMPORTANT

  • Testing has been completed as neccessary, depending on the nature & impact of the changes.
  • The Release Notes section below must be filled out appropriately to explain the changes made in this PR. This section will be used in Framework Changelogs.
  • If the contribution affects the wiki, please include your changes in this pull request so the wiki is consistently updated.
  • Contribution Guidelines are read, understood and applied.
  • Title of this PR uses our standard template [Descriptor] - Add|Fix|Improve|Change|Make|Remove {changes}.

Resolves #133

Bubbus added 17 commits March 14, 2023 21:05
- Added pre and post events for gearscripting.
- Added example event handlers:
- Added event handler to preserve player facewear.
- Added event handler to fix overloading by adjusting max loads.
- Added events readme.
Group-leader override support for channels - not yet available to player.
Fixed bug with handling extended loadouts.
Removed the cross-sides radio config hint in acre_radio_configuration.sqf
Squad changing via squad picker updates radio nets.
Backpack radios now go into the backpack.
Altered radio list font, custom channels show the channel number.
Added default radios for Zeus.
…dio-refactor

# Conflicts:
#	components/gearScript/functions.hpp
@Bubbus Bubbus marked this pull request as ready for review June 8, 2023 21:03
@Bubbus Bubbus modified the milestones: 1.7.0, 1.6.0 Jun 8, 2023
components/gearScript/fn_applyLoadoutModifications.sqf Outdated Show resolved Hide resolved
components/gearScript/fn_reapplyGear.sqf Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see you've separated chunks of code into different files to later join them via includes - presumably to interface with the configuration file. However, imo this is done at the expense of readability: here you're declaring private variables without assigning them to anything or giving them a default value. If I later want to figure out where a variable comes from, I'd have to trace it here throughout the includes, which isn't ideal (especially with how small these files are).

I'd suggest merging the pre/post configuration snippets into the radio component, leaving only the include for the configuration file (so as to not expose component code to the user).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The config files are intended for user readability first - it sucks more as a developer but if it's more readable to MMs then it's the right way imo. That said, I'll collapse this whole deal down a bit because yeah it's a bit extra rn.

components/radio/acre/configuration/macros.hpp Outdated Show resolved Hide resolved
components/radio/acre/globals.sqf Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

Refer to my comment about merging the pre/post files into here.

components/radio/globals.sqf Outdated Show resolved Hide resolved
components/radio/macros.hpp Outdated Show resolved Hide resolved
@Cre8or
Copy link
Collaborator

Cre8or commented Jun 14, 2023

As discussed, I'd modify the ACRE override to use two distinct functions: your override, and the original function (compiled in the traditional way in CfgFunctions. but using a soft-dependency). The functions config would then become

#if __has_include("\idi\acre\addons\main\stringtable.xml")
    class acre_ace_interact
    {
        class overrides
        {
            file = "components\radio\acre";
            class radioListChildrenActions{};
            class radioListChildrenActions_original
            {
                file = "idi\acre\addons\ace_interact\fnc_radioListChildrenActions.sqf";
            };
        }
    }
#endif

Then we can omit lines 5-12 of your override:

if (isNil "f_var_originalFunction_addRadioActionsToClass") then
{
    // Why isn't this easier to do in SQF?  Why does it have to be so brittle?  thanks lads
    f_var_originalFunction_addRadioActionsToClass = compile preprocessFileLineNumbers "idi\acre\addons\ace_interact\fnc_radioListChildrenActions.sqf";
};


private _children = _this call f_var_originalFunction_addRadioActionsToClass;

and just do:

private _children = _this call acre_ace_interact_fnc_radioListChildrenActions_original;

Copy link
Collaborator

@Cre8or Cre8or left a comment

Choose a reason for hiding this comment

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

Everything's resolved as far as I can see.

🚢

Copy link
Collaborator

Choose a reason for hiding this comment

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

That function is now gone - good catch.

@Bubbus Bubbus merged commit 8ed2197 into develop Jun 17, 2023
@Bubbus Bubbus deleted the feature/radio-refactor branch June 17, 2023 17:50
dgibso29 added a commit that referenced this pull request Jun 17, 2023
* [Chore] Update Release GitHub Action (#96)

* Replace auto-tag with pulling latest tag

* Auto assign PR reviewers

* Update auto_assign.yaml

* Update auto_assign.yaml

* fixed ending dialog population breaking on double defined entries (#98)

* [Add] - Visible framework version (#99)

* Added Framework map panel with version entry.

* Moved map admin stuff into new Framework panel.

* [Feature] - Add Gearscript ACE gun-bag support. (#102)

* Part 1 - added "SET_GUNBAG_CONTENTS" macro and underlying variable setter.

* Full gunbag support including forcing gunbag state onto regular backpacks.
Examples placed into default gearscripts.
Fixed globals ordering bug (was after preinit config group).

* [Feature] - Disable ACE advanced car damage by default. (#105)

* Added option to cbaSettings.hpp to disable ACE adv. vic damage model.  Disabled by default.

* Reduced scope of feature to just ACE car damage.

* [Feature] - Improve ceasefire side relations (#101)

* Ceasefire UI, first draft

* UI handler function

- Added a clientside function to draw and update the ceasefire UI
- Added a default RscTitle to the mission description

* Implemented server/client handling

- Added serverside function to initiate (or terminate) a ceasefire
- Added clientside function to handle ceasefire limitations on the player (god mode, captivity, projectile removal)
- Added component initialisation with default mission start duration of 60 seconds (subject to change)

* Zeus integration, Zen module

- Added a Zen module to handle ceasefire from Zeus
- Ceasefire UI no longer shows in the debug camera (no longer
- Player captivity is no longer reset when exiting Zeus during a ceasefire
- Removed "Default" RscTitle (`cutFadeOut` does the job aswell)

* Component init

- Added ceasefire component init to the client group (necessary for global vars initialisation )

* ACE throwing, UI improvements

- Fixed ACE throwing not being detected as fire event; now inhibited during ceasefire
- Player captivity no longer gets reset when toggling player visibility as Zeus during ceasefire
- Added a fade-in animation to the ceasefire UI
- Added sounds to the ceasefire UI

* Initial justification

Added a configuration macro to override the justification text for the initial ceasefire (on mission start)

* Removed SafeStart/SafeEnd components

With the completion of the Ceasefire component, SafeStart and SafeEnd are now obsolete and have thus been removed

* Removed border on safestart box to align with rest of CAFE UI design, fixed config indent alignment.
Re-centered mission.sqm camera position.

* Removed UI outline

* Side relations

- Enforced ceasefire on AI via side relations

* *notices missing semicolon*

OwO who did this

* Update fn_ceasefire.sqf

- Initialised global variable to prevent an error on first execution
- Fixed varname casing for _ceasefireStateChanged

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update pull_request_template.md

* [Improve] Overhauled default medical settings (#108)

* overhauled medical settings

AI should feel less tanky with unconsciousness enabled
Headshots still instakill AI
Player damage threshold has been buffed a bit to counteract those changes on the player side

Disabled ACE vehicle crash damage (ACE car damage is back baby)

* fixed funny slider numbers

* [FIX] Zeus being unable to properly update crate gear via module (#111)

* Update fn_zen_createSupplyCrate_performAction.sqf

fixes edgecase of Zeus being unable to assign gear to crates in certain cases

* Update components/gearScript/zen/fn_zen_createSupplyCrate_performAction.sqf

bruh moment

Co-authored-by: Bubbus <splambob@googlemail.com>

Co-authored-by: Bubbus <splambob@googlemail.com>

* Fixed default BLUFOR and INDFOR loadouts so PCMLs in crates are loaded (#110)

closes #106

* [Improve Gearscript] Resupply crates now have space to drop stuff (#109)

* Resupply crates now have space to drop stuff

Gearscript automatically adds 25% more load capacity over the assigned Gear

* Cleanup

Added Comments
Added fix for edgecase Zeusmodule (goes together with #110)

* Update readme.md

* Fixed Fatal damage source (#112)

* Update gear_blufor.sqf (#115)

fixed double semicolon in the blufor default LAT loadout

* Changed default vehicle lock to "Locked for players" for framework spawned vics (#116)

* [Bugfix] Compatibility for new ACE gearstrings (#120)

* fixed compat for new ACE gearstring

gunbag compat also done

* Changed to use "count != 10", to be in-line with how CBA does this same check.
Added check to gunbag because why not, it saves us effort for our re-runs.

Co-authored-by: Bubbus <splambob@googlemail.com>

* [Update] Add new default addon settings. (#122)

- ims_bluntweapon (-> Unconscious)
- ace_marker_flags_placeanywhere (-> true)
- ace_overheating_cookoffcoef (-> 0)
- ace_vehicle_damage_enabled (-> true)

This commit affects a lot of the mission.sqm because an Arma update has introduced the new `singleType` key.

* [Chore] Release 1.4.2 Hotfix -> Dev (#126)

* [Hotfix] Added compatibility for new ACE gearstring format (#121)

* fixed ACE gearstring compat

* Made change character-identical to other hotfix branch to simplify merge upon next release.

Co-authored-by: Bubbus <splambob@googlemail.com>

* Added new default values to these settings: - ims_bluntweapon (-> Unconscious) - ace_marker_flags_placeanywhere (-> true) - ace_overheating_cookoffcoef (-> 0) - ace_vehicle_damage_enabled (-> true)

This commit affects a lot of the mission.sqm because an Arma update has introduced the new `singleType` key.

* Update create_draft_release.yml (#125)

Co-authored-by: Bubbus <splambob@googlemail.com>
Co-authored-by: Joecuronium <83242905+Joecuronium@users.noreply.github.com>

* [Improve] Fix PAK Stitch Exploit Pending ACE PR Merge (#128)

* Fixed PAK Stitch Exploit

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Fracture fix 2

* Update fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* [Chore] Update Medical Setting CBA Presets (#127)

* Consolidate Advanced Medical CBA Settings

* Update medical_basic.sqf

* Update medical_advanced.sqf

* Update zen_modules.sqf (#134)

* [Refactor] - New respawn system. (#135)

* Using default respawn.  Removed respawnWaves component, made downtime only work on uncon players.

* Added basic gearscript handler to vanilla respawn system.

* Added basic squad handling to respawn refactor.

* Progress on respawn:
* Torn out now-irrelevant stuff about respawn dialogs etc.
* Made configurable (although some of the config doesn't work idk why)

* Now with 4 options: timed waves, personal timer, side tickets, personal tickets (ticket types stack so can have personal pool and then side-based 'overflow' pool).
Respawn timer is variable-based so can be altered mid-mission.

* imagine no tab indents

* Added legacy triggered-waves mode w/ UI and tickets compat.
Fixed personal-tickets allowance.
other lil bits

* fixn and addn...

[?] when player is in spectate before dying, mouse gets broken, oh no
[x] make respawn ace-action invisible if not in triggered-waves mode
[x] fix jip teleport ticket - broken in off position
[>] locations framework thingy - in progress

* remaining bugs from initial test session (probly) fixed

[x] when player tickets all gone, team tickets stay the same
[x] first start - no respawn menu pls

* Added respawn manager system.
Updated default mission file.

* Allowed players to spawn with triggered-waves when respawnOnStart = 1
Allow to define an initial respawn delay when respawnOnStart = 1
Refactored the startup sequence to ensure globals run before preInit config.

* Attempt to fix players not getting the right languages upon spawning.

* Hide default-named groups from the squad picker.
Hide the "ZEUS" group from squad picker unless you are a zeus.
Ensure a group is always picked when Confirm is pressed, unless there are no groups to pick from.

* Added "redeploy via flagpole" support.
Corrected examples in respawnLocations config.

* Doubled down on the respawn position module despite some flaws, until I can get the code-based alternative working again.
Misc fixes.

* Added weapon safety on respawn.
disabling debug mode again woops

* Moved spectator camera controls out from underneath respawn UI.

* Force-on auto-respawn when in triggered-waves mode.

* Added better respawn examples to mission.sqm
Removed respawn location module override as not really needed.

* Made BIS spectator respect ACE camera mode settings.

* Added "close" button to redeploy screen.

* Removed forced auto-respawn for triggered-waves.

* Added "create respawn", "change tickets" and "allow immediate respawn" ZEN modules.

* Feedback from testing: docs and jip/teleport toggle support.

* Re-added addon defaults which were introduced in 11895c9 but overwritten by merge of 238ef47.

* Removed stray chat/console debug statements.

* [Bugfix] Zeus teleport

- Fixed script error when attempting to teleport the player upon leaving the Zeus interface

* [Bugfix] - Dead spectator voicechat (#149)

* Forcing spectator voicechat on/off when dead-spectator screen is entered/exited.

* Added some comments

* [Bugfix] - Fix "Wound Randomly" locality issue. (#147)

* Forcing ACE damage to run on unit locality, for fn_woundUnitRandomly.

* remoteExec ➡ remoteExecCall

* [Bugfix] - Ceasefire UI font

Switched the current font to the non-bold variant, because CUP overrides it to be non-monospace, for some silly reason

* Made gravestone manager respect setting of GRAVESTONES_USE_PRIORITY_LIST config value. (#150)

* Fixed CLEAR_UNIFORM typo. (#153)

Fixed similar typos.
Added docs for COPY_* macros.

* [Bugfix] - Resolving squadmarker issues. (#154)

* Attempted fix for marker reset upon player JIP.

* Fixed JIP players not seeing squad menu or getting a teleport ticket.

* Disable the cancel-button of the squad selector, when player respawns.
 - (they can still press ESC but if they do that and complain about no marker, skill issue.)
Prevent TP to origin if selecting squad with 0 members.

* Replaced vanilla ticket handling with bespoke stuff. (#152)

Specified isCall for all respawn modes.
Added new timed-tickets mode.  IDK why it was missing.

* [Change] - Made customStartup_* scheduled. (#148)

* Made customStartup_* scheduled.  Added comments describing new behaviour.

* phrasing

* [Feature] - Added ZEN module for creating loadout lockers mid-mission. (#155)

* Added ZEN module for creating loadout lockers mid-mission.
Changed calculations for loadout locker add-on prop to allow for different objects.

* Forgot about ZEN Module ASL pos.

* Ok any object can be lockernatored mid mission now

* Fix Broken URLs In Contrib File

* [Refactor] Change to an event-driven radio system. (#162)

* Tearing out most things radio-related.  We're starting from scratch babyyyy

* Gearscript alterations:
- Added pre and post events for gearscripting.
- Added example event handlers:
- Added event handler to preserve player facewear.
- Added event handler to fix overloading by adjusting max loads.
- Added events readme.

* Made Zeus ACRE features soft-dependent on ACRE presence.

* WIP 'declarative' radio config.  Channel assignment not working yet.

* Improving radio configuration capability.

* Channel auto-assignment kinda working

* Channel assignment works.
Group-leader override support for channels - not yet available to player.

* Added new radio list, collapsible, reactive to changes in side, role etc.

* Optimised radio list refresh a little

* Added support for mixed-presets radio loadout.
Fixed bug with handling extended loadouts.

* tiny tweaks to radio list

* Added language support via ACRE Babel.

* Re-added radio ACE interacts in the ACRE section this time such wow

* Fixed radios being incorrect on respawn by introducing a "re-gearscript grace period".

* Added ZEN modules for playing around with people's radios.
Removed the cross-sides radio config hint in acre_radio_configuration.sqf

* Added player feedback for radio net changes.
Squad changing via squad picker updates radio nets.
Backpack radios now go into the backpack.
Altered radio list font, custom channels show the channel number.
Added default radios for Zeus.

* Changes based on Cre's review.

---------

Co-authored-by: Joecuronium <83242905+Joecuronium@users.noreply.github.com>
Co-authored-by: Bubbus <splambob@googlemail.com>
Co-authored-by: Cre8or <3143797+Cre8or@users.noreply.github.com>
Co-authored-by: Cre8or <cre8or@tuta.io>
dgibso29 added a commit that referenced this pull request Jun 22, 2023
* [Chore] Update Release GitHub Action (#96)

* Replace auto-tag with pulling latest tag

* Auto assign PR reviewers

* Update auto_assign.yaml

* Update auto_assign.yaml

* fixed ending dialog population breaking on double defined entries (#98)

* [Add] - Visible framework version (#99)

* Added Framework map panel with version entry.

* Moved map admin stuff into new Framework panel.

* [Feature] - Add Gearscript ACE gun-bag support. (#102)

* Part 1 - added "SET_GUNBAG_CONTENTS" macro and underlying variable setter.

* Full gunbag support including forcing gunbag state onto regular backpacks.
Examples placed into default gearscripts.
Fixed globals ordering bug (was after preinit config group).

* [Feature] - Disable ACE advanced car damage by default. (#105)

* Added option to cbaSettings.hpp to disable ACE adv. vic damage model.  Disabled by default.

* Reduced scope of feature to just ACE car damage.

* [Feature] - Improve ceasefire side relations (#101)

* Ceasefire UI, first draft

* UI handler function

- Added a clientside function to draw and update the ceasefire UI
- Added a default RscTitle to the mission description

* Implemented server/client handling

- Added serverside function to initiate (or terminate) a ceasefire
- Added clientside function to handle ceasefire limitations on the player (god mode, captivity, projectile removal)
- Added component initialisation with default mission start duration of 60 seconds (subject to change)

* Zeus integration, Zen module

- Added a Zen module to handle ceasefire from Zeus
- Ceasefire UI no longer shows in the debug camera (no longer
- Player captivity is no longer reset when exiting Zeus during a ceasefire
- Removed "Default" RscTitle (`cutFadeOut` does the job aswell)

* Component init

- Added ceasefire component init to the client group (necessary for global vars initialisation )

* ACE throwing, UI improvements

- Fixed ACE throwing not being detected as fire event; now inhibited during ceasefire
- Player captivity no longer gets reset when toggling player visibility as Zeus during ceasefire
- Added a fade-in animation to the ceasefire UI
- Added sounds to the ceasefire UI

* Initial justification

Added a configuration macro to override the justification text for the initial ceasefire (on mission start)

* Removed SafeStart/SafeEnd components

With the completion of the Ceasefire component, SafeStart and SafeEnd are now obsolete and have thus been removed

* Removed border on safestart box to align with rest of CAFE UI design, fixed config indent alignment.
Re-centered mission.sqm camera position.

* Removed UI outline

* Side relations

- Enforced ceasefire on AI via side relations

* *notices missing semicolon*

OwO who did this

* Update fn_ceasefire.sqf

- Initialised global variable to prevent an error on first execution
- Fixed varname casing for _ceasefireStateChanged

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update pull_request_template.md

* [Improve] Overhauled default medical settings (#108)

* overhauled medical settings

AI should feel less tanky with unconsciousness enabled
Headshots still instakill AI
Player damage threshold has been buffed a bit to counteract those changes on the player side

Disabled ACE vehicle crash damage (ACE car damage is back baby)

* fixed funny slider numbers

* [FIX] Zeus being unable to properly update crate gear via module (#111)

* Update fn_zen_createSupplyCrate_performAction.sqf

fixes edgecase of Zeus being unable to assign gear to crates in certain cases

* Update components/gearScript/zen/fn_zen_createSupplyCrate_performAction.sqf

bruh moment

Co-authored-by: Bubbus <splambob@googlemail.com>

Co-authored-by: Bubbus <splambob@googlemail.com>

* Fixed default BLUFOR and INDFOR loadouts so PCMLs in crates are loaded (#110)

closes #106

* [Improve Gearscript] Resupply crates now have space to drop stuff (#109)

* Resupply crates now have space to drop stuff

Gearscript automatically adds 25% more load capacity over the assigned Gear

* Cleanup

Added Comments
Added fix for edgecase Zeusmodule (goes together with #110)

* Update readme.md

* Fixed Fatal damage source (#112)

* Update gear_blufor.sqf (#115)

fixed double semicolon in the blufor default LAT loadout

* Changed default vehicle lock to "Locked for players" for framework spawned vics (#116)

* [Bugfix] Compatibility for new ACE gearstrings (#120)

* fixed compat for new ACE gearstring

gunbag compat also done

* Changed to use "count != 10", to be in-line with how CBA does this same check.
Added check to gunbag because why not, it saves us effort for our re-runs.

Co-authored-by: Bubbus <splambob@googlemail.com>

* [Update] Add new default addon settings. (#122)

- ims_bluntweapon (-> Unconscious)
- ace_marker_flags_placeanywhere (-> true)
- ace_overheating_cookoffcoef (-> 0)
- ace_vehicle_damage_enabled (-> true)

This commit affects a lot of the mission.sqm because an Arma update has introduced the new `singleType` key.

* [Chore] Release 1.4.2 Hotfix -> Dev (#126)

* [Hotfix] Added compatibility for new ACE gearstring format (#121)

* fixed ACE gearstring compat

* Made change character-identical to other hotfix branch to simplify merge upon next release.

Co-authored-by: Bubbus <splambob@googlemail.com>

* Added new default values to these settings: - ims_bluntweapon (-> Unconscious) - ace_marker_flags_placeanywhere (-> true) - ace_overheating_cookoffcoef (-> 0) - ace_vehicle_damage_enabled (-> true)

This commit affects a lot of the mission.sqm because an Arma update has introduced the new `singleType` key.

* Update create_draft_release.yml (#125)

Co-authored-by: Bubbus <splambob@googlemail.com>
Co-authored-by: Joecuronium <83242905+Joecuronium@users.noreply.github.com>

* [Improve] Fix PAK Stitch Exploit Pending ACE PR Merge (#128)

* Fixed PAK Stitch Exploit

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Fracture fix 2

* Update fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* [Chore] Update Medical Setting CBA Presets (#127)

* Consolidate Advanced Medical CBA Settings

* Update medical_basic.sqf

* Update medical_advanced.sqf

* Update zen_modules.sqf (#134)

* [Refactor] - New respawn system. (#135)

* Using default respawn.  Removed respawnWaves component, made downtime only work on uncon players.

* Added basic gearscript handler to vanilla respawn system.

* Added basic squad handling to respawn refactor.

* Progress on respawn:
* Torn out now-irrelevant stuff about respawn dialogs etc.
* Made configurable (although some of the config doesn't work idk why)

* Now with 4 options: timed waves, personal timer, side tickets, personal tickets (ticket types stack so can have personal pool and then side-based 'overflow' pool).
Respawn timer is variable-based so can be altered mid-mission.

* imagine no tab indents

* Added legacy triggered-waves mode w/ UI and tickets compat.
Fixed personal-tickets allowance.
other lil bits

* fixn and addn...

[?] when player is in spectate before dying, mouse gets broken, oh no
[x] make respawn ace-action invisible if not in triggered-waves mode
[x] fix jip teleport ticket - broken in off position
[>] locations framework thingy - in progress

* remaining bugs from initial test session (probly) fixed

[x] when player tickets all gone, team tickets stay the same
[x] first start - no respawn menu pls

* Added respawn manager system.
Updated default mission file.

* Allowed players to spawn with triggered-waves when respawnOnStart = 1
Allow to define an initial respawn delay when respawnOnStart = 1
Refactored the startup sequence to ensure globals run before preInit config.

* Attempt to fix players not getting the right languages upon spawning.

* Hide default-named groups from the squad picker.
Hide the "ZEUS" group from squad picker unless you are a zeus.
Ensure a group is always picked when Confirm is pressed, unless there are no groups to pick from.

* Added "redeploy via flagpole" support.
Corrected examples in respawnLocations config.

* Doubled down on the respawn position module despite some flaws, until I can get the code-based alternative working again.
Misc fixes.

* Added weapon safety on respawn.
disabling debug mode again woops

* Moved spectator camera controls out from underneath respawn UI.

* Force-on auto-respawn when in triggered-waves mode.

* Added better respawn examples to mission.sqm
Removed respawn location module override as not really needed.

* Made BIS spectator respect ACE camera mode settings.

* Added "close" button to redeploy screen.

* Removed forced auto-respawn for triggered-waves.

* Added "create respawn", "change tickets" and "allow immediate respawn" ZEN modules.

* Feedback from testing: docs and jip/teleport toggle support.

* Re-added addon defaults which were introduced in 11895c9 but overwritten by merge of 238ef47.

* Removed stray chat/console debug statements.

* [Bugfix] Zeus teleport

- Fixed script error when attempting to teleport the player upon leaving the Zeus interface

* [Bugfix] - Dead spectator voicechat (#149)

* Forcing spectator voicechat on/off when dead-spectator screen is entered/exited.

* Added some comments

* [Bugfix] - Fix "Wound Randomly" locality issue. (#147)

* Forcing ACE damage to run on unit locality, for fn_woundUnitRandomly.

* remoteExec ➡ remoteExecCall

* [Bugfix] - Ceasefire UI font

Switched the current font to the non-bold variant, because CUP overrides it to be non-monospace, for some silly reason

* Made gravestone manager respect setting of GRAVESTONES_USE_PRIORITY_LIST config value. (#150)

* Fixed CLEAR_UNIFORM typo. (#153)

Fixed similar typos.
Added docs for COPY_* macros.

* [Bugfix] - Resolving squadmarker issues. (#154)

* Attempted fix for marker reset upon player JIP.

* Fixed JIP players not seeing squad menu or getting a teleport ticket.

* Disable the cancel-button of the squad selector, when player respawns.
 - (they can still press ESC but if they do that and complain about no marker, skill issue.)
Prevent TP to origin if selecting squad with 0 members.

* Replaced vanilla ticket handling with bespoke stuff. (#152)

Specified isCall for all respawn modes.
Added new timed-tickets mode.  IDK why it was missing.

* [Change] - Made customStartup_* scheduled. (#148)

* Made customStartup_* scheduled.  Added comments describing new behaviour.

* phrasing

* [Feature] - Added ZEN module for creating loadout lockers mid-mission. (#155)

* Added ZEN module for creating loadout lockers mid-mission.
Changed calculations for loadout locker add-on prop to allow for different objects.

* Forgot about ZEN Module ASL pos.

* Ok any object can be lockernatored mid mission now

* Fix Broken URLs In Contrib File

* [Refactor] Change to an event-driven radio system. (#162)

* Tearing out most things radio-related.  We're starting from scratch babyyyy

* Gearscript alterations:
- Added pre and post events for gearscripting.
- Added example event handlers:
- Added event handler to preserve player facewear.
- Added event handler to fix overloading by adjusting max loads.
- Added events readme.

* Made Zeus ACRE features soft-dependent on ACRE presence.

* WIP 'declarative' radio config.  Channel assignment not working yet.

* Improving radio configuration capability.

* Channel auto-assignment kinda working

* Channel assignment works.
Group-leader override support for channels - not yet available to player.

* Added new radio list, collapsible, reactive to changes in side, role etc.

* Optimised radio list refresh a little

* Added support for mixed-presets radio loadout.
Fixed bug with handling extended loadouts.

* tiny tweaks to radio list

* Added language support via ACRE Babel.

* Re-added radio ACE interacts in the ACRE section this time such wow

* Fixed radios being incorrect on respawn by introducing a "re-gearscript grace period".

* Added ZEN modules for playing around with people's radios.
Removed the cross-sides radio config hint in acre_radio_configuration.sqf

* Added player feedback for radio net changes.
Squad changing via squad picker updates radio nets.
Backpack radios now go into the backpack.
Altered radio list font, custom channels show the channel number.
Added default radios for Zeus.

* Changes based on Cre's review.

* Fixed CBA loadouts propagating through gearscript library without being unwrapped. (#168)

---------

Co-authored-by: Joecuronium <83242905+Joecuronium@users.noreply.github.com>
Co-authored-by: Bubbus <splambob@googlemail.com>
Co-authored-by: Cre8or <3143797+Cre8or@users.noreply.github.com>
Co-authored-by: Cre8or <cre8or@tuta.io>
dgibso29 added a commit that referenced this pull request Aug 3, 2023
* [Chore] Update Release GitHub Action (#96)

* Replace auto-tag with pulling latest tag

* Auto assign PR reviewers

* Update auto_assign.yaml

* Update auto_assign.yaml

* fixed ending dialog population breaking on double defined entries (#98)

* [Add] - Visible framework version (#99)

* Added Framework map panel with version entry.

* Moved map admin stuff into new Framework panel.

* [Feature] - Add Gearscript ACE gun-bag support. (#102)

* Part 1 - added "SET_GUNBAG_CONTENTS" macro and underlying variable setter.

* Full gunbag support including forcing gunbag state onto regular backpacks.
Examples placed into default gearscripts.
Fixed globals ordering bug (was after preinit config group).

* [Feature] - Disable ACE advanced car damage by default. (#105)

* Added option to cbaSettings.hpp to disable ACE adv. vic damage model.  Disabled by default.

* Reduced scope of feature to just ACE car damage.

* [Feature] - Improve ceasefire side relations (#101)

* Ceasefire UI, first draft

* UI handler function

- Added a clientside function to draw and update the ceasefire UI
- Added a default RscTitle to the mission description

* Implemented server/client handling

- Added serverside function to initiate (or terminate) a ceasefire
- Added clientside function to handle ceasefire limitations on the player (god mode, captivity, projectile removal)
- Added component initialisation with default mission start duration of 60 seconds (subject to change)

* Zeus integration, Zen module

- Added a Zen module to handle ceasefire from Zeus
- Ceasefire UI no longer shows in the debug camera (no longer
- Player captivity is no longer reset when exiting Zeus during a ceasefire
- Removed "Default" RscTitle (`cutFadeOut` does the job aswell)

* Component init

- Added ceasefire component init to the client group (necessary for global vars initialisation )

* ACE throwing, UI improvements

- Fixed ACE throwing not being detected as fire event; now inhibited during ceasefire
- Player captivity no longer gets reset when toggling player visibility as Zeus during ceasefire
- Added a fade-in animation to the ceasefire UI
- Added sounds to the ceasefire UI

* Initial justification

Added a configuration macro to override the justification text for the initial ceasefire (on mission start)

* Removed SafeStart/SafeEnd components

With the completion of the Ceasefire component, SafeStart and SafeEnd are now obsolete and have thus been removed

* Removed border on safestart box to align with rest of CAFE UI design, fixed config indent alignment.
Re-centered mission.sqm camera position.

* Removed UI outline

* Side relations

- Enforced ceasefire on AI via side relations

* *notices missing semicolon*

OwO who did this

* Update fn_ceasefire.sqf

- Initialised global variable to prevent an error on first execution
- Fixed varname casing for _ceasefireStateChanged

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update pull_request_template.md

* [Improve] Overhauled default medical settings (#108)

* overhauled medical settings

AI should feel less tanky with unconsciousness enabled
Headshots still instakill AI
Player damage threshold has been buffed a bit to counteract those changes on the player side

Disabled ACE vehicle crash damage (ACE car damage is back baby)

* fixed funny slider numbers

* [FIX] Zeus being unable to properly update crate gear via module (#111)

* Update fn_zen_createSupplyCrate_performAction.sqf

fixes edgecase of Zeus being unable to assign gear to crates in certain cases

* Update components/gearScript/zen/fn_zen_createSupplyCrate_performAction.sqf

bruh moment

Co-authored-by: Bubbus <splambob@googlemail.com>

Co-authored-by: Bubbus <splambob@googlemail.com>

* Fixed default BLUFOR and INDFOR loadouts so PCMLs in crates are loaded (#110)

closes #106

* [Improve Gearscript] Resupply crates now have space to drop stuff (#109)

* Resupply crates now have space to drop stuff

Gearscript automatically adds 25% more load capacity over the assigned Gear

* Cleanup

Added Comments
Added fix for edgecase Zeusmodule (goes together with #110)

* Update readme.md

* Fixed Fatal damage source (#112)

* Update gear_blufor.sqf (#115)

fixed double semicolon in the blufor default LAT loadout

* Changed default vehicle lock to "Locked for players" for framework spawned vics (#116)

* [Bugfix] Compatibility for new ACE gearstrings (#120)

* fixed compat for new ACE gearstring

gunbag compat also done

* Changed to use "count != 10", to be in-line with how CBA does this same check.
Added check to gunbag because why not, it saves us effort for our re-runs.

Co-authored-by: Bubbus <splambob@googlemail.com>

* [Update] Add new default addon settings. (#122)

- ims_bluntweapon (-> Unconscious)
- ace_marker_flags_placeanywhere (-> true)
- ace_overheating_cookoffcoef (-> 0)
- ace_vehicle_damage_enabled (-> true)

This commit affects a lot of the mission.sqm because an Arma update has introduced the new `singleType` key.

* [Chore] Release 1.4.2 Hotfix -> Dev (#126)

* [Hotfix] Added compatibility for new ACE gearstring format (#121)

* fixed ACE gearstring compat

* Made change character-identical to other hotfix branch to simplify merge upon next release.

Co-authored-by: Bubbus <splambob@googlemail.com>

* Added new default values to these settings: - ims_bluntweapon (-> Unconscious) - ace_marker_flags_placeanywhere (-> true) - ace_overheating_cookoffcoef (-> 0) - ace_vehicle_damage_enabled (-> true)

This commit affects a lot of the mission.sqm because an Arma update has introduced the new `singleType` key.

* Update create_draft_release.yml (#125)

Co-authored-by: Bubbus <splambob@googlemail.com>
Co-authored-by: Joecuronium <83242905+Joecuronium@users.noreply.github.com>

* [Improve] Fix PAK Stitch Exploit Pending ACE PR Merge (#128)

* Fixed PAK Stitch Exploit

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Update components/medical/fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* Fracture fix 2

* Update fn_isInStableCondition.sqf

Co-authored-by: Bubbus <splambob@googlemail.com>

* [Chore] Update Medical Setting CBA Presets (#127)

* Consolidate Advanced Medical CBA Settings

* Update medical_basic.sqf

* Update medical_advanced.sqf

* Update zen_modules.sqf (#134)

* [Refactor] - New respawn system. (#135)

* Using default respawn.  Removed respawnWaves component, made downtime only work on uncon players.

* Added basic gearscript handler to vanilla respawn system.

* Added basic squad handling to respawn refactor.

* Progress on respawn:
* Torn out now-irrelevant stuff about respawn dialogs etc.
* Made configurable (although some of the config doesn't work idk why)

* Now with 4 options: timed waves, personal timer, side tickets, personal tickets (ticket types stack so can have personal pool and then side-based 'overflow' pool).
Respawn timer is variable-based so can be altered mid-mission.

* imagine no tab indents

* Added legacy triggered-waves mode w/ UI and tickets compat.
Fixed personal-tickets allowance.
other lil bits

* fixn and addn...

[?] when player is in spectate before dying, mouse gets broken, oh no
[x] make respawn ace-action invisible if not in triggered-waves mode
[x] fix jip teleport ticket - broken in off position
[>] locations framework thingy - in progress

* remaining bugs from initial test session (probly) fixed

[x] when player tickets all gone, team tickets stay the same
[x] first start - no respawn menu pls

* Added respawn manager system.
Updated default mission file.

* Allowed players to spawn with triggered-waves when respawnOnStart = 1
Allow to define an initial respawn delay when respawnOnStart = 1
Refactored the startup sequence to ensure globals run before preInit config.

* Attempt to fix players not getting the right languages upon spawning.

* Hide default-named groups from the squad picker.
Hide the "ZEUS" group from squad picker unless you are a zeus.
Ensure a group is always picked when Confirm is pressed, unless there are no groups to pick from.

* Added "redeploy via flagpole" support.
Corrected examples in respawnLocations config.

* Doubled down on the respawn position module despite some flaws, until I can get the code-based alternative working again.
Misc fixes.

* Added weapon safety on respawn.
disabling debug mode again woops

* Moved spectator camera controls out from underneath respawn UI.

* Force-on auto-respawn when in triggered-waves mode.

* Added better respawn examples to mission.sqm
Removed respawn location module override as not really needed.

* Made BIS spectator respect ACE camera mode settings.

* Added "close" button to redeploy screen.

* Removed forced auto-respawn for triggered-waves.

* Added "create respawn", "change tickets" and "allow immediate respawn" ZEN modules.

* Feedback from testing: docs and jip/teleport toggle support.

* Re-added addon defaults which were introduced in 11895c9 but overwritten by merge of 238ef47.

* Removed stray chat/console debug statements.

* [Bugfix] Zeus teleport

- Fixed script error when attempting to teleport the player upon leaving the Zeus interface

* [Bugfix] - Dead spectator voicechat (#149)

* Forcing spectator voicechat on/off when dead-spectator screen is entered/exited.

* Added some comments

* [Bugfix] - Fix "Wound Randomly" locality issue. (#147)

* Forcing ACE damage to run on unit locality, for fn_woundUnitRandomly.

* remoteExec ➡ remoteExecCall

* [Bugfix] - Ceasefire UI font

Switched the current font to the non-bold variant, because CUP overrides it to be non-monospace, for some silly reason

* Made gravestone manager respect setting of GRAVESTONES_USE_PRIORITY_LIST config value. (#150)

* Fixed CLEAR_UNIFORM typo. (#153)

Fixed similar typos.
Added docs for COPY_* macros.

* [Bugfix] - Resolving squadmarker issues. (#154)

* Attempted fix for marker reset upon player JIP.

* Fixed JIP players not seeing squad menu or getting a teleport ticket.

* Disable the cancel-button of the squad selector, when player respawns.
 - (they can still press ESC but if they do that and complain about no marker, skill issue.)
Prevent TP to origin if selecting squad with 0 members.

* Replaced vanilla ticket handling with bespoke stuff. (#152)

Specified isCall for all respawn modes.
Added new timed-tickets mode.  IDK why it was missing.

* [Change] - Made customStartup_* scheduled. (#148)

* Made customStartup_* scheduled.  Added comments describing new behaviour.

* phrasing

* [Feature] - Added ZEN module for creating loadout lockers mid-mission. (#155)

* Added ZEN module for creating loadout lockers mid-mission.
Changed calculations for loadout locker add-on prop to allow for different objects.

* Forgot about ZEN Module ASL pos.

* Ok any object can be lockernatored mid mission now

* Fix Broken URLs In Contrib File

* [Refactor] Change to an event-driven radio system. (#162)

* Tearing out most things radio-related.  We're starting from scratch babyyyy

* Gearscript alterations:
- Added pre and post events for gearscripting.
- Added example event handlers:
- Added event handler to preserve player facewear.
- Added event handler to fix overloading by adjusting max loads.
- Added events readme.

* Made Zeus ACRE features soft-dependent on ACRE presence.

* WIP 'declarative' radio config.  Channel assignment not working yet.

* Improving radio configuration capability.

* Channel auto-assignment kinda working

* Channel assignment works.
Group-leader override support for channels - not yet available to player.

* Added new radio list, collapsible, reactive to changes in side, role etc.

* Optimised radio list refresh a little

* Added support for mixed-presets radio loadout.
Fixed bug with handling extended loadouts.

* tiny tweaks to radio list

* Added language support via ACRE Babel.

* Re-added radio ACE interacts in the ACRE section this time such wow

* Fixed radios being incorrect on respawn by introducing a "re-gearscript grace period".

* Added ZEN modules for playing around with people's radios.
Removed the cross-sides radio config hint in acre_radio_configuration.sqf

* Added player feedback for radio net changes.
Squad changing via squad picker updates radio nets.
Backpack radios now go into the backpack.
Altered radio list font, custom channels show the channel number.
Added default radios for Zeus.

* Changes based on Cre's review.

* Fixed CBA loadouts propagating through gearscript library without being unwrapped. (#168)

* Update version.hpp (#175)

* Fixed map rendering (#173)

Fixed CeaseFire UI not updating with the map open

* [Refactor] - Respawn Refactor Remake (#177)

* Removed BI respawn screen, just using a basic spectate screen for now.
Added MP timing tolerance for squad choice and radio setup functions.
Forced minimum respawn delay to 5 seconds to reduce timing/sync issues on respawn.

* Added spectator downtime widget, placeholder spawnpoint interaction, placeholder down-state indicator.

* Prototype spawn selector dialog + integration.

* Widget now affected by down state.
Fixed spawn dialog staying up through respawn.
Reinstated some old downtime behaviour.
Removed old downtime titles.
some other stuff probably, forgor

* Redeploy flag works again.
Stopped players spamming spawn dialog.
Stopped radio config subtitle appearing when it isn't meant for the local player.

* [Feature] - Add ACE actions to loadout lockers (#174)

* ACE actions, QoL improvements

- Added ACE actions to loadout lockers
- Ensure loadout lockers are automatically registered as Zeus editable objects
- Fixed loadout locker bags not getting deleted alongside their locker

* Restrict function recompiling

- Disable function recompiling outside of 3DEN preview (mission-defined functions are not final when recompiling is enabled)

---------

Co-authored-by: Joecuronium <83242905+Joecuronium@users.noreply.github.com>
Co-authored-by: Bubbus <splambob@googlemail.com>
Co-authored-by: Cre8or <3143797+Cre8or@users.noreply.github.com>
Co-authored-by: Cre8or <cre8or@tuta.io>
@dgibso29 dgibso29 mentioned this pull request Dec 2, 2023
5 tasks
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.

[Refactor] Event/loadout driven radio refactor
2 participants