Hello Tony,
I am considering using randomly choosen dialogues for some of my NPCs. This should be short conversations that would add some nice touch to the game and make it feel less "generic". What is the best way to start with this? My guess: make a large conversation in a dedicated DB, and choose a proper dialogue thread based on a randomly selected Lua variable value. But what about other DBs present in the current scene, then?
Best!
Random Dialogue System
Re: Random Dialogue System
In the Dialogue Editor, it's not possible to link from one DB to another DB. But you can certainly load as many DBs as you want at runtime. Make sure their IDs don't conflict by running them through the Unique ID Tool.
You can load the DB at runtime using DialogueManager.AddDatabase() or the Extra Databases component. I use the Extra Databases component often. It's more convenient than writing code.
You can also customize the dialogue text further by using the [lua(code)] tag. For example, you can give each actor a custom field named "FavoriteColor" and then use Dialogue Text like this:
You can load the DB at runtime using DialogueManager.AddDatabase() or the Extra Databases component. I use the Extra Databases component often. It's more convenient than writing code.
You can also customize the dialogue text further by using the [lua(code)] tag. For example, you can give each actor a custom field named "FavoriteColor" and then use Dialogue Text like this:
- Dialogue Text: "My favorite color is [lua( Actor[Variable["Conversant"]].FavoriteColor )]."
- Dialogue Text: "Hello, my [lua( RandomElement("friend|buddy|amigo") )]."
Re: Random Dialogue System
Tony,
great thanks, again!
Best!
great thanks, again!
Best!