Is there a quest action for playing a sound file during a quest?
- harbinger451
- Posts: 198
- Joined: Mon Apr 13, 2020 4:08 pm
- Contact:
Is there a quest action for playing a sound file during a quest?
I'm currently updating my Prostitutes and Lovers mod and working on a couple of other upcomming quest pack mods (Games and Gambling / Bards and Balladeers) and I would really love to add some sound to them for immersion. Nothing complicated... adding the coins sound that plays automatically when a PC is rewarded with gold to when the PC pays an NPC some gold - that transaction is silent at the moment and I think it would be handy to have an audible cue when the money tranfers from one to the other. Also, for my Games and Gambling quests, it would be really cool to play the dice role sound used during custom character creation at certain points of some the quests, plus other, possibly added sounds.
If this quest action is not available at the moment, can it be made so? Also, some clue as to what the respective sound files are called might be useful.
If this quest action is not available at the moment, can it be made so? Also, some clue as to what the respective sound files are called might be useful.
-
- Posts: 67
- Joined: Wed Jun 29, 2022 8:54 am
Re: Is there a quest action for playing a sound file during a quest?
Yes you can play some sounds in quests using:
I would love to know if you can add customs sounds of your own as that would be really cool.
This will play the sound every 2 minutes. Ending the quest will stop it and I think it can be stoped in quest. One of the sounds is coins, I thought there was a dice one but I could not see it.play sound coins_drop 2 0
I would love to know if you can add customs sounds of your own as that would be really cool.
- harbinger451
- Posts: 198
- Joined: Mon Apr 13, 2020 4:08 pm
- Contact:
Re: Is there a quest action for playing a sound file during a quest?
Cheers for that, Sappho20. The coin drop sound will be very useful ... I'll test it in my Prostitutes and Lovers update. If anyone figures out the dice sound file name that would be cool. Presumably, adding your own sound files packaged in the mod, these should be callable in the quest file the same way? I may experiment.
Quick question ... will putting just " play sound coins_drop " play it just the once immediately? Coz this is how I want it in the quests.
Quick question ... will putting just " play sound coins_drop " play it just the once immediately? Coz this is how I want it in the quests.
-
- Posts: 67
- Joined: Wed Jun 29, 2022 8:54 am
Re: Is there a quest action for playing a sound file during a quest?
To make it play immediately you would write:
The first number is the number of minutes before it plays and the interval between each play. The second number is supposed to be the number of repeats but is broken, thus the above will play continuously until the quest ends.
To get it to play immediately and only once the task must be stopped, this way works:
Code: Select all
play sound coins_drop 0 0
To get it to play immediately and only once the task must be stopped, this way works:
Code: Select all
Clock _timer0_ 00:00
-- Quest start-up:
_play_ task:
play sound coins_drop 0 0
start timer _timer0_
_timer0_ task:
clear _play_
- harbinger451
- Posts: 198
- Joined: Mon Apr 13, 2020 4:08 pm
- Contact:
Re: Is there a quest action for playing a sound file during a quest?
OK, yes that works. Thank you so much. Took a little fiddling with, to make it fit in with the existing quest actions so the whole thing runs smoothly. Unfortunately the sound file coins_drop seems to have a second or two of, admittedly very quite, interference or background noise before you get the familiar coin drop noise. A bit irksome, doesn't quite happen exactly when I want it to, but it'll do for now. Were there any other coin related sounds in there I could maybe try out?
-
- Posts: 67
- Joined: Wed Jun 29, 2022 8:54 am
Re: Is there a quest action for playing a sound file during a quest?
I don’t think there are any there coin sounds, unless someone knows how to add a custom sound.
I use visual studio code and TheLacus’ quest editor mod, then write ‘play sound’ and go through the alphabet seeing what sounds appear to choose from. If I put in a name that is not on the list then nothing happens.
Have you tried making the sound play on a separate task just before the action task, it’s a bit convoluted and messy but it might add a slight gap which allows the sound to appear more in time:
I use visual studio code and TheLacus’ quest editor mod, then write ‘play sound’ and go through the alphabet seeing what sounds appear to choose from. If I put in a name that is not on the list then nothing happens.
Have you tried making the sound play on a separate task just before the action task, it’s a bit convoluted and messy but it might add a slight gap which allows the sound to appear more in time:
Code: Select all
Clock _timer0_ 00:00
-- Quest start-up:
_play_ task:
play sound coins_drop 0 0
start timer _timer0_
_timer0_ task:
clear _play_
start task _action_
- Jay_H
- Posts: 4073
- Joined: Tue Aug 25, 2015 1:54 am
- Contact:
Re: Is there a quest action for playing a sound file during a quest?
A full list of quest sounds can be found in daggerfall-unity/Assets/StreamingAssets/Tables/Quests-Sounds.txt. This link may also work: https://github.com/Interkarma/daggerfal ... Sounds.txt
- harbinger451
- Posts: 198
- Joined: Mon Apr 13, 2020 4:08 pm
- Contact:
Re: Is there a quest action for playing a sound file during a quest?
Yeah, I managed to jig things round a bit so the sound comes at a more or less appropriate time in the quest. Thanks for all your help.Have you tried making the sound play on a separate task just before the action task, it’s a bit convoluted and messy but it might add a slight gap which allows the sound to appear more in time:
- harbinger451
- Posts: 198
- Joined: Mon Apr 13, 2020 4:08 pm
- Contact:
Re: Is there a quest action for playing a sound file during a quest?
Oooh, that's great. Should come in very useful, thanks.A full list of quest sounds can be found in daggerfall-unity/Assets/StreamingAssets/Tables/Quests-Sounds.txt.
Probably a dumb question, but is it possible to add new sounds by dropping them in the sounds folder and then adding them to this list?
-
- Posts: 126
- Joined: Wed Nov 02, 2022 8:43 am
- Location: Australia
Re: Is there a quest action for playing a sound file during a quest?
Now that you mention it, I'm curious about this too.harbinger451 wrote: ↑Tue Dec 06, 2022 4:38 pm Probably a dumb question, but is it possible to add new sounds by dropping them in the sounds folder and then adding them to this list?