Dialogue Question...

Grab your favourite IDE and tinker with the innards of game engines

Dialogue Question...

Postby GodAndAirborne on Mon Nov 28, 2011 11:24 pm

Gentlemen, let me pose this question to all of you: is it possible to implement dialogue choices into Half Life 2? For example, in Bioware's Dragon Age/Mass Effect games, when the player enters into a conversation, they are provided with three dialogue options, which can often shape the outcome of the game itself. Does anyone know how this can be done, has it been done in Half Life 2, or does anyone have a link they can provide?

Thanks.

Joshua.
User avatar
GodAndAirborne
Member
Member
 
Joined: Mon Nov 28, 2011 11:17 pm

Re: Dialogue Question...

Postby Armageddon on Mon Nov 28, 2011 11:59 pm

Well you could play the Mod Water, it has a very good dialogue system. In the Podcast 17 interview Au-Heppa said something about using the weapon select keys (1,2,3,ect...) code to select a dialogue choice. Maybe play the mod and looking editing the weapon select.
User avatar
Armageddon
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sun Dec 14, 2008 5:53 am

Re: Dialogue Question...

Postby GodAndAirborne on Tue Nov 29, 2011 2:52 am

Good sir, my thanks. I will download "Water" and check out how they worked upon dialogue selection. That, and I'll e-mail the developers for further advice. Thanks again.
User avatar
GodAndAirborne
Member
Member
 
Joined: Mon Nov 28, 2011 11:17 pm

Re: Dialogue Question...

Postby Gambini on Tue Nov 29, 2011 3:31 am

Whatever you do, will be a sort of hack. Because Freeman doesn´t talk. :P
User avatar
Gambini
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Mon Oct 20, 2008 1:52 am
Location: Buenos Aires, Argentina.

Re: Dialogue Question...

Postby Gary on Tue Nov 29, 2011 4:30 am

Well, I doubt he will record player voice anyways. So we can assume the dialog are messages Gorden is inserting into the other person's brain, like how the squad commands work.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Dialogue Question...

Postby ChromeAngel on Tue Nov 29, 2011 8:25 am

A dialogue system doesn't sound too hard to code. A map entity to trigger the start of a dialog, A keyvalues file to hold the dialog options and responses (you probably don't want to be hard coding this stuff), a VGUI control for the player to pick the dialog options from, some code to handle the result (possibly in the dialog starting entity).

I'd produce side-effects of the dialog by having a set of outputs on the dialog entity and having each dialog option specify which output it corresponds to.

Sample keylvalus dialog script:
Code: Select all
dialog
{
     start
   {
      hurt
      {
         say "Help i'm bleeding!"
         reply "have a medkit freeman"
         output 1  //triggers output #1 in the npc_dialog, which is scripted to give the player a medkit
         next ""
      }
      dry
      {
         say "I'm out of ammo!"
         reply "have some ammo.  don't foregt to reload"
         output 2  //triggers output #2 in the npc_dialog, which is scripted to give the player ammo
         next ""
      }
      intel
      {
         say "can you tell me what's going on?"
         reply "sure"
         output 0 //triggers output #0 in the npc_dialog, which isn't scripted to do anything
         next "intel2"   
      }
      sorry
      {
         say "i've got to go"
         reply "see ya"
         output 0
         next ""
      }
   }
   intel2
   {
      rebel
      {
         say "where are the other rebels?"
         reply "up the road, hiding from snipers"
         output 0
         next ""   
      }
      combine
      {
         say "where are the combine?"
         reply "accross the street, sniping the other rebels"
         output 0
         next ""   
      }
      sorry
      {
         say "i've got to go"
         reply "see ya"
         output 0
         next ""
      }
   }
}


something like that...

ChromeAngel really wants to try this now
User avatar
ChromeAngel
Member
Member
 
Joined: Fri Oct 21, 2011 7:28 am
Location: England

Re: Dialogue Question...

Postby zombie@computer on Tue Nov 29, 2011 1:12 pm

you'll probably want some fancy way of displaying dialog options, so you will need a custom vgui panel. Panels can override keyboard (and mouse) input, so it would be easy to intercept and use the inputs required to select a dialog. It's very easy to implement. Start with your panel, script some usermessages/servercmds to transfer inputs to and from the server and create a custom dialogue entity which initiates and continues the dialogue. Just make sure you also implement a system to continue the dialog if a user save-reloads during a dialogue.
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: Dialogue Question...

Postby GodAndAirborne on Tue Nov 29, 2011 5:53 pm

Gentlemen, my many thanks for your replies. Please allow me to specify what I'm hoping to accomplish: like zombie@computer wrote, I do want a specialized panel to open during cutscenes that will allow for three dialogue options to be selected. When one of the options is selected, it would signal a trigger that activates a .wav file for both player and NPC. Maybe an example will suffice. Forgive how crude this is:

