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

Information aboute The New Pirate Age - Update! [WIP]

Even if I could help, I'm sorry, but I won't.
Many people have given you a lot of help already; it is your turn to make use of the help you have already been given and do something of your own.
In other words: Show us you're willing to do what you can yourself first.
 
I'm not asking for your help.
I'm asking for you to make use of the help you have already been given and start to do some substantial work on that project of yours yourself.
You have been given clues, support and answers aplenty. So you should have enough tricks up your sleeve to make some real progress of your own.
 
Yes I will doe the work on project be me self,
But some work it is for me to complicated to doe. And for some work I have some Question.
 
Hello Guys! @Grey Roger @Pieter Boelen
I have a Problem and a Question.
The Problem: Me Alliance Charakter did. Not Chose to me as a Allicane Charakter!
What did. make wrong? Maybe i Need to User a ather Dialog File ne i Need the Officer Dialog.
Good where to have a basis Dialog file for the Allicane Character where I have to change the Text in the TExt file.

The Question: Can set Character like Jack Sparrow, Barbossa, Blackbeard, and William Turner only in me Storyline on to ships or on Islands. Is it Possible le.
 
Last edited:
Hello to all!

I have someone Question:
Is it posibel to put a Ship with a Pirate Charakter in Front of a Bay or Beach?
For what purpose?

If you just want to be able to see the ship while you're standing in the port or on the beach:
Code:
setCharacterShipLocation(characterFromID(<name of pirate>), <name of port / beach>);
For example, during my "Ardent" storyline, someone named Mauricio Juradu steals your ship, and you travel on someone else's ship to Boca de Hubon on Hispaniola. When you go ashore and are standing on the beach, you can see your own ship out at sea. Here's how:
Code:
setCharacterShipLocation(characterFromID("Mauricio Juradu"), "Hispaniola_shore_02");

If you want the ship to appear while you're at sea, e.g. because you're about to fight it:
Code:
           Group_CreateGroup("payroll_ship");
           Group_AddCharacter("payroll_ship", "Spanish_Captain2");
           Group_SetGroupCommander("payroll_ship", "Spanish_Captain2");

           Group_SetPursuitGroup("payroll_ship", PLAYER_GROUP);
           Group_SetTaskAttack("payroll_ship",  PLAYER_GROUP, true);
           Group_LockTask("payroll_ship");
           Group_SetAddress("payroll_ship", "Cuba", "Quest_ships", "quest_ship_1");
           Sea_LoginGroupNow("payroll_ship");
This is the code from "Ardent" which sets up a ship for you to attack. Even if there is only one ship, you have to define a group for it using Group_CreateGroup. The other 'group' commands then do things to that group. 'Group_SetPursuitGroup' means the ship will automatically appear near you - leave that command out if you want the ship to appear at a specific place so that the player has to go there to find the ship.

Group_SetAddress is the command which puts the ship at a specific place. In this example, "payroll_ship" is the name of the group containing the ship, as defined by the Group_CreateGroup, Group_AddCharacter and Group_SetGroupCommander commands. "Cuba" is the name of the island - check "PROGRAM\ISLANDS\Islands_init.c" to make sure you're using the right name for the island. "Quest_ships" is the locator group and "quest_ship_1" is the locator name which define where the ship will appear. (If you have included the Group_SetPursuitGroup line, or if you give locator group and name which do not correspond to an actual locator, the ship will appear next to the player.)

You can use TOOL to find locators at an island. Or, if you tell me which island and which port or beach you want to use, I can probably find a suitable locator for you.
 
@Grey Roger
Ok Fine i will Check out the Pleases if I need and tell it then go you.

But can you help me with the Alliance Problem?
For: red-Hear Shanks on Turk and for Trafalga D Law on Alice Town. I also like to see there Ship in the Ports
 
Hello Guys! @Grey Roger @Pieter Boelen
I have a Problem and a Question.
The Problem: Me Alliance Charakter did. Not Chose to me as a Allicane Charakter!
What did. make wrong? Maybe i Need to User a ather Dialog File ne i Need the Officer Dialog.
Good where to have a basis Dialog file for the Allicane Character where I have to change the Text in the TExt file.
I would need to see your dialog files and "quests_reaction.c" file to see what is happening. You'll need to tell me which character I need to check, and where in "quests_reaction.c" he is supposed to join you.

