Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-28-2010, 12:38 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Dialogue system

Been messing with this for a few hours, I think it looks nice. The script's pretty sloppy, though. It was one of those keep-chucking-****-in-as-you-go-along deals. Hell, it works and it looks nice, though! :P

Sample dialogue file, as you can see "-player" doesn't have to be defined as a character and displays the player:
PHP Code:
CHARACTERS
"Bob" "head9.png"
"Cheese!" "head1000.png"
CHARACTERSEND

DIALOGUE
-playerAhhello Bob.
BobOh heyHow's it goin'?
-
playerJust dandy.
BobI'll be on my way then.
Bob: Boy, don'
t you wish word wrapping worked correctlyI meanI wish it only wrapped at the correct intervals to let words finishI'd write a function myself, but I'm too lazyOh well..
-
playerWhat?
Cheese!: BAAAAAAAAWH!!
-
playerWhat..?
BobRun away!!! =(
DIALOGUEEND 
And the script, it's in weapon form, but could easily be adopted as a class/DBNPC type deal. It's attached as a text file.

And a video because I get bored easily:


If you're interested as to why I make a video for everything I share (See other thread), it's because I like to share the kind of music I like to people subliminally.
Attached Files
File Type: txt dialogue.txt (9.5 KB, 300 views)
Reply With Quote
  #2  
Old 01-28-2010, 12:41 AM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Hahaha, that's pretty nice man. Also, you could just attach it as a text file?
Reply With Quote
  #3  
Old 01-28-2010, 12:42 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Quote:
Originally Posted by Immolate View Post
Hahaha, that's pretty nice man. Also, you could just attach it as a text file?
Didn't think of that, will do.

Also, thank you :3
Reply With Quote
  #4  
Old 01-28-2010, 12:55 AM
Rufus Rufus is offline
Registered User
Join Date: Jun 2004
Location: United Kingdom
Posts: 4,698
Rufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud of
Looks pretty good.
__________________
Quote:
Originally Posted by Loriel View Post
Seriously, you have ****-all for content and you're not exactly pulling in new developer talent, angling for prestigious titles should be your last concern.
Reply With Quote
  #5  
Old 01-28-2010, 12:57 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Could use the control GUI's, as they have built-in word-wrapping, and would also allow you to do some fancy scrolling(I disable the scrollbars and use scrollpos to build my own smooth scrolling).

Any intent to add anything more advanced, like player input(yes/no/maybe...)?

Also, most games store dialogue data clientside in a text file, as it's really not sensitive data(what harm is going to come of the player changing what an NPC says?). You could do this and probably simplify the loading.
Reply With Quote
  #6  
Old 01-28-2010, 01:01 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Looks cool, but if I had to play a server and that popped up at regular intervals when interacting with npcs it would get quite annoying but that's just me.
__________________
Quote:
Reply With Quote
  #7  
Old 01-28-2010, 01:13 AM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by fowlplay4 View Post
Looks cool, but if I had to play a server and that popped up at regular intervals when interacting with npcs it would get quite annoying but that's just me.
I seriously think that this looks way better for NPC interaction, than using the default ways, such as the this.chat = "stuff"; variable and say2( "" );

If I ever get the motivation to start my own project, or if Mallow lets me on Final Star, I'd be totally changing the way players communicate with other players and NPCs. I hate how it's done in the default systems.
Reply With Quote
  #8  
Old 01-28-2010, 01:59 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
The idea was to allow player input and have dialogue trees, this is just over an hour of work or so. I might expand upon it, unsure at the moment.

Player input is already pretty much done, it's not much work in the first place, just a series of text files that reference other ones is what I would do. Could be conditional based on different variables the player has and whatnot, setting variables as well.

Also, I think this is loads better for dialog. You can even press M to skip, so people like you can be happy, or maybe press D to quickly advance it, like a say().

I had initially planned on using GUIControls, but I'm relatively old fashioned as far as Graal and GS2 goes and haven't done much with them, I usually do things manually with arrays, I feel more comfortable.
Reply With Quote
  #9  
Old 01-28-2010, 04:03 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
The animation looks stiff. Effects are what makes games cool, even if they are just small effects. If they look nice, they create a nice feeling. I suggest increasing the "speed" of the heads, or adding another form of movement to it (some kind of bounce? might look awkward).
Reply With Quote
  #10  
Old 01-28-2010, 06:09 PM
Dnegel Dnegel is offline
Rjax Shizibz
Join Date: Jul 2009
Posts: 1,334
Dnegel will become famous soon enough
Pretty neat.

Edit: Oh yeh, forgot giving rep. >.<

Last edited by Dnegel; 01-28-2010 at 11:35 PM..
Reply With Quote
  #11  
Old 01-28-2010, 06:12 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
I have to say I do like the implementation as well and has given me a few ideas for later projects. Bravo. Rep++.
Reply With Quote
  #12  
Old 01-28-2010, 08:09 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
awesome
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #13  
Old 01-28-2010, 09:46 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Personally, I'd prefer a scripted method. Maybe something similar to a common way behavior trees are made:
PHP Code:
this.conversation newConversation()
  .
dialogue("Bob""head0.png""Hello, World!")
  .
dialogue(player.nickplayer.headimg"Sup")
  .
question("Bob""head0.png""How you doin?", {"Good""Alright""Bad"})
    .
answer("Good")
      .
dialogue("Bob""head0.png""Awesome. ttyl")
      .
toParent()
    .
answer("Alright")
      .
dialogue("Bob""head0.png""Cool, cool")
      .
toParent()
    .
answer("Bad")
      .
dialogue("Bob""head0.png""Sorry to hear that")
      .
toParent()
    .
toParent()
  .
dialogue(player.nickplayer.headimg"Smell ya later")
  ; 
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #14  
Old 01-28-2010, 10:11 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by coreys View Post
Personally, I'd prefer a scripted method. Maybe something similar to a common way behavior trees are made:
PHP Code:
this.conversation newConversation()
  .
dialogue("Bob""head0.png""Hello, World!")
  .
dialogue(player.nickplayer.headimg"Sup")
  .
question("Bob""head0.png""How you doin?", {"Good""Alright""Bad"})
    .
answer("Good")
      .
dialogue("Bob""head0.png""Awesome. ttyl")
      .
toParent()
    .
answer("Alright")
      .
dialogue("Bob""head0.png""Cool, cool")
      .
toParent()
    .
answer("Bad")
      .
dialogue("Bob""head0.png""Sorry to hear that")
      .
toParent()
    .
toParent()
  .
dialogue(player.nickplayer.headimg"Smell ya later")
  ; 
I love this idea but rather than having to keep typing the head filename and name, I think it'd be better to have some functions which defines an object for each participant of the conversation, which contains their specific attributes.
Reply With Quote
  #15  
Old 01-29-2010, 12:18 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
I thought of something like that, Abjorn, but figured it would be easier for LATs to handle it if it was stored in text files with a simple interface, could be done with an editor too.

The new format with trees would look something like this:

PHP Code:
CHARACTERS
"Bob" "head3.png"
CHARACTERSEND

DIALOGUE
LABEL choices
Bob
What should I do?
CHOICE "Go to label poop" linepoop
CHOICE 
"Load a new file" filebloop.txt
CHOICE 
"End dialogue" lineend

LABEL poop
Bob
Ahso you like poop!
-
playerummkay?
GOTO 
choices

LABEL end
DIALOGUEEND 
Choices could be handled just as easily by sending back another array with corresponding choices, most likely parsed again by the server. Would be the easiest, in my opinion. Make have a SETVAR function to set player variables or a RUNFUNC function or something, dunno.
Reply With Quote
Reply


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 03:02 PM.


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