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

Discussion Dead Man's Chest Storyline

I'm not sure what's wrong, then. Doing that trick of writing the locators to a text file, reading them into the model file, then viewing the result with GM Viewer, I can see your locator close by the port side of the deck. Differences I can see between this and the locators which @Pieter Boelen put into "RESOURCE\MODELS\Locations\Decks\udeck2\udeck_ld.gm" to add places for a ship to appear near "ShipDeck3":
  • Those in "udeck2" are have group names "ships" and "ships_other", whereas yours are "Ships" and "Ships_Other". I wouldn't have expected capitals to make any difference, but I'm not sure about locator names.
  • The locators in "udeck2" have different co-ordinates. "ships_other\ship_1" is a lot further astern than "ships\ship_1". I'm guessing that the ship should appear on "ships_other\ship_1" and, if the "sailaway" attribute for the character is set, it will move towards "ships\ship_1". Certainly that's what the Interceptor does in the "Jack Sparrow" storyline - starts off astern from you and moves alongside. Your locators have the same co-ordinates, so if that is how ship movement works then the Flying Dutchman isn't going to move, as it starts and finishes in the same place. Whether that prevents it from appearing in the first place, I've no idea.
Try running it again, then look in the log files. Or post them here so we can see if they hold any clues.
 
It all goes well @Grey Roger, I put the lines:
Code:
GiveShip2Character(characterFromID("Davy Jones"),"CursedDutchman","Flying Dutchman",-1,PIRATE,true,true);
                                                      SetCharacterShipLocation(characterFromID("Davy Jones"), "ShipDeck2");
Much higher!
Even though I do not understand why, at the point where these two lines were placed, the Dutch didn'tt appear..
Anyway now it works!:dance
 
I wouldn't have expected capitals to make any difference, but I'm not sure about locator names.
Doesn't make a difference as far as I know.

The locators in "udeck2" have different co-ordinates. "ships_other\ship_1" is a lot further astern than "ships\ship_1". I'm guessing that the ship should appear on "ships_other\ship_1" and, if the "sailaway" attribute for the character is set, it will move towards "ships\ship_1".
The direction of a sailaway ship depends purely on the rotation of the locator that the ship is generated on.
Other locators have nothing to do with it.

Your locators have the same co-ordinates, so if that is how ship movement works then the Flying Dutchman isn't going to move, as it starts and finishes in the same place.
Sailaway ships don't ever stop moving.
They just keep going in a straight line.
 
What is the difference between groups "ships" and "ships_other", then? How do you control which of the locators will be used by 'SetCharacterShipLocation(characterFromID("Port Guard"), "ShipDeck3")'?
 
If I recall, the one is used for player ships and the other for NPC ones.
I know I've seen the code dealing with it, because @Captain Maggee and me modded it to add the "jetty ships" and the "sailaway" functionality.
But I don't remember the specifics. Think it was in locations_loader.c .
 
Ahoy!:ahoy
The problem this time concerns Mr. Gibbs at Tortuga Tavern.
I gave the command:
Code:
ChangeCharacterAddressGroup(characterfromID("Mr. Gibbs"),"Tortuga_tavern", "goto", "goto2");
But I find two Mr. Gibbs
This is because (I think) somewhere is set the location where Gibbs has to be. Instead, it would be useful for me to remove it, only during this Storyline.:keith
 
Are you developing inside the current Jack Sparrow storyline or in a different one?
 
@Pieter Boelen
Code:
ch.old.name = "Joshamee";
    ch.old.lastname = "Gibbs";
    ch.name = TranslateString("","Joshamee");
    ch.lastname = TranslateString("","Gibbs");
    ch.id        = "Storyteller";
    ch.model    = "bocman5";
    ch.sex = "man";
    ch.location    = "Tortuga_tavern";
    ch.location.group = "candles";
    ch.location.locator = "sit5";
    ch.Dialog.Filename = "Storyteller_dialog.c";
    ch.Dialog.CurrentNode = "Tavern_Story";
    ch.rank     = 10;
    ch.reputation = "None";
    ch.experience = "0";
    ch.skill.Leadership = "10";
    ch.skill.Fencing = "7";
    ch.skill.Sailing = "4";
    ch.skill.Accuracy = "6";
    ch.skill.Cannons = "4";
    ch.skill.Grappling = "2";
    ch.skill.Repair = "0";
    ch.skill.Defence = "1";
    ch.skill.Commerce = "10";
    ch.skill.Sneak = "0";
    ch.money = 10000;
    LAi_SetSitType(ch);
    LAi_SetLoginTime(ch, 0.0, 24.0);
    ch.questchar = true;//MAXIMUS: identifier for captives
    AddGameCharacter(n,ch);
