Will this Asset suit my project?

Announcements, support questions, and discussion for the Dialogue System.
warielime
Posts: 5
Joined: Fri Jul 26, 2019 9:43 pm

Will this Asset suit my project?

Post by warielime »

Hi! I'm making a game in my free time that's going to rely very heavily on dialogue that's controlled by variables (my time/date controller is powered by variables representing the hour, minute, day, season, etc). I'm doing my best to mimic the dialogue style of Stardew and Harvest Moon, where dialogue is dependent on an intersection of all of my calendar variables.

I'm honestly not very tech savvy (and am at my wits end trying to smash together my own system), and at this point purchasing the Dialogue System asset seems like my best bet, but I couldn't find anything in the docs about variable-driven dialogue selection. Is this something that could work without me tearing my hair out?
Thanks in advance!
User avatar
Rallix
Posts: 15
Joined: Mon Jul 08, 2019 9:02 am

Re: Will this Asset suit my project?

Post by Rallix »

Speaking as a user of this asset, I can definitely recommend it. It's very vast and packed with features, so for plenty of common scenarios, there are already components, sequences or tools you can use without coding them yourself. Therefore if you're not very comfortable with coding, this asset is probably your best pick for dialogues (and quests, on top of that).

I think you could create a Stardew Valley-like dialogue system with this asset mostly without coding, just with the built-in Dialogue Editor. Checking the time of day & day of the month is easy enough if you update the variables properly somewhere. The relevant sections you're looking for are probably these: Variables, Conditions.

The whole page is worth reading, e.g. take note of the [pic=#] tag which overrides the actor's current portrait (to show character expressions, similarly to Stardew Valley).
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Will this Asset suit my project?

Post by Tony Li »

Thanks @Rallix! You summed it up perfectly. Stardew Valley-like games have been made with the Dialogue System entirely without coding.

Please feel free to try out the evaluation version if you're not sure.
warielime
Posts: 5
Joined: Fri Jul 26, 2019 9:43 pm

Re: Will this Asset suit my project?

Post by warielime »

Thank you both for the quick replies! I'll definitely be trying out the evaluation version. My only other immediate worry is how to access my day/time script variables from Dialogue System. I've found plenty of forum posts on doing the opposite (referencing Dialogue System variables in a script). Any tips?
Thank you for your patience!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Will this Asset suit my project?

Post by Tony Li »

Hi,

There are three typical ways. You can take your pick.

1. Use a visual scripting tool such as PlayMaker or Bolt. The Dialogue System has integration with most of them. Use the Dialogue System's "Set Variable" action to set a Dialogue System variable (e.g., "Day") with the value of one of your script variables.

2. Or set it directly in a script using DialogueLua.SetVariable:

Code: Select all

public int day;
...
DialogueLua.SetVariable("Day", day);
You can add an OnConversationStart method that sets up the Dialogue System variables at the start of a conversation.

3. Or register a function with the Dialogue System that reads your variable directly. Internally, the Dialogue System runs a language called Lua. Normally you don't have to think about it. You just use the "..." dropdowns in nodes' Conditions and Script fields to set it up visually. But the Dialogue System also lets you register your own functions that you can use in Conditions and Script fields.
warielime
Posts: 5
Joined: Fri Jul 26, 2019 9:43 pm

Re: Will this Asset suit my project?

Post by warielime »

Awesome! Thank you again for the reply, and I apologize for having so many questions. You've been a great help!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Will this Asset suit my project?

Post by Tony Li »

Glad to help!
warielime
Posts: 5
Joined: Fri Jul 26, 2019 9:43 pm

Re: Will this Asset suit my project?

Post by warielime »

Sorry to revive the thread, but after trying both sending my variables from Playmaker to Dialogue System and trying to code the variables in directly from my GameTimeManager script a la your second example, I'm not having any luck. (Apologies for the gigantic screenshots.)
Attachments
Screen Shot 2019-07-28 at 7.58.20 PM.png
Screen Shot 2019-07-28 at 7.58.20 PM.png (36.75 KiB) Viewed 1718 times
Screen Shot 2019-07-28 at 8.31.52 PM.png
Screen Shot 2019-07-28 at 8.31.52 PM.png (154.24 KiB) Viewed 1718 times
Screen Shot 2019-07-28 at 8.32.09 PM.png
Screen Shot 2019-07-28 at 8.32.09 PM.png (44.63 KiB) Viewed 1718 times
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Will this Asset suit my project?

Post by Tony Li »

In PlayMaker, I see that you're trying to set a Dialogue System variable named "Hour".
And in your C# code, you're trying to set a Dialogue System variable named "hours".

Have you added a variable in the Dialogue Editor's Variables section? If so, what is its name? Does it match the name you're trying to set in PlayMaker and/or C#?
warielime
Posts: 5
Joined: Fri Jul 26, 2019 9:43 pm

Re: Will this Asset suit my project?

Post by warielime »

Oh man, thank you for pointing that out! It's all working smoothly now, thank you so much!
Post Reply