Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
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
  #2  
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
  #3  
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:34 PM.


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