Page 1 of 1

Very Noob question

Posted: Mon Jun 15, 2020 6:55 pm
by jeuazarru
Hi, I am writing a roguelike visual novel & RPG. I started using Unity with Ink, with all the logic in C# scripts in UNITY.

I really don't like that EXTERNAL functions in INK cannot be used to change states in the game, and need to use externals with tags to get some results, which is messy because i have tons of interactions.

So I was thinking to move from ink to dialogue system, because at this point the ink part is not too big. I saw the tutorial videos and read documentation, but still not sure if I can do something like this in dialoguesystem:

Lets say I have a room with several random N characters. I need in the narration to be able to interact with them. I have them assigned to the room as C# objects with their own properties. I need to talk to some of them and generate on the fly options of dialogue depending on who is there. So maybe there are 5 people, and I can say a different thing to each one depending on internal properties of the characters. There is a way to define conversations at run time based on that? So in the list of options will add more depending on who is there and its internal state?

Thanks a lot for your insights!

Re: Very Noob question

Posted: Mon Jun 15, 2020 7:12 pm
by Tony Li
Hi,

There are a few ways you can do this in the Dialogue System.

One of the most straightforward is to write a conversation with lots of options. Depending on the character(s), some of those options can be blocked off for some characters and open for other characters.

You can also organize this content into multiple conversations and link from one conversation to another. But that's just a convenience for organization. Conceptually, it's the same as one big conversation with lots of branches.

To get the system to decide what branches to block off and what branches to open, you can put conditions on branches. For example, maybe some branches will only be spoken by Elves, or by Warlocks, or by female NPCs. These conditions can check values in the characters' C# objects.

Similarly, you can use expressions or UnityEvents to change values in characters' C# object based on which branches are chosen.

In addition, you can add variable tags in your text. So a character might say something like:

"Hello! I am [name], a [race] [class]."

One character might say: "Hello! I am Elebar, a High Elf Wizard."
And another character might say: "Hello! I am Grimdol, a Dwarf Warrior."

(The actual tags you'll use in the Dialogue System are slightly different than the example above; I'm just trying to convey the idea here.)

And there could be, for example, an optional follow-up line such as: "Want to arm wrestle?" that only Warriors use.

Similarly, the conversation could present a response choice "Where do High Elves come from?" that's only available if the player is talking to a High Elf character. It would follow a conversation branch about High Elves.

This is all standard stuff in the Dialogue System. I can provide more details and links to tutorials if you decide to go that route.

Another, different approach is to create the text and conversation tree structure at runtime. This is more complex, but it's still possible in the Dialogue System. I recommend the first approach if it'll work with what you have in mind.

If this has raised more questions than it's answered, just let me know what I can help to clarify.

Re: Very Noob question

Posted: Tue Jun 16, 2020 10:27 am
by jeuazarru
Thank you Tony, I am grateful for your detailed answer. It is nice to receive a thoughtful answer even being someone completely new here. I appreciate it. As this is a dream project that I started some months ago, and it might take several years of my life, I want to pick the right technology to move forward.

I will explain a little more of what I am doing, so maybe you can guide me in this. (yesterday I was too burnt out and I didn't fully explained myself).

Thing is, my game is a roguelike narrative game, like a visual novel but with lots of random interactions and encounters. Most of the interactions are defined by reading text and selecting options or dialogues, with still images.

I will detail one complex situation of the game, and see if you can give me hint if dialogue system can handle it. If we can work this one out, the rest should be easier.

Imagine that my game is a maze, randomly generated. Yo can visit a room several times. When you arrive a room, you find 3 groups of people. Friends, Neutral and Foes. But who is where is defined on runtime randomly. Lets say there may be 10 people in the room, some of them you already met in other rooms and already had some conversations, but some are new to you. When you arrive to the room, you will have dialogues with each one separately or as a group, and some will join you, some will ignore you and some will fight you. All that info is stored on the C# game state in Unity.

The characters are not depicted in the screen, the narrator will just tell you who is there, with some descriptions. And then you will have dialogue or choice options to decide what to do.

So, as you enter the room as a player, I will fill the room with these actors, and need to group them depending on some factors, and have some conversation with each one, tell the player who is there, talk with some of them, pick sides, and maybe start a battle. There is a random luck chance of some things to happen, and also it will depend on your skills and current situation. So the dialogues are not defined or tied to the specific room: they will depend on who is there, their internal state, and a random luck generator that triggers when you talk to them. I found difficult to do this on INK without creating a custom parser, exchange info back and forth with external functions and dynamic tags, and I really don't like my code and the complexities underneath.

As the dialogue and narrative is not tied to the place, but to the game state, and the explosion of states combinations is too big, I need to be able to define what is happening on runtime, and I am not sure the usual way of using dialog system with predefined flows can adjust to that. Maybe it works, but I will love to hear your insights on how to do it, so I can test it and feel if it will be easier or more manageable than my current ink version. I believe it will work, as a lot of people is recommending this plugin, and as some interactions that I am working on are very similar on how Disco Elysium works (and I understand they used this tool too), so I just want ideas so I can try them and decide what is best for my project.

Thanks a lot!

Re: Very Noob question

Posted: Tue Jun 16, 2020 12:12 pm
by Tony Li
Hi,

I recommend trying the free evaluation version to see if you like how you'd implement it in the Dialogue System.

I'll recap the two approaches I mentioned earlier:

1. At design time, write conversation fragments that you can reuse for characters. These fragments can contain variable content so the text will be customized for each character.

2. Or create entire conversations at runtime. See: Create Dialogue Database At Runtime.

Re: Very Noob question

Posted: Tue Jun 16, 2020 2:29 pm
by jeuazarru
Thank you Tony. I bought the full plugin from the asset store and integrated without hassle to my Unity project. Now I am running some tests with my current dialogues. I believe it will work. I need to learn how everything works, and I will.
If I have specific questions I will ask again in this forum.
Regards!

Re: Very Noob question

Posted: Tue Jun 16, 2020 2:50 pm
by Tony Li
Thanks! There are new video tutorials on how to connect dialogue entry nodes to GameObjects in your scene using UnityEvents, and how to interface the Dialogue System with your own C# scripts.