SQLite/Scaleform RPG Dialogue System
I was frustrated at the lack of a full, flexible, dialogue system in UDK that was capable of handing dialogue trees like those present in classic RPGs. I wanted something that would come close to the system in classic RPGs like PS:T, incorporating skill/item checks and simple scripts - and I definitely didn't want to mess around with tangles of Kismet nodes and hardcoded strings whenever I wanted to write dialogue.
So here's a very simple demo of what I have so far (watch in HD to see the text!):
- Reuse dialogue on multiple characters (e.g. generic guard dialogue) without copy-pasting any code.
- Don't have to start up UDK to edit dialogue.
- No need to search through levels to find where you defined a Kismet sequence for a piece of dialogue. Just find it in the database and edit.
- Encapsulates features like skill/item checking and scripting, including linking to Kismet.
- Custom DLL combining BlackHornet's SQLite code and code for setting up and accessing variables (e.g. player skills, global variables), and evaluating boolean conditions (e.g. ASkill > 5 && 1 == 1) at runtime.
- SQLite databases linking lines to character names that can be defined in UDK.
- Custom Kismet event that can be raised from a database script for more complex interactions.
- Simple scripts stubbed out (e.g. raising player stats, giving items) that can be defined per game.
- Conditional branching - e.g. define that node A links to node B if the player has a high enough skill, or node C if they don't.
- Changeable dialogue start nodes - want your character to say "Hello, my name is X" the first time you talk to them, but "Hi again" the next time? No problem.
- Integrate with any Scaleform UI.
- Greater encapsulation and more code moved into DLL for faster operation
- Define preset custom camera angles and be able to switch cameras in script
- Stub functions to be used with the mood/character columns (for use in systems like visual novels - define what character image(s) to show)
- Custom Kismet actions to start dialogue, redefine/reset dialogue start nodes, etc
- Character 'memories' - define a list of variables and values per character (or globally), and be able to use them in conditional checks.
- Java program to more easily view (in tree format) and edit the dialogue.
The code needs a LOT of cleanup and improvement before it can potentially be released, and I don't know if there's even any interest (maybe everyone else would prefer to stick with Kismet - I just hate using it haha), but let me know what you think!
Looks unbelievably amazing! Would love to get involved.
Well, I just saw this topic. Good work man.
Funny thing is I was working on a dialogue system with subtitle support at the same time, which was finished about 10 days ago. I actually couldn't think of any feature that can't be done using US and archetypes and so I don't know why you chose a database for them and a win application for edits, but if it's working for you good enough, it's cool. Congratulations anyway.
The most recent feature that I added a few days back was multilingual subtitles. After some though we decided to add this because it is essential for our current game due to the importance of the story in gameplay and that we wanted it to be understandable by non-English speaking players as well. Maybe you want to add that too (depends on the project of course).
Anyway it's look like you have a great system here, and I also like some of the ideas for future updates. I'd start with the camera as it's quite useful and also very easy to add but obviously that's for you to decide.
Keep up the good work and good luck.
Last edited by farshad12; 05-28-2012 at 12:50 PM.
Thanks for your reply. Actually I don't like kismet a bit for this kind of systems. I need 3 other systems beside this for my current project and they all will be done by US. As for recompiling, there is no need at all, because I use archetypes for all editing, in this case not only dialogues and subtitles, but also all the settings, style customizations, debug options, etc. are accessible via 3 different archetypes, and so they all will be done in the content browser.
I don't think you need voice for your dialogues, but it was a must for our project and I believe it can't be done without hassle in an external program since you don't have access to content of a UPK package there. But as I said you probably don't need it, so that is cool.
However it is nice that you can give the DB to someone and he start to edit the dialogues without even have the UDK installed. After all there is a dozen way to program any single thing, and every programmer prefers one of these, so cheers. I hope this system can be a good use to you and saves a lot of time and effort in future, as it is usually the main goal for these systems.
Happy developing and good luck.
I really like the fact that you can use DB to store certain data. Like farshad12 said "it is nice that you can give the DB to someone and he start to edit the dialogues without even have the UDK installed".
@PrismMirrorLens i have send you a PM a few days back, did you find the time to read it?