The Question: Can set Character like Jack Sparrow, Barbossa, Blackbeard, and William Turner only in me Storyline on to ships or on Islands. Is it Possible le.
You already know how to define characters - put them in any file in folder "PROGRAM\Storyline\NewPirateAge\characters\init". You also know how to place a character on an island. To put him on a ship, either include a ship in his definition in the file; or, in "quests_reaction.c", give him a ship:
Code:
GiveShip2Character(characterFromID("Doolin Becart"),"Tartane2","Jacqueline",-1,SPAIN,true,true);
This, in the "Ardent" storyline, gives a ship of type "Tartane2", named Jacqueline, to a character named Doolin Becart. The "-1" means the ship will get default guns as defined in "ships_init.c". "SPAIN" means the ship will have data modified as if it had been built in Spain. The two "true" bits mean the ship will automatically have full crew and standard supplies, so you don't need to worry about assigning them.

Note that Will Turner appears in a sidequest. If you're going to have your own version of Will Turner, that sidequest will probably need to be disabled in your storyline. In "StartStoryline.c", somewhere before the "QUESTS SECTION END" line, add this:
Code:
       DeleteAttribute(PChar, "quest.Jackpot");
       DeleteAttribute(PChar, "quest.Jackpot_start");
 
@Grey Roger
The Quests file looks like this:


My quests_reaction.c

void QuestComplete(string sQuestName)
{
ref PChar, NPChar, sld;
PChar = GetMainCharacter();

switch(sQuestName)
{
case "Start":
SetQuestHeader("Beginning");
AddQuestRecord("Beginning", "1");
CloseQuestHeader("Beginning");
if (GetMySimpleName(PChar) == "James Flint") GiveShip2Character(PChar,"Corvette4","Ship1",-1,PIRATE,true,true);
if (GetMySimpleName(PChar) == "Jack Throne") GiveShip2Character(PChar,"US_Interceptor","Ship2",-1,PIRATE,true,true);
break;

case "Officier":
DeleteAttribute(&Locations[FindLocation("Antigua_port")],"vcskip");
DeleteAttribute(&Locations[FindLocation("Grand Cayman_Tavern")],"vcskip");
DeleteAttribute(&Locations[FindLocation("Santiago_Tavern")],"vcskip");
DeleteAttribute(&Locations[FindLocation("Havana_Town_05")],"vcskip");
DeleteAttribute(&Locations[FindLocation("Redmond_Tavern")],"vcskip");
DeleteAttribute(&Locations[FindLocation("Charlestown_port")],"vcskip");
Locations[FindLocation("Eleuthera_tavern")].vcskip = true;
Locations[FindLocation("Turks_Tavern")].vcskip = true;
Locations[FindLocation("BC_Tavern")].vcskip = true;
break;

case "Alliance":
SetCompanionIndex(PChar, -1, GetCharacterIndex("Trafalgar D. Water Law"));
SetCompanionIndex(PChar, -2, GetCharacterIndex("Red-Hair Shanks"));
break;

PChar.questnotfound = true; // PB: Testing
}
}
 
How is case "Alliance" called? Do you know if that happens?
All executed quest cases get logged in compile.log, so you can check there.
 
First: it is not necessary to copy and paste the entire contents of the file. You can upload the file as an attachment. See at the bottom right where you press "Post Reply" to send your message? Next to it is "Upload a file". Press that, then pick your file, and it should appear as an attachment to your post.


Next: apart from some initial setting up, almost all of "quests_reaction.c" consists of cases. These will be triggered by various means. Case "start" is probably triggered from "StartStoryline.c".
Have a look at "PROGRAM\Storyline\Hornblower\quests\quests_reaction.c". See how, in case "Start", there is this bit:
Code:
           Pchar.quest.Join_the_ship_crew.win_condition.l1 = "location";
           PChar.quest.Join_the_ship_crew.win_condition.l1.character = Pchar.id;
           Pchar.quest.Join_the_ship_crew.win_condition.l1.location = "Antigua_academy";
           Pchar.quest.Join_the_ship_crew.win_condition = "Join_the_ship_crew";
What this does is set up a condition so that, when you go into "Antigua_academy", case "Join_the_ship_crew" is triggered.

Case "Join_the_ship_crew" ends with this:
Code:
           LAi_SetActorType(pchar);
           LAi_ActorGoToLocator((Pchar), "goto", "goto1", "arrived_from_England", 10);
