<a href="http://forum.piratesahoy.net//index.php?s=&showtopic=11382&view=findpost&p=231923" target="_blank">Click here to see start of quest writing</a>
New tutorial for starting quest writing for Build 14 Alpha 9
We will call the new Quest: �Chris Roupe� (You should be able to remember that <img src="http://forum.piratesahoy.net/public/style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid="
" border="0" alt="w00t.gif" /> )
Now play the game starting at Oxbay � repair your ship etc. then sail for Tortuga (not forgetting to change your flag to pirate before your arrive). Go to the Tavern and talk to the Tavern Owner.
Remember what happened. Quit game.
Now we will �DO Stuff� - explanations will come later. (as will whippings, if you don't get it right! <img src="style_emoticons/<#EMO_DIR#>/whippa.gif" style="vertical-align:middle" emoid="
" border="0" alt="whippa.gif" /> )
In Notepad++ OPEN: quest_reaction.c (Located in: PROGRAM\Storyline\[Storyline*]\quests)
After the code line <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> switch(sQuestName)
{<!--c2--></div><!--ec2-->
You will notice the code <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid="
" border="0" alt="biggrin.gif" />
Notice some lines are blue/black and those beginning with �//� are in green.
The �//� lines are ignored by the computer but are useful for making notes.
Go to the bottom and before the <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> }
}<!--c2--></div><!--ec2-->
and hit enter a couple of times to give room, then add
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// Chris Roupe Quest -->
case "Chris_Roupe_start":
SetEnterLocationQuest("Tortuga_tavern", "Chris_Roupe_start_check", 0);
break;
case "Chris_Roupe_start_check":
if(makeint(PChar.rank) >= 12)
{
PChar.quest.Chris_Roupe = "Chris_away_we_go";
}
break;
case "Chris_Roupe_start_ship_search":
PChar.quest.Chris_Roupe = "search";
DeleteEnterLocationQuest("Tortuga_tavern", "Chris_Roupe_start_check");
//SetQuestHeader("Chris_Roupe_Quest");
Pchar.quest.Chris_Ship_Search.win_condition.l1 = "location";
Pchar.quest.Chris_Ship_Search.win_condition.l1.location = "QC_town";
PChar.quest.Chris_Ship_Search.win_condition = "Chris_Ship_Search";
break;
case "Chris_Ship_Search":
AddPartyExp(pchar, 2500);
break;<!--c2--></div><!--ec2-->
<b>do a file/save </b>(top left of notepad++)
Two options here:
Now open in Notepad++ (no need to close quest_reaction.c that you just saved)
Program\Dialogs: John Adams_dialog.c
Then open:
Programs\Dialogs\ENGLISH: John Adams_dialog.h
or
Program\Storyline\[Storyline*]\Dialogs: John Adams_dialog.c
Then open:
Programs\Storyline\[Storyline*]\Dialogs\ENGLISH: John Adams_dialog.h
(NOTE: Option B is required if John Adams_dialog's are already located in that folder <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid="
" border="0" alt="wink.gif" />)
Now you should have three tabs in Notepad++
Quest_reaction.c � John Adams_dialog.c � John Adams_dialog.h
And as you click each tab so that respective file will open and the others close.
Now it will pay you to open the DialogMerge program.
Click on Code file (the one with the icon) click through till you find Program\Dialogs\John Adams.c and open that.
Then click on Headers file (ENGLISH should show up) click that and then open John Adams_dialog.h
Then click the next button MERGE
The program will run, merging the two files. When done, click on Merged File button just below and you will find the program and words spoken by John Adams as they occur.
These we are going to change. BUT in Notepad++ (NOT YET)
Looking in the MERGED file you can follow the dialog, here is the part we are interested in:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> case "second time":
Dialog.defAni = "dialog_stay1";
Dialog.defCam = "1";
Dialog.defSnd = "dialogs\17";
Dialog.defLinkAni = "dialog_1";
Dialog.defLinkCam = "1";
Dialog.defLinkSnd = "dialogs\woman24";
Dialog.ani = "dialog_stay2";
Dialog.cam = "1";
dialog.snd = "Voice\FADU\FADU003";
dialog.text = "I am all ears. How can I help you?";
link.l1 = pcharrepphrase("I need to hire some sailors.", "I'm looking to add to my crew.");
link.l1.go = "crew";
link.l2 = "Let's talk business.";
link.l2.go = "rumours";
Link.l3 = pcharrepphrase("I'd like a room.", "Do you have a free room in this place?");
Link.l3.go = "room";
link.l4 = "Never mind. I've got to go.";
link.l4.go = "exit";
break;<!--c2--></div><!--ec2-->
Play the game going to the Tavern and you will see how this works: (This is where the small screen comes in handy).
Dialog.text is John Adams speaking and Link.l1, link.l2, link.l3 and link.l4
Are the four possible answers you can give.
Each answer sends you to another part of the program using:
Link.l1.go, Link.l2.go, Link.l3.go and Link.l4.go
We need to change this dialog to get John Adams to work with our quest.
So let�s take the case �rumours� which is you (the player) having asked to talk business::
dialog.snd = "Voice\FADU\FADU004";
dialog.text = "Certainly, " + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + ". What's on your mind?";
link.l99 = "Actually, it's nothing important.";
link.l99.go = "second time";
Go to Notepad++ John Adams_dialog.c change that to:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> case "rumours":
dialog.snd = "Voice\FADU\FADU004";
dialog.text = DLG_TEXT[13] + GetMyAddressForm(NPChar, PChar, ADDR_CIVIL, false, false) + DLG_TEXT[14];
if (PChar.quest.Chris_Roupe == "Chris_away_we_go")
{
link.l1 = DLG_TEXT[35];**
link.l1.go = "and the answer is";
}
link.l99 = DLG_TEXT[16];
link.l99.go = "second time";
break;
case "and the answer is":
dialog.text = DLG_TEXT[36];**
link.l1 = DLG_TEXT[37];**
link.l1.go = "exit_for_Chris";
break;
case "exit_for_Chris":
NextDiag.CurrentNode = NextDiag.TempNode;
NPChar.quest.meeting = NPC_Meeting;
DialogExit();
AddDialogExitQuest("Chris_start_ship_search");
break;<!--c2--></div><!--ec2-->
<b>SAVE</b>
Then Notepad++ John Adams_dialog.h
Change the first line to:
<b>string DLG_TEXT[38**] = {</b>
(the number has changed from 35)
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->"I'm looking to escort a ship or something similar",
"I heard if you go to Quebradas Costillas there is someone there who needs that sort of service.",
"Thanks, I'll pay them a visit.",<!--c2--></div><!--ec2-->
<b>SAVE</b>
The last three lines are the NEW dialog � you can put in what you wish � just be sure to have the correct punctuation: �words words words�,
and ONLY three lines for the moment.
Now open: Program\Storyline\[Storyline*]\StartStoryline.c
And ADD our quest so it looks like this: (I have shown the Tortuga Atmosphere so you can see where to put it
Other stuff above this:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->//Tortuga Atmosphere
PChar.quest.Tortuga_atmosphere.win_condition.l1 = "location";
PChar.quest.Tortuga_atmosphere.win_condition.l1.character = PChar.id;
PChar.quest.Tortuga_atmosphere.win_condition.l1.location = "Tortuga_port";
PChar.quest.Tortuga_atmosphere.win_condition = "Tortuga_atmosphere";
//Tortuga Atmosphere
//Chris_Roupe
ch.quest.Chris_Roupe = "";
ch.quest.Chris_Roupe_start.win_condition.l1 = "location";
ch.quest.Chris_Roupe_start.win_condition.l1.character = ch.id;
ch.quest.Chris_Roupe_start.win_condition.l1.location = "Tortuga_tavern";
ch.quest.Chris_Roupe_start.win_condition = "Chris_Roupe_start";
//Chris_Roupe
// KK --><!--c2--></div><!--ec2-->
other stuff below this
<b>SAVE</b>
Now you can start a new game � save when you get to Totuga Port (before you go to the Tavern)
Enter the Tavern, talk, and nothing has changed (he he he!) <img src="style_emoticons/<#EMO_DIR#>/razz.gif" style="vertical-align:middle" emoid="
" border="0" alt="razz.gif" /> <img src="style_emoticons/<#EMO_DIR#>/razz.gif" style="vertical-align:middle" emoid="
" border="0" alt="razz.gif" />
O.K. � the problem � in quest_reaction.c we have set the players level to be equal to, or above 12
See: if(makeint(PChar.rank) >= 12)
So quit the game � Reload the saved Port Game then press number pad 4 until you see the players level goes above 12.
Then go on to the Tavern and talk again � this time all should work correctly.
Good luck.
* Storyline that you want quest to appear in
** Change the original number in the [] to number + 3 and then check the line the "" is on and -2 and the dialog will appear where it should
Pieter don't worry about updating SJG's post, mine can be tutorial for Build 14 Alpha 9