Random Conversation Tutorial


Ok, I don't have much hope for this, but let's try making a tutorial for my random conversation syntax. Please note that this is a tutorial for writing non-random conversations, but they are used with random NPCs during randomly occurring micro-events. There's a separate syntax for random conversations happening in much the same context that I have no interest in going over here, but I might at a different time.

So, to put it simply, a conversation is expressed as an array with four columns and as many rows as there are lines to the dialogue.

Let's say that a single column looks a bit like this:

speaker_id;code;mood;dialogue_line

And a whole conversation file might look like this:

0;null;annoyed;She was mewing really loudly when I came home, but I couldn't find her.
1;null;neutral;Oh, she got stuck somewhere?
0;null;annoyed;Got stuck [?between the sofa and the wall|in the trashcan|in the laundry basket|behind the refrigerator|under the sofa pillows]. And then clawed her way out up my forearm when I tried to help her.
1;null;amused;Mine does that too.

Now let's go over the elements one by one.

1) speaker_id

This is a number identifying the randomly generated speaker of the sentence. The speakers are 0-indexed, meaning that the first speaker is 0, the second speaker is 1, the third speaker is 2, etc. Most conversations have only two speakers. The only requirements for identifiers is that:

  • the first line has to belong to the 0 speaker,
  • a speaker's identifier should only be used if all preceding speakers' identifiers were already used (i.e. for the speaker with the identifier 2 to appear, both speaker 0 and 1 should already say at least one line).

2) code

This element exists to execute arbitrary code before the line is displayed. This can be used to set flags (i.e. informing the PC about something happening in the world) or for explicit emotes. I'll only explain this last one. However, this is a very recently added feature, so its functionality is still in the growing phase. Most of the time, you won't need it. This is marked symbolically using the text null, as in the example conversation.

To force a character to perform a specific emote, this element should be replaced by one of these two entries:

[>>_ sets "rc-type" "emote-pure,emote:emote-name"]
[>>_ sets "rc-type" "emote-text,emote:emote-name"]

Here's a test file using these options:

0;null;annoyed;Does this even work?
1;[>>_ sets "rc-type" "emote-pure,emote:nod"];annoyed;null
0;[>>_ sets "rc-type" "emote-text,emote:nod"];annoyed;Does seem so, yeah.

Where emote-name is a name of an available emote. Currently, this is nod, shake-head or laugh, but the assortment will grow in time.

But, what is the difference between the two? The first will simply have the character perform the emote without saying anything. The second will have the character emote on top of having a line they say. In either case, emotes are dynamic, include character attributes, can be used in conjunction with introductions, make references to the line's mood, and are probably a bigger hassle to implement than they are worth, but when has that ever stopped me?

3) mood

This simply represents the line's mood; the available values are:

  • amused,
  • annoyed,
  • confused,
  • curious,
  • enthusiastic,
  • neutral,
  • pleading,
  • tired.

However, as with many things, this is an ever-growing list. If you require a specific emote or mood, you can always ask me to add it if it's not on the list. Characters express mood in various descriptions generated for the text, particularly when their mood changes (the default starting value is neutral).

4) dialogue_line

And finally, the remaining part of the line (that is to say, even if it contains further semicolons) is what the character speaks. There's not much to say here. At least without getting into deeper tricks. Grammatical non-terminals are resolved and can be used freely (especially the [?|] non-terminal), though I don't expect anyone other than me to do so.

An important note is to, when possible, use plain (British) English when writing the dialogue. This helps the text not clash with idiolect filtering options that are randomly applied to it. The text needs to be done with proper capitalisation, proper British spelling, contractions, no punctuation or spelling quirks, and a common vocabulary for maximum compatibility. However, if you have any specific ideas for a punctuation quirk, spelling quirk or an uncommon vocabulary, it might be possible to implement. The only thing I'm reserved about right now is vocabularies, as I don't find the statistical data from them to be a good guide on what substitutions are valuable.

If the character is set to perform a pure emote, it's best to set this as a symbolic null; the game will ignore the value anyway.

Get Esoteric ♥ Esoterica

Comments

Log in with itch.io to leave a comment.

hello any change of getting your game on Mac ? I would love to try it but I don't own PC

Mono on Mac can't run it, though possibly Wine still could. I'm not interested in wasting my time on porting my engine to a shitty OS otherwise.

Deleted 43 days ago
(1 edit)

I just wanted to add something here for posterity. When Apple blocked 32 bit applications from running on macOS they essentially killed Carbon for Mono, which is needed for Mono to run applications that use WinForms components. Hence me being rather salty towards the OS. (Especially that the same update locked me out of a few apps that I enjoyed using on my iMac.)