Dialogue Kit V2 // An easy way to create interactive Dialogues & Events

An easy way to create interactive Dialogues and Events in your Experience.


This is the successor to Dialogue Kit V1 which was made last year in 2023.
This version was built from scratch to incorporate a bunch of new and requested features.

Dialogue Kit V2 allows the user to interact with Text-based prompts or Dialogues in this case. It can be used to talk to an NPC, Buy an item from a shop, Give the player a decision & more! You can do so much more than just make a string of text to show when holding the shown input on a proximity prompt.

In this DevForum post, I’ll explain how things work, how to set it up, how to customize it, and the future updates!


You can get the Free Model for Dialogue Kit V2 here or on the link below.


Dialogue Kit V2 works by requiring a ModuleScript and running a function named “CreateDialogue”.
This allows the Dialogues to be created anywhere in any script as long as the script has access to the ModuleScript.

There is a folder where you can put all your dialogues to keep everything organized if you’d like.

There is no sort of functions other than CreateDialogue. You use the pre made function inside of the TestDialogue LocalScript or the script provided at the very end of the “Documentation” script, meaning you just copy and paste that function provided into your script and once an event fires (for example, a ProximityPrompt or MouseButton1Click) the dialogue will run.

Below is a video which shows you how to install the Dialogue Kit. Every setting has a comment so you just need to read those to learn how each parameter functions.


Here I’ll describe a few key features that will convince you to use Dialogue Kit V2.

Run Code

Unlike in V1, in V2 you can run functions.
They can be ran when selecting a reply, or when on a piece of content. This can be used if you want an NPC to show different reactions to what the player replies with, or if you want to assign a quest to the player if they choose to accept it!

Example

local function customFunction1()
    print("Function Executed!")
end

Exec = { -- This is where you can run code in your dialogue if you want any custom functions. (Quests, Animations, etc.)
        --[[
                    
        func1 = { 
            Function = customFunction1, -- Set this to a function you have created. Do not leave the brackets at the end.
            ExecuteContent = nil, -- Set to a number or the name of a Reply. If set to 1, it will execute at the first piece of content on the dialogue.
        },
                    
        ]]--
}

Support for Voice Acting & Sounds

V1 had this system but it was lacking. So I took it into consideration and upgraded it! In V2, you can play sounds individually per piece of content allowing you to add voicelines to your dialogues! In V2 you can also set background music, and the sound that the typewriter makes (if it’s enabled!)

Example
-- This would be in your Layer.
DialogueContent = {"Content1", "Content2"},
DialogueSounds = {1234, 5678}, -- Sounds can be played here, they play along side each piece of content. Content goes up by 1 when the player clicks continue.

Allows Players to Reply back to the Dialogue

Dialogue Kit V2’s main feature is the Reply system. You can use Replies to continue the dialogue and give it more depth, you can also use it to give the player a choice, maybe to accept or decline an offer.

Example
-- This is just pasted in from the TestDialogue.
Replies = { -- This is a table of stuff the player can reply with to the Dialogue. They always appear at the last piece of content on the layer. ("Content2" in this case.)
	{
		ReplyName = "reply1", -- This is the name of the reply button. It can be used to reference in Exec so you can run code when this button is clicked.
		ReplyText = "Reply1", -- This is the text that will be displayed on your Reply Button.
		ReplyLayer = "Layer2" -- This is what Layer the player will be sent to if the player selects this reply.
	},

	{
		ReplyName = "goodbye1", -- This is the name of the reply button.
		ReplyText = "Goodbye!", -- This is the text that will be displayed on your Reply Button.
		ReplyLayer = nil -- Since the Layer is nil, the dialogue will just end as nil is not a layer and is nothing.
	}
},

This is just a tiny fraction of what Dialogue Kit V2 can do. Take a look at the settings script if you wanna see more of the features!