That makes you walk to locator "goto/goto1", then triggers case "arrived_from_England".

Case "arrived_from_England" sets up a dialog with Captain James Sawyer. Looking at "Captain James Sawyer_dialog.c", a sequence of dialogs ends at case "Exit_Continue_with_Justinian", which includes the command
Code:
AddDialogExitQuest("Keene_has_his_say");
So when the dialog finishes, quest case "Keene_has_his_say" is triggered.

These are ways by which quest cases can be triggered. There are others. So, in your "quests_reaction.c", there are quest cases "Officier" and "Alliance". How are these triggered?


Next: in case "Alliance", there is:
Code:
SetCompanionIndex(PChar, -1, GetCharacterIndex("Trafalgar D. Water Law"));
SetCompanionIndex(PChar, -2, GetCharacterIndex("Red-Hair Shanks"));
The number is the slot to which the officer's ship will be assigned. Normally this should be 1, 2 or 3, to put that ship into that slot in your fleet. (Slot 0 is your own ship, so don't try assigning someone else's ship there!) If you have -1 there, the code for 'SetCompanionIndex' will try to find any empty slot and put the ship into it. -2 is nonsense and won't work.

If you want Trafalgar D. Water Law to go into slot 1 and Red-Hair Shanks to go into slot 2, then the code should be:
Code:
SetCompanionIndex(PChar, 1, GetCharacterIndex("Trafalgar D. Water Law"));
SetCompanionIndex(PChar, 2, GetCharacterIndex("Red-Hair Shanks"));
If you just want them assigned to any two slots that aren't currently occupied, use this:
Code:
SetCompanionIndex(PChar, -1, GetCharacterIndex("Trafalgar D. Water Law"));
SetCompanionIndex(PChar, -1, GetCharacterIndex("Red-Hair Shanks"));
 
Hm sorry what did you mean?
I don't understand you sorry?
You have this code:
Code:
case "Alliance":
SetCompanionIndex(PChar, -1, GetCharacterIndex("Trafalgar D. Water Law"));
SetCompanionIndex(PChar, -2, GetCharacterIndex("Red-Hair Shanks"));
break;
Unless you tell the game to actually do that, it will never get executed.
So how are you telling the game that?

Additional to that, if it DOES get executed, it gets logged to compile.log so that you know for certain that it works.

Reason I ask is because there could be two reasons why it doesn't do what you want:
1. The code inside "Alliance" does not do what you want
or
2. Case "Alliance" never gets executed at all

Need to know which of the two it is. ;)
 
Yes I know but I only can open your page on phones because my offices Blocks you site.

Hm ok then maybe
I make this changes and let the Alliance away.

Or should I add this to lines in to the Offcer case area?
 
Last edited:
By the way, in quest case "Start", you have:
Code:
if (GetMySimpleName(PChar) == "James Flint") GiveShip2Character(PChar,"Corvette4","Ship1",-1,PIRATE,true,true);
if (GetMySimpleName(PChar) == "Jack Throne") GiveShip2Character(PChar,"US_Interceptor","Ship2",-1,PIRATE,true,true);
The third parameter to 'GiveShip2Character' is the ship's name. So if you are playing as James Flint, you'll get a corvette whose name is "Ship1". If you're playing as Jack Throne, you'll get a small brig whose name is "Ship2". You may want to change the ship names to something more appropriate. ;)
 
I have littel Question:
Can we make sidequest or only Main Quests?
I ask because I like to make sidequest the called
"The Pirate Alliances" but the Quest is no must Quest.
 
You can write sidequests as well if you like. They work pretty much the same way as quests in a storyline. You can find code for these in "PROGRAM\Quests\quests_side.c". You can also have a sidequest within a storyline; something which the player can do but which is not necessary to the main story.

But writing a sidequest while you're still trying to make the storyline work is probably not a good idea; and writing sidequests within the storyline just makes it more complicated. And if "The Pirate Alliance" is supposed to do what you're trying to do in your quest case "Alliance", currently in your "quests_reaction.c", then you're going to run into exactly the same problem - it won't happen until you provide a way to trigger it.
 
Ok so then you mean it is Better to but the Pirate Alliances as Main Quest or to don't put it in a Quest.

Can I have normal Dialog File for Starter Quest NpC. Would be fine.
 
Back
Top