Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

19 hours ago, Petike the Taffer said:

I wonder whether you can resize and reshape a speaker from a spherical shape into a rectangular shape that could fit in a room.

I couldn't find a clear tutorial on resizing the speaker and altering its shape from the default sphere/orb shape. Odd.

Maybe it's just a dumb pipe dream by me, but I'd find a rectangular sort of configuration for a speaker much better to work with.

 

Why do you want a square visualization for sounds? If is because you are afraid, that because of the fact the sound shape goes through walls, in a squared like room, that sound may go as well, then don't be, afaik unless there's zero portals in a scene, sound will be blocked by "walls" automatically. It uses the portals to know where it can "flow" into other rooms.

So only the size not the shape of the visualization, is what matters, like OrbWeaver said, the shape is only a visualization for the inner and outer radius of a sound.  In other words the area or "field of influence" of a sound and that "field" afaik, expands equally in a 3D volume, in a sphere like manner (to be more precise two spheres, a smaller inner one and a larger outer one), so a sphere shape, IMO is the best approximation for it.

I also assume, a cube would be misleading because on the current system, if the player parked at the corners of the cube, he/she wouldn't hear the sound, thou I never tested it.

Link to comment
Share on other sites

On 4/2/2024 at 6:46 PM, joebarnin said:

You don't connect the path_ nodes to an AI - you connect the AI to the path_ nodes. So Ctrl+k points the AI to its starting node. That node should point to one or more other nodes, and so on. So basically: 1) define a path or paths by connecting several path_ nodes. 2) tell the AI to start along this path by targeting one of the nodes.

That's the basics. It can get more complicated with scripting and/or triggers, etc.

I plan to gradually try out all or most of the different path node types and adjust them depending on the interaction.

Though I don't plan to use it in this particular mission, I have a keen interest in the follow type, as I'll want an NPC to follow the player character in another, future FM I'd like to create. Never too soon to try out various functions while I'm already learning new FM-building skins after a long hiatus. 
 

21 hours ago, Frost_Salamander said:

If you can do this, I don't know how.  But it's something I want as well and was actually going to raise it as a feature request.  I think speakers are spherical so they model real sound which radiates from a source outwards.

I find this doesn't work so well with some scenarios though:

  • water.  For example you want to hear the sound of waves lapping a shoreline or a running water sound for a stream, river or canal.  If the shoreline or stream is on the longer side, you have to have a speaker with a huge radius to cover it and the sounds extends too far along perpendicular to the body of water.  Or alternatively multiple speakers but then you have to manage overlap and it becomes a pain.
  • wind.  Same idea but vertical - if you have a long edge or balcony then you need a large radius speaker to cover it and it might extend too low so you hear wind noises on the ground.

@Petike the Taffer If all you want is for a sound to fill a room, just use the location system ambients instead.  But you can only have one sound I think, so you couldn't have say your ambient music and also a weather sound at the same time without using a speaker for one of them.

Thank you for the suggestion. 😎

I completely forgot about the location system ambients as an option !  😛

A few years back, when I was testing various stuff in DR, I did actually use that approach instead, once or twice. I haven't used DR much in recent years, so I eventually forgot about setting it up that way.

Acknowledged, and I'll look into it. It'll save a lot of time concerning the audio side of the mission.

My first few missions won't have much a natural environment, they'll largelly be small and focused on buildings or urban spaces, so I won't need to bother with detailed audio for rivers yet. I have an outdoor FM planned for later (it's in the pre-production phase), and I'll have a good reason to study it in greater detail.
 

5 hours ago, OrbWeaver said:

All speakers are defined as spheres, with a customisable inner and outer radius. There is no way to change them into any other shape.

Implementing support for rectangular speakers would need changes to the core game code.

It's actually okay, I don't reallt need rectangular speakers. Given that I've been reminded I can set a main ambience for each room - something I did know before, but forgot, after not working properly with DR these past few years - I'll do just that, and use the speakers for more secondary ambience concerns.
 

5 hours ago, grodenglaive said:

handy shortcut!🙂

Handy indeed.
 

1 hour ago, HMart said:

