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

@Grey Roger
Ah ok thanks.

Did you know any dialog that can copy and edit to me plan?

Sorry a ather Quest what Code did I need so that on the Ship are Skelett Fighter iS?
And where have i to put this code then.

Put are some question what I don't know it.
 
Last edited:
In "PROGRAM\Storyline\Ardent\DIALOGS", you should find "blank_dialog.c". And in "PROGRAM\Storyline\Ardent\DIALOGS\ENGLISH" is the corresponding "blank_dialog.h". Whenever I'm creating a new dialog, I start by copying those files and renaming the copies to suit the character whose dialog I'm writing, then start filling them in.

Start by copying "blank_dialog.h". Rename the copy to suit the character whose dialog you're editing - perhaps "Salazar_dialog.h". The file initially looks like this:
Code:
string DLG_TEXT[2] = {
".",
".",
}
Replace the first "." with something Salazar can say to you when nothing is happening - perhaps something simple like "Hello"." or "Get lost!". Replace the second "." with what you'll say back. After that, you can add more lines for the important dialog. For a simple dialog, you just need to add more pairs of lines - he says something, you say something back. When you've finished, count how many lines of dialog text there are and edit that first 'string DLG_TEXT[2]' line - replace the 2 with the new number of dialog lines. If you're using Notepad, there's a nice little trick. Put the cursor to the last line of dialog and press Ctrl-G, or click "Edit" and then "Go to". That will tell you the line number you're looking at. The first line of the file is that 'string DLG_TEXT' line, so the first line of dialog text is line 2. The line number of the last dialog line is therefore always 1 higher than the number of dialog lines.

Now copy "blank_dialog.c" and again, rename the copy to suit the character e.g. "Salazar_dialog.c". The name must match the "dialog.h" file. The file starts by setting up some useful variables, then most of the file is a big 'switch' block. Look at case "First time" - this controls what the character will say when you first talk to him. There's some stuff which I don't fully understand myself, but the important bit is this:
Code:
           dialog.text = DLG_TEXT[0];
           link.l1 = DLG_TEXT[1];
           link.l1.go = "Exit";
Programs often count starting at 0. So DLG_TEXT[0] is the first line of text in the "dialog.h" file and DLG_TEXT[1] is the second line. The simplest dialog cases all look like that:
  • dialog.text is what the character says.
  • link.l1 is what you say back.
  • link.l1.go is the dialog case which will trigger when you have said your line.
So as it stands, he'll say one line, you'll say one line, then the dialog goes to case "exit", which is a special one that you'll see in "blank_dialog.c" and which closes down the dialog, returning you to the game.

To make use of what you wrote in the "dialog.h" file, you just need to write more such "case" blocks. Look at "Slave_Commandant_dialog.c" and "Slave_Commandant_dialog.h", for example. The first two lines of "Slave_Commandant_dialog.h" are what he says and you say if you talk to him while he's just following you around. And in "Slave_Commandant_dialog.c", case "First time" is exactly as it was in "blank_dialog.c". The next case is:
Code:
       case "Intruder":
           PlaySound("VOICE\ENGLISH\pir_capHH.wav");
           dialog.text = DLG_TEXT[2];
           link.l1 = DLG_TEXT[3];
           link.l1.go = "Intruder2";
       break;

       case "Intruder2":
           dialog.text = DLG_TEXT[4];
           link.l1 = DLG_TEXT[5];
           link.l1.go = "Exit";
       break;
Remember, program counts starting at 0, and the first line of "officer1_dialog.h" is the 'string DLG_TEXT' line. So DLG_TEXT[2] is actually the fourth line of "officer1_dialog.h". In general, whatever line number you're looking at in a "dialog.h" file, the matching DLG_TEXT line in the "dialog.c" file is 2 less.

You don't need the 'PlaySound' line - I'd found a voice file which sounded appropriate to the situation. For a simple, basic dialog, don't bother with this. So, he says a line, you say a line, and the dialog goes to case "Intruder2". (Because you're an intruder in his camp! Make up your own names, don't just copy "Intruder".) Case "Intruder2" is the same, except the dialog now goes to case "Exit", which is a special case that closes down the dialog and returns you to the game.

For a longer dialog, just have link.l1.go lead to another case, then write the next case the same way. And so on. When the dialog is over, end with link.l1.go = "Exit"; to stop.

