FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: Dialogue Editor  (Read 5610 times)

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Dialogue Editor
« on: March 04, 2008, 07:07:00 pm »

Here's the current state of my work on a dialogue editor :
http://mirror1.cvsdude.com/trac/fife/engine/ticket/277

A screenshot is available here :
http://membres.lycos.fr/blackice9/dialogue_editor.JPG

The editor can only visualize a dialogue for the moment, but I hope to make it capable of creating an entire dialogue from scratch, or modify one, for the end of this week.
Logged

Sadr

  • Newbie
  • Posts: 34
    • View Profile
    • Radakan
Re: Dialogue Editor
« Reply #1 on: March 07, 2008, 07:57:36 am »

So, this is mainly for setting up a dialogue, correct? It wouldn't be useful for such things as, say, storing events that will have an effect on the next conversation you engage in with the same character you talked to earlier? There are some 'lite' examples of this in the conversation created by me so far in the techdemo storyline at the wiki.
Logged

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Dialogue Editor
« Reply #2 on: March 07, 2008, 08:54:51 pm »

First, let me set some general explanation about how the system works :

A dialogue is composed of Nodes and Lines : a Node is an ensemble composed by :
-A Message : this Line contain the text that the speaker say to your player character
In the dialogue editor, nodes Messages are shown by the orange lines icon.
-The Answers : these Lines are the answers that the player character can say to the speaker.
In the dialogue editor, nodes Answers are shown by the green lines icon. Each answer targets one or more nodes : it means that when the player pick an answer, the dialogue will continue with one of its target nodes. If there is only one node, the process is very simple. If there are more than one node, you must set a targeting script that will redirect to the desired node depending of the result of a check (for example, an "intimidating" or "persuasion" ability check that would lead to either a success : the speaker stay or a failure : the speaker gets angry)

In addition to this scripted check determining Answer -> Node redirection, there are three other "script elements" you can set :
-Answer Condition : Set such a condition on an answer and a check script will be fired before the answer is shown, returning 1 if the answer must be displayed and 0 if the answer must not be displayed. You just decide when you want it to return 1, or to return 0.
-Answer Consequence : Set such a consequence on an answer and the consequence script will be fired when the player pick this Answer : you decide what you want to put in this consequence script.
-Node Consequence : The same as the one before, with the slight difference that the script is fired when the player get to the given Node

These scripts have access to 3 "objects" that should allow a dialogue writer to do anything :
-The player character object
-The speaker character object
-The ruleset of the game

Now let's take your example : you want to store an information "that will have an effect on the next conversation you engage in with the same character you talked to earlier".

The first thing to do is to set a scripted consequence of the player picking an answer : you create an Answer "Tell me more about your sister ?" in the desired Node, and then click the "Add Consequence" button. An "Answer Consequence" script element will be created : when the player will pick this answer, its content will be executed. You then have to fill this script element so you get the desired behavior : In this example, by writing :
speaker.set("TalkedAboutHisSister", '1')

The result is that when the Answer will be picked by the player, the script will create a variable "TalkedAboutHisSister" on the speaker, set to 1.

Then, you can create a new Answer, and add a Condition to it. You fill the condition script with the following :
if speaker.get("TalkedAboutHisSister") == 1 :
      return 1

Then the line will show only if the variable "TalkedAboutHisSister" has been set to 1, i.e. that the player has picked the answer "Tell me more about your sister" once.
« Last Edit: March 07, 2008, 08:58:56 pm by November »
Logged

Sadr

  • Newbie
  • Posts: 34
    • View Profile
    • Radakan
Re: Dialogue Editor
« Reply #3 on: March 08, 2008, 05:02:21 am »

Hmmmm, alright, I think I should be able to use this as it stands now.