Settings Section of CreateDialogue
-- This is just pasted in from the TestDialogue.
Settings  = {
	Typewriter = true, -- Enable/Disable the typewriter. The typewriter writes every individual letter instead of displaying the text in full instantly.
	TypewriterSpeed = 0.01, -- How fast text is displayed on the typewriter.
	SpecialTypewriterSpeed = 0.5, -- How fast text is displayed for special characters. (. , ! ? ")
	TypewriterSound = nil, -- Sound to play each time a letter is wrote. Format as "rbxassetid://000" and not just a number.
	TypewriterSoundRNGPitch = false, -- Set a random pitch between 0.8 and 1.2 each time a letter is wrote.
				
	Autoscroll = 0, -- 0 disables autoscroll. If the player doesn't click continue after the specified time, the dialogue moves to the next piece of content
				
	DialogueWalkSpeed = 0, -- The WalkSpeed when inside the dialogue. Set to nil to keep the defailt WalkSpeed.
				
	CinematicBars = false, -- Adds some cinematic bars when in the dialogue. Recommended if you're using the Cinematic skin.
				
	BackgroundSound = nil, -- Sound to play for the duration of the dialogue. Format as "rbxassetid://000" and not just a number.
	BackgroundSoundVol = 0.1, -- Volume of the BackgroundSound.
				
	DisableBackpack = true, -- Disables the players backpack when in the dialogue.
	DisableChat = false, -- Disables the chat when in the dialogue.
	DisableLeaderboard = false, -- Disables the leaderboard when in the dialogue.
				
	ContinueButtonVisibleDuringReply = false, -- Should the continue button be visible when replies are visible?
	ContinueButtonVisibleDuringTypewriter = false, -- Should the continue button be visible when the typewriter is writing?
	ContinueTextTransparency = 0.5, -- The transparency of the Continue text when the continue button is unable to be clicked.
				
	DialogueCam = nil, -- Set to a part instance and it will change the players camera to that part for the duration of the dialogue
},

Dialogue Skins allow you to customize Dialogue Kit V2 to the fullest. Dialogue Kit V2 comes with some pre-made skins for you to use, and a custom one to make your own.

The skin also doesn’t have to replace the default one, you can have a custom Dialogue Skin for any purpose, meaning you can use Interactive & Material together.

I’ll be adding more skins to the Skins folder when I can, I’ll update the list of Skins when I do

How to Install & Apply a Skin
-- To install a skin, you need to go to the Skins folder included with the model.
-- Then choose the one you like the most, Drag any Skin that has "Skin" at the end of the name inside the Dialogues ScreenGui.
-- Some skins may come included with a custom Reply Button, insert that under the DialoguesModule.

-- To use the skin inside the dialogue, locate these 2 lines:

DialogueFrame = "DialogueFrame",
ReplyFrame = "Reply",

-- Change whats inside the quotation marks to the name of the skin that you want to use (The name of the Frame you inserted.)
-- For DialogueFrame, imagine we chose to insert the Material Skin. So we'll change everything to this:

DialogueFrame = "MaterialSkin",
ReplyFrame = "MaterialReply",

List of Skins

Default

Material

Interactive

Cinematic

Goofy

Goofy
(New)

RPG

RPG
(New)

Custom

Custom is purposely blank. You can use this to make your own Dialogue Skin.

If you’d like to see Dialogue Kit V2 in action, you can playtest it here!


To setup Dialogue Kit V2, please read the Documentation script for a full explaination on how to use Dialogue Kit V2! If you haven’t already, you can get the model here.

image


Finishing things off, I hope you find some use in Dialogue Kit V2 and I hope you like my system!
If you have any suggestions or want to report a bug, feel free to reply to the post and I’ll reply with an update if I can!


Updates

Bug Fixes (09/30/24)

Fixes

  • Fixes aren’t guaranteed, these were bugs that I found on my own,
  • ContinueButtonVisibleDuringReply shouldn’t break the Continue Button on the next layer,
  • Walkspeed should properly save the players last default value.
Patch 1

Added

  • StopDialogueOnDeath // Automatically stops the dialogue if the player dies,
  • InteractWithDialogueWhenDead // Disable/Enable Dialogue creation when dead,
  • TypewriterSoundPitch // Change the pitch of the Typewriter,
  • “Goofy” Dialogue Skin,
  • “RPG” Dialogue Skin inspired by Undertale.

Fixes

  • Continue button can now be clicked with the virtual cursor or the UI Selecter on gamepads,
  • Players WalkSpeed gets set back to their default WalkSpeed if they die during the dialogue.

Known Issues

  • If ContinueButtonVisibleDuringTypewriter is enabled, the Continue button is unable to be interacted with when moving to a new layer.
68 Likes

another peak asadrith asset, will def be using this for any future project

1 Like

its so cool bro :smiley:
you made hard work

Nicee! Good up the good work. :fire: :fire:

Wow, that so cool! I might try it use it for a project. :+1:

im personally more interested in the baseplate than the module itself, it looks clean!

Lmk if you can provide a file for it, Module looks awesome btw!

Here ya go
place.rbxl (56.2 KB)

2 Likes

This is great!
Is there anyway to add Controller Compatibility?
→ I come across this issue where I can’t press the Continue Button whilst on controller.
(reply buttons work perfectly fine tho!)

You might have to use the virtual cursor for now since I don’t actually know how to make the buttons selectable for controllers, I’ll have to read the docs a bit more.

I tried pressing the Continue Button using the controller’s virtual cursor but it still doesn’t work…
I pressed “A” and even “R2” but I couldn’t seem to get passed Continue. It works with the Reply Buttons.

Could probably be an issue with the Continue button’s ZIndex, try making that a higher value.

Still doesn’t seem to work :disappointed:
I’m using the MaterialSkin but I’ve also used DialogueFrame and I still couldn’t get passed the Continue button.

Sent you a private message so we don’t flood here.

Used Dialogue kit v1 for quite a while glad to see a v2 and will be updating my game to use it!

really like the module, i’ve got a few suggestions, can you make a option that if you click the dialog also continues/skips ?, there are a lot of cases i would need this , and also, a option for a specific Pitch for the typewriter sound

You can set the ContinueButtonVisibleDuringTypewriter to true to get the functionality you want for the typewriter since it’s built in but off by default.

I’ll consider adding the pitch option but for know you’ll have to change pitch on your own audio software for each type of dialogue.

1 Like

Thank you very much for creating this!

1 Like

Hi! Thanks for the amazing resource, I played around a little bit with it and it’s amazing!

Do you have a GitHub repository for this module?
And do you accept any contribution? I would love to help out the development of such an amazing resource!

Keep up the good work! :+1:t2:

I don’t actually have a GitHub repo (and I’ve never used it) but I’ll see what I can do!

For contribution, you can do whatever you want, thats why I added the customization options if you wanna make some of your own skins, go crazy.

Goofy

Updated to Patch 1 with 2 new skins and some QOL improvements, fixed the continue button not working on gamepad as well.