Hi Tony, I was wondering if you could help me out with an issue I'm having with the AC integration.
I keep all my dialogue in Dialogue System, but I run all the lines through an AC speech menu using ACSpeech(entrytag)@0.6. I wanted to write narration text in DS as well, but it doesn't seem to allow a text line to have no assigned actor. I initially thought I could simply create a DS actor called Narrator, to go along with a dummy AC NPC also called Narrator, but here's the problem: my AC settings are such that Speech text is set to scroll, but Narration text is not (text is considered narration when the AC speaker is not set). I want to keep the non-scrolling behaviour for AC narration, but if I make use of an NPC dummy, the text will scroll.
Is there a way for DS to pass dialogue to AC as narration?
Dialogue System + AC Narration
Re: Dialogue System + AC Narration
Hi,
Are you using a dialogue UI to show the text? If so, can you use a different subtitle panel that doesn't scroll for the narrator?
Are you using a dialogue UI to show the text? If so, can you use a different subtitle panel that doesn't scroll for the narrator?
Re: Dialogue System + AC Narration
The AC menu I use to display narration is different from the one I use for speech lines, and yes, I could assign the dummy Narrator NPC to it. The problem is that sadly the option for scrolling text in AC is a global setting, not a per-menu setting, so all we have are two checkboxes: "Scroll text for speech [x]" and "Scroll text for narration [ ]".
Re: Dialogue System + AC Narration
If you're comfortable with a bit of scripting, you could add a script to the Dialogue Manager GameObject that has an OnConversationStart(Transform) method. In this method, change the value of KickStarter.speechManager.scrollSubtitles to true or false depending on whether it's a regular conversation or narrator conversation. You can check DialogueManager.lastConversationStarted to know which conversation just started.
Alternatively, you could duplicate SequencerCommandACSpeech.cs as SequencerCommandACNarration.cs and modify it to use AC's narration system instead of the speech system. This would provide an ACNarrative() sequencer command. But it's more complicated than my first suggestion above.
Alternatively, you could duplicate SequencerCommandACSpeech.cs as SequencerCommandACNarration.cs and modify it to use AC's narration system instead of the speech system. This would provide an ACNarrative() sequencer command. But it's more complicated than my first suggestion above.
Re: Dialogue System + AC Narration
Thank you!
I preferred not to go with the first option for one reason: KickStarter.speechManager.scrollSubtitles changes the Speech Manager asset itself, not its runtime value. I could still do that if I made sure to change the asset's value back every time the game is launched, but it feels a bit messy.
I went with something similar to your second suggestion, but instead of creating an entire new sequencer command, I made the following change to SequencerCommandACSpeech.cs:
Now when the DS speaker's name is "Narrator" it passes the value of the speaking character as null to AC. I don't care if this is officially implemented either way (I've got it working now), but I think this might be a nice feature to have for other AC users out there!
I preferred not to go with the first option for one reason: KickStarter.speechManager.scrollSubtitles changes the Speech Manager asset itself, not its runtime value. I could still do that if I made sure to change the asset's value back every time the game is launched, but it feels a bit messy.
I went with something similar to your second suggestion, but instead of creating an entire new sequencer command, I made the following change to SequencerCommandACSpeech.cs:
Code: Select all
// Call AC's speech functionality. Credit: Based on AC's ActionSpeech.cs (c) Icebox Studios.
KickStarter.dialog.KillDialog(false, true);
if (subtitle.speakerInfo.Name == "Narrator")
{
KickStarter.dialog.StartDialog(null, text, isBackground, lineNumber, noAnimation);
}
else
{
KickStarter.dialog.StartDialog(speakerChar, text, isBackground, lineNumber, noAnimation);
}
Re: Dialogue System + AC Narration
Good idea! I'll add something similar to the integration.