Fire - Add ability to customize screams when on fire#10890
Fire - Add ability to customize screams when on fire#10890PabstMirror merged 13 commits intoacemod:masterfrom
Conversation
| _unit setVariable ["ace_fire_enableScreams", false, _isGlobal]; | ||
| ``` | ||
|
|
||
| ## 3. Custom Screaming Sounds |
There was a problem hiding this comment.
Docs could probably use some better wording
johnb432
left a comment
There was a problem hiding this comment.
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?
|
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 |
I'll try to come up with something to add onto this PR. |
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
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 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. I'd like to hear other opinions though before changes are made to the PR. |
|
Works for me 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? |
They should, otherwise |
|
Reasons rautamiekka pointed out were why I just did it class based |
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 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 |
It would be something similar to that, yes. However, this would not easily permit inheritance. Still considering another solution. |
|
There are several options for better incorporating inheritance:
|
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
When merged this pull request will:
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}.