• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Making a New Quest

In theory you don't even Notepad++, just ordinary Notepad. Only Notepad++ is easier and better. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
good.. Than its just to whate for: short jack gold

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Okey <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> ... Right now i got 13 final.... Yes, i have notepad ++<!--QuoteEnd--></div><!--QuoteEEnd--> <- me
 
This is a long post so I've split it in two - sorry for taking up so much space:
unsure.gif


From the main Pirates of the Caribbean directory Go to BuildSettings.h
And change (in GENERAL MODS)

Code:
#define DEATHRATE	1
// Chance of dying(= game over) after shipwrecks and lost fights
// Choose a value between 1(certain survival) and 130(certain death)
// After survival you will be down and out, so it is a new challenge and no cheat!

#define ENABLE_WEAPONSMOD	0
// 1: Weapons have different quality grades: from "Badly worn" to "Excellent"
// 0: Off, stock PotC

#define ENABLE_CHEATMODE	0
// 1: Enable cheatmode (cheats can be triggered with numpad buttons)
TO:

Code:
#define DEATHRATE	1
// Chance of dying(= game over) after shipwrecks and lost fights
// Choose a value between 1(certain survival) and 130(certain death)
// After survival you will be down and out, so it is a new challenge and no cheat!

#define ENABLE_WEAPONSMOD	0
// 1: Weapons have different quality grades: from "Badly worn" to "Excellent"
// 0: Off, stock PotC
#define ENABLE_CHEATMODE	1
// 1: Enable cheatmode (cheats can be triggered with numpad buttons)
In the Program File: PROGRAM\InternalSettings.h file

At the last line:
Change:
Code:
// ======================================
// Testing toggles
// ======================================
#define ENABLE_WEAPONSMOD_DEBUG			0
#define RANDOM_LOCS_TOGGLE				0
#define DISARM_MODE						0
#define VISIBLE_LOCATORS				0
TO

Code:
// ======================================
// Testing toggles
// ======================================
#define ENABLE_WEAPONSMOD_DEBUG			0
#define RANDOM_LOCS_TOGGLE				0
#define DISARM_MODE						0
#define VISIBLE_LOCATORS				1
In the Main PotC Menu: Engine.Configuration Settings

Make:
full_screen = 0 (this will make the program run as a small screen – then by pressing Alt/Tab you can jump in and out of it to test various things. Try it first to be sure you are happy with it.)
and
tracefilesoff = 0 (allows tracefile to be ON which will give us a log of what is happening)
and
debuginfo = 1

These will enable us to cheat as we test the program – and there is a good reason for this.

DISCLAIMERS:
In all cases SAVE a clean copy of your files so if we screw up (which we will) we can get back to the original. If you have the room save your complete PotC somewhere else before we start.

Do not do any of this while riding a bike, piloting an aircraft or sitting in a microwave.
 
SEE ABOVE POST:

We will call the new Quest: “Chris Roupe” (You should be able to remember that
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!
whippa.gif
)

In Notepad++ OPEN: quest_reaction.c

Somewhere around line 1304 you should see this:

Code:
case "return_faust_to_citizen":
LAi_SetPlayerType(pchar);
LAi_SetCitizenType(characterFromID("Faust Gasquet"));
LAi_group_MoveCharacter(characterFromID("Faust Gasquet"), "FRANCE_CITIZENS");
break;

