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

SOS :( @Grey Roger and @Pieter Boelen

I have all done and make with your Files and turtroial.
But in QC_Tavern on Sit8 is no Zorro siting. :(

Short Informatiom:
On Nevis in the Pirate Town in the Tavern is only One Officer from me Projekt
the Rest can be Random.


Pleace take a look at me file and tell me what i have miss or what in have make Worng!
 

Attachments

  • NewPirateAge.zip
    240.7 KB · Views: 55
In "PROGRAM\Storyline\NewPirateAge\characters\init\Story.c" is this line:
Code:
ch.quest.officertype = OFFIC_TYPE_FIRSTMATE;'.
Remove the '. from the end of that line.

If that still doesn't work, post the following files, which you'll find in the top level of the game installation folder:
  • compile.log
  • system.log
  • error.log (if it exists)
If something doesn't work, these files are very useful in finding out why.
 
In "PROGRAM\Storyline\NewPirateAge\characters\init\Story.c" is this line:
Code:
ch.quest.officertype = OFFIC_TYPE_FIRSTMATE;'.
Remove the '. from the end of that line.
Good catch! Indeed that probably makes it a compilation error, meaning that the game code would fail to load "Story.c" altogether.
That explains why the character wouldn't be there. But that is such an obvious error, that it should really generate an error.log entry.

So @pirateking: First thing to do is to check if you have an error.log file and, if yes, see what is in there.
For many of the most obvious errors, that will probably tell you something is wrong with the code and, hopefully, will also tell you where and why.

Also, remember again: BE CAREFUL TO AVOID TYPOS! This is computer code and pretty much ANY wrong character could mess things up.
So make certain, as much as possible, to write the code exactly the way it is intended to be written.
I know mistakes are always going to slip through, but it is important to do your best to minimize them.
Check, check, double-check. ;)
 
Oh je it works.
Hm but i have emty Dialog Files.
Are there any Files which i can copy for the Hire Dialog?
Did you already set ch.Dialog.Filename = "Enc_Officer_dialog.c"; in the Story.c file?
Maybe a ch.Dialog.CurrentNode = "*something*"; may be needed as well, but I'm not entirely sure what that "*something*" should be.
 
@Pieter Boelen
Look at that:

ch.old.name = "Roronoa";
ch.old.lastname = "Zoro";
ch.name = TranslateString("","Roronoa");
ch.lastname = TranslateString("","Zoro");
ch.id = "Roronoa Zorro";
ch.model = "Zorro";
ch.sex = "man";
ch.loyality = 15;
ch.alignment = "good";
ch.sound_type = "seaman";
GiveItem2Character(ch, "bladeC36");
ch.equip.blade = "bladeC36";
GiveItem2Character(ch, "PiratesPistol");
ch.equip.gun = "PiratesPistol";
ch.location = "QC_Tavern";
ch.location.group = "sit";
ch.location.locator = "sit8";
ch.Dialog.Filename = "Enc_Officer_dialog.c";
ch.greeting = "Gr_Officer_m common";
ch.rank = 1;
ch.reputation = "45";
TakeNItems(ch,"medical1", Rand(4)+1);
ch.experience = CalculateExperienceFromRank(1)+ (CalculateExperienceFromRank(1)/10 + rand(500));
ch.skill.Leadership = "2";
ch.skill.Fencing = "5";
ch.skill.Sailing = "3";
ch.skill.Accuracy = "1";
ch.skill.Cannons = "3";
ch.skill.Grappling = "2";
ch.skill.Repair = "2";
ch.skill.Defence = "4";
ch.skill.Commerce = "2";
ch.skill.Sneak = "3";
ch.money = "0";
ch.quest.help = "0";
ch.quest.dialog = "0";
ch.questchar = true;
LAi_SetSitType(ch);
ch.quest.officertype = OFFIC_TYPE_FIRSTMATE;
LAi_SetLoginTime(ch, 0.0, 24.0);
ch.HPBonus = 100; // KevAtl 08-26-2007 to correct for game giving low HP
ch.isOfficer = true;
AddGameCharacter(n, ch);
 
Oh je it works.
Hm but i have emty Dialog Files.
Are there any Files which i can copy for the Hire Dialog?
You could copy from "Enc_Officer_dialog.c" and "Enc_Officer_dialog.h", which you'll find in "PROGRAM\DIALOGS" and "PROGRAM\DIALOGS\ENGLISH".

But first, start by copying those empty files, perhaps to "Roronoa Zorro_dialog.c" and "Roronoa Zorro_dialog.h". Then edit those. Leave the blank ones alone, then you can copy them again and again as the starting point for any other character dialog files. (That, in fact, is why I created the blank files in the first place. Any time I want to start writing a new pair of files for a new character, I copy those two, then just add stuff for the new character.)

The "dialog.h" file is plain text. It's what you will see on screen, both what the character says to you and what you say in response. Edit "Roronoa Zorro_dialog.h" and change the "." lines to whatever you want him to say, for example:
Code:
string DLG_TEXT[2] = {
"Hello.",
"Good day.",
}
When you add more lines, be sure to change that 'DLG_TEXT' line - the number is how many lines of text there are in total. (A useful trick in "Notepad" is to press Ctrl-G, which tells it to go to a line number, and it starts by telling you the number of the line you're on. The first line of the file is that 'DLG_TEXT'. So if you're looking at the last line of text and that happens to be line 54, then there is one 'DLG_TEXT' line and 53 lines of text, so you would change the number in that first line to 53.)

Now look at "Roronoa Zorro_dialog.c", in particular these lines:
Code:
           dialog.text = DLG_TEXT[0];
           link.l1 = DLG_TEXT[1];
           link.l1.go = "Exit";
Programming usually counts up from 0, so DLG_TEXT[0] is the first line of text and DLG_TEXT[1] the second. dialog.text is what he will say to you, link.l1 is what you say in return, and link.l1.go is the name of the case to which the game will go next. case "exit" is special, that's the one which ends the dialog and resets the character so that next time you talk to him, he will use those introduction lines.

In general, a case section in a "dialog.c" file will have those three lines, so the most simple form will look something like this:
Code:
case "meeting":
    dialog.text = DLG_TEXT[2];
    link.l1 = DLG_TEXT[3];
    link.l1.go = "meeting2";
break:
This assumes that there are at least two more lines in the "dialog.h" file, probably at least four more. So he says whatever is on the third line of text (remember, programming code counts from 0, so DLG_TEXT[2] is actually the third line); you say whatever is on the fourth line; and then the dialog proceeds to another case section, "meeting2", which will look similar to that and probably use DLG_TEXT[4] and DLG_TEXT[5]. So there had better be at least six lines of text in the "dialog.h" file. When you want the dialog to end, use link.l1.go = "exit"; to finish.
 
Yes i will see what he says here in a post.
@Grey Roger place can you look at me @post #168: Information aboute The New Pirate Age - Update! [WIP]
If I'm looking at that post then I'm already looking at the thread! I've been a bit busy writing the previous answer, but it seems the discussion has moved on a bit while I was doing so.

There's no point in copying "Enc_Officer_dialog" completely. I was going to suggest looking through the files to see how they work, but I've just been having a look through them myself and they are not easy to follow! So, if you just want to use that dialog as it is, leave Roronoa set to use "Enc_Officer_dialog.c".

As far as I can tell, the starting point in "Enc_Officer_dialog.c" is case "Node_1". So you probably need this in Roronoa's section of "Story.c":
Code:
ch.dialog.CurrentNode = "Node_1";
Probably put it just after the ch.Dialog.filename line.
 
As far as I can tell, the starting point in "Enc_Officer_dialog.c" is case "Node_1". So you probably need this in Roronoa's section of "Story.c":
Code:
ch.dialog.CurrentNode = "Node_1";
Probably put it just after the ch.Dialog.filename line.
Thanks for looking that up! I thought it would be something like that. :onya
 
Oh je it works Thanks to all!

I will first add all hireable Charakter.

@Pieter Boelen
Two smal Question:
1. Is there a dialog code where you can a character with its ship ary. Can also be an already existing dialogue.
2. Pleace can you tell me the different between the Codes:
* Sit
* Goto
* Citizern

Thanks PK
 
Back
Top