Workflow examples for top down game

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Dabsco
Posts: 9
Joined: Sat Mar 05, 2022 12:31 am

Workflow examples for top down game

Post by Dabsco »

Hey Jeff,

As my game is growing, and I have more and more NPCs with their own conversations, I am starting to wonder what a 'good' workflow is to manage conversation triggers.

Currently I am following your post about multi-conversation NPCs (https://www.pixelcrushers.com/phpbb/viewtopic.php?t=878) which has been great to collect conversations together.

If I have, say, 10 different NPCs scattered around a walkable world with different dialogue options at different stages of the game, what is a way to keep these conversations in order?
What is a best practice way to manage the different triggers for when a dialogue should start?

I know this is a massive question! I am currently using variables like "hasTalkedToX" and the Actor Variable to go into a particular branch... but I can't help but feeling this could get unwieldly soon.

If you can give some tips to best practice ways, or point to me where there is documentation on growing the dialogues over time, that would really help!

Thanks again,
Dylan
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Workflow examples for top down game

Post by Tony Li »

Hi,

Continue to use variables -- or custom actor fields if you prefer. I like to use variables. It's nice to be able to see everything at a glance. One organizational trick is to use "." to group them, similarly to how you use "/" in conversation titles.

For example, if you have several variables for the Mayor, name them like:
  • Mayor.hasTalked
  • Mayor.describedJob
  • Mayor.discussedDaughter
  • Mayor.hatesVigilantes
  • Mayor.etc.
The Dialogue Editor's Variables section has several features to take advantage of this naming pattern:
  • Menu > Sort: Sort variables alphabetically, which will group all Mayor variables together.
  • Search filter: Set the filter to "Mayor." to show only the Mayor's variables.
  • Menu > Use Group Foldouts: Show groups in separate foldouts (i.e., "Mayor" will have its own foldout).
The "." naming pattern will also show variable names in submenus when selecting variables from a dropdown.

Note: To rename a variable and update all references to that variable, use the Asset Renamer tool. (Menu item Tools > Pixel Crushers > Dialogue System > Tools > Asset Renamer.)
Dabsco
Posts: 9
Joined: Sat Mar 05, 2022 12:31 am

Re: Workflow examples for top down game

Post by Dabsco »

Thanks Tony,
I feel better knowing I am mostly following along with what could be considered a reasonable workflow. I hadn't seen that about the "." for variables, things are looking much more manageable now in that screen.

During the game, how am I able to track the variables as they are set? I can see the initial variables in the Dialogue Manager Debug, but I cannot find a way to track them, or call them to the console like a Debug.log.

For example, I set variable "hasTalked" to true at the end of a conversation, and want to check it without initiating the next conversation that has condition "hasTalked == true" in the console, or somewhere in the dialogue manager.

Thank you!

EDIT
Ah, I just found the "Watches" section and refreshed the variable in question - this seems to have done it, thank you!
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Workflow examples for top down game

Post by Tony Li »

Yup, you can see the runtime values of variables in the Dialogue Editor's Watches section or the separate Variable Viewer window.

In builds, you can use a Lua Console.
Post Reply