A couple more questions though:

  • Could this editor also handle group-discussions? I.e. the character talks with 5 people at once, arguing, and what he chooses to say will decide who in that 5-people group says something back, or with someone speaking right after. Maybe they could even speak in eachother's mouth.

  • Could these events (or, variables I guess) also take into account something that happened while the player was away? Like in Fallout, where you go away for a long time, and when you come back a whole lot of stuff has been going on and the characters might even have forgotten about your last conversation, except this one important think you talked about.
Logged

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Dialogue Editor
« Reply #4 on: March 08, 2008, 06:41:14 am »

Could this editor also handle group-discussions? I.e. the character talks with 5 people at once, arguing, and what he chooses to say will decide who in that 5-people group says something back, or with someone speaking right after. Maybe they could even speak in eachother's mouth.

This should be possible, I'll think on how to implement so the system stays the most flexible.

Could these events (or, variables I guess) also take into account something that happened while the player was away? Like in Fallout, where you go away for a long time, and when you come back a whole lot of stuff has been going on and the characters might even have forgotten about your last conversation, except this one important think you talked about.

This is possible, but the change, the "something that happened" you want to take into account, wouldn't be executed by the dialogue itself, but in the script of the event.
Example : you set a trigger that will fire fire an event "Time since last visit > 40 days" when the actual time exceed the time of the last visit by more than 40 days. In the script of this event, you do the changes you want to happen on the dialogues.

-First case, you want the dialogue to change totally : the event script would have to modify the default dialogue of the character so talking to him would load another dialogue.

-Second case, you want the dialogue to change just a little, let's say make access to a new dialogue branches possible, whereas it wasn't before. The scripted check just need to check some variables that would be set by the event, and if the event has already happened, these check leads to new dialogue branches.

A more precise example : Suppose one of the citizen of the city has disappeared. The timer triggered event, after 40 days, would set the following variable :
Code: [Select]
character.set("BillyHasDisappeared", '1')
Then, in the dialogue of the character, the Answer "What's up ?" would have a conditional targeting set. Suppose the node 3 is the node where the character say "This place is dead, man, nothing happened for the last two years at least !", and the node 4 is the node where the character "Billy, the farmer, has disappeared last night." The targeting script would contain the following :
Code: [Select]
if character.get("BillyHasDisappeared") == 1 :
      self.displayNode(4)
else :
      self.displayNode(3)

Hope this explanation is understanble.
Logged

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Dialogue Editor
« Reply #5 on: March 08, 2008, 07:02:16 am »

Quote
Nicely done! Do you think someone like me, with limited programming knowledge and interest, yet a strong sense of logic, will be able to use this program for creating dialogue? Will it even be made available for me? Cheesy

I'll also answer to this question here because the subject deviated from pychan :
Yes, someone like you should be able to use it. But you will definitely have to familiarize yourself with some python base syntax. Because dialogues are easy to do as static things, but if you want to make dialogue interactives and evolving with the course of the game plot, you'll have to handle basic scripting of events, how to use triggers, and how to use the ruleset/characters base functions.
 
Tutorials will probably be made in the future so this is made accessible to "someone like you" (:)), but only when these features are ready to use, which is not quite the case for now.
Logged

Sadr

  • Newbie
  • Posts: 34
    • View Profile
    • Radakan
Re: Dialogue Editor
« Reply #6 on: March 08, 2008, 01:17:51 pm »

Sounds good, thanks for the explanations November. I have some past experience with simple dialogue scripting, so I think I'd be capable of getting the idea even without a tutorial; not saying a well done tutorial wouldn't be beneficial though :)
Logged

Lamoot

  • Guest
Re: Dialogue Editor
« Reply #7 on: March 09, 2008, 03:20:59 pm »

Very nice work on the dialogue editor, November :)

Also, there are some dialogue ideas at the wiki, which might be useful.

http://wiki.fifengine.net/Game_creators'_wishlist#Dialogue_ideas_-_wip_notes
Logged

November

  • Developer
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Dialogue Editor
« Reply #8 on: March 09, 2008, 03:31:28 pm »

Thank you for the ideas on features to implement.
I'll work on that as soon as the basic editing features of the editor are ready-to-use
Logged