Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   NPC Dialogue System (https://forums.graalonline.com/forums/showthread.php?t=134257987)

Inverness 02-12-2010 03:29 AM

NPC Dialogue System
 
3 Attachment(s)
This is a system that I've had in various stages of development for quite some time. More recently I redid it to make it more compact and fix it up for release.

This system is a replication of the dialogue system found in Morrowind. The purpose is to provide richer interaction with NPC's like what was possible in Morrowind.

I'm on a time limit so I can't provide as much detail as I'd like.

Dialogue Creation:
Content is divided into topic lists and topic. Topic lists represent the topics that NPCs are able to talk to you about. Topic list files are merely a list of topics, one topic ID per line. The topic files are INI files that define a range of responses to the topics and the conditions necessary to invoke each one.

Responses can make other topics available, execute simple scripts, and provide a series of choices to better direct the user's options.

Currently, the system reads topic and topic list files from the same directory. Topic list files are named tlist.ID.txt where ID is the string used to identify the topic list. Topic files are named similarly: topic.ID.ini.

Example files and a list of variables are included in the "example datafiles" folder in the zip.

Installation:
The person installing the scripts should check that the variables representing weapon names and folder paths are accurate for their environment. And also check that join() is being called with the correct class name. The required classes are also included in the zip.

Updating:
The loaddialogue() function is called in the system to scan the folder for dialogue files, this function needs to be called whenever changes are made on disk. I recommend creating an RC command to call this function.

Edit: Attached a screenshot of the default GUI.

12171217 02-12-2010 06:35 AM

I like dialogue systems a lot but I like flashy animations to go along with them too, I haven't tried it yet but from the screenshots it doesn't look like it takes the cake in that category.

Nonetheless it looks perfectly extensible and definitely a complete solution for any server. Nicely done :3

Inverness 02-12-2010 06:39 AM

Quote:

Originally Posted by 12171217 (Post 1555781)
I like dialogue systems a lot but I like flashy animations to go along with them too, I haven't tried it yet but from the screenshots it doesn't look like it takes the cake in that category.

Nonetheless it looks perfectly extensible and definitely a complete solution for any server. Nicely done :3

It was designed to separate the GUI from the system. So eye-searing flashy animations are not my responsibility :p.

coreys 02-12-2010 08:42 AM

Excellent work as always, Inverness, and a good choice of inspiration ;)

Inverness 02-12-2010 09:29 PM

Quote:

Originally Posted by coreys (Post 1555787)
Excellent work as always, Inverness, and a good choice of inspiration ;)

Thanks.

And if anyone actually does decide to use it, don't hesitate to IM me to question me about the details and stuff. I don't feel like I documented it very well. :\

DarkReaper0 02-27-2010 01:51 AM

This looks really cool, say2 seems to be losing it's luster lately...

Clockwork 02-28-2010 01:31 AM

We had something almost exactly like this in symphonia XD

nice work.

Chompy 02-28-2010 01:36 AM

Quote:

Originally Posted by Clockwork (Post 1559500)
We had something almost exactly like this in symphonia XD

nice work.

Not really (:
The mechanics are very different, if compared ;D


All times are GMT +2. The time now is 08:59 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.