Why do you want a square visualization for sounds? If is because you are afraid, that because of the fact the sound shape goes through walls, in a squared like room, that sound may go as well, then don't be, afaik unless there's zero portals in a scene, sound will be blocked by "walls" automatically. It uses the portals to know where it can "flow" into other rooms.

So only the size not the shape of the visualization, is what matters, like OrbWeaver said, the shape is only a visualization for the inner and outer radius of a sound.  In other words the area or "field of influence" of a sound and that "field" afaik, expands equally in a 3D volume, in a sphere like manner (to be more precise two spheres, a smaller inner one and a larger outer one), so a sphere shape, IMO is the best approximation for it.

I also assume, a cube would be misleading because on the current system, if the player parked at the corners of the cube, he/she wouldn't hear the sound, thou I never tested it.

A rectangular shape would be easier to remember. 😉

I'll just use the filters in the editor to put away the speakers if I ever the get the impression they're blocking my view.

Also, I don't actually mind the shape all that much. As you and the others say, the size/radius of the speaker is the actual key aspect.

I'm a bit disappointed it's seemingly not possible to resize speakers the same way you can resize brushes or certain models, though you can still tweak the radius numerically, manually. As long as I can work with that, the actual shape of a speaker isn't really important.

My main concern is expanding the minimum and maximum radius areas to an extent where they'll be audible for most for all of the respective areas the player will visit, rather than fading away quickly once the player leaves the hub of the speaker behind. As was already said above, I'll use the different utility to set the main ambient for the individual rooms, rather than a manually placed speaker, and I'll reserve the speakers for additional sound effects or more local ambience. I've already added some extra parameters to the speakers I'm testing out in my FM, so I'll take a look at those soon, though I'll deal with the main room ambience settings first.

 

I'd like to thank everyone for their replies. While I'm not surprised by the answers, I'm now more confident in working with the path node and speaker entities.

 

On an unrelated sidenote to all of this, the same in-development FM where I'm testing the speaker placement and range was tested yesterday for whether an NPC AI can walk from the ground floor all the way to the topmost floor, without issues. Thankfully, there have been no issues at all, and the test subject - a female mage, whom I won't use in the completed FM, sadly - did a successful first ascent of the tower-like building that'll serve as the main setting. (That's all your getting from me for now, concerning the FM contents.)

Edited by Petike the Taffer
  • Like 1
Link to comment
Share on other sites

10 minutes ago, Petike the Taffer said:

I'll want an NPC to follow the player character in another, future FM I'd like to create.

btw, the path node "path_follow_actor" is supposed to do just that, but it doesn't work (at least in TDM 2.11).  

  • Like 1
Link to comment
Share on other sites

9 minutes ago, grodenglaive said:

btw, the path node "path_follow_actor" is supposed to do just that, but it doesn't work (at least in TDM 2.11).  

I have this working in my current WIP. I have a path_follow_actor node targeting the "lead" AI, and then I have the "follower" AI targeting the path_follow_actor node. This has worked flawlessly for me in both 2.11 and 2.12. On a side note, this setup would make a good prefab for 2.13

Link to comment
Share on other sites

23 minutes ago, Amadeus said:

I have this working in my current WIP. I have a path_follow_actor node targeting the "lead" AI, and then I have the "follower" AI targeting the path_follow_actor node. This has worked flawlessly for me in both 2.11 and 2.12. On a side note, this setup would make a good prefab for 2.13

I think what @grodenglaive meant was it doesn't work if the 'lead AI' is the player.  At least that's my experience as well.  Have you managed to make that work?

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

Just now, Frost_Salamander said:

I think what @grodenglaive meant was it doesn't work if the 'lead AI' is the player.  At least that's my experience as well.  Have you managed to make that work?

Oh shoot, I misread, sorry. No I haven't gotten that to work

  • Like 1
Link to comment
Share on other sites

Just now, Amadeus said:

Oh shoot, I misread, sorry. No I haven't gotten that to work

