#Feedback on my custom dialogue script

1 messages · Page 1 of 1 (latest)

raw imp
#

It's called UDM, currently you write the files in txt cause I couldn't find a way to let unity read custom file formats as text files.

[ACTOR]"This is test text for UDM v.0.1!"
{1}"Option 1"
>[ACTOR]"You picked option 1!"
###
{2}"Option 2"
>[ACTOR]"You picked option 1!"
###
{3}"Option 3"
>[ACTOR]"You picked option 1!"
###
{4}"Option 4"
>[ACTOR]"You picked option 1!"
###
{5}"Jump to start!"
^STR```
#

I've only built a...is 'parser' the right word? for unity so far but since it's not really....engine specific you could use it in any engine or language because it's just a scripting language

#

you just need something to convert it to a list of strings

#

and make the engine

#

understand it

#

might put it up on github

#

or the asset store

#

or something

#

if it's

#

stable

brittle merlin
#

neat

#

how does it work 😄

raw imp
brittle merlin
#

Can you explain how the snippet is parsed? like what does that end up as and how

raw imp
#

since that's what ive written

#

i've done similar stuff in godot but in unity

#

it's made of two scripts, the parser and the thing that translates it to UI. if i put this into something public I'd probably just use the UI script as a demo since it's specific to my UI, but the parser is universal, and converts and snips the code you wrote into something more understandabke and managable for scripting in CS

#

it ends up sorta like this but also with a seperated title dictionary which associates titles with indexes in the array to jump to places

#

then the UDMUI handles the in-game logic of progressing through dialogue, processing options, ect. ^_^

#

string manipulation is one of my favorite things

#

since string manupulation is pretty similar between languages it'd probably be pretty easy to translate the parser to godot, unreal, ect.

#

idk if it's a lamguage

#

or what it's called

#

it's more similar to json i guess but more readable and specific

plucky sable
#

Why not just use Yarnspinner or Ink?

raw imp
# plucky sable Why not just use Yarnspinner or Ink?

I felt like they were too....complex? or, i don't want to use bloated because that brings negative connotations, they're good, i've tried both but i never enjoyed writing them and it always felt disconnected from the engine. aside from that, I've always wanted to write my own dialogue system, for learning and to make something

nimble plume
#

For a dialogue system to be viable in real life it needs at a minimum:

  • handle nested choices without becoming unreadable
  • a way to show or hide choices conditionally
  • a way to hide (or not hide) choices when they have been chosen once
  • dynamic text
  • communicate with the normal C# scripts, i.e. triggering events and displaying text based on what a C# function returns
    If you can show a more complete example with multiple choice points, including nested ones, and with all the features it has or are planned, it would be easier to give feedback.
fair rover
# raw imp It's called UDM, currently you write the files in txt cause I couldn't find a wa...

The only information I really see here is a text file and then a list of strings at the end, with some modification to what these strings are. I can only assume what your UDMUI script does but I have a feeling it's just looking for these symbols ($, #1#, etc) you defined and doing hardcoded logic.

if you want honest feedback on this, this is not a proper tool. You mention putting this on github or the asset store if its stable meaning you want other people to use it. This looks like a script specific to your use case rather than something extensible to be used by others. The way of defining your dialogue looks like a pain and I can just imagine how many edge cases this will have.

When you say "it's not really....engine specific you could use it in any engine or language because it's just a scripting language", this isn't true at all. The only part here that's not engine specific the text file. Your scripts that handle parsing the text are c# scripts, and you definitely rely on unity components here, so this is unity specific. regardless of if the statement was true, it clashes with your message of why you don't want to use yarnspinner or ink "it always felt disconnected from the engine". I'm not suggesting you should or shouldn't use those tools, but the reasoning is definitely flawed there.

One thing i suggest is getting your script more editor friendly. It is incredibly easy to make this editable in unity through scriptable objects. Then you also get an editor friendly way of linking dialogue because you can drag and drop scriptable object references. This is still probably worse than what existing tools do. It's definitely better than what you currently have though. At least if it's editable in unity, you can do hardcoded logic based on enums rather than forcing the user to insert stuff like >[ACTOR] in a text file with no verification if their syntax is correct

nimble plume
#

That's not to discourage you from working on this but if a major motivation is the joy of making the system yourself, that's not a thing for other people. If you want to make it public you'll have to think about what other benefits it has and why people would want to use it instead of existing systems or just using a bunch of arrays, dictionaries and if statements

raw imp
#

Don’t trust the exact words I say

#

I don’t mean to mislead people or such

raw imp
#

@fair rover sorry to both you, but what would this...thing be called? I want to get it right this time!

fair rover
# raw imp <@119616167894712320> sorry to both you, but what would this...thing be called?...

im not really sure what you're referring to, like the overall set of scripts and logic? id normally just say tool or asset (since people get these things on the asset store)
if you're talking about the text file, i wouldnt call it anything specific other than a format. this is a text file that you format a specific way and thats all. the same way json is just a format

raw imp
fair rover
#

my message btw wasn't to focus on the word "language" or say its a negative that it isn't engine specific. My point is that your entire logic right now is engine specific so you should focus on getting the file more editable in the engine

fair rover
raw imp
fair rover
#

ideally yea but i have seen a fair amount of garbage on the asset store still. its a place where people are looking to buy actual usable solutions or models. i wouldnt count yours as usable in its current state

raw imp
#

i mostly want to put it out there in case anybody finds it useful idrc about fame or money with it

fair rover
#

focus on adding features first that are easy to setup in inspector, and hard to mess it up. Nitku listed a few good ideas above. The main thing i think is important is the "communicate with the normal C# scripts"

raw imp
fair rover
#

you really shouldnt focus on the one beginner out there who will find your script and like it. Im being completely blunt here, no intermediate to professional level developer is going to see what you made and think it's a good solution

fair rover
#

Nitkus message has more info about that part

raw imp
raw imp
#

like BBcode?

raw imp
green walrus
nimble plume
raw imp
raw imp