Results 1 to 6 of 6

Thread: Dialog System?

  1. #1

    Default Dialog System?

    I was wondering if there is a system in Novashell for creating, storing and accessing dialogs, specifically rpg-style back and forth chatter and response selections. I've checked out the selection dialog special entity and would like to learn more but I can't find the source code and Seth hasn't gotten to the documentation yet!

    ...so I went ahead and set up my own system for dialog. I have the dialog for each character saved in a nested table with dialog branches that hold leafs for each piece of dialog. The player must meet requirements for each branch as well as each leaf. It's easy for my getDlg function to determine which leaf is supposed to come up each time the player interacts with a character. I'll probably set up a simple html/javascript interface to edit dialogs and generate the tables because I'm a web developer and could do it quickly that way.

    If there is nothing like this in place or planned for Novashell I'm willing to share the code. Once I've tested it out and make sure it does everything I need I'll post it up here for suggestions.

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    The dialog special entity is pretty bare-bones, writing your own system for a dialog/GUI intensive game is probably a good idea.

    If there is nothing like this in place or planned for Novashell I'm willing to share the code.
    Cool
    Seth A. Robinson
    Robinson Technologies

  3. #3

    Default

    I'm at a point where I need to modify the code for the ChoiceDialog special entity. Where can I find this?

  4. #4
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Default

    It's EntChoiceDialog.x and EntChoiceDialog.cpp.

    Hint for next time: Scan the source code for the word ChoiceDialog.

    If you don't have a way to do that, figure one out, it's invaluable! And will show you the other places that need to be modified to add a NEW custom class that can be initted by script if that's the route you end up going.

    (If you're using MSVC, it's Ctrl-Shift-F by default I believe, or alternatively, Edit->Find and replace->Find in files.

    If you aren't adding functionality to EntChoiceDialog but rather just want a way to control the existing system's dialog tree flow, it might make more sense to write something that merely "uses" EntChoiceDialog?

    I guess it depends on how much you need to change, if a lot, might make sense to rename EntChoiceDialog EntChoiceRPGDialog and gut it from there as a template to start from. (So the original EntChoiceDialog functionality could still be used, and you don't have to be careful not to break it with the changes)
    Last edited by Seth; 11-03-2008 at 05:30 AM.
    Seth A. Robinson
    Robinson Technologies

  5. #5

    Default

    Thanks. Pretty much all I need is to have the existing choice dialog take a different anonymous function for each choice that is selected, instead of using one function with a string that is passed as an argument from each choice. I'll probably do a copy and paste and create a new special entity with it. I was expecting to find most of the choice dialog code as Lua script, I guess that C++ bible that I only got 100 pages through a year ago is going to come in handy

  6. #6

    Default I'm in...

    expect to get a few questions from me. Luckily I see I can call LogMsg from the source, so that's going to be a big help. I created a back up of the original EntChoiceDialog.cpp and now I'm working on modifying it to run an anonymous Lua function for whatever choice is selected. Shouldn't be too hard. From the looks of it I can probably get the current EntChoiceDialog class to work the old way with one function and my new way with many functions without any modification to existing games that use the class.

Similar Threads

  1. Build System ?
    By zyklo in forum Official ClanLib SDK Forums
    Replies: 10
    Last Post: 09-22-2008, 02:00 PM
  2. New to Novashell: Is there a Battle System?
    By Joe Rossi in forum Novashell Game Creation System
    Replies: 2
    Last Post: 06-14-2007, 07:41 AM
  3. Browse system missing
    By Razor in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 01-24-2007, 09:32 AM
  4. bug? hitting enter on property edit dialog...
    By whisperstorm in forum Novashell Game Creation System
    Replies: 1
    Last Post: 12-19-2006, 11:32 PM
  5. Payment system
    By in forum Funeral Quest
    Replies: 0
    Last Post: 12-15-2002, 07:46 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •