Announcement

Collapse
No announcement yet.

Blueprint Dialogue System

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by Cinebeast View Post
    Yo! I'm very, very slow when it comes to these things. Bear with me please.

    I'm interested in adding my own portraits, but I don't know how to go about it. The doc suggests editing the Speaker Attributes data table in Excel, but I've never worked in Excel. Can I export the data table from UE4 as a CSV, or do I need to make my own?

    Also, a tangential question. I'd like to know how to go about altering the font on a sentence-by-sentence basis? Like, one character speaks in a certain font and then the next speaks in a different one, etc. That's probably really simple and I'm just going blind.

    Thanks again for making this, it's a big help. You're cool.

    Hi Cinebeast,

    You can also use Google Sheets, OpenOffice, LibreOffice, CSVed or any other spreadsheet application that can save to CSV. You can alter the tables directly in UE4's table editor, but it is much more flexible to work in a spreadsheet editor.

    As for the font, UMG doesn't (as far as I know), support changing the font, font size, or font weight at runtime, so this can't be directly supported. I can think of a way to do it, but it's a clumsy task (and not cleanly supported in the current version of the BDS): Create a new UI_DialogueTextItem for each font settings you'd like to support and add new options in the inline parser to swap out the text item it spawns.

    The only font option we can alter directly is the colour, you can use the inline font tags for this (col/color/colour)

    Hope this helps

    Comment


      Thank you! It does. I'll consider making individual UIs for each typeface.

      Sorry for being late to reply, but I'm still a bit confused. I managed to export the Speaker Attributes data table as a CSV and alter it in Excel, but I'm not sure how to get it back into UE4. I can't import it as a CSV, so what sort of file should save it as?
      I'm an artist! Check out my work at https://cinebst.wixsite.com/cinebeastart and hit me up!

      You can e-mail me at cinebst@gmail.com.

      Comment


        Originally posted by Cinebeast View Post
        Thank you! It does. I'll consider making individual UIs for each typeface.

        Sorry for being late to reply, but I'm still a bit confused. I managed to export the Speaker Attributes data table as a CSV and alter it in Excel, but I'm not sure how to get it back into UE4. I can't import it as a CSV, so what sort of file should save it as?

        Hi Cinebeast, CSV is the right format to use. You can import it like any other file (drag&drop, with the import button, or by placing it anywhere in the content folder if monitor content option is on). When you try to import it you should get a prompt for which kind of data asset to create, select Dialogue_TableItem (note, UE4 sometimes doesn't show this data row type, if this happens try opening DT_Dialogue_Main and trying again to make the editor aware of that type)

        In the sample project, I placed the CSV files in the "SampleContent/DialogueSampleContent/Data" folder, in my case UE4 automatically detects a change and updates the datatable or prompts to create a new one from the CSV file - I believe this is the 'monitor content folder' option in editor settings, I'm not sure if this is on by default.

        For more info on data tables, have a look here

        Comment


          Hello again! I seem to live here now.

          Sorry to bug you, but I've run up against a new hurdle and I hope you can help me. I'm trying to use the Conditions column, but I'm not sure how. Here's what I'm looking to do: I have a dialogue branch where the player can choose one of three or four outfits. Whichever outfit they pick, they wear. Ideally, whichever outfit they're currently wearing will be removed from the dialogue branch, and vice versa if they change into another outfit.

          It seems clear to me I need to use the Conditions column to make this happen, but I'm not sure how to go about it. I've tried updating a variable every time you pick and outfit -- something like $Namespace@CostumeName$="false" and such -- but I've had no luck so far. Could you give some suggestions?

          Thanks again. This system gives me life.
          I'm an artist! Check out my work at https://cinebst.wixsite.com/cinebeastart and hit me up!

          You can e-mail me at cinebst@gmail.com.

          Comment


            Originally posted by Cinebeast View Post
            Hello again! I seem to live here now.

            Sorry to bug you, but I've run up against a new hurdle and I hope you can help me. I'm trying to use the Conditions column, but I'm not sure how. Here's what I'm looking to do: I have a dialogue branch where the player can choose one of three or four outfits. Whichever outfit they pick, they wear. Ideally, whichever outfit they're currently wearing will be removed from the dialogue branch, and vice versa if they change into another outfit.

            It seems clear to me I need to use the Conditions column to make this happen, but I'm not sure how to go about it. I've tried updating a variable every time you pick and outfit -- something like $Namespace@CostumeName$="false" and such -- but I've had no luck so far. Could you give some suggestions?

            Thanks again. This system gives me life.
            The condition column expects a value to evaluate to true or false (this follows the same rules as C/C++ where anything other than false or 0 is true).

            You have the right idea I believe. When an outfit is selected, set a flag for that costume (either have a variable for each costume: 'redDress=true;', or use one variable with a key: 'currentDress="RedDress";')

            In the condition column, test to see if that variable evaluates to true (you can use 'redDress' or 'redDress==true' or '!blueDress') or the key you're looking for ('currentDress == "RedDress"). If the value is false, the option won't be displayed or used in any default way.

            Comment


              Thank you so much! I guess I just didn't know the precise wording. It works beautifully now.
              I'm an artist! Check out my work at https://cinebst.wixsite.com/cinebeastart and hit me up!

              You can e-mail me at cinebst@gmail.com.

              Comment


                Originally posted by Cinebeast View Post
                Thank you so much! I guess I just didn't know the precise wording. It works beautifully now.
                Great! Glad to hear it

                Comment


                  Originally posted by CelestialPanda View Post
                  Hey Grog (and others using the Dialog System!)

                  4.10 brings with it an error if you try to package your project and it has Macros that use a Wildcard Array input pin. It's a weird one but the answerhubs say it'll be fixed for 4.11. This means that GetOption and PopOption in UI_Dialogue are causing packaging errors.

                  I'm also getting an error with a Math Expression with Pin Input "X" in UI_Dialogue_TextItem, again, only when packaging.

                  This could be just our project, but I thought I'd let post in case it helped anybody else with issues.
                  Originally posted by HInoue View Post
                  I'm getting the same error when I try to package. It's not a super-duper emergency by any means, but I just wanted to verify that it's not just Panda
                  Hi Panda & HInoue,

                  Since I'm having the same problems you guys are having regarding packaging, I was wondering if you found a solution, or are waiting for 4.11 to be released?

                  Comment


                    Originally posted by Grogger View Post
                    As for the font, UMG doesn't (as far as I know), support changing the font, font size, or font weight at runtime, so this can't be directly supported. I can think of a way to do it, but it's a clumsy task (and not cleanly supported in the current version of the BDS): Create a new UI_DialogueTextItem for each font settings you'd like to support and add new options in the inline parser to swap out the text item it spawns.
                    I've been meaning to get around to doing this. I'm not actually sure how to go about it, though? I've created a new UI for the text item like you said, and I went ahead and made a whole new UI_Dialogue that uses said text item too, just in case. I don't know how to call upon these, however.

                    Looking at BPC_Dialogue (and the children I've made), it looks like I just need to swap out the UI there through a Cast To node or a Blueprint Interface, but the option isn't available to me.

                    Click image for larger version

Name:	ue4_dio_ui_wontaccept.png
Views:	1
Size:	20.9 KB
ID:	1098159

                    (That one.)

                    The variable will only accept the UI_Dialogue class, but I'd like to broaden its horizons, so to speak, so it can also accept the custom UI I made. I could be going about this rather poorly. What do you suggest?

                    Thanks for your time.
                    I'm an artist! Check out my work at https://cinebst.wixsite.com/cinebeastart and hit me up!

                    You can e-mail me at cinebst@gmail.com.

                    Comment


                      Originally posted by Cinebeast View Post
                      I've been meaning to get around to doing this. I'm not actually sure how to go about it, though? I've created a new UI for the text item like you said, and I went ahead and made a whole new UI_Dialogue that uses said text item too, just in case. I don't know how to call upon these, however.

                      Looking at BPC_Dialogue (and the children I've made), it looks like I just need to swap out the UI there through a Cast To node or a Blueprint Interface, but the option isn't available to me.

                      [ATTACH=CONFIG]72949[/ATTACH]

                      (That one.)

                      The variable will only accept the UI_Dialogue class, but I'd like to broaden its horizons, so to speak, so it can also accept the custom UI I made. I could be going about this rather poorly. What do you suggest?

                      Thanks for your time.
                      Hi Cinebeast,

                      UI_Dialogue was intended to be inherited instead of duplicated entirely (mentioned briefly in the documentation), I don't think it would be straightforward to replace it with a new class entirely.

                      Another problem you will encounter is that the text and response widgets are "hardcoded" in the base UI_Dialogue file (this has been changed for the next version).

                      I'm afraid I won't be much help beyond this though; the implementation that I can figure is far too cumbersome to describe

                      Comment


                        Okay, thanks. I didn't know widgets could inherit from other widgets. (I really should have, though, my bad.)

                        So, I remade the custom UI and parented it to UI_Dialogue, and I've overridden only one graph, the Create Dialogue Item graph. Here I run into an issue that I don't really understand:

                        Click image for larger version

Name:	ue4_createDialogueItem_error.png
Views:	1
Size:	57.0 KB
ID:	1098165

                        In case it's hard to read, on compile I get an error that says I can't override the function because it was declared in a parent with a different signature. This is over my head, but maybe you have an idea.

                        Still, this might be unnecessary. You mentioned the next update will feature an easier way to change these sorts of things, and I'm not really in any rush to get this problem settled. I could just wait for the update. If it's not too pushy of me, when can we expect it?
                        I'm an artist! Check out my work at https://cinebst.wixsite.com/cinebeastart and hit me up!

                        You can e-mail me at cinebst@gmail.com.

                        Comment


                          Originally posted by Cinebeast View Post
                          Okay, thanks. I didn't know widgets could inherit from other widgets. (I really should have, though, my bad.)

                          So, I remade the custom UI and parented it to UI_Dialogue, and I've overridden only one graph, the Create Dialogue Item graph. Here I run into an issue that I don't really understand:

                          [ATTACH=CONFIG]72961[/ATTACH]

                          In case it's hard to read, on compile I get an error that says I can't override the function because it was declared in a parent with a different signature. This is over my head, but maybe you have an idea.

                          Still, this might be unnecessary. You mentioned the next update will feature an easier way to change these sorts of things, and I'm not really in any rush to get this problem settled. I could just wait for the update. If it's not too pushy of me, when can we expect it?
                          When you created that function, did you use the 'Override' drop down? I've checked that it should work that way.

                          The changes that are in the newer version are a few fixes and a few built in functions, nothing major - I've exposed the UI_Dialogue_TextItem and ResponseItem classes to spawn from, but you can work around it without this change (you're in the right direction with the Create dialogue item override, I think).

                          Comment


                            Originally posted by Grogger View Post
                            When you created that function, did you use the 'Override' drop down?
                            Yes, I did. I just made it again to make sure, and I get the same error. All I'm changing is the Dialogue Item variable so that it references the custom Text Item UI I've made instead of the original.

                            For the record, the custom Text Item UI is not parented to the original Text Item UI -- it's a duplicate using a different font. Could that be a problem?
                            I'm an artist! Check out my work at https://cinebst.wixsite.com/cinebeastart and hit me up!

                            You can e-mail me at cinebst@gmail.com.

                            Comment


                              Originally posted by Cinebeast View Post
                              Yes, I did. I just made it again to make sure, and I get the same error. All I'm changing is the Dialogue Item variable so that it references the custom Text Item UI I've made instead of the original.

                              For the record, the custom Text Item UI is not parented to the original Text Item UI -- it's a duplicate using a different font. Could that be a problem?
                              Hmm, I'm not able to recreate your error without starting a new function without overriding, maybe try creating a new fresh umg widget, reparent from UI_Dialogue, and try overriding it there - see if it happens again?
                              I can't say for certain off the top of my head if that will be a problem, but my instincts tell me it will be.

                              Comment


                                Originally posted by Grogger View Post
                                Hmm, I'm not able to recreate your error without starting a new function without overriding, maybe try creating a new fresh umg widget, reparent from UI_Dialogue, and try overriding it there - see if it happens again?
                                I can't say for certain off the top of my head if that will be a problem, but my instincts tell me it will be.
                                If I understood you correctly, I tried this and got the same error. I made a new, completely blank widget, set UI_Dialogue as its parent, and then overrode the function in question. Even then it compiles fine, but as soon as I remove the call to the parent function and replace the references, the error crops up.
                                I'm an artist! Check out my work at https://cinebst.wixsite.com/cinebeastart and hit me up!

                                You can e-mail me at cinebst@gmail.com.

                                Comment

                                Working...
                                X