A cutscene plays out between the main character (player) and an NPC.

NPC: So, John Doe, how's the weather out there?

Dialogue Panel Appears: 1). It's fine. 2). It sucks. 3). This is what you call smalltalk?
(You, the player, select option#3, which in turn triggers a .wav file of option#3 and the NPC's response that corresponds with option#3.)

Player: This is what you call smalltalk?

NPC: Well, excuse me!

With the use of triggers and code, is this type of interaction possible?
Thanks again, guys!
User avatar
GodAndAirborne
Member
Member
 
Joined: Mon Nov 28, 2011 11:17 pm

Re: Dialogue Question...

Postby Gary on Tue Nov 29, 2011 6:03 pm

Hell... You could do this with no coding... But would require a screenoverlay texture for every option. You could do this kinda thing with a game_ui but it would be kinda hacky.

The right way would be to use a vgui panel and a custom logic entity. The entity wouldn't be very complicated.


Hmm... I kinda want to make this now...
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Dialogue Question...

Postby GodAndAirborne on Tue Nov 29, 2011 7:32 pm

Gary, therein lies the problem: I don't know how to implement this. I can barely scratch rudimentary triggers and coding, but I'm still interesting in learning. To be honest with all of you, I'm working on a MOD and have put aside a budget to pay for a mapper/skinner/programmer. If anyone is interested in working on what I've been talking about here, please let me know; it is a paying job.
User avatar
GodAndAirborne
Member
Member
 
Joined: Mon Nov 28, 2011 11:17 pm

Re: Dialogue Question...

Postby Gary on Tue Nov 29, 2011 8:01 pm

I see. I find it interesting how in this day and age that people are willing to pay for these services.

I might try to make a dialog system, but can't really do anything until Thursday.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Dialogue Question...

Postby Alters1 on Tue Nov 29, 2011 8:28 pm

If Gary ends up passing this up and depending on more details, I'd do it.
User avatar
Alters1
Member
Member
 
Joined: Sat Apr 04, 2009 2:35 am

Re: Dialogue Question...

Postby GodAndAirborne on Tue Nov 29, 2011 8:50 pm

Gary, if I may, allow me to shed a bit of light on why I'm willing to pay. It's due to one simple, yet undeniable reason:

Talent in the modding community is available, but because it's limited, there is much needed demand for it. Most of your Half Life 2 forums have people screaming for help in one of the various fields (mapping, skinning, coding, etc...), but the bulk of them go unanswered. Even with a team, you see dozens of mods fold up and call it a day because life (..or other games), as it tends to do, gets in the way. Yet, when you pay a man, there is often an unspoken understanding that goes with it. 1). "Your service/skill is valuable to me. I have a need and you can fill it, therefore you need to be compensated." 2). "You're being paid, therefore there is an obligation on your part to deliver. Should you fail to live up to your end, and not because of an emergency or a priority that couldn't wait, then word is spread that you're not only undependable, but also a thief."

And Gary, I'm not being sarcastic with my post; just explaining my reasoning to pay someone for their talent. What maybe easy for you, may come difficult to another. Besides, I want to see my story see the light of day. I'm not that great a promoter that I could "sell" it to any Tom, Dick, and Harry, but I know a great story and if it means paying others to help launch it, then so be it. Even indie film-makers have to pay a crew to get their movie made.

Thanks for your time.
User avatar
GodAndAirborne
Member
Member
 
Joined: Mon Nov 28, 2011 11:17 pm

Re: Dialogue Question...

Postby GodAndAirborne on Tue Nov 29, 2011 8:54 pm

Alters1, thank you for your offer. If I can't find anyone willing to take this job, then I'll get back with you here. And should I'm unable to find someone, well...just show me what you can do, then we'll talk payment, and hopefully we'll make a great mod in the process.

Thanks!

Joshua.
User avatar
GodAndAirborne
Member
Member
 
Joined: Mon Nov 28, 2011 11:17 pm

Re: Dialogue Question...

Postby Gary on Tue Nov 29, 2011 9:16 pm

I was not criticizing or questioning your willingness to pay for such services. I was just stating how I find it interesting.

You have completely valid points there. But I couldn't legally accept such payments unless you went through legit channels. Though, I am curious what the legal difference it is to receive donations.


Anyways, enough about money, if I do make a dialog system or what ever else you may want, I will gladly give it to you at no charge. At the moment(maybe at some point in the future I'll do contract work), I mod for the pure enjoyment and learning experience.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL
Next

Return to Programming

Who is online

Users browsing this forum: No registered users