Darn - I was hoping you had somehow figured it out :-(.  It's a bit weird that it doesn't work.  The entity description even says:

Quote

A path entity instructing the AI targetting this path to follow the actor (=player or other AI) targetted by this path.

Think I'll raise a bug report - there doesn't seem to be anything in there about it now.

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

this sounds like something that'll need a custom def. I know you can bind lights to the player and a few other things; I feel like this should work too, but experimentation will be needed. If I have time today or tomorrow I might look into it

  • Like 1
Link to comment
Share on other sites

44 minutes ago, grodenglaive said:

btw, the path node "path_follow_actor" is supposed to do just that, but it doesn't work (at least in TDM 2.11).  

That's the exact one I meant. I've tried it in my FM (a wait node converted into a follow node), but it doesn't seem to work once the character reaches the spot where it's supposed to trigger. The character just stands and waits in place, as usual or as with the wait node. Well, I don't really need a follow node in the FM I'm currently making, so I'll still have plenty of time to wait until a fully functional follow node becomes available. :) (There's also some potential path node workarounds if it doesn't get resolved, anyway.)

  

3 minutes ago, Amadeus said:

this sounds like something that'll need a custom def. I know you can bind lights to the player and a few other things; I feel like this should work too, but experimentation will be needed. If I have time today or tomorrow I might look into it

Thanks, Amadeus. :)

Interesting. The FM I might make in the future that might need the follow type node is still really far away, so it's unimportant now.

Edited by Petike the Taffer
  • Like 1
Link to comment
Share on other sites

7 minutes ago, Amadeus said:

this sounds like something that'll need a custom def. I know you can bind lights to the player and a few other things; I feel like this should work too, but experimentation will be needed. If I have time today or tomorrow I might look into it

Cool.  Either way I've raised an issue for it: https://bugs.thedarkmod.com/view.php?id=6516

  • Like 1

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

Maybe a dumb question and ugly hack. But could you create an invisible, nonsolid, and inert AI, continually update its position to be on top of the player, and then have the "follower" AI follow this dummy?

  • Like 1
  • Thanks 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Link to comment
Share on other sites

17 minutes ago, thebigh said:

Maybe a dumb question and ugly hack. But could you create an invisible, nonsolid, and inert AI, continually update its position to be on top of the player, and then have the "follower" AI follow this dummy?

I've seen fun workarounds like that in other game modding as well. :)

Years ago, maybe even a decade, some fella who was making a mod for Mount & Blade over at the Taleworlds forums revealed that he put invisible human NPCs on the backs of regular horse NPCs, then put the horse NPCs inside a horse corral he built for one of his mod's locations/scenes and then did some minor scripting, so the horses with invisible riders would wander around the corral. The end result was that it looked they're doing this of their own will, rather than an NPC rider being scripted to ride around the corral slowly. Necessity is the mother of invention. :D I don't know about the newest Mount & Blade game, but the first generation ones (2008-2022) apparently had some sort of hardcoded issue back in the earlier years, where if you left a horse NPC without a rider in its saddle, the horses would just stand around and wait and you couldn't get them to move around. 😛 Placing an invisible rider in their saddles suddenly made it viable again, at least for background scenes, of riderless horses wandering around, for added atmosphere. First generation M&B presumed you'd mostly be seeing horses in movement with riders, and the only horses-wandering-loosely animations and scripting were done for situations when the rider was knocked off their horse or dismounted in the middle of a battle. Hence the really odd workarounds. :) So, an invisible NPC trick might not be out of the question in TDM, even though you could probably still bump into it, despite its invisibility.

Edited by Petike the Taffer
Link to comment
Share on other sites

1 hour ago, Petike the Taffer said:

Thank you for the suggestion. 😎

I completely forgot about the location system ambients as an option !  😛

A few years back, when I was testing various stuff in DR, I did actually use that approach instead, once or twice. I haven't used DR much in recent years, so I eventually forgot about setting it up that way.

Acknowledged, and I'll look into it. It'll save a lot of time concerning the audio side of the mission.
 

Also don't forget if you use the location system it makes it easy to add EAX as well (especially using the presets): https://wiki.thedarkmod.com/index.php?title=Setting_Reverb_Data_of_Rooms_(EAX)#Locations

  • Thanks 1

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