And if you want to trigger a quest case, the 'AddDialogExitQuest' line goes just before the 'link.l1.go = "Exit";' line. (It can probably go anywhere in that block, but as far as I'm concerned, it's neater if I set up the 'AddDialogExitQuest' just before the dialog exits to trigger the quest. :D)

One more thing. Don't forget to save these dialog files in your own storyline folder, not in the "Ardent" one, otherwise your storyline won't find them!
 
You have presumably defined character "Armando Salazar" somewhere. Add this to his definition:
Code:
ch.boardingmodels = "Skeletons";
 
No. That defines the model which the character can use, not the character himself. Do you have anything for Salazar in "PROGRAM\Storyline\NewPirateAge\characters\init\Story.c", or any other file in that folder?
 
@Grey Roger

Yes I found it by me self.

So but pleace can you tell exatly what i have to doe and which Code i need:

Case: Doflamigo Family (4 Member):

2 Member in the Pirate Fort
2 ---"---- in the Smuggler Lair

Aktion: Only they should attack the Player and the Party.
Pirate Fort: 2 vs Player & Party
Smuggler Lair: 2 vs Player & Party


Case: Capt. Kuro Gang (4 Member):
all 4 Members a placed on the Lighthouse Bay
And all 4 Member Attack Player & Party


That is the Last thing what i need to Finsh the Projekt.

But für the Bouns i only need your Meanings about Charakter, but that is later.

CU
 
Last edited:
Hello @Grey Roger and @Pieter Boelen

I have two question to you!

1.) Pleace can you give me some Coding Support about me last Post #347

2.) I need your advice / opinion regarding: Which CharacterModel looks most similar to these Charatkern in the picture (AttachmentFile)

SOS I need help i get a error.log but i dont find the Error!

Place can you tell what this Error log see! How can i fix it.


CU
PK
 

Attachments

  • Projekt_Bonus2.jpg
    Projekt_Bonus2.jpg
    562.4 KB · Views: 75
  • error.log
    420 bytes · Views: 72
Last edited:
About the error: that comes from "CharacterUtilite.c", specifically function "GetCargoMaxSpace". The game is trying to calculate the cargo space for a type of ship which does not exist. Could you run the game again, then upload "compile.log"? The function has a 'trace' command to send a message to "compile.log" saying which ship type is causing the problem.
 
Are the DoFlamingo family and the Kuro gang supposed to be there right from the start of the game? Or are they only supposed to appear after something else has happened, e.g. after you have talked to someone who tells you about them?
 
OK, then you can place them by setting their location in their character definitions. First, you will need to find locators on which to place them. Edit "InternalSettings.h", change "VISIBLE_LOCATORS" to 1, then go to the Pirate Fort, the Smugglers Lair and the lighthouse, and look round to find locators where your characters can stand.

Also, upload whichever file contains the definitions of the DoFlamingo family and the Kuro gang. If you then tell me the locators you found, I should be able to edit the file to place the characters on those locators.
 
Then, to place one of the DoFlamingo family members in Pirate Fort for example, add this to his character definition:
Code:
    ch.location    = "Pirate_Fort";
    ch.location.group = "goto";
    ch.location.locator = "goto1";
    LAi_group_MoveCharacter(ch, "monsters");
Replace "goto" and "goto1" with the locator you want to use. When you start a new game and walk into Pirate Fort, he should now be standing there. Being in group "monsters", he might automatically attack you. If not, we can figure out some code to make it happen. Also, if he does attack, watch to see if any of the other people in the fort join in.
 
@Grey Roger: Should this:
Code:
LAi_group_MoveCharacter(ch, "monsters");
Be this:
Code:
LAi_group_MoveCharacter(ch, LAI_MONSTERS);
Or something like that?
 
Probably either:
Code:
LAi_group_MoveCharacter(ch, "monsters");
or
Code:
LAi_group_MoveCharacter(ch, LAi_monsters_group);
Because in "LAi_monsters.c", LAi_monsters_group is defined:
Code:
string LAi_monsters_group = "monsters";
 
Sounds about right, @Grey Roger. I would definitely recommend using the LAI_MONSTERS_GROUP instead of directly "monsters".
The #defines are there for a reason and that reason is to be used. ;)
 
Back
Top