[Released] RPGTalk - Easy text-to-dialog script




[Asset Store] [Documentation] [Git]
[Video] [Timeline Video]



This package allows the creation of dialogs very RPG-Like, with smoothly text show-ups and a lot of useful configuration.
It easily transforms .TXT files in dialogs in your scene. You can use sprites in the middle of the text, make questions and giving choices to the player, change language, have dubbing and so much more!

Oh, did I mention it is free!?

Features:

  • Read text from a TXT file;
  • Uses Unity’s Canvas;
  • Allows Dubbing;
  • Allows Localization;
  • Allows Choices;
  • Lots of Customizations.

Cool Stuff:

  • Integrated with Unity’s Timeline;
  • Can pause Timeline while waiting for player action;
  • Creates areas to trigger a talk or cutscene;
  • Areas to trigger can be conditioned to player action. “Press the ‘A’ button to talk”;
  • Accepts Rich Text;
  • Can change text speed while the dialog is happening;
  • Natively accepts callbacks, but also has lots of Events;
  • Demos that uses all of the features.

Check it out! It is really cool!
Why is it free, you ask? Because we want give back to the community. Support us by liking our Facebook page and following us on Twitter!

###NEW Stuff 1.3###

  • Talks can pass themselves
  • TextUI now accepts Text Mesh Pro classes
  • Language is easier to set
  • Characters now can be set differently, and have its own expressions or animators.
  • Follow character now is a snippet
  • The “Can pass” signal is now a snippet
  • We have a smart pointer, a snippet for Line Renderers pointers.
  • Save Instance snippet, making it easier to change dialog based on saved conversations
  • NewTalk tag, making it easier to change the dialog midway
  • Jitter tag for TMP, making part of the text jitter!
  • BETA: Node Editor! Visually change your TXTs instead of writing it outside Unity.

Note: Every time that you update a Plugin, backup your project.
A lot has changed in RPGTalk base on this update to accept TMP.
You can loose your TextUI and DialogerUI references.
The way the Dialog Window follow a character has also changed, you will need to revision it.
Localisation have changed so it have to be set on an Asset.
The Callback on RPGTalkHolder is now a UnityEvent. You will loose your previous references.

1 Like

Hi, thanks for this great product, wish I had found it sooner though. before I wasted nearly a week developing my own simile but crap solution.

I just have one question though…
How do I include apostrophes and quote marks in to the text. every time I add text with one I get the “The Line To Start and the Line To Break are not fit for the given TXT” error.

Thanks

Ahh never mind… apparently this apostrophe ’
is somehow different from this apostrophe ’ … I guess RPGTalk don’t like this one.

I’m glad you are enjoying RPGTalk.
About your problem I can only guess it is something to do with file encoding. RPGTalk is ready to deal with raw TXT files, something you would create with Notepad, TextEdit or even Unity’s MonoDevelop. Some other programs, like WordPad, Word or Google Notes, fill the txt file with code to help formatting the text, but mess with the txt file itself.

Anyway, I’m glad you were able to solve your problem. Anything else you need help to, don’t hesitate to ask it out!

Hey, I’m just working on my first unity project and it is a RPG game. I’m so glad that there’s an useful and free tool in asset store:)

