your code worked great after a bit of a tweak - had to add the Title to get the conversation to work. Posting my code for posterity...
Code: Select all
void SetRandomConversation()
{
List<PixelCrushers.DialogueSystem.Conversation> conversations = DialogueManager.masterDatabase.conversations.FindAll(x => x.Title.StartsWith("Region/Town/"));
int conversationID = UnityEngine.Random.Range(0, conversations.Count);
GetComponent<DialogueSystemTrigger>().conversation = conversations[conversationID].Title.ToString();
}