I found this in Story.c
So I took it away.:onya
 
in another...
I was about to say, if it is IN the Jack Sparrow storyline code, it is probably the "Storyteller", which you found. :onya
Outside the Jack Sparrow storyline, it could have been the "Muerte_start" quest case instead.
 
Hi all!
Code:
PChar.seabattlemusic = "music_KrakenAttack";
                                                      RemoveCharacterGoods(pchar, GOOD_BALLS, 2000);
                                                      Group_CreateGroup("RN_Corvette");
   Group_AddCharacter("RN_Corvette", "Capitan Damaski");
   Group_SetGroupCommander("RN_Corvette", "Capitan Damaski");
   Group_SetPursuitGroup("RN_Corvette", PLAYER_GROUP);
   //Group_SetTaskAttack("RN_Corvette", PLAYER_GROUP, true);
                                                      Group_SetAddress("RN_Corvette", "KhaelRoa", "reload", "reload_1");
   Group_LockTask("RN_Corvette");
I entered this code so that a ship appears and I only have the kraken option to sink it. But the next quest starts right away. So I tried:
Code:
Pchar.quest.CorvetteDestroyed.win_condition.l1 = "Ship_HP";
            Pchar.quest.CorvetteDestroyed.win_condition.l1.character = "Capitan Damaski";
            Pchar.quest.CorvetteDestroyed.win_condition.l1.quantity = 1500;
            Pchar.quest.CorvetteDestroyed.win_condition.l1.operation = "<";
            Pchar.quest.CorvetteDestroyed.win_condition = "CorvetteDestroyed";
But with this code, just evoke the kraken the game crashes.
Is there another way to end the battle before continuing?
And I found that the mistake that crashes the game is this line:
Code:
Pchar.quest.CorvetteDestroyed.win_condition.l1.operation = "<";
In "error.log" he tells me first:
COMPILE ERROR - file: storyline \ Dead man's chest \ quests \ both_reaction.c; Line: 17
Missing '}' in segment
Unfortunately in my "both_reaction.c" I have nothing, because I don't know what to serve.
 

Attachments

  • both_reaction.rar
    253 bytes · Views: 246
  • compile.rar
    2.9 KB · Views: 240
  • error.rar
    429 bytes · Views: 249
Your "both_reaction.c" has two '{' and no corresponding '}', which is why the system doesn't like it.

Copy "PROGRAM\Storyline\Hornblower\quests\both_reaction.c" into "PROGRAM\Storyline\Dead man's chest\quests", replacing your existing "both_reaction.c" file. The "Hornblower" one contains no active code, it is just a starting file with the basic 'switch' block. If you don't need anything in "both_reaction.c", that should be enough to stop the system from showing errors.

"error.log" also indicates a problem with your "Ragetti_Dialog.h". Could you post that as an attachment?
 
"error.log" also indicates a problem with your "Ragetti_Dialog.h". Could you post that as an attachment?
No problem, I corrected 46 with 47
Your "both_reaction.c" has two '{' and no corresponding '}', which is why the system doesn't like it.

Copy "PROGRAM\Storyline\Hornblower\quests\both_reaction.c" into "PROGRAM\Storyline\Dead man's chest\quests", replacing your existing "both_reaction.c" file. The "Hornblower" one contains no active code, it is just a starting file with the basic 'switch' block. If you don't need anything in "both_reaction.c", that should be enough to stop the system from showing errors.
Now I try:onya
 
@Grey Roger while charging, a black screen appears first and then the quest appears. Also, see the attached:
This could be the cause of the scripts that appear in error.log? I mean: RUNTIME ERROR - file: CCCdirectsail.c; Line: 331
Null ap
 

Attachments

  • screenshot.jpg
    screenshot.jpg
    29.6 KB · Views: 230
Alternatively, if you have enough hard disc space, install the game again into a different folder. For example, if your current install is in "C:\Games\Pirates of the Caribbean", install again into "C:\Games\Pirates of the Caribbean (copy)". Install from CD, then install Build 14 Beta 4.1 along with the zip update - follow the link in @Pieter Boelen's signature to get these. Then you have two versions of the game - the known working version, and the version you're modifying to add your storyline.

