Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

[Sky] Sound/Dialogue help needed


LegacyCloud
 Share

Recommended Posts

Hello TESA!

I am having some issues integrating sound for my mod. What I am trying to achieve is have a FX sound play when the player makes a certain selection during a dialogue. The preference is for the FX to play first and delay any response line from the NPC who the player is conversing with, however it would also be acceptable for the FX to play after the NPC has delivered their line.

I have been trying to achieve this by adding soundname.playandwait(game.getplayer()) to the begin fragment of the relevant topic info (with soundname setup as a descriptor). The code all checks out and compiles ok within the CK and the sound file previews fine, however I can not seem to get... anything to happen in game (NB: have also tried using the same code on the end fragment with equal results).

Getting this feature to work really is a cornerstone of what I am planning to be a very substantial mod, however my limited scripting experience was with older versions of the engine and Papyrus still somewhat eludes me! So if anyone here is able to shed some light on this, or even interested in working collaboratively on the mod development, I would be very grateful :)

Link to comment
Share on other sites

13 hours ago, LegacyCloud said:

Hello TESA!

I am having some issues integrating sound for my mod. What I am trying to achieve is have a FX sound play when the player makes a certain selection during a dialogue. The preference is for the FX to play first and delay any response line from the NPC who the player is conversing with, however it would also be acceptable for the FX to play after the NPC has delivered their line.

I have been trying to achieve this by adding soundname.playandwait(game.getplayer()) to the begin fragment of the relevant topic info (with soundname setup as a descriptor). The code all checks out and compiles ok within the CK and the sound file previews fine, however I can not seem to get... anything to happen in game (NB: have also tried using the same code on the end fragment with equal results).

Getting this feature to work really is a cornerstone of what I am planning to be a very substantial mod, however my limited scripting experience was with older versions of the engine and Papyrus still somewhat eludes me! So if anyone here is able to shed some light on this, or even interested in working collaboratively on the mod development, I would be very grateful :)

My personal experience with playandwait was that it didn't work at all.

The first thing I would want to confirm is that the sound you made does in fact play in the game. Have you done that? Also, did you put in code to tell the game what the "source" of the sound was (player, NPC, The Spanish Inquisition, etc)

Edited by TigerCubofPNW
Link to comment
Share on other sites

I did suspect that with the playandwait function and tried with the play function to no avail. The sound does play fine when triggered elsewhere too.

As for the code telling the game the source of the sound, my understanding is that is what the "(game.getplayer())"  part achieved, is this not so?

 

EDIT: Ok so I found the issue with the sound not playing; the script property was pointing at the descriptor, by creating a marker and pointing the property to that the sound now plays on cue (using playandwait!) However...

As I first suspected, the playandwait function does not delay the NPC dialogue from being delivered :( Can anyone think of a means to force this so that my sound plays when the response is selected, then the NPC delivers their line?

Edited by LegacyCloud
Link to comment
Share on other sites

11 hours ago, LegacyCloud said:

I did suspect that with the playandwait function and tried with the play function to no avail. The sound does play fine when triggered elsewhere too.

As for the code telling the game the source of the sound, my understanding is that is what the "(game.getplayer())"  part achieved, is this not so?

 

EDIT: Ok so I found the issue with the sound not playing; the script property was pointing at the descriptor, by creating a marker and pointing the property to that the sound now plays on cue (using playandwait!) However...

As I first suspected, the playandwait function does not delay the NPC dialogue from being delivered :( Can anyone think of a means to force this so that my sound plays when the response is selected, then the NPC delivers their line?

 

I'm not really sure what you're trying to do, so I'm taking a stab in the dark here but here's my idea:

Instead of using a script to trigger the dialogue, make the FX a dialogue response.

So, like, the player is all "Unhand that maiden, you fiend!"

and the NPC response is like (...) and the audio file you made is used in place of a dialogue FUZ file.

then the second line of response text can be whatever you had in mind for the NPC dialogue.

Then it should come up as (...) / <SFX> / (dialogue)

Link to comment
Share on other sites

What you describe does sound ideal but I've not yet found a way to make this the case, hence the scripted alternative.

The test dialogue I am trying to get working is as follows:

Player (Click): What have you got for sale?

Player (voice): Show me your wares

NPC (voice): take a look

Barter menu opens.

 

Right now this scripted version works but the player voice and npc voice overlap

Link to comment
Share on other sites

16 minutes ago, LegacyCloud said:

What you describe does sound ideal but I've not yet found a way to make this the case, hence the scripted alternative.

The test dialogue I am trying to get working is as follows:

Player (Click): What have you got for sale?

Player (voice): Show me your wares

NPC (voice): take a look

Barter menu opens.

 

Right now this scripted version works but the player voice and npc voice overlap

So, you are trying to add a voice for the player, is that what you're up to?

If so, that would explain why this is so complex, since Skyrim wasn't built that way. I don't think there would be a way to use CK's dialogue builder for that as it assumes all the voice files are for the NPC

I'm guessing this test dialogue is just a proof of concept and you're looking to then use this in the rest of the game. That sounds like you'd need to do some heavy scripting.

For this application, the best I can offer is just to add a script to the merchant actor that says something like...

Event OnActivate(ObjectReference akActionRef)
If akActionRef == Playerref
Dialoguefile.Playandwait(player)
Endif
EndEvent

That would change the order of your test dialogue so that the sound would play first and then you would click the "What have you got for sale?" option second. Which is probably not what you want. But I figured maybe this would give you a new pathway to think about.

Or maybe I've totally misunderstood your purpose. :D

 

 

 

 

Link to comment
Share on other sites

No you're exactly right with the proof of concept, and your script idea may be prudent in places, but would this not play the Player dialogue before the option is selected?

The only other concept I've yet to try is adding a stage in the dialogue tree where it currently points to the NPC delivering it's "take a look" line, which would deliver the Player line with an auto-progress on to the NPC's line.

If none of that works then I guess I can stick with the current topic info fragment code which now works and edit the NPC response to include a 'x' secs. silence to accomodate the Player dialogue. The problem here is that evey Player dialogue option would be a different length so somewhat... troublesome to implement!

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.
Note: Your post will require moderator approval before it will be visible.

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.

 Share

×
×
  • Create New...