However, I have a question here: is it possible to detect whether there’s a talk going on right now? When my character walks close to an object by tapping the space in the map, and then I tap that object to invoke RPGTalk, It successfully invoke the conversation; but when I tap the margin outside of the conversation UI, the character moves:(

Thanks for developing it anyway!

Hello reginadinan! Welcome to Unity’s world and I’m glad you are enjoying RPGTalk.

Yes! RPGTalk have a public variable called isPlaying, that is true when a talk is active. You can block your controls if this variable is true.
Another option is doing so in your own script. Every time you start a talk, you block the controls. The callback in RPGTalk (that is called when the talk ended) give the controls back. We did so in our “Complex Demo” scene. Check that out!

I’m anxious to see your awesome RPG! Keep up the good work!
Let me know if there is anything more you have trouble on!

1 Like

Hi,how can i use two or more animator controller in one instance of rpg talk? Id like to use my own animated gameobject as a photo during the dialogue,and change the displayed object when the line of the dialoguer changes too,is it possible?

Omg! Right now, you can’t. I can’t believe we missed such a basic feature! We added the possibility to change an Animator thinking about the “Photo” of the character in the UI. But it make a lot of sense being able to set several animator, specially on 3D projects. =/
We will absolutely add something like this in the next update.

But worry not! It should be easy to make a simple script and make use of the events in RPGTalk to do so. Like this:

public class RPGTalkToAnimator : MonoBehaviour{
   
     //You should place the RPGTalk instance in the variable below in the Inspector tab
     public Rpgtalk rpgtalk;
     //Below, the name of a Boolean parameter that you should set in your animator. Like: "talking"
     public string boolParameter;

     Animator anim;
     bool aTalkIsHappening;

     void Start(){
          anim = GetComponent<Animator>();
          rpgtalk.OnNewTalk+=TalkStarted;
          rpgtalk.OnEndTalk +=TalkEnded;
     }

     void TalkStarted(){
          aTalkIsHappening = true;
     }

     void TalkEnded(){
          aTalkIsHappening = false;
     }

     void Update(){
          if(aTalkIsHappening){
               anim.SetBool(boolParameter, rpgtalk.isPlaying);
          }
     }
}

If everything is fine, you should be able to add this script to each of your GameObjects that have an Animator, and a boolean will be set when RPGTalk is writing the text. You can add something to check if the talker is the right one (by using the rpgtalk.dialogerUI variable, for instance) or something like that if you want more control.

I’m terribly sorry for the inconvenience. Let me know if you got everything running!

1 Like

Hi,thank you for replying! I will definitely give your solution a try and report back here with the result,thanks a lot for this awesome free asset!

hi @seizestudios
Just wanted to tell you the method you advised actually works,but I had to modify the code a little to make the animation parameter return to false after the talk has ended,your code doesnt really turn the parameter back to false,here is my modified code:

using UnityEngine;

public class RPGTalkToAnimator : MonoBehaviour
{

    //You should place the RPGTalk instance in the variable below in the Inspector tab
    public RPGTalk rpgtalk;
    //Below, the name of a Boolean parameter that you should set in your animator. Like: "talking"
    public string boolParameter;

    Animator anim;
    bool aTalkIsHappening;

    void Start()
    {
        anim = GetComponent<Animator>();
        rpgtalk.OnNewTalk += TalkStarted;
    }

    void TalkStarted()
    {
        aTalkIsHappening = true;
    }

    void Update()
    {
        if (aTalkIsHappening)
        {
            anim.SetBool(boolParameter, true);
        }
        if (rpgtalk.currentChar >= rpgtalk.rpgtalkElements[rpgtalk.cutscenePosition - 1].dialogText.Length)
        {
            anim.SetBool(boolParameter, false);
        }
    }
}

Hi guys, first of all sorry for my english. Im from Argentina.
Thankss!!! A LOT for this utility. I’m developing an indie game and RPGtalk made things so much easier for me. Now, i’ve got a problem and you may know the cause. I can’t use accents marks like this ( á, é, í, ó, ú ) in my texts, i thought it could be because it was released for english keyboards. Maybe i can change something and make it work?

Again, thanks for all and cheers from Argentina!

Hi,

First I want to thank @seizestudios for this amazing package. It is incredible that you relase something of this quality for free, and will help a lot of people for sure !

Then I want to share a little modification I made.
My problem was that when using KickStep, the user tend to use the skip control two time in a row, one to display the next sentence, and one to make it faster. But when using a choice, the second press actually skips the choice. I am not sure why since the button prefabs are not yet instanciated at the time of the second press, but… it does (at least for me, on a fresh project, unity beta 2018.3.0b1, using the 3rd demo scene). And it stops if I comment the line that preselect the first choice button spawned in RPGTalk.cs

So I fixed that by delaying the preselection of the first button by 0.8 seconds. This prevent this strange behaviour, and as a bonus, enable someone who was spamming the skip control to be aware that a choice is coming, stop spamming and choose something else than the first choice.

If you ever needs to reproduct this, just change this part of the RPGTalk.cs

    //The text just ended to be written on the screen
    void TextEnded(){

        [...]
                            if (i == 0) {
                                newChoice.GetComponent<Button> ().Select ();
                            }
                        } else {
                            Debug.LogWarning ("RPGTalk can only put the choice's text correctly if choicePrefab is a button with a child of type Text.");
                        }
                    }
                    break;
                }
            }

        }
    }

