Jump to content
The Dark Mod Forums

EFX preset spawnarg for Location entities?


Recommended Posts

Currently if you are implementing EFX in your map, you need to maintain an .efx file: https://wiki.thedarkmod.com/index.php?title=Setting_Reverb_Data_of_Rooms_(EAX)

If you are using presets only, all this is is simply a 1:1 mapping of location entities to an EFX preset.  Doing this in a file is kind of tedious and error-prone, as you have to check each location entity in your map, and then check the file to make sure you got the location entity name correct, or didn't leave one out, etc.

Would it be a worthwhile feature request to be able to just set the EFX preset with a spawnarg on the location entity itself?  Something like:

"efx_preset"    "WOODEN_SMALLROOM"

Also, the location entity has other zone-related information, like ambient sound, ambient light, etc.  It would just make sense to have the EFX here as well.

This would only make sense for the presets, since you just need the preset name.  If you wanted to do anything more complicated, the file could still be used.  If both are used for the preset, one could take precedence over the other (the spawnarg pehaps).

I don't think anything would need to change in DR either, as it's just a new spawnarg on the entity.

 

 

  • Like 2
Link to comment
Share on other sites

On a related note, I would like to be able to change a room's EAX settings on the fly. Currently it's possible to change a room's ambient light and sound by using a script to swap out one atdm:location for another, though you do need to leave through an atdm:locationseparator and come back. However, the EAX settings do not update.

  • Like 2

{ 0 | 🞵 } = funk_tastic

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                              

Link to comment
Share on other sites

8 hours ago, thebigh said:

Currently it's possible to change a room's ambient light and sound by using a script to swap out one atdm:location for another

I needed this functionality as well, but I found that simply updating the ambient spawnargs on the location entity (via a script) worked fine, although like you said you had to leave and come back into the room.

Anyways, getting slightly off topic :-).

 @stgatilov does the original ask make sense? I'm never sure if we should wait and hope for the dev team to see these, or just add a feature request to the bugtracker....

  • Like 1
Link to comment
Share on other sites

46 minutes ago, stgatilov said:

Yes, I think it is possible to specify efx preset in location entity.

Probably worth it to implement cross-fading of EFX settings simultaneously.
 

Thank you - feature request here: https://bugs.thedarkmod.com/view.php?id=6273

  • Like 1
Link to comment
Share on other sites

That'd be a great idea.

To dynamically change EFX, we have to know that it's a dynamic feature and not one permanently set during dmap or spawn time.

  • Like 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

On 3/19/2023 at 12:55 AM, Frost_Salamander said:

I found that simply updating the ambient spawnargs on the location entity (via a script) worked fine, although like you said you had to leave and come back into the room.

True. However, if the EFX settings are read from a file I think you'd need to pull the switcheroo script trick because those are determined by the name of the atdm:location entity. I suspect that changing its name spawnarg during play would be asking for all sorts of trouble.

{ 0 | 🞵 } = funk_tastic

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                              

Link to comment
Share on other sites

15 hours ago, thebigh said:

True. However, if the EFX settings are read from a file I think you'd need to pull the switcheroo script trick because those are determined by the name of the atdm:location entity. I suspect that changing its name spawnarg during play would be asking for all sorts of trouble.

Well you don't need to change the name of the entity, only the ambient/ambient_light spawnargs on it.  That's what I did anyways.

I did actually try the 'switcheroo' trick first, but kept getting errors about multiple entities with the same name even though I was removing the old one first.  No idea why.  Then I tried the spawnarg thing and that worked so I left it at that.

Link to comment
Share on other sites

If you're not using a preset, a custom EFX setting read from the file looks something like this:

eaxreverb "loc_streets_alcove_1" {
    density                    0.576
    diffusion                  0.633
    gain                       0.3162
    gainhf                     0.7655
    gainlf                     0.769
    decay_time                 1.79
    decay_hfratio              0.6267
    decay_lfratio              0.4433
    reflections_gain           0.4281
    reflections_delay          0.0167
    reflections_pan            0 0 0
    late_reverb_gain           0.9058
    late_reverb_delay          0.0133
    late_reverb_pan            0 0 0
    echo_time                  0.218
    echo_depth                 0.1
    modulation_time            0.25
    modulation_depth           0
    air_absorption_gainhf      0.9905
    hfreference                10364
    lfreference                192.2
    room_rolloff_factor        0
    decayhf_limit              1
}

where loc_streets_alcove_1 is the name of the atdm:location entity for that location. If you wanted to change such an EFX during play you would need another entry in the file, then refer to it by either changing the name of the location entity (BAD!) or exchanging one for another.

{ 0 | 🞵 } = funk_tastic

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                              

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • MayheM

      Hello, Since this track is originally from TDM,i think it's better to ask here than TTLG. Do you guys have the full version of this ambient track?
      https://sndup.net/z4ty/
      https://sndup.net/qwhy/
      · 2 replies
    • DeTeEff

      Bachelor Mapping Challenge!
      The girlfriend will be away to her mum's place for almost a week, which means more mapping time for me! I'm planning a speed build. Hope it will go my way
      I'm starting by downloading 2.11. Don't know if I'm going to use any fancy new stuff. Just want to crack those itching map muscles that has gone dry and dead since almost a year's worth of no-mapping
      · 4 replies
    • kano

      The cool part of Canonical's Snap, is that my machine can now ray-trace an entire (simple) scene faster than it takes the web browser to start!
      · 5 replies
    • datiswous

      Fm idea (braindump)
      "Experience the life of a mission builder"
      Esentially there are finnished elements placed somewhere in storage in the game and you have to place them in the correct places, build some walls here and there, add guard routes, give them their correct speech lines, etc. Decorate the places.. all in-game. lots of fun.. 😉
      If you do it right in the end you can play the mission.
      (would be even cooler if a thief-ai could play the mission, making it some kind of tower-defence game)
       
      This first started as an idea for an aquarium builder mission where-in you have to fill an empty aquarium with sand, waterplants, castles water and swimming fish. But above idea is more fun.
       
      · 4 replies
    • JackFarmer

      Dear ChatGPT, What are The Builders in the Dark Mod?
       
      The Builders is a popular game mode in the video game community called "Dark Mod," which is a fan-made tribute to the classic "Thief" series of stealth games. In this game mode, players assume the role of builders who construct structures in a dark and ominous environment while trying to avoid detection by patrolling guards.
      The Builders game mode is unique in that it offers players the opportunity to create and design their own levels using the in-game tools and resources provided. Players can experiment with different building materials, construct intricate traps and puzzles, and create their own unique gameplay experiences.
      While The Builders game mode is not an official part of the Dark Mod, it has become one of the most popular and well-loved aspects of the game, thanks to its emphasis on creativity, strategy, and stealth.
       
      You guys did not know that, did you?
      · 2 replies
×
×
  • Create New...