// TIH --> no longer need two seperate actions for the same result
/*
// TIH --> two different ways to end this quest Aug31'06
case "Story_Sink_Oiseau1":

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.

At a blank line (1309 on my machine) press the return key twice to make some space.
Then enter:

Code:
// 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;

Do a file/save (top left of notepad++)

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

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:

Code:
    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;
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::

Code:
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:

Code:
        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;
SAVE

Then Notepad++ John Adams_dialog.h

Change the first line to:
string DLG_TEXT[38] = {
(the number has changed to 38)
and add the following to the end of the page (I have shown the original last two lines so you can see where you are.)

Code:
"Friends, please! Enough of this madness. Don't make me call out the guard!",
"Relax! I'm leaving.",
"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.",

SAVE

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\Characters\characters_init.c
And ADD our quest so it looks like this: (I have shown the Lucas quest so you can see where to put it:)

Code:
[Other stuff above this]
//Lucas
ch.quest.Lucas = "";
ch.quest.Luc_start.win_condition.l1 = "location";
ch.quest.Luc_start.win_condition.l1.character = ch.id;
ch.quest.Luc_start.win_condition.l1.location = "Muelle_Residence";
ch.quest.Luc_start.win_condition = "Luc_start";
//Lucas

//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 -->
[other stuff below this]
SAVE

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!)
razz.gif
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.

Next Time: Why we did What, and What it Did.
Good luck.
 
Thanks a lot of doing this, Short Jack Gold. I think this could make a good general quest-writing tutorial once done. I'll add it to our list of tutorials. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
<!--quoteo(post=232076:date=Jan 5 2008, 06:01 AM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Jan 5 2008, 06:01 AM) [snapback]232076[/snapback]</div><div class='quotemain'><!--quotec-->Thanks a lot of doing this, Short Jack Gold. I think this could make a good general quest-writing tutorial once done. I'll add it to our list of tutorials. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->Thanks for that.
I am hoping that not only Chris will try this. Hopefully we can encourage others to "have a go" and strengthen this part of the modding team, which will be good for bug finding and testing, and of course some different quests.
 
Definitly agreed. Making quests is quite possible as many people have found out before. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
I will start makeing the quest as soon as I am home.. Right now i am with my father,, come home to morow
 
QUOTE (Chris Roupé @ Jan 5 2008, 12:20 PM) I will start makeing the quest as soon as I am home.. Right now i am with my father,, come home to morowO.K. then Ill add this part which should help you as you work your way through it:

WHAT – WHY and WHEN:

For our little sub-quest to work the following must have occurred:

The First thing that tells the program what to do is in: Program\Characters\characters_init.c
Where we added:

Code:
//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
This told the program to expect a quest called: Chris_Roupe and that it could start when the player, (ch.id) reached the location – Tortuga_tavern then it can action Chris_Roupe_start (our first program line in the quest_reaction.c file.)

This means the player can wander all around the islands, including Tortuga, but until he/she enters the Tortuga Tavern THIS quest WILL NOT be able to start.

So having entered the Tavern – quest_reaction.c now looks at:

Code:
// Chris Roupe Quest -->
case "Chris_Roupe_start":
SetEnterLocationQuest("Tortuga_tavern", "Chris_Roupe_start_check", 0);
break;
This first “case” can now operate which tells the program to goto “Chris_Roupe_start_check”:

Code:
        case "Chris_Roupe_start_check":
if(makeint(PChar.rank) >= 12)
{
PChar.quest.Chris_Roupe = "Chris_away_we_go";
}
break;
Now in this case, we can see we have a further “condition” to fulfill BEFORE it can work:
The players rank MUST be >= (greater than or equal to) 12. If it isn’t, then the program will not operate the command. And will wait until the player comes back having reached that rank.
The rank could be any number 1 or above and it will work.
It also doesn’t need to have a rank condition, it can be different condition. If you look over the other quests, you will find lots of examples.

If you want to see the effect here – play till you reach Tortuga – save the game while you are STILL in the port. Go to the Tavern and talk to John Adams. You will see that “our” quest isn’t active. While STILL in the Tavern press number pad 4 till rank is above 12. Talk again. You will see the quest is STILL not working. The reason is that the condition of rank wasn’t met BEFORE you entered the Tavern. Go out side (just outside the Tavern door will do) do the rank increase again. Go back into the Tavern and WHOOPIE! The quest works. If you study the program we have written you should start to get the logic going on here.

So having got rank 12 the program sets the Pchar.quest_Chris_Roupe to “Chris_away_we_go”
This is another condition that has to be met. And in this location it is only met when we talk to John Adams at the case section:

Code:
        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";
}
(The “if” statement here means that if we are not doing this quest, then this question will NOT be asked – so we have a condition within a condition)

Code:
            link.l99 = DLG_TEXT[16];
link.l99.go = "second time";
break;

When the player selects the answer: "I'm looking to escort a ship or something similar",
(if you don’t click on this line then you will get other option until you do, or stop the conversation)
When clicked – the link.l1.go sends you to case “and the answer is”:

Code:
case "and the answer is":
dialog.text = DLG_TEXT[36];
link.l1 = DLG_TEXT[37];
link.l1.go = "exit_for_Chris";
break;

Which has John saying: "I heard if you go to Quebradas Costillas there is someone there who needs that sort of service."
And the player answering: "Thanks, I'll pay them a visit."
When clicked – the link.l1.go sends you to case “exit_for_Chris”

Code:
    case "exit_for_Chris":
NextDiag.CurrentNode = NextDiag.TempNode;
NPChar.quest.meeting = NPC_Meeting;
DialogExit();
AddDialogExitQuest("Chris_start_ship_search");
break;

This closes that section of dialog and the line: AddDialogExitQuest("Chris_start_ship_search");
Sends the program back to the quest_reaction.c section where it then looks for the case: “Chris_start_ship_search"

Code:
    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;

PChar.quest.Chris_Roupe = "search"; changes the quest title so to disable you from having the same conversation with John Adams because it isn’t "Chris_away_we_go" anymore so that particular conversation line won’t show again.

The DeleteEnterLocationQuest("Tortuga_tavern", "Chris_Roupe_start_check"); line deletes the case: case "Chris_Roupe_start_check": so this quest cannot be started again every time you enter the Tortuga Tavern in future playing of the game.


The win_conditions will hold the quest till the player reaches Quebradas Costillas Town.

In the meantime, of course, the player is free to do what he/she wants. Other quests, sea battles or whatever. This quest will wait until he/she does reach the town.
When he/she does, then case "Chris_Ship_Search": starts:

Code:
    case "Chris_Ship_Search":
AddPartyExp(pchar, 2500);        

break;

For the moment I have just increased the players experience (for all your hard work), and as written, the Quest would END here, as there is no instruction to the program to do anything else.

That’s it for now.
Do study the quest_reaction.c file. Try tracing some other existing quests to see if you can follow their progress and what they, and their respective dialogs, do.

When we come back, if you are still interested, we will expand this quest some more to give you an idea of what else can be done.
 
Thanks for all that information.. I will start as soon as im home <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

Hope I can send in a litle bit from the files so you can see if anything is wrong <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />


Chris
 
Heya,. I am home and started to make the quest.. There is something that went wrong... The cheats.. hehe

I got 13 final..

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->// ======================================
// Testing toggles
// ======================================
#define ENABLE_WEAPONSMOD_DEBUG 0
#define RANDOM_LOCS_TOGGLE 0
#define DISARM_MODE 0
#define VISIBLE_LOCATORS 0

TO

// ======================================
// Testing toggles
// ======================================
#define ENABLE_WEAPONSMOD_DEBUG 0
#define RANDOM_LOCS_TOGGLE 0
#define DISARM_MODE 0
#define VISIBLE_LOCATORS 1<!--QuoteEnd--></div><!--QuoteEEnd-->

when i edit: PROGRAM\ "InternalSettings.h" file there is no "#define VISIBLE_LOCATORS" , every thing but not that one... <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />

so when i try use the cheet so i get to rank 12 npthing happens..


//

So i tryed to be smart and changed the Charakter rank to 1, but nothing happend <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> // do i have to start a new game?
 
Which game version do you use? I think that toggle might have been added in Update 3, so it won't be there unless you use Build 13 Final or Build 13 Full + Update 3. This is NOT the cheatmode though. Please note that for the cheats you must use the NUMPAD and Num Lock must be ON.
 
New problem.. I installed uppdate 3 and now i cant find <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->case "return_faust_to_citizen":
LAi_SetPlayerType(pchar);
LAi_SetCitizenType(characterFromID("Faust Gasquet"));
LAi_group_MoveCharacter(characterFromID("Faust Gasquet"), "FRANCE_CITIZENS");
break;

// TIH --> no longer need two seperate actions for the same result
/*
// TIH --> two different ways to end this quest Aug31'06
case "Story_Sink_Oiseau1":<!--QuoteEnd--></div><!--QuoteEEnd-->

It´s not there :S

//
OK i wil install it igain... Copy/past my backupp and then install 13final
 
How about you install the modpack correctly first? Just reinstal the game, install Build 13 Final on top and you're pretty much done. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
ok... now i installed as you said to the final.. (so now it is laging igain, sometimes the screen is blinking black, and i have to run as administrator)

But i can´t still get to rank 12
 
Did you enable the cheatmode and press the Numpad 4 button with Numlock on?
 
yeah :S


<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->// ======================================
// GENERAL MODS:
// ======================================

#define DEATHRATE 1
// Chance of dying(= game over) after shipwrecks and lost fights
// Choose a value between 1(certain survival) and 130(certain death)
// After survival you will be down and out, so it is a new challenge and no cheat!

#define ENABLE_WEAPONSMOD 1
// 1: Weapons have different quality grades: from "Badly worn" to "Excellent"
// 0: Off, stock PotC

#define ENABLE_CHEATMODE 1
// 1: Enable cheatmode (cheats can be triggered with numpad buttons)<!--QuoteEnd--></div><!--QuoteEEnd-->
 
<!--quoteo(post=232702:date=Jan 7 2008, 06:20 AM:name=Chris Roupé)--><div class='quotetop'>QUOTE(Chris Roupé @ Jan 7 2008, 06:20 AM) [snapback]232702[/snapback]</div><div class='quotemain'><!--quotec-->ok... now i installed as you said to the final.. (so now it is laging igain, sometimes the screen is blinking black, and i have to run as administrator)

But i can´t still get to rank 12<!--QuoteEnd--></div><!--QuoteEEnd-->
This sounds like a bad download - FORGET level 12 for the moment - Can you play the game?
 
Back
Top