/EDIT:
I made the wrong assumption that the EFX properties are queried on an FPlayingSound basis, and not once in UAudioSubsystem::Update() based on player zone.
Indeed, it's a very cool idea to add it this way. However despite the fact that EFXZone also has a bunch of floating point variables, it has the disadvantage if someone opens the map in UnrealEd without having an audio device supporting this, the properties would get lost when saving.
But another approach came to my mind which would allow a more fine grained control about EFX effects:
Don't load the variables in a direct way out of the ZoneInfo, but add an unrealscript event to load the effects and also pass the actor for which these are loaded.
So a Zoneinfo supporting EFX would look like this.
//=============================================================================
// EFXEventBasedZone.
//=============================================================================
class EFXEventBasedZone extends ZoneInfo;
var(EFX) enum EAmbients
{
REVERB_PRESET_GENERIC,
REVERB_PRESET_PADDEDCELL,
REVERB_PRESET_ROOM,
REVERB_PRESET_BATHROOM,
REVERB_PRESET_LIVINGROOM,
REVERB_PRESET_STONEROOM,
REVERB_PRESET_AUDITORIUM,
REVERB_PRESET_CONCERTHALL,
REVERB_PRESET_CAVE,
REVERB_PRESET_ARENA,
REVERB_PRESET_HANGAR,
REVERB_PRESET_CARPETTEDHALLWAY,
REVERB_PRESET_HALLWAY,
REVERB_PRESET_STONECORRIDOR,
REVERB_PRESET_ALLEY,
REVERB_PRESET_FOREST,
REVERB_PRESET_CITY,
REVERB_PRESET_MOUNTAINS,
REVERB_PRESET_QUARRY,
REVERB_PRESET_PLAIN,
REVERB_PRESET_PARKINGLOT,
REVERB_PRESET_SEWERPIPE,
REVERB_PRESET_UNDERWATER,
REVERB_PRESET_DRUGGED,
REVERB_PRESET_DIZZY,
REVERB_PRESET_PSYCHOTIC,
REVERB_PRESET_CASTLE_SMALLROOM,
REVERB_PRESET_CASTLE_SHORTPASSAGE,
REVERB_PRESET_CASTLE_MEDIUMROOM,
REVERB_PRESET_CASTLE_LONGPASSAGE,
REVERB_PRESET_CASTLE_LARGEROOM,
REVERB_PRESET_CASTLE_HALL,
REVERB_PRESET_CASTLE_CUPBOARD,
REVERB_PRESET_CASTLE_COURTYARD,
REVERB_PRESET_CASTLE_ALCOVE,
REVERB_PRESET_FACTORY_ALCOVE,
REVERB_PRESET_FACTORY_SHORTPASSAGE,
REVERB_PRESET_FACTORY_MEDIUMROOM,
REVERB_PRESET_FACTORY_LONGPASSAGE,
REVERB_PRESET_FACTORY_LARGEROOM,
REVERB_PRESET_FACTORY_HALL,
REVERB_PRESET_FACTORY_CUPBOARD,
REVERB_PRESET_FACTORY_COURTYARD,
REVERB_PRESET_FACTORY_SMALLROOM,
REVERB_PRESET_ICEPALACE_ALCOVE,
REVERB_PRESET_ICEPALACE_SHORTPASSAGE,
REVERB_PRESET_ICEPALACE_MEDIUMROOM,
REVERB_PRESET_ICEPALACE_LONGPASSAGE,
REVERB_PRESET_ICEPALACE_LARGEROOM,
REVERB_PRESET_ICEPALACE_HALL,
REVERB_PRESET_ICEPALACE_CUPBOARD,
REVERB_PRESET_ICEPALACE_COURTYARD,
REVERB_PRESET_ICEPALACE_SMALLROOM,
REVERB_PRESET_SPACESTATION_ALCOVE,
REVERB_PRESET_SPACESTATION_MEDIUMROOM,
REVERB_PRESET_SPACESTATION_SHORTPASSAGE,
REVERB_PRESET_SPACESTATION_LONGPASSAGE,
REVERB_PRESET_SPACESTATION_LARGEROOM,
REVERB_PRESET_SPACESTATION_HALL,
REVERB_PRESET_SPACESTATION_CUPBOARD,
REVERB_PRESET_SPACESTATION_SMALLROOM,
REVERB_PRESET_WOODEN_ALCOVE,
REVERB_PRESET_WOODEN_SHORTPASSAGE,
REVERB_PRESET_WOODEN_MEDIUMROOM,
REVERB_PRESET_WOODEN_LONGPASSAGE,
REVERB_PRESET_WOODEN_LARGEROOM,
REVERB_PRESET_WOODEN_HALL,
REVERB_PRESET_WOODEN_CUPBOARD,
REVERB_PRESET_WOODEN_SMALLROOM,
REVERB_PRESET_WOODEN_COURTYARD,
REVERB_PRESET_SPORT_EMPTYSTADIUM,
REVERB_PRESET_SPORT_SQUASHCOURT,
REVERB_PRESET_SPORT_SMALLSWIMMINGPOOL,
REVERB_PRESET_SPORT_LARGESWIMMINGPOOL,
REVERB_PRESET_SPORT_GYMNASIUM,
REVERB_PRESET_SPORT_FULLSTADIUM,
REVERB_PRESET_SPORT_STADIUMTANNOY,
REVERB_PRESET_PREFAB_WORKSHOP,
REVERB_PRESET_PREFAB_SCHOOLROOM,
REVERB_PRESET_PREFAB_PRACTISEROOM,
REVERB_PRESET_PREFAB_OUTHOUSE,
REVERB_PRESET_PREFAB_CARAVAN,
REVERB_PRESET_DOME_TOMB,
REVERB_PRESET_PIPE_SMALL,
REVERB_PRESET_DOME_SAINTPAULS,
REVERB_PRESET_PIPE_LONGTHIN,
REVERB_PRESET_PIPE_LARGE,
REVERB_PRESET_PIPE_RESONANT,
REVERB_PRESET_OUTDOORS_BACKYARD,
REVERB_PRESET_OUTDOORS_ROLLINGPLAINS,
REVERB_PRESET_OUTDOORS_DEEPCANYON,
REVERB_PRESET_OUTDOORS_CREEK,
REVERB_PRESET_OUTDOORS_VALLEY,
REVERB_PRESET_MOOD_HEAVEN,
REVERB_PRESET_MOOD_HELL,
REVERB_PRESET_MOOD_MEMORY,
REVERB_PRESET_DRIVING_COMMENTATOR,
REVERB_PRESET_DRIVING_PITGARAGE,
REVERB_PRESET_DRIVING_INCAR_RACER,
REVERB_PRESET_DRIVING_INCAR_SPORTS,
REVERB_PRESET_DRIVING_INCAR_LUXURY,
REVERB_PRESET_DRIVING_FULLGRANDSTAND,
REVERB_PRESET_DRIVING_EMPTYGRANDSTAND,
REVERB_PRESET_DRIVING_TUNNEL,
REVERB_PRESET_CITY_STREETS,
REVERB_PRESET_CITY_SUBWAY,
REVERB_PRESET_CITY_MUSEUM,
REVERB_PRESET_CITY_LIBRARY,
REVERB_PRESET_CITY_UNDERPASS,
REVERB_PRESET_CITY_ABANDONED,
REVERB_PRESET_DUSTYROOM,
REVERB_PRESET_CHAPEL,
REVERB_PRESET_SMALLWATERROOM,
REVERB_PRESET_UNDERSLIME,
REVERB_PRESET_NONE,
} EFXAmbients;
struct EFXData
{
var int EFXVersion;
var EAmbients Ambients;
var bool bUserDefined;
var float EFXflAirAbsorptionGainHF;
var float EFXflDecayHFRatio;
var float EFXflDecayLFRatio;
var float EFXflDecayTime;
var float EFXflDensity;
var float EFXflDiffusion;
var float EFXflEchoDepth;
var float EFXflEchoTime;
var float EFXflGain;
var float EFXflGainHF;
var float EFXflGainLF;
var float EFXflHFReference;
var float EFXflLFReference;
var float EFXflLateReverbDelay;
var float EFXflLateReverbGain;
var float EFXflRoomRolloffFactor;
var bool EFXiDecayHFLimit;
var int _Reserved[32];
}
event GetEFXData( out EFXData Data, Actor Actor )
{
Data.EFXVersion = 1;
Data.Ambients = Ambients;
Data.bUserDefined = bUserDefined;
Data.EFXflAirAbsorptionGainHF = EFXflAirAbsorptionGainHF;
Data.EFXflDecayHFRatio = EFXflDecayHFRatio;
Data.EFXflDecayLFRatio = EFXflDecayLFRatio;
Data.EFXflDecayTime = EFXflDecayTime;
Data.EFXflDensity = EFXflDensity;
Data.EFXflDiffusion = EFXflDiffusion;
Data.EFXflEchoDepth = EFXflEchoDepth;
Data.EFXflEchoTime = EFXflEchoTime;
Data.EFXflGain = EFXflGain;
Data.EFXflGainHF = EFXflGainHF;
Data.EFXflGainLF = EFXflGainLF;
Data.EFXflHFReference = EFXflHFReference;
Data.EFXflLFReference = EFXflLFReference;
Data.EFXflLateReverbDelay = EFXflLateReverbDelay;
Data.EFXflLateReverbGain = EFXflLateReverbGain;
Data.EFXflRoomRolloffFactor = EFXflRoomRolloffFactor;
Data.EFXiDecayHFLimit = EFXiDecayHFLimit;
}
defaultproperties
{
bUserDefined=False
EFXflAirAbsorptionGainHF=0.994
EFXflDecayHFRatio=0.83
EFXflDecayLFRatio=1.0
EFXflDecayTime=1.49
EFXflDensity=1.0
EFXflDiffusion=1.0
EFXflEchoDepth=0.0
EFXflEchoTime=0.25
EFXflGain=0.32
EFXflGainHF=0.89
EFXflGainLF=0.0
EFXflHFReference=5000.0
EFXflLFReference=150.0
EFXflLateReverbDelay=0.011
EFXflLateReverbGain=1.26
EFXflRoomRolloffFactor=0.0;
EFXiDecayHFLimit=True;
EFXAmbients=REVERB_PRESET_NONE
}
This would allow mod authors a really fine grained controll about EFX effects, like per actor/actorclass effects, or having non Zoneinfo actors which can have EFX settings like you suggested earlier.