Heyo, I'm the lead dev on http://playadnc.com and we loved Dialogue System for Unity so much in our pre-alpha we're sticking with it for our finalized game framework. We currently use it with Chatmapper for comment threading with our editors.
Question: Is it possible to inject a variable with a text block of dialogue from Chatmapper as so below. It would be most ideal if I could do this with a Lua function or accessor since all of our variables pull from a custom database separate from Chatmapper.
Example: "Me and [PLAYER_NICKNAME] don't care! Nothing you can say will keep us here."
PLAYER_NICKNAME = Some anonymous variable string variable injected at run-time. We have some scenarios where we want the player to customize some overridable text instead of writing a ton of branching nodes.
If I have to write some custom logic or hit a hook before text is processed I know the Chatmapper source decently well (just let me know where to look). More than happy to custom code something in if I have to. If there is a pre-existing hook to do this that would be amazing.
PS Awesome looking source code, it helped me learn how to properly architect my own custom plugins.
Using a variable in dialogue
Re: Using a variable in dialogue
Hi!
I bookmarked A Dragon Named Coal a while ago. I'm glad to see it's still going strong!
To inject a variable, just use the [var=variableName)] markup tag.
Example: "Me and [var=PLAYER_NICKNAME] don't care! Nothing you can say will keep us here."
This is built into Chat Mapper, so you can test it right in the Simulator.
The Dialogue System supports everything Chat Mapper does, so it'll translate perfectly into Unity, too.
The Dialogue System also supports additional markup tags that Chat Mapper doesn't, such as [lua(code)]:
Example: "Next week is my birthday! I'm almost [lua( Actor["Player"].Age + 1 )] years old!"
If you combine that with built-in Lua functions like RandomElement() or with your own C# code registered as Lua functions, it becomes a really powerful and flexible feature.
I bookmarked A Dragon Named Coal a while ago. I'm glad to see it's still going strong!
To inject a variable, just use the [var=variableName)] markup tag.
Example: "Me and [var=PLAYER_NICKNAME] don't care! Nothing you can say will keep us here."
This is built into Chat Mapper, so you can test it right in the Simulator.
The Dialogue System supports everything Chat Mapper does, so it'll translate perfectly into Unity, too.
The Dialogue System also supports additional markup tags that Chat Mapper doesn't, such as [lua(code)]:
Example: "Next week is my birthday! I'm almost [lua( Actor["Player"].Age + 1 )] years old!"
If you combine that with built-in Lua functions like RandomElement() or with your own C# code registered as Lua functions, it becomes a really powerful and flexible feature.
Re: Using a variable in dialogue
That is really cool! Great to hear this is built-in like that. This will definitely open up some new writing options. Will pass this onto our team and add some new variables to our writing docs.