On 4/3/2024 at 12:49 AM, Frost_Salamander said:

If all you want is for a sound to fill a room, just use the location system ambients instead.  But you can only have one sound I think, so you couldn't have say your ambient music and also a weather sound at the same time without using a speaker for one of them.

Are you sure?

I never tried it, but the info here doesn't state you can't have multiple sounds for a location:

https://wiki.thedarkmod.com/index.php?title=Location_Settings#Sound_Shaders

So it seems you could just do this in your atdm:location_settings entity:

"snd_streets" "city_night01_loop_z"
"snd_streets" "misterious_humming_noise"
"snd_streets" "people_talking_sounds"

They would then all activate when you enter location "snd_streets"

Link to comment
Share on other sites

On 4/3/2024 at 5:21 PM, thebigh said:

Maybe a dumb question and ugly hack. But could you create an invisible, nonsolid, and inert AI, continually update its position to be on top of the player, and then have the "follower" AI follow this dummy?

@Petike the Taffer

Well that was challenging, but I managed to get it to work with a dummy AI (but with a warning message).

Using hide doesn't work on the dummy, as each time it moves it un-hides. You need to use an invisible model. I used the atdm:ai_base, which surprisingly worked with these spawn args so it doesn't interfere with the player position and is inert as possible. 

image.png.b52848f79b70351586f0a17c6cb86dd1.png

 Then you just need to trigger a follow script, e.g.:

void follow_dummy()
{
	$dummy.setOrigin($player1.getOrigin());
	$dummy.hide();    //not sure why this is needed, but it stopped working when I deleted it 
	sys.wait(0.2);   //needed to prevent game from hanging
	thread follow_dummy();
}

Alternatively, I tried to just bind the dummy to the player instead, but then the follower ai wouldn't follow me. 

 

Edited by grodenglaive
error
  • Like 2
Link to comment
Share on other sites

4 minutes ago, Amadeus said:

it was a long shot, but I figured it'd be worth trying. are there any seemingly relevant console errors that pop up?

yup:

missing 'idle' animation on 'dummy' (atdm:ai_base), channel 2

also channel 1

Link to comment
Share on other sites

WOAH! Great work!! It's kinda funny that you have to take a potion, but that could actually be an interesting thing you buy at an in-game shop. maybe to herd zombie AIs? Anyway, this is cool and I hope you share a test map please :D

Link to comment
Share on other sites

7 hours ago, datiswous said:

Are you sure?

Of course not 🙂

7 hours ago, datiswous said:

So it seems you could just do this in your atdm:location_settings entity:

"snd_streets" "city_night01_loop_z"
"snd_streets" "misterious_humming_noise"
"snd_streets" "people_talking_sounds"

They would then all activate when you enter location "snd_streets"

AFAIK you can't have multiple values for a key, it would just overwrite the last value if you tried adding a new one.

  • Like 1

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Link to comment
Share on other sites

On 4/3/2024 at 9:10 PM, Petike the Taffer said:

I'm a bit disappointed it's seemingly not possible to resize speakers the same way you can resize brushes

It is possible. You can drag outside a selected speaker and resize it exactly like a brush.

Note that you have to drag outside the entire bounding box of the speaker (as if it were a rectangle), rather than just outside the circular boundary, which isn't particular intuitive. If you enable View -> Show -> Show Size Info you will see sizing axes which give a better idea of where the bounding box is.

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

    • Xolvix

      Took a break from TDM until I got my backlog under control. It's been months and it's still not "under control". Damnit.
      · 0 replies
    • Ansome

      I sleep well at night knowing the player will never see the absolute nightmare that is my sealing brushwork outside the playable area. Only the pointfile can judge me now.
      · 4 replies
    • JackFarmer

      Somehow I admire the fact that the material from Dune has now been filmed for the third time. Personally, I could never do much with the material, but as a child of the 80s, I of course know the David Lynch movie...and that movie was at least funny!
      · 2 replies
    • Baal

      Episode 3 of the second best Doom 3 mod, Phobos,  was just released.
      · 6 replies
    • snatcher

      TDM Modpack v4.2 released!
      · 1 reply
×
×
  • Create New...