Have you ever wanted to add dialogs or conversation to your games, but you don’t know how?
Or you know how to do it, but the boredom of entering lines and lines of text manually in to a spreadsheet or text file is so bad that you never finished?
Well hopefully this project will be of some use to you.
It is going to be made up of two parts:
An editor.
An in game dialog manager.
All you’ll have to do is write your dialogs and save them as a pickled text file, add a script to the characters in your game who are going to be doing the speaking and enjoy adding text based, multiple choice dialog style conversation to your games.
The main editor is pretty much finished, but the code is a mess and it’s completely untested. I’m going to need feedback and testing if I’m going to get it to work.
Here’s a short video showing how it works:
The basic idea is that when you meet a character you can engage in conversation with them. Either you or they can make the first contact. Right now the SPEAKER (AI character) is the default first speaker, but their first dialog can be skipped with a GO_TO action, meaning your first dialog starts the conversation. The speaker needs to be the first contact because they will be the in point of the dialog tree. A property on the NPC will match a dialog ID in the tree and conversation can start from there.
Actions will be handled by an in game function, they can do things like check for items in the player’s inventory, or give the player money or change their appearance or give them hidden tokens which close off future dialog options.
Several actions will be included, so far I have plans for:
PLAYACTION (do an animation, either the speaker or the player)
PLAYSOUND (makes radioactive kittens rain from the sky)
GO_TO (kind of loop back or forward to another point in the conversation)
CHK_INV
CHK_QUEST (check the player inventory or quests list to see if that dialog is possible)
CHANGE_STATE (make the player or speaker do something, like attack or die or something)
CUT_SCENE
CHK_REP (check personal reputation)
SET_REP
GIVE_OB_INV
TAKE_OB_INV (give or take objects from the player’s inventory)
TELEPORT (transport the player to another game location)
Any other ideas for actions?
Any other ideas or suggestions?
I’m already thinking of illustrating the GO_TO action on the display tree with lines to the relevant dialog.
Should the dialog boxes be bigger and show more text, or is graph comprehension more important in the overview scene? If you zoom out you can’t read the text, but if you zoom in you can’t see all of the dialog tree.
Maybe mouse over a dialog box to pop up a more detailed summary of that box?