Delay and append on a node level

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
MarkHenryC
Posts: 3
Joined: Wed Dec 18, 2019 2:56 am

Delay and append on a node level

Post by MarkHenryC »

Hi.

Just wondering what's the simplest way to implement this: for each selected conversation node I'd like to be able to override things like (1) the delay before response and (2) text appending.

For example: NPC says something, there's a pause, and there's a following NPC text response that I want to append to the previous (without changing any global setting). Ditto with things like delays.

I can't see anywhere obvious where this can be done on a node basis.

Thanks.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Delay and append on a node level

Post by Tony Li »

Hi,

The conversation stays on each node for the duration of its Sequence. (If a node's Sequence field is blank, it uses the Default Sequence set in the Dialogue Manager's Camera & Cutscene Settings.)

Let's say you want to show node A for 2 seconds plus an additional 3 second delay (total 5 seconds) before progressing to node B. You could simply set node A's Sequence to:

Code: Select all

Delay(5)
Sequences can get more sophisticated, though. (See How To Write Sequences.) If you're using a typewriter effect, you can wait for the typewriter effect to finish and then delay 3 seconds. When the typewriter finishes, it sends a sequencer message "Typed". If you set the Sequence to:

Code: Select all

Delay(3)@Message(Typed)
then the node will wait for the typewriter to finish and then delay an additional 3 seconds.

Sequences can do quite a bit more. The Cutscene Sequence Tutorials cover them in more detail.


If you want to append text in general, usually you'll use a single subtitle panel. See the "WRPG Template Standard Dialogue UI" and "Runic Dialogue UI" for examples. Tick the subtitle panel's Accumulate Text checkbox.

If you want to append text only for one node, you can duplicate the text from one node to the next like this:
  • Node 1 Dialogue Text: "I thought you wanted to always append text."
  • Node 2 Dialogue Text: "I thought you wanted to always append text. But you only want to do it here."
If you're using a typewriter effect, you'll need to use special typewriter codes to tell node 2 to skip ahead to the appended text instead of retyping the entire line again:
  • Node 1 Dialogue Text: "I thought you wanted to always append text."
  • Node 2 Dialogue Text: "\>I thought you wanted to always append text.\< But you only want to do it here."
For info about the typewriter codes, jump down to Rich Text Codes & Control Codes in the Dialogue UIs section of the manual.
MarkHenryC
Posts: 3
Joined: Wed Dec 18, 2019 2:56 am

Re: Delay and append on a node level

Post by MarkHenryC »

Thanks for the quick response. That takes care of delays.

For appending, I wanted it to be real-time - instead of pre-packaging the extended text - as the composite text is dynamic.

So, for example, the NPC says something, there's a delay, they continue their dialog (append to the previous). IOW the text is built up in chunks, based on the node being executed, which itself is determined by a bunch of conditionals.

My reasoning for this approach: while I could presumably do it in code, but I'm trying to keep things visible - that was the attraction of the DSU conversation editor. The dialog in this project will become quite intricate and hard to visualise if I do too much in the background.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Delay and append on a node level

Post by Tony Li »

I think I better understand what you're looking for now. It sounds like ticking Accumulate Text will do it. You don't have to do all that stuff I described above.

If you want to clear the accumulated text at some point, use the ClearSubtitleText() sequencer command.
MarkHenryC
Posts: 3
Joined: Wed Dec 18, 2019 2:56 am

Re: Delay and append on a node level

Post by MarkHenryC »

Ah, thanks for pointing me to the checkbox and the clear command.

Because I'm not doing cutscenes at the moment I didn't look in that help section - which contains the Sequencer commands.

Very helpful!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Delay and append on a node level

Post by Tony Li »

Glad to help! :-)
Post Reply