i have a dialogue text effect handler thing that the client can access, for the typewriter effect kind of dialogue you see in pokemon games
im not sure whether to store the dialogue in somewhere the client can access and let them handle everything on the client, or to use remote events and send each dialogue to the client from the server
because normally id just go for the server sending the player dialogue but i also want to include skipping thorugh to the end of the dialogue, and id assume i can do that entirely on the client, but then to get to the next dialogue i’d have to tell the server to send the next dialogue
is my thought process sound
is this good
and is there another way of doing this/a proper way that developers actually do this
The way I would do it is let the server be the source of the dialogue/truth. This way, it can prevent the client from getting to the dialogue they shouldn’t have access to. Store the important/big blobs of dialogue on the server, while smaller pieces of dialogue on the client (stuff like opening the shop with a dialogue, etc, so you don’t keep polling the server for them). I think the way you’re doing it right now is good and works well!
Or you can have a moduleScript only in Client with all dialogue lines, separating then with the KEY in modulescript. Each KEY is a UID (unique ID). in this way the server know how to treat the dialogue based in the UID.
Example ModuleScript:
local module = {
[1] = "Phrase 1.";
[2] = "Phrase 2...";
}
return module
OR
local module = {
[1] = {
Phrase = "Phrase 1";
Anwsers = {
[1] = "Yes";
[2] = "Continue";
[3] = "No";
};
};
}
return module
![]()
how would be best to handle player choice answers? because i was assuming that you connect a remote event to a function on the server and you check which one its answering or something
Hello! Assuming you want the player choices to be handled like other story teller games like Detroit: Become Human, you’d use what is called a Directed Acyclic Graph (DAG) to handle changes in the story based on player input, if you would like an example, I’d be glad to help, just let me know!
im not confused about how the dialogue will progress, im confused about how to recieve the player input without making it messy, because id prefer not to connect a remote event every time i want to make an optional choice