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,415
    If I understand correctly:
    "Slave5", "Black Sam", "Black Bart", "Charles Vane", "Edward Low", "John Quelch", "Stede Bonnet" and "Walter Kennedy" are your crew. Some enemies are supposed to fight them but not to fight you. What are you supposed to be doing during all this if not fighting alongside your crew?

    You could try:
    Code:
    LAi_group_MoveCharacter(characterFromID("Slave5"), "Crew");
    
    for each of them. Then, to trigger the fight:
    Code:
    LAi_group_SetRelation("FRANCE_SOLDIERS", "Crew", LAI_GROUP_ENEMY);
    LAi_group_FightGroups("FRANCE_SOLDIERS", "Crew", true);
    That should create a new group, "Crew", and make it fight against the enemy. (You don't have to use "FRANCE_SOLDIERS". I used that group in my battle because it's a predefined group for French soldiers and the battle was indeed against French soldiers.) I'm not sure if this will work properly, though. If two separate groups fight each other and neither of them is the player's group then the AI can sometimes get confused and weird things may happen.

    I'm surprised that 'LAi_SetWarriorType' was preventing the crew from fighting - the purpose of that line is to allow them to fight!
     
  2. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    Yes, I also have to fight.
    I do not know what to say. But it seems that the code 'LAi_SetWarriorType', in this case, has the same action as 'LAi_SetCivilianGuardianType'
     
  3. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,415
    Very strange - on one occasion I tried to set up a fight and the characters would only fight if they'd been set to WarriorType.

    Anyway, if you're supposed to join in the fight then disregard my previous post and use "LAI_GROUP_PLAYER" for all your crew.
     
  4. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    Hi all,
    I have a problem: I set the code from 0 to 1:
    Code:
    #define SIDESTEP_ENABLED 1
    But as soon as I'm on the deck, I can't get out of the ship to set the "ship_other" ...
    I would need ShipDeck2 :nerbz
     
  5. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I don't think I understand what you mean...
     
  6. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,415
    "SIDESTEP_ENABLED" can be useful when playing the game but it's never worked properly, and any storyline which depends on it is never going to be reliable. It certainly won't get you from one scene to another. If you sidestep off a ship, you'll just be floating over the sea.

    What exactly are you trying to do? Transfer to another ship? What is "ship_other"?
     
  7. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    When you're on a deck, part of it should be a "ships_other" where another ship appears.
    I try to add a ship near mine
     

    Attached Files:

  8. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    I try to add a location where I can not walk on it. As in the case of "ships_other".
     
  9. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Oh, you're trying to add a locator that you can put another ship on!
    That should indeed be possible; I've done it with the Interceptor during CotBP.
     
  10. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    Yes, but to do this I think I should use the SIDESTEP_ENABLED code and then I can get out of the ship, but unfortunately that does not happen ...
     
  11. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Did sidestep work at all?

    There are other ways with clever use of the TOOL and GM Viewer.
     
  12. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,415
    No, "SIDESTEP_ENABLED" won't get you to another ship. You'll need to do a 'DoQuestReloadToLocation' or possibly a 'DoReloadCharacterToLocation' to transfer to the other ship's deck.
     
  13. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I thought he meant to get to the position to place a locator to put another ship on.
    So you can have another ship showing in the same scene.
     
  14. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    This code doesn't allow me to sidestep into open space? So should you take me out of the ship too? Or rather, how have the leases been added the locations outside the port? For example: Ships_other - ship_1?
     
  15. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Sidestep usually allows you to float outside the walkable scene.

    But you can also export locators with the TOOL, import them in a copy of the location GM, use GM Viewer to view the locators and then use trial and error to find the coordinates you want.
    I've definitely done that before.
     
    Jones likes this.
  16. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    Oh yes! Now I try!
    ps. And I did not understand, to add a location with GM Viewer?
     
  17. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,415
    You don't use GM Viewer to add locations. You use TOOL for that. For "ShipDeck2", you'll be editing "RESOURCE\MODELS\Locations\Decks\udeck1\udeck_ld.gm". When you've done so, click Locators -> Write to File and save the locators as a text file, e.g. "udeck_ld.txt". Now open "udeck.gm", which is the file for the deck model. Click Locators -> Read from File and read back the text file you saved earlier. Save the result as a new file, e.g. "udeck_with_locators.gm".

    Now use GM Viewer to open "udeck_with_locators.gm". At the bottom left is a box "Locators" with two check-boxes, "Show labels" and "Show locators". Tick both of them. You can now see all the locators on the deck, including the one you added. If the new locator isn't where you want it, use TOOL to change it in "udeck_with_locators.gm" and use GM Viewer to see it, and repeat until it is where you want it. Then edit "udeck_ld.gm" and change the locator to match the values you put into "udeck_with_locators.gm".
     
  18. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    With this code:
    Code:
    SetCharacterShipLocation(characterFromID("Davy Jones"), "ShipDeck2");
    The ship should look partially where I defined "Ships_other" and "Ship_1". But this strangely doesn't happen.
    I've tried adding other things like this:
    Code:
    characters[GetCharacterIndex("Davy Jones")].sailaway = true;
    This should ensure that the ship located in "Ships_other" moves
    Then I tried to add this too:
    Code:
    pchar.vcskip = true;
    I also tried to "give me" the ship to myself but nothing ...
    Code:
    SetCharacterShipLocation(pchar, "ShipDeck2");
     
  19. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,415
    Can you upload the file "RESOURCE\MODELS\Locations\Decks\udeck1\udeck_ld.gm"? You'll need to zip it with something like 7-Zip first.

    'SetCharacterShipLocation(characterFromID("Davy Jones"), "ShipDeck2")' should make Davy Jones' ship appear. 'SetCharacterShipLocation(pchar, "ShipDeck2")' should make your ship appear, useful if the action is taking place on someone else's deck and you want your own ship visible in the background.

    Looking at the code for the part of the "Jack Sparrow" story where this is used (the scene in which Jack has stolen the Dauntless, the Interceptor catches up, then Jack steals the Interceptor):
    Code:
           case "Dauntless_Deck_JACK":
               pchar.vcskip = true;
               characters[GetCharacterIndex("Port Guard")].sailaway = true;
               SetCharacterShipLocation(characterFromID("Port Guard"), "ShipDeck3");
               DoQuestReloadToLocation("ShipDeck3", "rld", "wheel", "Dauntless_Deck_JACK2");
           break;
    "ShipDeck3" is the deck used by "HMS_Dauntless", as shown in "Ships_init.c":
    Code:
    refShip.QDeck               = "ShipDeck3";
    'pchar.vcskip = true' prevents random crew from appearing on the deck.

    'characters[GetCharacterIndex("Port Guard")].sailaway = true' means the ship belonging to "Port Guard" will appear to be moving.
    'SetCharacterShipLocation(characterFromID("Port Guard"), "ShipDeck3")' puts the ship belonging to "Port Guard" onto the scene. "Port Guard" has previously been given a "HMS_Interceptor" way back at case "And_the_Film_Starts".

    'DoQuestReloadToLocation("ShipDeck3", "rld", "wheel", "Dauntless_Deck_JACK2")' puts you onto the scene, then proceeds to quest case "Dauntless_Deck_JACK2", which puts Will Turner onto the scene and starts a dialog with him.
     
  20. Jones

    Jones Sailor

    Joined:
    Apr 16, 2017
    Messages:
    137
    Gender:
    Male
    I had done something like that before:

    Code:
    GiveShip2Character(characterFromID("Davy Jones"),"CursedDutchman","Flying Dutchman",-1,PIRATE,true,true);
    and
    Code:
    GiveShip2Character(pchar,"CursedDutchman","Flying Dutchman",-1,PIRATE,true,true);
     

    Attached Files:

Share This Page