Sunday, July 3, 2016

Dialogue Transcriptions

This post is something I've been meaning to make for a while, regarding translating wiki transcripts of quests into usable format for our code. To start making a transcript there first needs to be one on the RS3 wiki, such as:

After this we need to breakdown what method calls each panel of dialogue exist as. For the 4 formats below, see the picture and how it gets transcribed into a usable method call in code.

1.) NPC chat:

d.sendNpcChat("I have been waiting here three thousand years,", "guarding the Tears of Guthix. I serve my master", "faithfully, but I am bored.");

2.) Player chat:

d.sendPlayerChat("...I still can't believe how long that 'one small favor'", "took me! I ended up walking all over the world doing", "small favors for all and sundry!");

3.) Statement: (Here you can see standard chat colors being used as well)

 d.sendStatement("You cannot enter the cave again until you have gained either @dre@one", "@dre@quest point@bla@ or @dre@100,000 total XP@bla@.");

4.) Options:

 d.sendOption("Okay...", "You tell me a story.", "Not now.", "What are the Tears of Guthix?");

Note: If the red 'Select an Option' says something different you would use this method call:
d.sendTitledOption("Different Title Here", "option1", "option2"); 

And there you have the 4 basic panels of dialogue broken down into method calls. The core thing to note over all the dialogue is how the lines are broken down. When you get a long string of text from a transcript on a wiki, you need to first cut out the part that is for that panel and wrap it in quotations. Then you add ", " to break the line up into a 'list' so to speak of more quoted strings. Each quoted string represents a line of a dialogue. It is also very important that you use the format for the method calls written here.

So basically what people have done in the past is paste in the whole transcript to their favorite text editor, pull up a 2007/2006/OSRS quest guide video and begin translating the lines into method calls. After this is done you can just put your text file into pastebin and send one of us the link. At the end of this post is a link to a site showing quests left to do. In each of the tasks are either a link to the transcript or a pastebin of the completed dialogue. You can use the completed pastebins for reference if you get stuck or are unsure of how it should be formatted.

T. Regards,

For those of you code savvy - the "d." part references a DialogueManager class owned by the player and instantiated as a variable "d" for ease of use instead of typing "player.getDialogue()." every method call.

No comments:

Post a Comment