It is currently Thu May 23, 2013 4:13 pm

All times are UTC - 8 hours




Post new topic Reply to topic  Page 1 of 3
 [ 40 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: SE Conversations
PostPosted: Thu Jan 03, 2008 8:27 am 
Offline
Programmer
Programmer
User avatar

Joined: Tue Nov 08, 2005 3:53 am
Posts: 2374
Location: St. Petersburg, Russia
Good news, Janis added script parser to Vavoom progs, so it should be easy now to make any custom scripts we need. Thus I am raising this topic.
Primary question is - what should the conversation look like in SE?


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Thu Jan 03, 2008 9:53 am 
Offline
2D Artist
2D Artist
User avatar

Joined: Thu Apr 25, 2002 12:01 am
Posts: 3105
Location: Mexico
I imagine something very similar to that conversation system in Strife, with a few additions (like the commands for NPCs system or some new inventory system for stores).

Also, some ACS execution stuff could come in handy :).

_________________
I'm the ruler of the Fire Power.....


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Sun Jan 06, 2008 1:16 pm 
Offline
Project Lead
Project Lead
User avatar

Joined: Thu Jun 28, 2001 12:01 am
Posts: 5031
Location: Zurich, Switzerland
I am still lobbying for my concept of town areas being designated in SE (since we have dozens to hundreds of 3D locations physically separated by the travel map anyway, shouldn't cause any kind of strange transitions). In town areas, controls are different except for movement - you have no in-screen weapon, you can't attack anybody, but on the other hand you can trade and interact with NPCs (buy, sell, talk). In dungeon and wilderness areas (basically the same, depending whether they are indoors or outdoors maps), you won't find NPCs but you can fight. Separating stuff this way should IMO make building the game much easier. With this concept, you can spend as much time in the trade or conversation popup window as you want, since there won't be a monster coming at you from behind. They did it in Strife this way much of the time, and in the few cases where they didn't it actually didn't work out too well. But of course this is up to discussion so fire away.


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Mon Jan 07, 2008 12:56 am 
Offline
Programmer
Programmer
User avatar

Joined: Tue Nov 08, 2005 3:53 am
Posts: 2374
Location: St. Petersburg, Russia
I have nothing against removing attack abilities in town; as for outdoors, we could make so that NPCs won't talk if there are monsters nearby.
But actually I was asking about different thing; what I had in mind is how the dialog structure should look like.

_________________
- Our necromancers' team have already prepared everything for the Rebirth Ritual. Soon Holy Lenin will be back with us!
- Perfect. I shall report to Magistre Stalin immediately.


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Mon Jan 07, 2008 5:18 am 
Offline
Project Lead
Project Lead
User avatar

Joined: Thu Jun 28, 2001 12:01 am
Posts: 5031
Location: Zurich, Switzerland
As Firebrand proposed, similar to Strife should be good, a couple of lines of text overlaid over a background picture of the speaker.


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Mon Jan 07, 2008 11:09 am 
Offline
2D Artist
2D Artist
User avatar

Joined: Thu Apr 25, 2002 12:01 am
Posts: 3105
Location: Mexico
As for a script lump format, IIRC there were some test conversations on KDev that were from the SE alphs build, I think a format similar to that one would be best for them, it might change in the future to allow additions to the system, and it's easy to do IMO, which is important so everyone can contribute dialogs for any part of the game by just making text files :).

_________________
I'm the ruler of the Fire Power.....


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Tue Jan 08, 2008 6:28 am 
Offline
Programmer
Programmer
User avatar

Joined: Tue Nov 08, 2005 3:53 am
Posts: 2374
Location: St. Petersburg, Russia
There are so much stuff on kdev, I am bored searching for that "dialog lump"; what if we reorganise kdev contents at once?

Anyway, here's my proposal on how dialog script could look like:

Code:
#person
name=$<localized string>
pic=
<other data here>

#hello
switch=<switch number local>[, <switch number global>]
text=$<localized string>

#bye
switch=<switch number>[, <switch number global>]
text=$<localized string>

#replica
switch=<switch number>[, <switch number global>]
text=$<localized string>
answerid=<answer id (number)>

#answer <id>
switch=<switch number>[, <switch number global>]
text=$<localized string>
trigger local <switch number>[, <switch number>, ...]
trigger global <switch number>[, <switch number>, ...]
script <map number> <script number>
[some other actions]


Example:

Code:
#person
"Legion Officer"
PIC101

#hello
0
"Hail, warrior"

#bye
0
"Fare thee well"

#replica
0
"Hi, how are you?"
1

#replica
0
"Do you have any quests for me?"
2

#answer 1
0
"I am fine, thank you"

#answer 2
!1
"Not this time, come again later"

#answer 2
1
"Yes, I've got one task for you"



So, we have 4 types of entries here: 'hellos',"byes", "replicas" and "answers".
Hellos are person's phrases said when conversation commences, byes - when it ends.
Replicas are available player sentences. Answers are NPC's replicas.
Availability is controlled by SWITCHES (kind of boolean variables). They could be global or local (that affect only this current NPC) for convenience. In the sample above player's replica "Do you have any quests..." have 2 possible answers, first available if switch 1 is OFF ( '!1' means "NOT 1"), second available when switch 1 is ON. Assuming switch 1 is OFF initially, switch 1 could be set ON, so answer changes from #1 to #2.
Every entry can have additional commands activated when the phrase "comes into play"; commands could be switch toggling, script running etc whatever, like displaying shop buy/sell menu like:

Code:
#hello
display shop


Shop contents could be defined in same script, in #person entry, as well as initial amount of gold as similar things.

_________________
- Our necromancers' team have already prepared everything for the Rebirth Ritual. Soon Holy Lenin will be back with us!
- Perfect. I shall report to Magistre Stalin immediately.


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Tue Jan 08, 2008 2:12 pm 
Offline
Project Lead
Project Lead
User avatar

Joined: Thu Jun 28, 2001 12:01 am
Posts: 5031
Location: Zurich, Switzerland
For the scripting language created by Janis just open up the KMOD 3 beta, it's either in a text file on the file level or compiled into the wadfile. His take was different, I can't easily say which is better to use. The concept Janis created allows very long threads with many forks (it can get quite complicated though), OTOH that system used a widescreen "camera shot" of the NPC and the player talking and had only 2 lines available for text at a time, while if we go with a Strife-like system, we can put considerably more text on the screen at a time.


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Wed Jan 09, 2008 2:02 am 
Offline
Programmer
Programmer
User avatar

Joined: Tue Nov 08, 2005 3:53 am
Posts: 2374
Location: St. Petersburg, Russia
Still cannot find it. I downloaded KMOD 3 Beta from SVN but there's nothing like dialog script in WAD.


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Wed Jan 09, 2008 3:19 am 
Offline
Lead Programmer
Lead Programmer
User avatar

Joined: Sat Oct 06, 2001 12:01 am
Posts: 564
Location: Limassol, Cyprus
Found it in koraxdev_old. Here's the example conversation script:

Code:
//   Note: Number enclosing conversations and numbers in speeches are
// TIDs assigned in level editor, -1 is for player.

1   //   Assign to the first mage
{
   OldMage1   //   Just a name, not used
   {
      speech   //   Begins a speech
      {
         //   <speaker> <speaking_to> <text>
         1   -1   "How can I help you?"
      }
      choice   //   begins a choice
      {
         Clear   //   This flag says that screen (previous speech) must be cleared
         {
            //   <text> <label>
            "Who are you?"         WhoAreYou
         }
         {
            "What are you doing?"   Walking
         }
      }
   WhoAreYou:   //   This is a label
      speech
      {
         -1   1   "Who are you?"
      }
      speech
      {
         1   -1   "I'm an old mage."
      }
      jump   End      //   Jump to the specified label
   Walking:
      speech
      {
         -1   1   "What are you doing?"
      }
      speech
      {
         1   -1   "Just walking around."
      }
   End:
      end      //   Ends conversation
   }
}

2
{
   OldMage2
   {
      speech
      {
         2   -1   "I don't want to talk with you."
      }
      speech
      {
         -1   2   "Why's that?"
      }
      speech
      {
         2   -1   "Because I don't like you!"
      }
      speech
      {
         -1   2   "OK, I see."
      }
      end
   }
}

_________________
You may think you can fly, but you better not try...


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Wed Jan 09, 2008 4:55 am 
Offline
Programmer
Programmer
User avatar

Joined: Tue Nov 08, 2005 3:53 am
Posts: 2374
Location: St. Petersburg, Russia
Ok I found this in http://downloads.orcishweb.com/koraxdev ... se-bin.zip
They have such features like consequent replicas, automatic replicas from player, random replica selection and NPCs talking to NPCs.


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Thu Jan 10, 2008 1:44 am 
Offline
Programmer
Programmer
User avatar

Joined: Tue Nov 08, 2005 3:53 am
Posts: 2374
Location: St. Petersburg, Russia
Heh, after an attempt to merge these two script styles I've got following syntax idea.

Code:
person <Person Literal ID (used in dialog&quest scripts)> <Person Numeric ID (used in map scripts)>
{
   name
   {
   }
   
   pic
   {
   }
   
   // local variable
   var <variable name>
   {
      [ boolean | integer ]
      <initial value>
   }
   
   < hello | bye | choice [<choice name>] <choice text> | speech <speech name> > <speech flags>
   [ if ( <availability conditions> ) ]
   {
      if ( <some conditions> )
      
      say <who> <to whom> <text> [<voice file>]
      
      <some other actions here>
   }
}


Simple examples:

Code:
person GenericTownfolkMale 11011
{
   name "Billy Boy"
   
   hello
   {
      // simple block can be written inline
      say myself Player "Hi there."
   }
   
   bye
   {
      random
      {
         say myself Player "Bye."
         say myself Player "Cya."
         say myself Player "Have a good day."
      }
   }
}

Code:
person GenericTownfolkMale2 11012
{   
   var bool NameIsKnown 0

   name if ( NameIsKnown ) "John Smith"
   name if ( !NameIsKnown ) "Commoner"
   
   hello
   {
      if ( Player.Class is Fighter )
         say myself Player "Hail, Fighter"
      if ( Player.Class is Mage )
         say myself Player "Good day, Wizard"
      if ( Player.Class is Cleric )
         say myself Player "God bless you, Priest"
   }
   
   choice "Ask his name"
   if (!NameIsKnown)
   {
      say Player myself "What is your name?"
      say myself Player "My name is John Smith."
      set NameIsKnown 1
   }
}


Example 3 (Switches, Advanced Commands)

Code:
person LegionOfficer 666
{
   var int QuestStatus 0

   name "LegionOfficer"
   
   hello
   {
      if ( Player.Class is Fighter )
         say myself Player "Hail to thee!"
      else
      {
         say myself Player "I can't say anything to you"
         end   // 'end' command terminates conversation without "bye"
      }
   }
   
   choice "Ask for orders"
   {
      say Player myself "Can you give me some orders?"
      
      if ( QuestStatus is 0 )
      {
         say myself Player "Ok, I have a quest for you. Bring me 1 Disc of Repulsion. Are you ready to go for this task?"
         yesno QuestStatus 1 0   // quick command for displaying 2 player choices, which set corresponding values to variable
         if ( QuestStatus is 0 )
            say myself Player "I'll wait till time you are ready for this."
         else
            say myself Player "Great, return to me when you get one."
      }
      if ( QuestStatus is 1 )
      {
         say myself Player "You have already got an order."
      }
      if ( QuestStatus is 2 )
      {
         say myself Player "No more orders for now."
      }
   }
   
   choice "Repeat quest details"
   if (QuestStatus is 1)
   {
      say Player myself "Can you repeat your order?"
      say myself Player "Bring me 1 Disc of Repulsion."
   }
   
   choice "Give him Disc of Repulsion"
   if ( (QuestStatus is 1) and (Player.HasInventory DiscOfRepulsion 1) )
   {
      say Player myself "Here's Disc of Repulsion, sir."
      say myself Player "Good work, soldier!"
      set QuestStatus 2
      Player.RemoveInventory DiscOfRepulsion 1
      Player.GrantExperience 1000
   }
}


Example 4 (Forks)

Code:
person NPC 111
{
   hello
   {
      say myself Player "Do you like to hear my story?"
      yesno jump Story none
      end
   }
   
   speech Story
   {
      say myself Player "Bla bla bla."
      say myself Player "What do you want me to tell you also?"
      // Construct immediate selection
      choices
      {
         TellAboutHimself
         TellAboutFamily
         TellAboutCity
      }
   }
   
   // Hidden choices can be displayed only using "choices" command
   choice TellAboutHimself "Ask about himself" Hidden
   {
      ...
   }
   choice TellAboutFamily "Ask about his family" Hidden
   {
      ...
   }
   choice TellAboutCity "Ask about the city" Hidden
   {
      ...
   }
}


Heh, what a mess :)

