Skip to content

Fire - Add ability to customize screams when on fire#10890

Merged
PabstMirror merged 13 commits intoacemod:masterfrom
DartRuffian:fire/customize-screams
Jan 20, 2026
Merged

Fire - Add ability to customize screams when on fire#10890
PabstMirror merged 13 commits intoacemod:masterfrom
DartRuffian:fire/customize-screams

Conversation

@DartRuffian
Copy link
Contributor

When merged this pull request will:

  • Add ability to customize on fire screams for different units

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

_unit setVariable ["ace_fire_enableScreams", false, _isGlobal];
```

## 3. Custom Screaming Sounds
Copy link
Contributor Author

@DartRuffian DartRuffian Apr 30, 2025

Choose a reason for hiding this comment

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

Docs could probably use some better wording

Copy link
Contributor

@johnb432 johnb432 left a comment

Choose a reason for hiding this comment

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

I don't like that this is a purely scripted function: mods need to absolutely call functions to make use of this functionality, when a config property would be much better suited for mods.
Imo a config property should either outright replace the scripted adding or, at the very least, complement the existing. I don't really see the point of the scripted adding - is it for mission makers?

@DartRuffian
Copy link
Contributor Author

DartRuffian commented Apr 30, 2025

I went for a function over config because I couldn't think of a good way to do the lookups without having a hashmap where most of the entries just have the same value. Not that it matters a ton, it just felt nicer imo

And mission makers being able to customize stuff is always nice

@johnb432
Copy link
Contributor

johnb432 commented May 1, 2025

without having a hashmap where most of the entries just have the same value

I'll try to come up with something to add onto this PR.

DartRuffian and others added 3 commits May 1, 2025 12:21
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
@johnb432
Copy link
Contributor

johnb432 commented May 1, 2025

I'll try to come up with something to add onto this PR.

I'm tempted to say: scrap the functions altogether, inform users about the hashmap but don't mark it as API and add a config property to CAManBase, an array containing the screams.

I don't think such a niche feature needs proper API, apart from the config properties, which only exists to make it easy for mods to implement.
The absence of proper API would allow mission makers (or others) to edit the hashmap as they see fit. As of now, the function you provide doesn't update the scream array for units that inherit from the class you provide. E.g. you want to update screams for all units, so editing CAManBase, but the existing hashmap keys won't have their respective values updated.

I'd like to hear other opinions though before changes are made to the PR.

@DartRuffian
Copy link
Contributor Author

Works for me

My reasoning for not inheriting screams was just different voices

@johnb432
Copy link
Contributor

johnb432 commented May 3, 2025

My reasoning for not inheriting screams was just different voices

At that point we'd be better off using voices instead of unit types to determine the screams, no?
The issue with that could be the no voice from ace - not sure if units having that voice should scream or not.

@rautamiekka
Copy link
Contributor

rautamiekka commented May 3, 2025

The issue with that could be the no voice from ace - not sure if units having that voice should scream or not.

They should, otherwise NoVoice would add yet another problem (I personally use NoVoice on Player units who'll use ACRE2 for voice chat, and units like isolated guards, but very often to decrease confusion added by other units like civilians speaking, too) that'll require balancing between not being confused by AI speaking and someone getting burned without knowing, which is unacceptable.

@DartRuffian
Copy link
Contributor Author

Reasons rautamiekka pointed out were why I just did it class based

@DartRuffian
Copy link
Contributor Author

I'd like to hear other opinions though before changes are made to the PR.

I'd like to get this finished up, was there anything else needing deciding? Also just to make sure I understood correctly, you're saying to remove fnc_addScreamSounds and fnc_getScreams completely and just have the hashmap of ["class": [screams]] correct?

Then fnc_burnReaction would just be something like:

private _scream = selectRandom (GVAR(screams) getOrDefault [typeOf _unit, GVAR(screams) get "CAManBase"]);

And instead of manually specifying ACE's sounds in XEH_preInit it'd just be:

GVAR(screams) = createHashMapFromArray [["CAManBase", getArray (configFile >> "CfgVehicles" >> "CAManBase" >> QGVAR(screams))]];

If I'm understanding correctly

@johnb432
Copy link
Contributor

If I'm understanding correctly

It would be something similar to that, yes. However, this would not easily permit inheritance. Still considering another solution.

@johnb432
Copy link
Contributor

There are several options for better incorporating inheritance:

  1. private _sound = selectRandom (getArray (configOf _unit >> QGVAR(screams)));
    We add the GVAR(screams) entry to CAManBase and assume that all units that scream inherit from CAManBase (I think that's guaranteed by ace_fire, so it should be fine). Specific classes would be changed by mod makers.

  2. private _sound = selectRandom (GVAR(screams) getOrDefault [typeOf _unit, getArray (configOf _unit >> QGVAR(screams))]);
    We'd also add GVAR(screams) entry to CAManBase. The benefit of the hashmap is that mission makers can edit the sounds, but I don't really see the point of it, as I doubt mission makers are going to want to change this specifically without making a mod patch directly.

  3. Use CfgVoice instead, so it could be based off of voices instead. Add a default to the Base class, so that all voices should have it. Downside is that numerous no-voice-voices from 3rd party mods don't inherit from Base (ACE' could be easily accounted for, but others less so).

Copy link
Member

@LinkIsGrim LinkIsGrim left a comment

Choose a reason for hiding this comment

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

Why not a config lookup?

EDIT: Reviewed before reading discussion.

@johnb432 johnb432 added the kind/feature Release Notes: **ADDED:** label Jan 8, 2026
@johnb432 johnb432 added this to the 3.20.3 milestone Jan 8, 2026
@PabstMirror PabstMirror merged commit ea3f6ee into acemod:master Jan 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Release Notes: **ADDED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants