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

A start for the "Master and Commander" storyline

I see no particular wrongs in your above code. When you try it, what happens?
 
The same thing as always:

I cant load the (Stephen Maturin_dialog.c) assigned for me.


Yeah, i know i can edit... my head is just in another place, thats is :rolleyes:
 
Well, i decided to go slowly and just made 6 lines and it worked. Im going to try more and see how further i can go.


I did it! Finally the dialog is working.

Now i want to make my character to sit down after the greetings.

How do i do it?
 
If you haven't done so already, I very much recommend you turn on error logging:
- Open "engine.ini" in your main game folder.
- Find the "debuginfo = 0" line and change it to "debuginfo = 1".
- Start the game and wait until the error occurs.
- Now find compile.log, system.log and the possible error.log in your main game folder.

Usually if you made a mistake in a dialog file, the error.log will tell you in which line and give you a clue on why.

I recommend you have a look at the code for the opening of the Jack Sparrow storyline for the sitting down.
I have run out of time, so I can't give you a proper explanation. Hopefully Captain Maggee will be able to.
 
The debuginfo is already = 1, by default here :shrug

There is no compile.log or error.log, just system.log.

But i will do it if i find another error, thank you.

Now i will learn how to make my character sit down.
 
What you need to do is open up PROGRAM/Storyline/LegendJackSparrow/quests/quest_reaction.c and the start of that is entering a tavern and talking to a character sitting down...

To put it in your one follow the corisponding file for your quest ;)
 
And what should i change in that code in case i copy it?

Also, i guess i will change the place to start in the naval base island, Antigua. What is the code name to Saint John's? I mean, if i want Stephen to be found in the tavern there, i should write "Saint John's_tavern" or is there another code name?

Also, i think i will buy a better PC today. Now that im "moding" and need to start a new game several times, the lag is starting to kill me.
 
If you hit F12 it will tell you the location name in the top left of the screen ;)

- location
- characterid
are the things you need to change :yes

Other than them it should work the same :)
 
I wonder what more i have to change in this code part.

case "opening":
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, pchar.model, "reload", "reload1");
sld.name = pchar.name;
sld.lastname = pchar.lastname;
sld.id = "Original Model";
Pchar.originalmodel = pchar.model;
ChangeCharacterAddressGroup(CharacterFromID("Original Model"), "none", "", "");
ChangeCharacterAddress(characterFromID("Carpenter"), "none", "");
ChangeCharacterAddress(characterFromID("Crew_member_01"), "none", "");
ChangeCharacterAddress(characterFromID("Crew_member_02"), "none", "");
ChangeCharacterAddress(characterFromID("Crew_member_03"), "none", "");
ChangeCharacterAddress(characterFromID("Crew_member_04"), "none", "");
ChangeCharacterAddress(characterFromID("Crew_member_05"), "none", "");
ChangeCharacterAddress(characterFromID("Crew_member_06"), "none", "");
ChangeCharacterAddress(characterFromID("Crew_member_07"), "none", "");
ChangeCharacterAddress(characterFromID("Crew_member_08"), "none", "");
ChangeCharacterAddress(characterFromID("Jack Aubrey"), "none", "");
Locations[FindLocation("Antigua_Residence")].reload.l2.disable = 1;

Pchar.Temp.self.dialog = Pchar.dialog.currentnode;
LAi_SetActorType(pchar);
Pchar.dialog.filename = "Stephen Maturin_dialog.c";
Pchar.dialog.currentnode = "First time";
LAi_ActorSelfDialog(Pchar, "player_back");

pchar.Turks = "0";

if(ENABLE_CHEATMODE)
{
ChangeCharacterAddressGroup(CharacterFromID("Stephen Maturin"),"Antigua_tavern", "sit", "sit5");
pchar.quest.henry_talk = "for_game_shortcuts";
}
break;

case "opening_1":
LAi_QuestDelay("opening_2", 1.0);
break;

case "opening_2":
LAi_SetActorType(pchar);
Pchar.dialog.currentnode = "Tavern_stuck";
LAi_ActorSelfDialog(Pchar, "player_back");
break;

case "opening_3":
LAi_SetActorType(characterFromID("Stephen Maturin"));
LAi_ActorSetSitMode(characterFromID("Stephen Maturin"));
LAi_QuestDelay("opening_4", 1.0);
break;

case "opening_4":
LAi_ActorDialogNow(characterFromID("Stephen Maturin"), pchar, "", -1);
break;

case "Take_a_seat_BB":
DeleteAttribute(pchar,"quest.henry_talk");
LAi_SetActorType(characterFromID("Stephen Maturin"));
LAi_ActorSetSitMode(characterFromID("Stephen Maturin"));
LAi_fade("Take_a_seat_BB2", "Take_a_seat_BB3");
break;

case "Take_a_seat_BB2":
LAi_SetSitType(pchar);
ChangeCharacterAddressGroup(pchar, "Antigua_tavern", "sit", "sit4");
break;

case "Take_a_seat_BB3":
Characters[GetCharacterIndex("Stephen Maturin")].dialog.currentnode = "Tavern_Story2";
LAi_ActorDialog(characterFromID("Stephen Maturin"), pchar, "", 0.0, 0.0);
break;

Specialy in this part:
Pchar.dialog.currentnode = "First time";
LAi_ActorSelfDialog(Pchar, "player_back");

I must change the "First time" and the "player_back"? I have to create more codes that should replace these?

And this part?

DeleteAttribute(pchar,"quest.henry_talk");

I dont know... :shrug
 
That start part is a self dialog for the player that Im guessing you dont want...

dialog.currentnode = ""; (the word/s in between the quotations refer to the case in the dialog file (eg node1)

So the first part of the code is pretty much useless...

Try this code and I will highlight the lines that need further editing ;)

Code:
		case "Start":
ChangeCharacterAddressGroup(CharacterFromID("Stephen Maturin"),"Antigua_tavern", "sit", "sit5");
LAi_SetActorType(characterFromID("Stephen Maturin"));
LAi_ActorSetSitMode(characterFromID("Stephen Maturin"));
break;

case "Take_a_seat":
LAi_fade("Take_a_seat_2", "Take_a_seat_3");
break;

case "Take_a_seat_2":
LAi_SetSitType(pchar);
ChangeCharacterAddressGroup(pchar, "Antigua_tavern", "sit", "sit4");
break;

case "Take_a_seat_3":
Characters[GetCharacterIndex("Stephen Maturin")].dialog.currentnode = "Tavern_Story2";          //change the currentnode
LAi_ActorDialog(characterFromID("Stephen Maturin"), pchar, "", 0.0, 0.0);
break;

So like I said a fair bit of useless code in there for what you want, (note: somewhere in the dialog after first time you will need to add a AddDialogExitQuest("Take_a_seat"); line [to make your character sit down])
 
I noticed that the Quest Log message disappeared.

What i have to do to get it back?



Never mind. God bless the backups!
 
These three lines were adding it:
Code:
			SetQuestHeader("Beginning");
AddQuestRecord("Beginning", "1");
CloseQuestHeader("Beginning");
Just put that back in the first quest case.
 
SetQuestHeader: makes the quest log
AddQuestRecord: adds a quest log entry
CloseQuestHeader: blanks the quest log out and adds the tick (finished quest)
DeleteQuestHeader: completly removes the quest log

I do strongly recommend you try editing a quest to work out what all the different code lines do before trying to make your own completly new quest (so for example take a sidequest from Jack Sparrow (located in both_reaction.c) and adapt it with new characters and locations and see if you can get it to work in your game) ;)
That will teach you how to change character locations, dialog files and how to move onto different quest cases either using ( pchar.quest, AddDialogExitQuest(); or LAi_QuestDelay(); )
 
Hi,

this is my first Post here. I spend some Time in the Build 14 Code and it may be a good Help for the Master & Commander Storyline.

At first i changed the Ranks of the Royal Navy:


Its located in the nations_init.c
Code:
 rNation.Ranks.Quantity = 19;
rNation.Ranks.1 = "Volunteer First Class";
rNation.Ranks.2 = "Midshipman";
rNation.Ranks.3 = "Ensign";
rNation.Ranks.4 = "Lieutenant";
rNation.Ranks.5 = "Lieutenant-Commander";
rNation.Ranks.6 = "Commander";
rNation.Ranks.7 = "Captain";
rNation.Ranks.8 = "Commodore";
rNation.Ranks.9 = "Rear Admiral, Blue Flag";
rNation.Ranks.10 = "Rear Admiral, White Flag";
rNation.Ranks.11 = "Rear Admiral, Red Flag";
rNation.Ranks.12 = "Vice Admiral, Blue Flag";
rNation.Ranks.13 = "Vice Admiral, White Flag";
rNation.Ranks.14 = "Vice Admiral, Red Flag";
rNation.Ranks.15 = "Admiral, Blue Flag";
rNation.Ranks.16 = "Admiral, White Flag";
rNation.Ranks.17 = "Admiral, Red Flag";
rNation.Ranks.18 = "Admiral of the Fleet";
rNation.Ranks.19 = "First Lord of the Admiralty";


NATIONS_QUANTITY++;

The Admirality-Ranks where valid up to the year of 1864 (not implemented yet).

Second Change takes place in the NK.c (Folder Program), the player now reaches more Items in the RN:
Code:
case ENGLAND:
switch(GetRank(pchar, GetCurrentLocationNation()))
{
case 1: // Volunteer First Class
switch(GetAttribute(pchar,"model"))
{
case "cnorrington": GiveModel2Player("Mdnorrington", true); break;
case "blaze": GiveModel2Player("47_Blaze_brtmds", true); break;
switch(rand(2))
{
case 0: GiveModel2Player("rn_mdshp18_1", true); break;
case 1: GiveModel2Player("rn_mdshp18_2", true); break;
case 2: GiveModel2Player("rn_mdshp18_3", true); break;
}
}

GiveItem2Character(pchar,"clock1"); // ..
break;
case 2: // Midshipman
if(pchar.model == "depp")				GiveModel2Player("47_Ltsparrow", true);
if(pchar.model == "Mdnorrington")		GiveModel2Player("Ltnorrington", true);
if(pchar.model == "47_Blaze_brtmds")	GiveModel2Player("47_Blaze_brtlt", true);
GiveItem2Character(pchar,"compass1"); // ..
GiveItem2Character(pchar,"spyglass2"); // ..

break;
case 3: // Ensign
GiveItem2Character(pchar,"sextant"); // ..
GiveItem2Character(pchar,"clock2"); // position geht nun..
break;
case 4: // Lieutenant
GiveItem2Character(pchar,"spyglass3"); // ..
break;
case 5: //Lieutenant-Commander
break;
case 6: //Commander
if(pchar.model == "47_Ltsparrow")		GiveModel2Player("47_Cptsparrow", true);
if(pchar.model == "Ltnorrington")		GiveModel2Player("cnorrington", true);
if(pchar.model == "47_Blaze_brtlt")		GiveModel2Player("47_Blaze_brtcpt", true);
GiveItem2Character(pchar,"blade24"+qual); // English Officer's Saber
EquipCharacterByItem(pchar,"blade24"+qual);
break;
case 7: //Captain
if(pchar.model == "47_Cptsparrow")		GiveModel2Player("47_Cosparrow", true);
if(pchar.model == "cnorrington")		GiveModel2Player("Conorrington", true);
if(pchar.model == "47_Blaze_brtcpt")	GiveModel2Player("47_Blaze_brtco", true);
GiveItem2Character(pchar,"blade22"+qual); // Corsair's Pride
EquipCharacterByItem(pchar,"blade22"+qual);
break;
case 8: // Commodore
if(pchar.model == "47_Cosparrow")		GiveModel2Player("47_Admsparrow", true);
if(pchar.model == "47_Blaze_brtco")	GiveModel2Player("47_Blaze_brtadm", true);
break;
case 9: //Rear Admiral, Blue Flag
break;
case 10: //Rear Admiral, White Flag
break;
case 11: //Rear Admiral, Red Flag
break;
case 12: //Vice Admiral, Blue Flag
break;
case 13: //Vice Admiral, White Flag
break;
case 14: //Vice Admiral, Red Flag
break;
case 15: //Admiral, Blue Flag
GiveItem2Character(pchar,"spyglass4"); // ..
break;
case 16: // Admiral, White Flag
break;
case 17: // Admiral, Red Flag
break;
case 18: // Admiral of the Fleet
break;
case 19: // First Lord of the Admiralty
break
}
break;

This does not Affect the Changes, just gives you as Midshipman a Compass and Spyglass, as Ensign a Sextant an Chronometer. On your way to the Top you will get a better Spyglass al Lieutenant a Officer's Saber as Commander (your first Major Command).

It would be great if you implement this minor Changes in the Build. If i missed anything please Contact me, for me it Works great in Game. :)

Regards
John
 
I like the idea of adding more promotion rewards, but I reckon similar ones should be added to the other nations then as well.
As for the ranks, the game at this time only supports 12 ranks per nation. You can add more lines of code, but they aren't used.

Are you registered on the forum? If not, go ahead and join us! You're still showing up as guest. :wacko:
 
I like the idea of adding more promotion rewards, but I reckon similar ones should be added to the other nations then as well.
As for the ranks, the game at this time only supports 12 ranks per nation. You can add more lines of code, but they aren't used.

Are you registered on the forum? If not, go ahead and join us! You're still showing up as guest. :wacko:


The number of ranks is set in globals.c or not?

Just changed it to 19 and i will see how it works :)

regards
john

EDIT:

It works, POTC now uses 19 Ranks. Even without adding new cases for the other nations than england. I have added new cases without changing the max rank of the other nations. BTW: For rank 19 u need about 1680 rank-points, some more challenging as before :p

If someone is interested i'm going to upload the code! Some minor changes to the storylines are needed as well..

regards
John
 
You already tested and got yourself up to those high ranks? Wow! :shock
I do think if England gets 19 ranks, the other countries should do too.
Possibly when you do have 19 ranks working for England in the game, when you're in the service of another nation,
the game might eventually try to promote you to an unexisting rank and cause trouble.
 
Back
Top