• 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

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!
 
Some enemies are supposed to fight them but not to fight you.
Yes, I also have to fight.
I'm surprised that 'LAi_SetWarriorType' was preventing the crew from fighting - the purpose of that line is to allow them 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'
 
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.
 
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
 
"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"?
 

Attachments

  • screenshot.jpg
    screenshot.jpg
    66.4 KB · Views: 241
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.
 
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.
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 ...
 
Did sidestep work at all?

There are other ways with clever use of the TOOL and GM Viewer.
 
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.
 
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.
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.
 
No, "SIDESTEP_ENABLED" won't get you to another ship
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?
 
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.
 
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".
 
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");
 
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.
 
"Port Guard" has previously been given a "HMS_Interceptor" way back at case "And_the_Film_Starts".
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);
 

Attachments

  • udeck_ld.rar
    1.8 KB · Views: 239
Back
Top