Understanding Networking

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
rayll
Posts: 2
Joined: Sun Feb 23, 2025 4:47 am

Understanding Networking

Post by rayll »

Hi Tony,

I'm using dialogue system with netcode. I'm starting to implement the dialogue system to sync over the network: In the game, there may be instances where the two players talk to each other AND also have isolated conversations with the NPCs.

From my understanding you recommend using dialogue system events methods but passing subtitle to the other client through rpcs (using OnConversationLine) is not allowed?

I'm a little lost and trying to understand what is the ideal way to go about this.

Thanks for any help on this.
User avatar
Tony Li
Posts: 23256
Joined: Thu Jul 18, 2013 1:27 pm

Re: Understanding Networking

Post by Tony Li »

Hi,

The Dialogue System should always run locally on each client.

For isolated (local client-only) conversations, you don't need to do any networking.

For shared conversations, there are at least two kinds of conversations you could run:

1. If it's a player-to-player conversation, this is probably best done outside of the Dialogue System, perhaps using freeform chat.

2. If it's a conversation between an NPC and multiple players, you can use the Dialogue System for that. One player's client will initiate the conversation. The other players' clients will not start an actual Dialogue System conversation. Instead, you should set up a bit of code and UI that mirrors the conversation from the initiating client to the other participating clients. For example, on the initiating client, you can use OnConversationLine() and OnConversationResponseMenu() to know what content to show on the other clients. The other clients can either show the content in a custom UI of your making, or you can manually open and show the content in the participating client's dialogue UI. In this case, the Dialogue System won't be controlling the dialogue UI. Your code will control it by calling the dialogue UI's Open() method, ShowSubtitle() method, etc.
rayll
Posts: 2
Joined: Sun Feb 23, 2025 4:47 am

Re: Understanding Networking

Post by rayll »

Thanks much, I will get to implementing this soon.
User avatar
Tony Li
Posts: 23256
Joined: Thu Jul 18, 2013 1:27 pm

Re: Understanding Networking

Post by Tony Li »

Sounds good. If any questions come up, don't hesitate to ask.
Post Reply