• 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!

Dialog Help

aviator543

Landlubber
Storm Modder
hi all i was just wounderin does anyone know how to set a dialog up so that after you have talk to a person once the next time you talk to them the dialog is differant from the first time? This is what i have right now

Code:
case "First time":
Dialog.defAni = "dialog_stay1";
Dialog.defCam = "1";
Dialog.defSnd = "dialogs\0\017";
Dialog.defLinkAni = "dialog_1";
Dialog.defLinkCam = "1";
Dialog.defLinkSnd = "dialogs\woman\024";
Dialog.ani = "dialog_stay2";
Dialog.cam = "1";

Dialog.Text = DLG_TEXT[2];
Link.l1 = DLG_TEXT[3];
Link.l1.go = "begin_1";
break;

case "begin_1":
dialog.snd = "Voice\CLLA\CLLA004";
dialog.text = DLG_TEXT[5];
link.l1 = DLG_TEXT[6];
link.l1.go = "begin_2";
break;

case "begin_2":
dialog.snd = "Voice\CLLA\CLLA004";
dialog.text = DLG_TEXT[7];
link.l1 = DLG_TEXT[8];
link.l1.go = "begin_3";
link.l2 = DLG_TEXT[9];
link.l2.go = "Exit";
break;

case "begin_3":
dialog.snd = "Voice\CLLA\CLLA004";
dialog.text = DLG_TEXT[10];
link.l1 = DLG_TEXT[11];
link.l1.go = "begin_4";
break;

case "begin_4":
dialog.snd = "Voice\CLLA\CLLA004";
dialog.text = DLG_TEXT[12];
link.l1 = DLG_TEXT[13];
link.l1.go = "Exit";
AddDialogExitQuest("killrodregezhulao");
break;

case "Exit":
DialogExit();
NextDiag.CurrentNode = NextDiag.TempNode;
break;

At the moment if you exit the conversation with out him attackin you he just repeats the same dialog over and over.


Never mind iv sorted it, if anyone wants to know you have to add the code -
Code:
NextDiag.TempNode = "";
put the name of the dialog header you want in the "" and it cant be placed on an exit dialog
 
Isnt this already in the tutorials? :?

Also there is other ways to do it with the most common having the first time leading to nothing (eg. "stop talking to me", "fine")