As for your quest code:
'RemoveCharacterGoods(pchar, GOOD_BALLS, 2000)' removes a lot of the player's ammo. Is that really what you want to happen right at the start of the battle?
'Group_AddCharacter("RN_Corvette", "Capitan Damaski")' - does a character named "Capitan Damaski" have a ship assigned, either in his character definition or from a 'GiveShip2Character' command earlier in the quest code?
'Pchar.quest.CorvetteDestroyed.win_condition.l1.operation = "<"' can't be the cause of the trouble. It's a valid command, and a necessary part of a block which starts with 'Pchar.quest.CorvetteDestroyed.win_condition.l1 = "Ship_HP"'. The check for "Ship_HP" can't happen unless "win_condition.l1.operation" has been defined. If you remove that line, the game won't crash but you'll probably get a message about it in one of the log files, and quest case "CorvetteDestroyed" will never trigger.
 
Is that really what you want to happen right at the start of the battle?
Yes, because it is when Davy Jones evokes the kraken to attack the other ship. By doing so, one understands that the only way to sink the ship is the kraken
'Group_AddCharacter("RN_Corvette", "Capitan Damaski")' - does a character named "Capitan Damaski" have a ship assigned, either in his character definition or from a 'GiveShip2Character' command earlier in the quest code?
This could be defined in TempQuest.c? Even though the ship still appears. I do not know if it is the same model as RN_Corvette. But as I remarked in GM_Viewer, it's more or less the same.
'Pchar.quest.CorvetteDestroyed.win_condition.l1.operation = "<"' can't be the cause of the trouble.
Maybe. But I removed that line and left only the other three. By doing so, the kraken attacks without problems, but the next quest doesn't start.
 
Yes, because it is when Davy Jones evokes the kraken to attack the other ship. By doing so, one understands that the only way to sink the ship is the kraken
That's not what I'd understand at all. Unless there's some reason given by either a dialogue or questbook entry, all the player knows is that he's suddenly short of some ammo. Depending on how much ammo he's carrying, losing 2000 cannonballs might not be enough to force him to use the Kraken. Personally, if I noticed I'd just lost a 2000 cannonballs, I'd probably be inclined to reload the game to the last time where I could get any ammunition, then make sure to get a lot more.
This could be defined in TempQuest.c? Even though the ship still appears. I do not know if it is the same model as RN_Corvette. But as I remarked in GM_Viewer, it's more or less the same.
Where have you defined "Capitan Damaski"? In "TempQuest.c", "TempQuestEnemy.c", "Story.c" or somewhere else? It doesn't matter - if a ship appears then he must be defined somewhere. Calling his group "RN_Corvette" won't affect what type of ship he has. You give him the ship one of two ways. You can put this in his character definition:
Code:
ch.Ship.Type = "RN_Corvette";
ch.Ship.Name = "Insert Name Here";
Or put this in "quests_reaction.c" somewhere before the battle:
Code:
GiveShip2Character(CharacterFromID("Capitan Damaski"), "RN_Corvette", "Insert Name Here", -1, ENGLAND, true, true);
(Replace "Insert Name Here" with the ship's name. :))
Maybe. But I removed that line and left only the other three. By doing so, the kraken attacks without problems, but the next quest doesn't start.
Exactly as I said. With that line gone, the whole check for "Ship_HP" can't happen, which means it can't trigger the next quest case.

Could you post "quests_reaction.c"? Or at least, post whatever is between 'case "CorvetteDestroyed"' and the next 'break'. My guess is that the problem is there. If you leave the 'Pchar.quest.CorvetteDestroyed.win_condition.l1.operation = "<"' line in place then, when the ship is down to less than 1500HP, case "CorvetteDestroyed" is triggered, and that's when the game crashes.
 
That's not what I'd understand at all. Unless there's some reason given by either a dialogue or questbook entry, all the player knows is that he's suddenly short of some ammo. Depending on how much ammo he's carrying, losing 2000 cannonballs might not be enough to force him to use the Kraken. Personally, if I noticed I'd just lost a 2000 cannonballs, I'd probably be inclined to reload the game to the last time where I could get any ammunition, then make sure to get a lot more.
It's easy enough to take away ALL ammo, regardless of how much you had.
Best would be to save the numbers before doing it, then give it back afterwards.
 
Unless there's some reason given by either a dialogue or questbook entry, all the player knows is that he's suddenly short of some ammo
No, no dialogue. It would be a code (I don't know) that allows me to retrieve all the recharges so that only the kraken can be used.
Where have you defined "Capitan Damaski"? In "TempQuest.c",
In TempQuest.c
Could you post "quests_reaction.c"?
Yes, that's just that piece. I don't know how to do your quests, but I, in order to avoid making history every time, always create a new quests_reaction.c and insert the story piece:doff
 
Back
Top