Home Artists Posts Import Register

Content

I'm particularly proud of how my dialog system has been coming along, and wanted to show off a little!

It's controlled entirely through a json file (basically a really big text file) that's loaded externally. Here you can see the first day's cutscene, as it is in the file.

There are 4 "slots" that can each have a character assigned to it. Who's talking and their current emote is set by the "[@Name|emote]" tag, and "[.]" is used to separate each message you click through. There's also one to set and change slots, [S(0-3)=Name|(0-1)|emote]", which sets what slot (the S value), what character (the name), if they're on screen or not (0 or 1), and their emote id.

I wanted to make it so that it's as easy to read as possible, so almost all of the actual assets are looked up by the game itself. It's a lot easier to write [@Carol|happy] 100 times than it is to specifically tell the game to use "sp_portrait_carol_happy"! So there's code to extract the character's name and then compare that to a database of emote keywords, then use those two values to find the intended portrait. I've even set up a list of every character's name written properly, so there won't be cases where the text box accidentally says "Craol" or "carol".

There's a lot of support for carry-over as well: If an emote isn't added to the [@name] tag, it just assumes to use that character's last set emote. Want to make a character say multiple lines? Don't bother using [@name] at all, and just keep writing after [.]! To end the dialog cutscene, you just don't add a [.] to the end of a message.

And of course, there's tags to control the background and to make an image pop up, for when characters are talking about something and I want to include an illustration.

I'm still looking to expand this system a bit to be able to control music, the color of the text, and maybe give the text a few special effects like jittering or waving. My hope is that later on I can make this whole system into a standalone library that other people can use for their projects!


Files

Comments

No comments found for this post.