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

Need Help Hoist the colors (For the 125431th time)

Here's the shipwreck.

It's the exterior of an inside (wreck cabin) location from COAS.

I sank the wreck down to take in water on maindeck, added a boat, made the grids transparent, placed glass in the windows,
made a new walk patch (as there wasn't any) and a work around for the stairs on deck.

The location is added last in Questlocations.c.
In quest_reaction.c there's a block from line 8804 that you have to copy into your version of the file. (stairs on deck )

These are the starting conditions:

SetCurrentTime(00.00, 0);
SetNextWeather("Heavy Rain");
SetCharacterShipLocation(characterFromID("Reynoud Verheugen"), "SFSI_deck");
Pchar.wreck_deck = "MD";
DoQuestReloadToLocation("SFSI_deck", "goto", "arrive" ,"wreck_deck_arrive");

Pchar can go to forecastle, quarterdeck and poopdeck. Officers and npc:s only maindeck. So the npc locators I've added are there.
Pchar will turn towards the npc:s when arriving.
:ship
Hope you'll like it.
 

Attachments

  • Sebrian shipwreck.7z
    8.1 MB · Views: 78
This is some amazing work @Jack Rackham This is way better than i even had hoped for!

Now i will need to fancy up my scene a bit so it matches this amazing location. Thank you, :cheers


For some reason:

C:
case "wreck_deck_arrive":
            LAi_SetActorType(Pchar);

            LAi_QuestDelay("wreck_deck_arrive1", 1.0);
        break;

        case "wreck_deck_arrive1":
            LAi_ActorTurnToLocator(Pchar, "goto", "S2X_down");

            LAi_QuestDelay("wreck_deck_status", 1.0);
        break;

Triggers just fine, but the locators don't want to trigger


C:
case "wreck_deck_status":
            LAi_SetPlayerType(Pchar);

            if(CheckAttribute(Pchar, "wreck_deck") && Pchar.wreck_deck == "MD")
            {
                pchar.quest.S1A_up.win_condition.l1 = "locator";
                pchar.quest.S1A_up.win_condition.l1.location = "SFSI_deck";
                pchar.quest.S1A_up.win_condition.l1.locator_group = "quest";
                pchar.quest.S1A_up.win_condition.l1.locator = "S1_low";
                pchar.quest.S1A_up.win_condition = "S1A_up";

                pchar.quest.S2A_up.win_condition.l1 = "locator";
                pchar.quest.S2A_up.win_condition.l1.location = "SFSI_deck";
                pchar.quest.S2A_up.win_condition.l1.locator_group = "quest";
                pchar.quest.S2A_up.win_condition.l1.locator = "S2_low";
                pchar.quest.S2A_up.win_condition = "S2A_up";
        
                pchar.quest.S3A_up.win_condition.l1 = "locator";
                pchar.quest.S3A_up.win_condition.l1.location = "SFSI_deck";
                pchar.quest.S3A_up.win_condition.l1.locator_group = "quest";
                pchar.quest.S3A_up.win_condition.l1.locator = "S3_low";
                pchar.quest.S3A_up.win_condition = "S3A_up";
            }

I have tried to remove the Pchar attribute checks but no luck... i don't really need the other locations, it's just a nice bonus for the future, so don't bother too much.


Meanwhile i have noticed that dialogue with Norrington has a strange delay in the final COTB scene, and unless i move closer to him he does not speak to the player, i will fix it up later

Code:
case "up_the_steps3":
            ChangeCharacterAddressGroup(characterFromID("James Norrington"), "Quest_Redmond_fort","rld", "loc14");
            LAi_ActorTurnToCharacter(characterFromID("James Norrington"), Pchar);
            LAi_SetStayType(characterFromID("James Norrington"));
            LAi_SetActorType(characterFromID("James Norrington"));
            LAi_ActorTurnToCharacter(pchar, characterFromID("James Norrington"));
            LAi_QuestDelay("up_the_steps4", 1.0);
        break;

        case "up_the_steps4":
            LAi_SetPlayerType(pchar);
            Characters[GetCharacterIndex("James Norrington")].Dialog.CurrentNode = "Goodbye_Commodore";
            LAi_ActorDialog(characterFromID("James Norrington"), Pchar, "and_over_the_wall", 10.0, 1.0);
        break;


Also i have tested the kraken attack scene that we had, as i have decided to set the kraken to attack the player if he doesn't sail to Antigua fast enough after Cozumel, making it more challenging/interesting.

So the scene seemed kinda "off", not enough tentacles were spawned to sink my ship (i use a sloop), but quest sets your ships hp to 0 after a delay, so it just sinks itself out of nowhere... and fast travel is not disabled again so the second time i just noped out of there when kraken attacked and my hp got set to 0 near a shore instead :D

I have fixed it all up a bit, not perfect but better.

C:
case "Kraken_attack_predmc":
            if (!bSeaActive)
            {
                DoQuestCheckDelay("Krak_loop", 1.0);
            }
            else
            {
                KrakenAttack(pchar, GetCharacterShipHP(pchar)/100); // PB: Enough tentacles to sink you twice
                bQuestDisableMapEnter = true;
                Island_SetReloadEnableGlobal("Cuba", false);
                Island_SetReloadEnableGlobal("Oxbay", false);
                Island_SetReloadEnableGlobal("Redmond", false);
                Island_SetReloadEnableGlobal("FalaiseDeFleur", false);
                Island_SetReloadEnableGlobal("IslaMuelle", false);
                Island_SetReloadEnableGlobal("Douwesen", false);
                Island_SetReloadEnableGlobal("Eleuthera", false);
                Island_SetReloadEnableGlobal("Aruba", false);
                Island_SetReloadEnableGlobal("BattleRocks", false);
                Island_SetReloadEnableGlobal("Curacao", false);
                Island_SetReloadEnableGlobal("Guadeloupe", false);
                Island_SetReloadEnableGlobal("KhaelRoa", false);
                Island_SetReloadEnableGlobal("SaintMartin", false);
                Island_SetReloadEnableGlobal("Hispaniola", false);
                Island_SetReloadEnableGlobal("Antigua", false);
                Island_SetReloadEnableGlobal("Cayman", false);

                Pchar.quest.Kraken_got_us_PREDMC.win_condition.l1 = "Ship_HP";
                Pchar.quest.Kraken_got_us_PREDMC.win_condition.l1.character = PChar.id;
                Pchar.quest.Kraken_got_us_PREDMC.win_condition.l1.quantity = 0;
                Pchar.quest.Kraken_got_us_PREDMC.win_condition.l1.operation = "=";
                Pchar.quest.Kraken_got_us_PREDMC.win_condition = "Kraken_got_us_PREDMC";

                DoQuestCheckDelay("Kraken_got_us_PREDMC1", 30.0);
            }
        break;

        case "Krak_loop":
            DoQuestCheckDelay("Kraken_attack_predmc", 1.0);
        break;

        case "Kraken_got_us_PREDMC":
            DoQuestCheckDelay("Kraken_got_us_PREDMC2", 14.0);
        break;

        case "Kraken_got_us_PREDMC1":
            pchar.ship.hp = 0;
            LAi_SetImmortal(PChar, false);
            DoQuestCheckDelay("Kraken_got_us_PREDMC2", 14.0);
        break;

        case "Kraken_got_us_PREDMC2":
            pchar.quest.disable_rebirth = true;
            PostEvent("LAi_event_GameOver", 0, "s", "kraken");
        break;

After:

C:
case "Kraken_attack_dmc_1":
            if (!bSeaActive)
            {
                DoQuestCheckDelay("Krak_loop_dmc_1", 1.0);
            }
            else
            {
                KrakenAttack(pchar, GetCharacterShipHP(pchar)/50); // PB: Enough tentacles to sink you twice - 100 //SEB: was 100 before
                DisableFastTravel(true);
                bQuestDisableMapEnter = true;
                Island_SetReloadEnableGlobal("Cuba", false);
                Island_SetReloadEnableGlobal("Oxbay", false);
                Island_SetReloadEnableGlobal("Redmond", false);
                Island_SetReloadEnableGlobal("FalaiseDeFleur", false);
                Island_SetReloadEnableGlobal("IslaMuelle", false);
                Island_SetReloadEnableGlobal("Douwesen", false);
                Island_SetReloadEnableGlobal("Eleuthera", false);
                Island_SetReloadEnableGlobal("Aruba", false);
                Island_SetReloadEnableGlobal("BattleRocks", false);
                Island_SetReloadEnableGlobal("Curacao", false);
                Island_SetReloadEnableGlobal("Guadeloupe", false);
                Island_SetReloadEnableGlobal("KhaelRoa", false);
                Island_SetReloadEnableGlobal("SaintMartin", false);
                Island_SetReloadEnableGlobal("Hispaniola", false);
                Island_SetReloadEnableGlobal("Antigua", false);
                Island_SetReloadEnableGlobal("Cayman", false);
                
                pchar.ship.hp = GetCharacterShipHP(pchar)/2; // make it easier for kraken to sink us

                Pchar.quest.Kraken_got_us_DMC_1.win_condition.l1 = "Ship_HP";
                Pchar.quest.Kraken_got_us_DMC_1.win_condition.l1.character = PChar.id;
                Pchar.quest.Kraken_got_us_DMC_1.win_condition.l1.quantity = 0;
                Pchar.quest.Kraken_got_us_DMC_1.win_condition.l1.operation = "=";
                Pchar.quest.Kraken_got_us_DMC_1.win_condition = "Kraken_got_us_DMC_1";

                DoQuestCheckDelay("Kraken_got_us_DMC1", 10.0);
            }
        break;

        case "Krak_loop_dmc_1":
            DoQuestCheckDelay("Kraken_attack_dmc_1", 1.0);
        break;

        case "Kraken_got_us_DMC_1":
            DoQuestCheckDelay("Kraken_got_us_DMC2", 10.0);
        break;

        case "Kraken_got_us_DMC1":
            pchar.ship.hp = 0;
            LAi_SetImmortal(PChar, false);
            DoQuestCheckDelay("Kraken_got_us_DMC2", 10.0);
        break;

        case "Kraken_got_us_DMC2":
            pchar.quest.disable_rebirth = true;
            PostEvent("LAi_event_GameOver", 0, "s", "kraken");
        break;
 
Yes you are right it doesn't work. I added the turnaround last and it spoiled the stairs code somehow.

Here are the new starting conditions:

SetCharacterShipLocation(characterFromID("Reynoud Verheugen"), "SFSI_deck");
Pchar.wreck_deck = "MD";
LAi_QuestDelay("wreck_deck_arrive", 0.1);
DoQuestReloadToLocation("SFSI_deck", "goto", "arrive" ,"wreck_deck_status");

and the new version of (the beginning of) stairs code in quest_reaction.c:

case "wreck_deck_arrive":
LAi_SetActorType(Pchar);

LAi_QuestDelay("wreck_deck_arrive1", 1.0);
break;

case "wreck_deck_arrive1":
LAi_ActorTurnToLocator(Pchar, "goto", "S2X_down");

LAi_QuestDelay("pchar_playertype", 1.0);
break;

case "Pchar_playertype":
LAi_SetPlayerType(Pchar);
break;
 
Yes you are right it doesn't work. I added the turnaround last and it spoiled the stairs code somehow.

Here are the new starting conditions:

SetCharacterShipLocation(characterFromID("Reynoud Verheugen"), "SFSI_deck");
Pchar.wreck_deck = "MD";
LAi_QuestDelay("wreck_deck_arrive", 0.1);
DoQuestReloadToLocation("SFSI_deck", "goto", "arrive" ,"wreck_deck_status");

and the new version of (the beginning of) stairs code in quest_reaction.c:

case "wreck_deck_arrive":
LAi_SetActorType(Pchar);

LAi_QuestDelay("wreck_deck_arrive1", 1.0);
break;

case "wreck_deck_arrive1":
LAi_ActorTurnToLocator(Pchar, "goto", "S2X_down");

LAi_QuestDelay("pchar_playertype", 1.0);
break;

case "Pchar_playertype":
LAi_SetPlayerType(Pchar);
break;

Thank you, i will try it out tomorrow, a bit busy these last couple of days.
 
I've got an idea for the church-location. How about using the inside of the Lighthouse. (Mayak_inside)
It's neither a church nor a ruin but could offer something of the video you showed.

In addition to the stairs up it has three platforms you can jump between 1-2-3 and to the floor.

Lighthouse_inside.jpg

Say you are followed by some enemies up the stairs. Eventually two bag guys already on the top floor.
The solution to the problem would be to use the three platforms (from which you can fire at the enemies)
or throw somrthing heavy at them (video) and if you are quick reach the floor and exit.
A bonus thing would be if you also could lock them in.
Just an idea.
 
Yes you are right it doesn't work. I added the turnaround last and it spoiled the stairs code somehow.

@Jack Rackham All is working perfectly now, but i recieved an error every time S4_high case would get triggered, stating that quest name was not found with no error log, after some minutes of checking your code i found:

if(CheckAttribute(Pchar, "wreck_deck") && Pchar.wreck_deck == "PD")
{
pchar.quest.S4_high.win_condition.l1 = "locator";
pchar.quest.S4_high.win_condition.l1.location = "SFSI_deck";
pchar.quest.S4_high.win_condition.l1.locator_group = "quest";
pchar.quest.S4_high.win_condition.l1.locator = "S4_high";
pchar.quest.S4_highn.win_condition = "S4_high";

Happens to the best of us xD

1vr4te.jpg



I've got an idea for the church-location. How about using the inside of the Lighthouse. (Mayak_inside)
It's neither a church nor a ruin but could offer something of the video you showed.

This seems like a great idea! To be honest the whole "up the stairs" scene could be skipped, it's the exterior of the ruins and some kind of a walkable roof that is the trickiest part, as the main fight happens there, and of course the whole fighting on the "wheel" part must be skipped due to the engine's limitations, i'm still searching for a similar location that we could use for the whole scene... but if you can make the interior of this lighthouse work as well it would be great! Appriciate all your work man!

Thanks to your and @Pieter Boelen 's tutorial if have learned the art of adding locators :D it's much easier than i thought with them being written to compile log.

Also i have decided to add more gameplay to one of the DMC scenes, so it took a bit longer, and me having more real life work than usual didn't help either, but i will upload
quests_reaction of what i have tested so far, rest of it is almost done but needs more polish/testing, but it should be ready in a few days (including cotbp fixes).

@Grey Roger, when replaying Justine Le Moigne’s Disappearance again i have noticed something that i would like to change, starting from case "davyonshore", player encounters Davy Jones, and he gets pushed into to the water by Jack, with the player saying:

"I perfectly know what I did. Justine told me during the voyage you can only set foot on land once every ten years, so when I saw you near the sea I immediately thought to push you into the water. Now, you can't recapture her.",

I think this is a somewhat bad way of explaning how the player knows that Davy Jones can't step ashore, and the whole scene could be done better, as right now we have a proper canon explenation of it to the player by Tia Dalma in my story, if you don't mind i could fix this scene up so it makes more sense in the current time of Jack's adventure. :doff
 

Attachments

  • quests_reaction.c
    535.4 KB · Views: 69
Last edited:
Meanwhile i have noticed that dialogue with Norrington has a strange delay in the final COTB scene, and unless i move closer to him he does not speak to the player, i will fix it up later
Odd. I've just reached that scene and found nothing wrong. You talk to the governor, Will Turner, Elizabeth Swann and finally Norrington. You then run up to the top of the wall, turn around to face Norrington, have the final dialog, and then escape to sea.

What I did notice is that at Rocky Shore, the reload from shore back to ship is locked. That's because at case "And_the_Film_Continues5", a whole load of reloads are locked, including the reloads from both Rocky Shore and Devil's Throat to the ship. Cases "Norrington_As_A_Pirate" and "Turner_and_me_take_ship2" then unlock all the town reloads but don't unlock the shores. At both cases, add this to the list of unlocks:
Code:
            locations[FindLocation("Redmond_Shore_01")].reload.l2.disable = 0;
            locations[FindLocation("Redmond_Shore_02")].reload.l2.disable = 0;

Also i have tested the kraken attack scene that we had, as i have decided to set the kraken to attack the player if he doesn't sail to Antigua fast enough after Cozumel, making it more challenging/interesting.

So the scene seemed kinda "off", not enough tentacles were spawned to sink my ship (i use a sloop), but quest sets your ships hp to 0 after a delay, so it just sinks itself out of nowhere... and fast travel is not disabled again so the second time i just noped out of there when kraken attacked and my hp got set to 0 near a shore instead :D
Where were you when the Kraken attack happened? Case "Kraken_attack_predmc" has a lot of code which is supposed to prevent you from escaping. 'bQuestDisableMapEnter = true;' should stop you from going to worldmap or DirectSailing to another island. And a long list of 'Island_SetReloadEnableGlobal' lines is supposed to prevent you from using SailTo to zap yourself to a beach or port and then land. But that list is incomplete - several islands are missing, including Nevis, alias Quebradas Costillas, which means that if you're at any of the missing islands then you probably can still SailTo a shore. Try deleting the list and putting this into "Kraken_attack_predmc" instead:
Code:
                for(cc = 0; cc<ISLANDS_QUANTITY; cc++)
                {
                    Island_SetReloadEnableGlobal(Islands[cc].id, false);
                }
That should automatically disable SailTo on all islands, now and forever. Even if someone adds a new island in the future, global variable ISLANDS_QUANTITY will need to increase and the island will need to be added to the 'Islands' array, which means this loop will get the new island as well.
 
Odd. I've just reached that scene and found nothing wrong. You talk to the governor, Will Turner, Elizabeth Swann and finally Norrington. You then run up to the top of the wall, turn around to face Norrington, have the final dialog, and then escape to sea.

I will try to replicate it again, for me i had to run towards Norrington for the dialogue to start, strange indeed.

Where were you when the Kraken attack happened?

I was near Cozumel/Roa, and while kraken was attacking i could DirectSail to shore, but couldn't enter shore.
 
Running towards Norrington shouldn't have made any difference as his dialog is not triggered by proximity or by a locator. Possibly your automatic run up the stairs was quicker than mine. At case "up_the_steps4", instead of this:
Code:
LAi_ActorDialog(characterFromID("James Norrington"), Pchar, "and_over_the_wall", 10.0, 1.0);
... try this...
Code:
LAi_ActorDialogNow(characterFromID("James Norrington"), pchar, "and_over_the_wall", 1.0);

Cozumel/Khael Roa is one of the islands in the original list. I've never triggered the Kraken attack myself, but I have played the sidequest "Sinking the Vogelstruijs", in which there's a 'bQuestDisableMapEnter = true;' command but no 'Island_SetReloadEnableGlobal' lines, and last time I tried it I couldn't even use SailTo to get to the ship, let alone any shores. So I don't know why you were able to teleport away from the Kraken. Anyway, so long as it gets you, it doesn't really matter, you're still dead.
 
Cozumel/Khael Roa is one of the islands in the original list. I've never triggered the Kraken attack myself, but I have played the sidequest "Sinking the Vogelstruijs", in which there's a 'bQuestDisableMapEnter = true;' command but no 'Island_SetReloadEnableGlobal' lines, and last time I tried it I couldn't even use SailTo to get to the ship, let alone any shores. So I don't know why you were able to teleport away from the Kraken. Anyway, so long as it gets you, it doesn't really matter, you're still dead.

If you are close to or playing Justine Le Moigne’s Disappearance, you can try to trigger the kraken attack and see how it plays out for you, then you can test it again after i upload my latest version, and see if you notice a difference for the better xD, disabling fast travel did solve DirectSail issues with it.
 
Happens to the best of us xD
Thanks for finding that one. :onya

Thank you again for the location!

By the way, do you think there might be an issue if i add locators to other decks which can only be accessed via your workaround ? Idea is to spawn one/two stationary npc's there...
 
dutchman.png



Looks like Mister Turner is in some trouble :D

A little question, maybe there is a quick answer to it, i would like to add some smoke/water splashes around the Dutchman, but i'm having troble figuring the way to add the coordinates for

CreateParticleSystem("waterfog" , 5.2, 0.4, -3.7, -27.8, 3.6, 16.3, sti(20) );

Is there a console trick for it as well ?

And what is the difference between CreateParticleSystem and CreateParticleSystemX ?

Oh and yet another question, can SubmergeDutchman() be used on an npc ship ? And could it be used in a land scene like the one above, i have studied the code for it a bit, and as far as i understand it's only for the player's ship if it is any version of Flying Dutchman, and only at sea ?
 
Last edited:
And what is the difference between CreateParticleSystem and CreateParticleSystemX ?
I don't know but I copy the already used one for a special effect - and it works.

Here's a copy of my console.c. Never mind all the other stuff but take a look at case 6 (and copy it
if you want). It's a testing simulator which cycles through all effects. I could never remember which one is which.
The effect nr is in the upper left corner.
 

Attachments

  • console.c
    113 KB · Views: 51
Here's a copy of my console.c. Never mind all the other stuff but take a look at case 6 (and copy it
if you want). It's a testing simulator which cycles through all effects. I could never remember which one is which.
The effect nr is in the upper left corner.

Thanks, i will try it out! :diomed

I decided to test the whole story ysterday, and recorded it, if anyone is interested you can watch the video, sorry that it' a bit choppy, OBS studio does not like me.

Video link / google drive

I should be done with the story for the update soon :)
 
@Grey Roger or @Jack Rackham

Please help me out adding this voice clip by @Grey Roger to the dialogue, i have tried a few ways but it always leads to some weirdness, what is the correct way to play a dailogue/voice sound ?
 

Attachments

  • DavyJones_sounds.zip
    587.7 KB · Views: 64
In the character file, you can assign the voice clip which is spoken when the dialogue starts in the line ch.greeting. In RESOURCE\INI\ALIASES\Greetings_alias, you assign one or several clips to that greeting. If it's more than one, the game will choose one randomly.

You can also add a "play sound" to any dialogue case in the dialogue c-file. For an example, look at the dialogue file of Lil Carlos (Devlin Opera). There's always a construction sound when you talm to him. JRH uses this quite a lot to let characters make sounds or say things during dialogues.

I don't know if your clips might be a bit too long. Not from a technical standpoint, it should work anyway, but just from a "logical" standpoint a twenty second voice clip might be a bit too much.
 
Back
Top