_________________
- Our necromancers' team have already prepared everything for the Rebirth Ritual. Soon Holy Lenin will be back with us!
- Perfect. I shall report to Magistre Stalin immediately.


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Fri Jan 18, 2008 2:19 am 
Offline
Programmer
Programmer
User avatar

Joined: Tue Nov 08, 2005 3:53 am
Posts: 2374
Location: St. Petersburg, Russia
Hmm, I got so obsessed by this idea that worked all night :) :( so today I am really drowsy but I've got a working extended script parser for conversations and basic syntax sctructures are parsed correctly already, so that it is possible to call "hello" and "bye" blocks. Now I need to put this into game as normal dialog, because I tested that in main menu.


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Fri Jan 18, 2008 6:20 am 
Offline
2D Artist
2D Artist
User avatar

Joined: Thu Apr 25, 2002 12:01 am
Posts: 3105
Location: Mexico
Sounds like good progress :), I would like to see the dialogs working in game.

_________________
I'm the ruler of the Fire Power.....


Top
 Profile  
 
 Post subject: Re: SE Conversations
PostPosted: Fri Jan 18, 2008 6:26 am 
Offline
Programmer
Programmer
User avatar

Joined: Tue Nov 08, 2005 3:53 am
Posts: 2374
Location: St. Petersburg, Russia
I think I will use RambOrcs photo as a background pic :lol:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 3
 [ 40 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group pozycjonowanie
Chronicles phpBB2 theme by Jakob Persson. Stone textures by Patty Herford.
With special thanks to RuneVillage