into this :

    //The text just ended to be written on the screen
    void TextEnded(){

        [...]
                            if (i == 0) {
                                buttonToSelect = newChoice.GetComponent<Button> ();
                                Invoke ("SelectButton", 0.8f); //Wait 0.8s and highlight the first button
                            }
                        } else {
                            Debug.LogWarning ("RPGTalk can only put the choice's text correctly if choicePrefab is a button with a child of type Text.");
                        }
                    }
                    break;
                }
            }

        }
    }

    private Button buttonToSelect;
    private void SelectButton ()
    {
        if (buttonToSelect != null) //destroyed if selected by mouse before this function is called
            buttonToSelect.Select ();
    }
1 Like

Hi, I´m from Brazil. There is a way to put our PT-BR accentuation on a text?? We´ve been facing some difficult. If I put the words with accentuation on the source Text file, the dialog even appears on the screen(e. “vá” or “não”). Another issue is that images inside a conversation are not showed.

Hello @castrojoaquin91 !
First, I’m really sorry for the late response. For some reason, we stopped receiving alerts for a while :sweat_smile:

As for your problem, if you haven’t solved it yet, RPGTalk should really have no issues using accents. But it expects a RAW TXT file. Some software may change the TXT encoding (like MS Word) and make it not readable. But you should be fine changing its encoding in something like Notpad++ or VisualStudio.
If you create or reuse a RAW TXT file, you shouldn’t even worry about encoding. Check our “TagsDemo” scene, we used a TXT file with accents for the “Brazilian Portuguese” localisation. Try changing and duplicating this file to create your own. It should be ok!

We are having a lot of users with similar issues, so we might think of a way to make it clear or accept other types of encoding…

Thank you for your patience! Your english is pretty good! Let me know what awesome games you are making! Big hugs to Argentina!

Hello @r0levrai !
First, I’m really sorry for the late response. For some reason, we stopped receiving alerts for a while :sweat_smile:

That is awesome! Thank you so much for the feedback, we haven’t noticed that bug.
We will absolutely add it to the next update.
Good catch!

1 Like

Hello @clovisbueno !
RPGTalk should really have no issues using accents. But it expects a RAW TXT file. Some software may change the TXT encoding (like MS Word) and make it not readable. But you should be fine changing its encoding in something like Notpad++ or VisualStudio.
If you create or reuse a RAW TXT file, you shouldn’t even worry about encoding. Check our “TagsDemo” scene, we used a TXT file with accents for the “Brazilian Portuguese” localisation. Try changing and duplicating this file to create your own. It should be ok!

We are having a lot of users with similar issues, so we might think of a way to make it clear or accept other types of encoding…

About the images problem, can you tell us more details? What is going on? Have you followed the steps in our TagsDemo or our documentation?

PS.: We are also Brazilians!!! Bom ver conterrâneos aqui! Se você se sentir mais a vontade conversando em português, manda um e-mail pra gente em contact@seizestudios.com !

In your example:

public Rpgtalk rpgtalk;
void Start(){
rpgtalk.OnMadeChoice += OnMadeChoice;
}
void OnMadeChoice(int questionID, int choiceID){
Debug.Log("Aha! In the question "+questionID+" you choosed the option "+choiceID);
}

How do I attach an ID to a choice?

TalkerName: [question=0]So, can I ask you something?
[choice]Sure!
[choice]I'm not im the mood.
TalkerName: Text to be shown after the answer

This is the only example given. I’ve tried choice=0 or choice=1 with no luck (it makes the choice buttons not pop up at all). I’ve been struggling with this for hours, digging through your code and trying various things to work around this very unsuccessfully. I’m sure there’s a simple answer, but I can’t figure it out. I’m still learning and I think I’m about to have an aneurysm.

Thanks for a fantastic asset!

Hello @AlexLDren !
I’m sorry you are having trouble with RPGTalk. We will try to make things clearer.

The “choice” ID is set automatically by its order.
On my example:

Sure!

Would have the id = 0.

I'm not im the mood.

Would have the id = 1.

And so on.
We wanted to make it easier for the developer to create e/or change the order of the answers if needed without having to rewrite code.

Let me know if you have any more trouble!
Keep making awesome games!

Ah! I understand now! I couldn’t figure out how to direct the choices into different lines of dialogue, but I’ve got it now. As usual, I was trying to make it more complicated than it is! Thank you!

Could it be possible displaying something like this during an interaction? It seems similar to the RPG Timeline but I don’t know how to make it interact where a specific person should come up in an interaction (Like for example interacting the red haired sprite and her picture coming at the right side). Sorry I’m still a bit new to this lol