1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Discussion Dead Man's Chest Storyline

Discussion in 'Hoist the Colours (Jack Sparrow)' started by Jones, Jun 4, 2017.

  1. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,390
    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.
     
  2. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    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
     
    Pieter Boelen likes this.
  3. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,581
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Doesn't make a difference as far as I know.

    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.

    Sailaway ships don't ever stop moving.
    They just keep going in a straight line.
     
  4. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,390
    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")'?
     
  5. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,581
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    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 .
     
  6. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    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
     
  7. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,581
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Are you developing inside the current Jack Sparrow storyline or in a different one?
     
  8. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    in another...
     
  9. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    @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
     
  10. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,581
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    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.
     
  11. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    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.
     

    Attached Files:

  12. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,390
    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?
     
  13. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    No problem, I corrected 46 with 47
    Now I try:onya
     
  14. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    @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
     

    Attached Files:

  15. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,581
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Revert your PROGRAM folder to the last state that did work; then use WinMerge to find the differences with your new version.
     
    Jones likes this.
  16. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,390
    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.
     
  17. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    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
    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.
    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.
     
  18. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,390
    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.
    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. :))
    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.
     
  19. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,581
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    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.
     
  20. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    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.
    In TempQuest.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
     

Share This Page