Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-12-2010, 03:29 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
NPC Dialogue System

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.
Attached Thumbnails
Click image for larger version

Name:	dialogue01.jpg
Views:	935
Size:	169.4 KB
ID:	50399  
Attached Files
File Type: zip Dialogue System.zip (12.2 KB, 513 views)
__________________

Last edited by Inverness; 02-12-2010 at 04:37 AM..
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:25 PM.


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