and then to start a different section going executing this line through code
Code:
characters[getcharacterindex("*character id*)].dialog.currentnode = "*case name*";
 
Isnt this already in the tutorials? :?

Also there is other ways to do it with the most common having the first time leading to nothing (eg. "stop talking to me", "fine")

and then to start a different section going executing this line through code
Code:
characters[getcharacterindex("*character id*)].dialog.currentnode = "*case name*";

I didnt know there was any tutorials lol, they probably would of made the last 5 hours easyer if i had known. Would of saved me alot of time tryin to figger stuff out but all that messin has payed off, iv made my own little quest. its nothin major but i like it

Theres just one thing buggin me right now, i cant delete an item out of my inventory at the end of the quest. Do you know the code to delete stuff? I didnt know how to link completed quest to dialog so the way you complete it now is by lootin an item but i want to remove it at the end.
 
Code:
TakeItemFromCharacter(pchar, "*item*");
thanx buddy, iv totaly changed the quest now. now you have to chace a guy round a few dif islands till you finaly kill him collecting the maps and the cumpass as you go. I'v finish up to the final show down with Armeze 'the guy your chasin' and im tryin to get access to the that island out of The curse or the black pearl. is there anyway of givin the curse to the player? im thinkin through some sort of quest comman, so the player changes his model at night to a skeleton
 
If you take a look around the forum this has been mentioned countless times and it was being worked on but it has been stopped, someone else will need to do it.

To get access to the island you only need the compass :shrug
 
If you take a look around the forum this has been mentioned countless times and it was being worked on but it has been stopped, someone else will need to do it.

To get access to the island you only need the compass :shrug

the quest iv made is on the LaCroix campaign not the jacksparrow or does that not make a differance lol.
im guessin to do the hole curse thing would take so major codein, not for neewbs like me
 
No it doesnt matter, if it did I would have said you need the compass AND in the Jack Sparrow storyline.

But yeah just the compass and yes it would take a fair bit of coding :yes
 
No it doesnt matter, if it did I would have said you need the compass AND in the Jack Sparrow storyline.

But yeah just the compass and yes it would take a fair bit of coding :yes

well theres somethin goin on with my game then cos i got all maps and cumpass, i probably plonkered somethin up wilst makin the quest. there is a weird thing goin on actually, all my created NPCs names change ingame to there last name twice lol so if a guys call Rodregez Hulio in the game hes call Hulio Hulio lol, cant for the life of me figger out why
 
Read the tutorial, I definantly reckomend it as it has a lot of good features and will make you understand why things happen. (which means you wont have to ask for help all the time only when your really stuck)

This is the code that is present to make Isla De Muerte be there
Code:
	if (CheckCharacterItem(mainCharacter, "aztec_compass")) // KK
CreateIslaDeMuerte();
else
DeleteIslaDeMuerte();
YOU DONT HAVE TO ADD THIS
 
Read the tutorial, I definantly reckomend it as it has a lot of good features and will make you understand why things happen. (which means you wont have to ask for help all the time only when your really stuck)

This is the code that is present to make Isla De Muerte be there
Code:
	if (CheckCharacterItem(mainCharacter, "aztec_compass")) // KK
CreateIslaDeMuerte();
else
DeleteIslaDeMuerte();
YOU DONT HAVE TO ADD THIS

oh sorry you misunderstand, the island is there. i can dock on Deserted shore but cant go into the cave. when i try a little pad lock comes up, it doesn't really matter anyways i was just playin about
 
Oh well that is a Jack Sparrow only thing where the maps unlock it in the storyline the line of code you need is:
Code:
Locations[FindLocation("IslaDeMuerte_shore_01")].reload.l2.disable = 0;

EDIT: The way I execute it is using this code:
Code:
		Pchar.quest.Open_the_Grotto.win_condition.l1 = "item";
PChar.quest.Open_the_Grotto.win_condition.l1.item = "Map_Doc_1";
Pchar.quest.Open_the_Grotto.win_condition.l2 = "item";
Pchar.quest.Open_the_Grotto.win_condition.l2.item = "Map_Doc_2";
Pchar.quest.Open_the_Grotto.win_condition.l3 = "item";
Pchar.quest.Open_the_Grotto.win_condition.l3.item = "Map_Doc_3";
Pchar.quest.Open_the_Grotto.win_condition.l4 = "item";
Pchar.quest.Open_the_Grotto.win_condition.l4.item = "Map_Doc_4";
Pchar.quest.Open_the_Grotto.win_condition = "Open_the_Grotto";
and then this in quest_reaction.c
Code:
case "Open_the_Grotto":
Locations[FindLocation("IslaDeMuerte_shore_01")].reload.l2.disable = 0;
break;
 
I think im puttin this code in the wrong place or not activating it right -

Code:
   case "GrotoAccess":
Pchar.quest.Open_the_Grotto.win_condition.l1 = "item";
PChar.quest.Open_the_Grotto.win_condition.l1.item = "Map_Doc_1";
Pchar.quest.Open_the_Grotto.win_condition.l2 = "item";			
Pchar.quest.Open_the_Grotto.win_condition.l2.item = "Map_Doc_2";
Pchar.quest.Open_the_Grotto.win_condition.l3 = "item";
Pchar.quest.Open_the_Grotto.win_condition.l3.item = "Map_Doc_3";
Pchar.quest.Open_the_Grotto.win_condition.l4 = "item";
Pchar.quest.Open_the_Grotto.win_condition.l4.item = "Map_Doc_4";
Pchar.quest.Open_the_Grotto.win_condition = "Open_the_Grotto";
break;

Iv put the above code in both_reaction.c and im activating the below code throught a AddDialogExitQuest("Open_the_Grotto"); command
Code:
case "Open_the_Grotto":
Locations[FindLocation("IslaDeMuerte_shore_01")].reload.l2.disable = 0;
break;
at the moment i can get on the island but cant get access to the second area where the gold is
 
I know what you cant do at the moment, you do realise that you need the compass BEFORE you set this code up (otherwise the grotto will just lock itself again). So make sure you get the compass then get the maps later and when you get the compass in dialog (or however you get it) just add this code in with it
Code:
		Pchar.quest.Open_the_Grotto.win_condition.l1 = "item";
PChar.quest.Open_the_Grotto.win_condition.l1.item = "Map_Doc_1";
Pchar.quest.Open_the_Grotto.win_condition.l2 = "item";			
Pchar.quest.Open_the_Grotto.win_condition.l2.item = "Map_Doc_2";
Pchar.quest.Open_the_Grotto.win_condition.l3 = "item";
Pchar.quest.Open_the_Grotto.win_condition.l3.item = "Map_Doc_3";
Pchar.quest.Open_the_Grotto.win_condition.l4 = "item";
Pchar.quest.Open_the_Grotto.win_condition.l4.item = "Map_Doc_4";
Pchar.quest.Open_the_Grotto.win_condition = "Open_the_Grotto";
And then in EITHER quest_reaction.c or both_reaction.c have the case "Open_the_Grotto":

QUESTION: have you looked at the tutorials yet? :?
 
You mean the Chris_Roupe quest tutorial? i'v looked at it but it tells you to add the below code in to the characters_init.c file but i cant find where abouts to put it
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
it says to put it under this code
Code:
//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
but i cant find that code in the characters_init.c so i gave up lol
 
No...

That is for quests you want to initilise at the the start of the game by going to a certain location.

You can put that code in ANYWHERE (dialogs, quest cases OR STARTSTORYLINE.c [I do suggest you look at the Build 14 version not Build 13]) You only put it in startstoryline.c if you want it to be executed from the very start of the game. If you do this though you definantly need to make sure you dont get all the maps till AFTER you have the compass (otherwise the grotto WILL LOCK ITSELF)

Another way to learn is by looking at current quests and seeing how they work
 
Thats what iv bin doin upto now, iv picked up alot from lookin at the JackSparrow files. im makin a quest so i can learn as i go along and iv picked up alot eg. makin dialogs, linkin quests to dialog, quest records, movin chars from place to place that sort of thing. there is alot to learn tho and a hell of a lot of dif codes lol
 
Yep, the way I really learnt what things did is getting a sidequest from standard and just changing it to work in Jack Sparrow :yes

It is amazing what some of the things you can do though
 
Back
Top