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

Now the only problem is that gurds don't run to the locators as intended, they spawn right on top of them after some time :modding
this one is a doozie for sure :shrug

Never mind, didn't check that:

LAi_ActorRunToLocator(characterFromID("Pirates_1"), "reload", "reload10", "", 1);

Function's last argument represents the time given to reach locator (if i'm correct, didn't check myselfyet), but changing it to 15-20 fixes it.

Sorry for my stupidity! :D
 
Where are goto\goto21 and reload\reload10? Where are reload\reload6 and goto\goto13? If a character doesn't run to a locator, but does teleport there, it tends to mean that he can't find a way to get there. Either the way is blocked by other characters or there isn't a path at all, e.g. if one of the locators is behind bars in a prison.

Edit: you were reporting success while I was trying to find where locators are located. Indeed, the last argument is the time limit. And the second last argument is a quest case which will be triggered when the character gets to the locator, though quests which are triggered that way have proven troublesome in the past. If you trigger a quest that way then the player has to wait until the character has reached the target. An impatient player who dashes to a door and leaves before a character has reached a trigger locator can break a quest. Speaking as the impatient player in question, I've broken a few quests quest that way. And then edited the code to change the way the quest triggers. :D

By the way, don't feel too bad about making mistakes, especially during your first attempt at story-writing. I've made plenty myself! Very probably so has everyone else that has written quests. Learn how to read the log files, you're going to need them. ;)
 
Last edited:
Where are goto\goto21 and reload\reload10? Where are reload\reload6 and goto\goto13? If a character doesn't run to a locator, but does teleport there, it tends to mean that he can't find a way to get there. Either the way is blocked by other characters or there isn't a path at all, e.g. if one of the locators is behind bars in a prison.

Edit: you were reporting success while I was trying to find where locators are located. Indeed, the last argument is the time limit. And the second last argument is a quest case which will be triggered when the character gets to the locator, though quests which are triggered that way have proven troublesome in the past. If you trigger a quest that way then the player has to wait until the character has reached the target. An impatient player who dashes to a door and leaves before a character has reached a trigger locator can break a quest. Speaking as the impatient player in question, I've broken a few quests quest that way. And then edited the code to change the way the quest triggers. :D

By the way, don't feel too bad about making mistakes, especially during your first attempt at story-writing. I've made plenty myself! Very probably so has everyone else that has written quests. Learn how to read the log files, you're going to need them. ;)

Thank you very much for the kind words again @Grey Roger! I am reading the error logs, and it has helped a lot too, right now i can say that everything is error free and runs smooth as butter now. :doff Thanks to this great community i can keep myself well motivated to keep on coding...by the way i have updated my first post, please check it out and let me know your thoughts.

Little detail, i use
C:
ChangeCharacterAddressGroup(CharacterFromID("Annamaria"),GetCharacterShipQDeck(pchar),"goto","goto20");
ChangeCharacterAddressGroup(CharacterFromID("Pirates_5"),GetCharacterShipQDeck(pchar),"goto","goto11");
ChangeCharacterAddressGroup(CharacterFromID("Pirates_6"),GetCharacterShipQDeck(pchar),"goto","goto21");  
ChangeCharacterAddressGroup(CharacterFromID("Mr. Gibbs"),GetCharacterShipQDeck(pchar),"goto","goto2");
DoQuestReloadToLocation(GetCharacterShipQDeck(pchar), "goto", "goto27", "dialogue_start_deck_turks");

to transport player to current ship's deck, but now i realized that some decks other than black pearl's might have different locators, and it would all break if player has some kind of Tartane :D would it be best to make player not able do change pearl untill he finishes the questline ?
 
Last edited:
Depending on whether the player has completed the "Sao Feng's lost his bodyguards", and which ship he kept, there's a significant chance that the player does not have the Black Pearl at the end of the story. He may have the Crimson Blood, an Aurora class frigate with modified stats, instead.

I had a similar problem with "Ardent" because there's a scene where the villain arrests you on your own quarterdeck, and as the player could have practically anything at that time, I had to use something similar:
Code:
            ChangeCharacterAddressGroup(villain, GetCharacterShipQDeck(PChar), "reload", "reload1");
            DoQuestReloadToLocation(GetCharacterShipQDeck(PChar), "rld", "startloc", "hunt_arrested_on_ship2");
There are always "reload\reload1" and "rld\startloc". Other locators may or may not be present, and are probably laid out differently on different decks if they are. Those two should be safe regardless of what sort of ship you have.

But there's another useful function:
Code:
PlaceCharacter(characterFromID("Annamaria"), "goto");
That will put "Annamaria" on an unspecified "goto" locator somewhere in the area. So long as there are at least four "goto" locators, which there probably are on the quarterdecks of both Black Pearl, Crimson Blood, or any other decent sized ship, you could try this:
Code:
PlaceCharacter(characterFromID("Annamaria"), "goto");
PlaceCharacter(characterFromID("Pirates_5"), "goto");
PlaceCharacter(characterFromID("Pirates_6"), "goto");
PlaceCharacter(characterFromID("Mr. Gibbs"), "goto");
But you will need to do that in quest case "dialogue_start_deck_turks", after you have teleported to your deck. Otherwise they'll all be sent to "goto" locators at the place from which you're about to teleport.
 
Depending on whether the player has completed the "Sao Feng's lost his bodyguards", and which ship he kept, there's a significant chance that the player does not have the Black Pearl at the end of the story. He may have the Crimson Blood, an Aurora class frigate with modified stats, instead.

I had a similar problem with "Ardent" because there's a scene where the villain arrests you on your own quarterdeck, and as the player could have practically anything at that time, I had to use something similar:
Code:
            ChangeCharacterAddressGroup(villain, GetCharacterShipQDeck(PChar), "reload", "reload1");
            DoQuestReloadToLocation(GetCharacterShipQDeck(PChar), "rld", "startloc", "hunt_arrested_on_ship2");
There are always "reload\reload1" and "rld\startloc". Other locators may or may not be present, and are probably laid out differently on different decks if they are. Those two should be safe regardless of what sort of ship you have.

But there's another useful function:
Code:
PlaceCharacter(characterFromID("Annamaria"), "goto");
That will put "Annamaria" on an unspecified "goto" locator somewhere in the area. So long as there are at least four "goto" locators, which there probably are on the quarterdecks of both Black Pearl, Crimson Blood, or any other decent sized ship, you could try this:
Code:
PlaceCharacter(characterFromID("Annamaria"), "goto");
PlaceCharacter(characterFromID("Pirates_5"), "goto");
PlaceCharacter(characterFromID("Pirates_6"), "goto");
PlaceCharacter(characterFromID("Mr. Gibbs"), "goto");
But you will need to do that in quest case "dialogue_start_deck_turks", after you have teleported to your deck. Otherwise they'll all be sent to "goto" locators at the place from which you're about to teleport.

To think about it, when i progress with the story it won't make sense for the player to not have the Pearl, it will just break the whole DMC storyline, i used that function because i wanted the player to have any ship he wants, and not restrct anyone...but idk if that's the best approach here. It's really up for a debate but i'd prefer to stay closer to the films where possible, and Pearl is a big part of them, i'd imagine some sidequests were not written with other film's storylines in mind.

Maybe we could just make Sao Feng's quest doable only after you finish DMC ? (as it is avaliable only after COTBP) And when i get to "At the world's end" it will make even more sense to have Sao Feng's quest there somewhere. :fiddle
 
Last edited:
The Sao Feng sidequest ends with you meeting Edward Teague, who gives you his Piece of Eight, and with it the title of Pirate Lord of the Caribbean. This may be significant if you've been to Aruba, seen two men fighting in the "JackSparrow" version of "Artois Voysey/Nigel Blythe", chose to attack the one doing the killing, and then found that you've just prevented a slave from killing his master. The only way then to take on Gentleman Jocard and free the slaves at Eleuthera is to become a Pirate Lord, which means you need to do the Sao Feng quest. So now you're effectively blocking two sidequests just to make sure the player has the Black Pearl.

Except that you still can't be sure that the player has the Black Pearl. He's a pirate. He could very easily do a bit of freelance piracy, steal a battleship, and keep it in preference to the Black Pearl.

Or he could go to Vanderdecken's shipyard. Facing Davy Jones while being in command of your own Flying Dutchman is silly but that's the player's choice and should not break the story entirely. :D
 
The Sao Feng sidequest ends with you meeting Edward Teague, who gives you his Piece of Eight, and with it the title of Pirate Lord of the Caribbean. This may be significant if you've been to Aruba, seen two men fighting in the "JackSparrow" version of "Artois Voysey/Nigel Blythe", chose to attack the one doing the killing, and then found that you've just prevented a slave from killing his master. The only way then to take on Gentleman Jocard and free the slaves at Eleuthera is to become a Pirate Lord, which means you need to do the Sao Feng quest. So now you're effectively blocking two sidequests just to make sure the player has the Black Pearl.

Except that you still can't be sure that the player has the Black Pearl. He's a pirate. He could very easily do a bit of freelance piracy, steal a battleship, and keep it in preference to the Black Pearl.

Or he could go to Vanderdecken's shipyard. Facing Davy Jones while being in command of your own Flying Dutchman is silly but that's the player's choice and should not break the story entirely. :D

Damn,,, this is a tough one, my vision is that the player does the film quests, while doing related sidequests, which do not change the ship he sails (thinking the naval officer route in freeplay, where you get new ships/officers depending on your ranks, but can't swap or sell your main ship), and after "At the world's end" finishes, Pearl is stolen by Barbossa anyways, so we could have an interesting sidequest of bringing it back if player so choses, but regardless allow player to do what he wants when the trilogy is finished.

I know there are two more films with the whole "ship in the bottle" nonsence, don't get me wrong, i'm a fan of the franchise, but i don't have it in me to do those two films as well... as they are well, let's say "not so good" compared to the first trilogy.

To sum it up, how i see it:
1.Play the trilogy, with Pearl, and be able to add more ships to your fleet, but not replace the Pearl for now.
2.Do sidequests which add more ships instead of replacing your own, to keep it interesting for the player.
3.By the end of trilogy have more sidequests and complete freedom, integrating the last 2 films later if anyone will want to do it, as they do not really equire the Pearl to be player's ship.

I'm guilty of not playing all the sidequests (i will do so soon!), but "Elizabeth Shaws Disappearance" should kinda require player to be a pirate lord to begin with, for the next storylines to make sense. :D

And as i can remember player can even get a better ship when he first get's the "wicked wench", which is later sunk and player loses the better ship and gets the Pearl back anyways, deleting all the possible progress. :)

Well and it would simply be silly to see some rate 7 ships trying to fight the Dutchman, or Jack having an "epic" enterence after he escapes Davey Jones locker with his majestic Lugger or a rate 1 ship of the line for that matter. :treasure:

As a fan of the movies myself i would really much prefer a bit more linear approach for the story, and freedom later, to keep it consistent. And i think most of the side quests shouldn't be too difficult to change up a bit just to keep things consistent and neat.

Sorry for a wall of text, but this is indeed an important aspect, and i truly see both pros and cons for each approach, but i'm siding with what i described above.

Of course i'm not pushing my ideas on anyone, the work done by other people is just amazing, and we are here to enjoy the game and do some moding after all! :cheers
 
Last edited:
After a bit more thinking, my proposal would be to check if player is a pirate lord before he can start the "Elizabeth Shaws Disappearance" quest, and just to change Sao Feng's quest so player gets another ship to his fleet with a captain officer, instead of having to choose between the two, i think this is an even better reward... so it's a win win situation with not much coding needed!

Durring the film quests player should get rewarded with an appropriate skill xp increase depending on what he was doing durring the quest, so quests become a good way of leveling up.

As i found out that after The black pearl quest i started to do the usual free play stuff, which gets boring some time after you have the best ships, i still have some sidequests to do but that's about it,

So it won't be much of a loss in a gameplay perspective either, player will get to enjoy the whole trilogy of POTC (which not many games provide), be it with some freeplay limitations, and by the end of it player will still have a whole lot of things to do, like reclaim the Pearl, or find anoher ship, and be at a high enough level / have other ships in fleet / new officers right away to feel that he/she acomplished something by playing the story! :duel:

Only thing that comes in mind is that player won't be able to fight the Dutchman with a different ship, which i admit is fun to do. :)

To add to his there are many scenes where i will need to know what ship's deck i'm working with (like characters running from one ship's side to another).

Sorry for going so deep into this matter, but as i will more than likely spend around half a year of my free time to code these storylines i want to be sure that i'm not doing someting that most don't agree on. :D

By the way i just played some naval officer freeplay, and noticed that you can't take the ships you capture for yourself, but you can assign them to your officers, and then swap them later using the menu, which kind of breaks the whole ranks purpose, was this intended or is it a bug ?
 
After a bit more thinking, my proposal would be to check if player is a pirate lord before he can start the "Elizabeth Shaws Disappearance" quest, and just to change Sao Feng's quest so player gets another ship to his fleet with a captain officer, instead of having to choose between the two, i think this is an even better reward... so it's a win win situation with not much coding needed!
Please don't change sidequests. In particular, don't make this change. The whole point of forcing you to give one of the ships to Jaoquin de Masse is that he'll steal the ship later.

Durring the film quests player should get rewarded with an appropriate skill xp increase depending on what he was doing durring the quest, so quests become a good way of leveling up.

As i found out that after The black pearl quest i started to do the usual free play stuff, which gets boring some time after you have the best ships, i still have some sidequests to do but that's about it,

So it won't be much of a loss in a gameplay perspective either, player will get to enjoy the whole trilogy of POTC (which not many games provide), be it with some freeplay limitations, and by the end of it player will still have a whole lot of things to do, like reclaim the Pearl, or find anoher ship, and be at a high enough level / have other ships in fleet / new officers right away to feel that he/she acomplished something by playing the story! :duel:
It would be a massive loss of gameplay. "Hoist the Colours" is all about player choice. Right at the start you have the choice of two paths. When the film section is about to start as you sail into Port Royale on Anamaria's boat, you have the choice to either go for the Interceptor as per the film, or talk to Henry the beggar and then go to the townhall for a completely different quest which ends with you getting the Interceptor. Before that, when you first get the Black Pearl when Davy Jones resurrects the burnt Wicked Wench, the questbook explicitly suggests that you go exploring before proceeding to Tortuga tavern to continue the main story - you're actively encouraged to go looking for the sidequests which have just become available. Deferring any of those quests until the player has completed the whole triple-extended story would ruin that choice.

So, please leave the sidequests, and the existing story up to the end of the first film, as they are now.

By the way i just played some naval officer freeplay, and noticed that you can't take the ships you capture for yourself, but you can assign them to your officers, and then swap them later using the menu, which kind of breaks the whole ranks purpose, was this intended or is it a bug ?
You should not be able to swap ships until you are at least rank 7, Commodore, which is flag rank - you are then officially in command of a fleet and allowed to rearrange it however you like. Which menu are you using to swap ships while below rank 7?
 
Please don't change sidequests. In particular, don't make this change. The whole point of forcing you to give one of the ships to Jaoquin de Masse is that he'll steal the ship later.


It would be a massive loss of gameplay. "Hoist the Colours" is all about player choice. Right at the start you have the choice of two paths. When the film section is about to start as you sail into Port Royale on Anamaria's boat, you have the choice to either go for the Interceptor as per the film, or talk to Henry the beggar and then go to the townhall for a completely different quest which ends with you getting the Interceptor. Before that, when you first get the Black Pearl when Davy Jones resurrects the burnt Wicked Wench, the questbook explicitly suggests that you go exploring before proceeding to Tortuga tavern to continue the main story - you're actively encouraged to go looking for the sidequests which have just become available. Deferring any of those quests until the player has completed the whole triple-extended story would ruin that choice.

So, please leave the sidequests, and the existing story up to the end of the first film, as they are now.


You should not be able to swap ships until you are at least rank 7, Commodore, which is flag rank - you are then officially in command of a fleet and allowed to rearrange it however you like. Which menu are you using to swap ships while below rank 7?

Hey Roger!

Okay no problem, i won't do anything with the sidequests, and the first film's story, but as i said it does come with pros and cons, some deck scenes will look silly, or i will have to spawn player on Pearl's deck, without them having the pearl.

Don't get me wrong i'm all about diversity and choices as well, this is an rpg after all...in my story you have two choices almost right at the start :)

Code:
PlaceCharacter(characterFromID("Annamaria"), "goto");
PlaceCharacter(characterFromID("Pirates_5"), "goto");
PlaceCharacter(characterFromID("Pirates_6"), "goto");
PlaceCharacter(characterFromID("Mr. Gibbs"), "goto");

This solution seems good, but even this scene above won't work on a really small ship, if we have decided to give the player complete freedom with his choice of ships i wouldn't want any ships even like Tartane breaking the scenes... i will need your ideas on how to do it better...

I had it all figured for this scene too but now i'm out of ideas as the deck is a changing variable :D

video of scene

You should not be able to swap ships until you are at least rank 7, Commodore, which is flag rank - you are then officially in command of a fleet and allowed to rearrange it however you like. Which menu are you using to swap ships while below rank 7?

Yes i was rank 4 or 5 i think, just captured an enemy ship, assigned an officer to it, and later on swapped between the ships, ill try to replicate it again later, as the save is on a different pc.
 
Last edited:
That video is from "At The World's End". You may want to finish off "Dead Man's Chest" and make sure it's working, bug-free and idiot-proof before moving onto the third part. Idiot-proofing doesn't mean restricting a player's choice of ship but it does mean preventing the player from wandering out of an area before something quest-related has a chance to happen, making sure the player doesn't have a weapon drawn while a quest character is trying to start a dialog, etc.

As for a deck scene, there's a good reason why the player might have a tartane, and not even blocking the player from changing ship voluntarily will prevent it. If you get into a storm, fail to turn the ship into the waves, and end up capsizing, you might be stuck with a tartane until you can reach port and get something else.

Fortunately, looking at the locator file, even a tartane seems to have "reload1", "startloc", and some "goto" locators. So if the player is teleported to one of the safe locators and everyone else uses 'PlaceCharacter' to put them onto any available "goto", it should work on anything from a tartane to a 1st rate ship of the line. The characters might need to run a bit before they can talk to you, but then looking at that video, they seem to do a lot of running around anyway so there's no problem with that. xD

If you want a bit more control over exactly where everyone will be, you could use a switch based on quarterdeck type. If it's "ShipDeck6" or "ShipDeck7", use one set of fixed locators. If it's "ShipDeck1", use another set of fixed locators. Anything else, use 'PlaceCharacter' to send characters to any available locators. "ShipDeck7" is used by the Black Pearl. "ShipDeck6" is almost identical apart from colour scheme and is used for a lot of largish ships. "ShipDeck1" is used by the Crimson Blood, other corvettes, and a lot of other medium sized ships.
 
Thank you for your advice! Now looking even at the tartane's deck which is the smallest ship out there, it doesn't seem so bad. and could hold 6-8 npcs easily, and that's pretty much all i need, we will indeed have some comedy gold ahead of us tho :) but it will totaly depend on how the player wants to do it, so i assume that's what we are going for here.

So i will indeed use what you described above for the decks,

I imagine something like this should work, correct me if i'm wrong:

C:
case "bootstrap_deck_check":
            switch(GetCharacterShipQDeck(pchar))//check deck sring from bigger to smaller decks
            {
                case "ShipDeck7":
                    LAi_QuestDelay("bootstrap_deck7", 0.0);;
                break;

                case "ShipDeck6":
                    LAi_QuestDelay("bootstrap_deck6", 0.0);
                break;

                case "ShipDeck5":
                    LAi_QuestDelay("bootstrap_deck5", 0.0);   
                break;

                case "ShipDeck4":
                    LAi_QuestDelay("bootstrap_deck4", 0.0);
                break;
                
                case "ShipDeck3":
                    LAi_QuestDelay("bootstrap_deck3", 0.0);
                break;
                
                case "ShipDeck2":
                    LAi_QuestDelay("bootstrap_deck2", 0.0);
                break;
                
                case "ShipDeck1":
                    LAi_QuestDelay("bootstrap_deck1", 0.0);
                break;   
            }
        break;

Are these all the decks there is ? Maybe a little rundown of which ships have which deck could help a lot too.


That video is from "At The World's End". You may want to finish off "Dead Man's Chest" and make sure it's working

I'm doing only DMC right now of course, i just had some free time at work to do some additional brainstorming beyond it. :napoleon


About the idiot proofing part, indded i will have to do some work there, which makes me wonder, should i make the quest charachers immortal ? For example player meets a guy named Elton Garfield, who then tells player how to get into the turks prison. And well player may just kill the guy instead or kill the guards who are supposed to lead player to the said prison, which will of course prevent the player from continuing the story, but if we are all about freedom of choice, why not let player do whatever :D
 
Last edited:
Are these all the decks there is ? Maybe a little rundown of which ships have which deck could help a lot too.
I'd have been inclined just to have special cases for "Shipdeck6" and "Shipdeck7" (which should use the same locators so both should use a 'LAi_QuestDelay' to the same quest case), plus "Shipdeck2". Those are the most likely ships the player will have - Black Pearl or Crimson Blood. The fact that the same cases cover a load of other ships as well is a bonus. Then just use a general catch-all with 'PlaceCharacter' to cover anything else the player may have, including a tartane.

About the idiot proofing part, indded i will have to do some work there, which makes me wonder, should i make the quest charachers immortal ? For example player meets a guy named Elton Garfield, who then tells player how to get into the turks prison. And well player may just kill the guy instead or kill the guards who are supposed to lead player to the said prison, which will of course prevent the player from continuing the story, but if we are all about freedom of choice, why not let player do whatever :D
If you only meet Elton Garfield in one scene, and if you're not supposed to fight anyone else there, then:
Code:
LAi_LocationFightDisable(&Locations[FindLocation(PChar.location)], true);
... will prevent the player from drawing a weapon and force him to sheath his weapon if he has one drawn already. This is doubly useful because NPC's can't initiate dialog while you have a weapon drawn, which means if the player enters this area with a drawn weapon and doesn't sheath it before Elton Garfield wants to talk, then Elton Garfield won't tell the player anything. Just remember to cancel it with:
Code:
LAi_LocationFightDisable(&Locations[FindLocation(PChar.location)], false);
... otherwise no fighting can ever happen in that area again.

You could also use:
Code:
LAi_group_MoveCharacter(CharacterFromID("Elton Garfield"), LAI_GROUP_PLAYER);
Do that for the guards as well. That way the player can't hurt them and even if he tries, they won't counterattack.

Freedom of choice doesn't include killing characters who are key to the story. Or, if you do want to allow players that choice, then you'll want something like this:
Code:
PChar.quest.Elton_dead.win_condition.l1 = "NPC_Death";
PChar.quest.Elton_dead.win_condition.l1.character = "Elton Garfield";
PChar.quest.Elton_dead.win_condition = "Elton_dead";
Then case "Elton_dead" can add a questbook entry saying that Elton Garfield is dead and so is the story, close the questbook, and let the player continue in freeplay. (Have a look at "PROGRAM\QUESTS\quests_side.c", case "Voysey_listed". Artois Voysey becomes an officer and is not immortal, so he may be killed in regular combat if you're not careful. Case "Artois_dead" closes down a number of triggers which would otherwise have Artois shot as part of the quest, adds a final questbook entry, and closes the whole "Artois Voysey" quest.)
 
Regarding LAi_LocationFightDisable(&Locations[FindLocation(PChar.location)], false);

The whole meeting is in Turks port town, and i have no intentions to make it so other npc's etc. don't spawn there, the idea is that player can even leave town or do other things before he is ready to meet the guards by the governors office and then move on with the DMC quest.

I think i will get back to the idio proofing of quests when i'm done with the whole DMC questline, just so i don't waste time, of course just making quest npc's immortal would be the easiest solution of all.


For the decks, please whatch these two videos the whole scene that i'm working on now (Well i finished it but have to adjust to all different decks :rolleyes:)

Video 1
Video 2

Sorry for hindi haha, couldn't find a proper clip in english :D

I couldn't find the whole scene in one clip, but i think this might help you understand what i'm trying to accomplish here, so how i did it

1. Jack in his cabin, talk to self about the rum and charts auto walk to the door and reload to lower ship deck;
2. In lower ship deck talk to self about the crew being asleep, auto walk to the second lower ship enterence and reload to it;
3. Spawn in bootstrap by the cage and do the whole scene dialog.

With pearl's deck layout and other bigger ships there is no issue, with others i have to skip/redo Step 1, or Step 2. as not all ships have so many decks to them, i hope i made it all understandable.

Thanks for your input in advance!
 
Last edited:
'LAi_LocationFightDisable' doesn't prevent anyone from respawning. It prevents them from fighting. The player can't draw a weapon, and if he already had one drawn when he entered the area then he sheaths it automatically and can't draw it again. You can disable fighting in a specific area, e.g.
Code:
LAi_LocationFightDisable(&Locations[FindLocation("Turks_port")], true);
... will prevent anyone from fighting in Turks Port and have no effect anywhere else. It doesn't stop you from leaving - you can go out into the jungle, kill some bandits, then return to Turks Port and still be unable to draw your weapon.

The 'vcskip' attribute is used to prevent random NPC's from spawning, e.g.:
Code:
Locations[FindLocation("Tortuga_port")].vcskip = true;
... disables random NPC's in Tortuga. This is necessary because there's an absolute maximum of 32 characters in a location and there are a lot of permanent characters in Tortuga. If additional NPC's aren't disabled then you're liable to find that someone you want to place there doesn't show up because he'd be number 33. So pretty much any quest case which involves Tortuga does that, and then disables 'vcskip' again as soon as possible afterwards:
Code:
DeleteAttribute(&Locations[FindLocation("Tortuga_port")],"vcskip");
.

Regarding Bootstrap Bill, remember that at present there's no character model for fishy Bill. "Hoist the Colours" currently just uses Will Turner's model for him, which sort of works since they're supposed to be related and you never see Bill and Will in the same scene. As of next update, Bootstrap Bill is going to look like this:

It's better than using Will's own model, especially since Bootstrap Bill is appearing here as Will Turner's briefing officer at the start of a FreePlay as Will Turner in command of the uncursed Flying Dutchman. But the point is that the ship is uncursed and so is Bill.

As for those scenes, you'd have to skip almost all of it if the player has a tartane because it won't have anywhere suitable - it's an open boat with no lower decks or cabin at all. Just go to "Shipdeck4" and put Bootstrap Bill somewhere on deck. For any other ship, scene 1 is in the ship's cabin ('GetCharacterShipCabin(PChar)' should tell you which cabin is in use), and scene 2 is probably in the crew's quarters, which is location "Seadogs". You might want to define a quest location which is a duplicate of "Seadogs" because otherwise you'll find the crew isn't asleep, some random crew and some of your officers will be wandering around very much awake! Look at "PROGRAM\Locations\init\ship.c" for the definition of "Seadogs", then copy it into "PROGRAM\Storyline\JackSparrow\Locations\init\QuestLocations.c" and give it a new ID such as "Fake_Seadogs". Spawn some fantoms, put them on bed locators, and use 'LAi_ActorSetLayMode' to make them lie on the beds. There's no cage unless you can add one by modelling, but you could put Bootstrap Bill in one of the cabins.
 
I will for sure need bootstrap's fishy model as well. For now i use what we have in Will's freeplay. Do we have any other models for Elizabeth, or only the dress one ?

For scene 2 i use main gun deck, and add some npcs here and there and set them to LAi_ActorSetLayMode, then for scene 3 i use cargo hold, but as you said i will have to skip both and do everything on main deck for deck4, i was just wondering if there is an easy way to see which ships use what deck model like schooner = deck5 has captains cabin, lower decks / cargo hold (just an example) if there isn't a way to look it up somewhere ill just have to test it all manually.

And captain's cabins are different as well with different locators. :shock


'LAi_LocationFightDisable' doesn't prevent anyone from respawning. It prevents them from fighting. The player can't draw a weapon, and if he already had one drawn when he entered the area then he sheaths it automatically and can't draw it again. You can disable fighting in a specific area, e.g.

C:
//Go to Elton Garfield on docks
        case "at_turks_port_talk":
            //Disable auto run
            AlwaysRunToggle = false;
            Locations[FindLocation("Turks_port")].vcskip = true;
            LAi_LocationFightDisable(&Locations[FindLocation("Turks_port")], true);
            LAi_SetActorType(pchar);
            SetCharacterToNearLocatorFromMe("Elton Garfield", 2);
            Lai_ActorGoToLocator(pchar, "soldiers", "protector2", "reset_player_after_Elton", -1);     
        break;


So be it, i will do excatly this for Turks in my quest, by the way, as much as i understand there is no way to get around this 32 npc limit ? It is indded a silly restriction in the engine, some bigger towns feel quite empty because of it.

To be honest i don't really want to use vcskip in towns, i want to keep them lively and just add the additional npcs that i need, i want to keep it as immersive as i can, of course i can just add npcs in the code after using vcskip, then reset it all and disable vcskip, but as you know it's just some additional work...


When do you plan to release the next update ? Maybe i can try to hurry a bit and get some DMC stuff into it if you are not against it ? Would be really cool if you could play trough what i have right now if you have any free time, it's not long right now, and allows the player to do whatever he wants after it. As what we have right now is a cliffhanger anyways without my continuation.
 
Last edited:
I will for sure need bootstrap's fishy model as well. For now i use what we have in Will's freeplay. Do we have any other models for Elizabeth, or only the dress one ?
I'm a bit busy with various things at the moment so I won't be making fishy Bootstrap Bill. For Elizabeth Swann, there's also "lizswann", which is her pirate outfit. You'll see her using it if you play the "Silver Train" sidequest in FreePlay.

For scene 2 i use main gun deck, and add some npcs here and there and set them to LAi_ActorSetLayMode, then for scene 3 i use cargo hold, but as you said i will have to skip both and do everything on main deck for deck4, i was just wondering if there is an easy way to see which ships use what deck model like schooner = deck5 has captains cabin, lower decks / cargo hold (just an example) if there isn't a way to look it up somewhere ill just have to test it all manually.
While it is true that sailors slept in hammocks on the gun deck in reality, the gun deck has no hammocks in the game so you can't have sleeping sailors there, unless you make a duplicate of the gun deck with some hammocks added. Otherwise this is one of many times when the storyline has to be adapted to the game - use the crew quarters, it has beds and it's used on any ship bigger than a tartane. ;) I'm pretty sure anything bigger than a tartane also has a cargo hold - it must have one because that's where you talk to prisoners, which generally aren't a problem on a tartane because you're unlikely to capture anything while sailing an unarmed dinghy. For other decks, look at the ship's entry in "Ships_init.c". For example, for "Schooner1":
Code:
    refShip.QDeck = "ShipDeck4";
    refShip.CannonsDeck = 0;
    refShip.CargoHold = 1;
    refShip.Cabin = "Cabin_small";
For a start, that means we'll need to figure out a different way of checking whether the player is in a tartane because the schooner uses the same quarterdeck, "ShipDeck4". For another, you can see there that the ship has one cargo hold, no gun decks, and cabin type "Cabin_small".

And captain's cabins are different as well with different locators. :shock
True, but there are a few safe locators which are used in all cabin models. I had a similar problem in "Ardent" where there's a scene in the ship's cabin, only I've no idea what sort of cabin the player is using because he's had plenty of time to pirate the ship of his choice and is actively encouraged to do so. So the key character who needs to appear in the cabin goes to "rld\startloc" and the player is teleported to "reload\reload1". (I wrote the story some time ago and didn't account for the possibility of a tartane without a cabin. But at this point in the story, you're about to raid a convoy, so if you previously capsized your ship and ended up in a tartane, you've probably got something better by now. :D)

C:
//Go to Elton Garfield on docks
        case "at_turks_port_talk":
            //Disable auto run
            AlwaysRunToggle = false;
            Locations[FindLocation("Turks_port")].vcskip = true;
            LAi_LocationFightDisable(&Locations[FindLocation("Turks_port")], true);
            LAi_SetActorType(pchar);
            SetCharacterToNearLocatorFromMe("Elton Garfield", 2);
            Lai_ActorGoToLocator(pchar, "soldiers", "protector2", "reset_player_after_Elton", -1);   
        break;


So be it, i will do excatly this for Turks in my quest, by the way, as much as i understand there is no way to get around this 32 npc limit ? It is indded a silly restriction in the engine, some bigger towns feel quite empty because of it.
You probably don't need 'AlwaysRunToggle = false'. You're about to put the player into "Actor" mode, at which point he loses all control anyway, and he shouldn't run because you're using 'Lai_ActorGoToLocator', not 'Lai_ActorRunToLocator'. If you do force "AlwaysRunToggle" for quest purposes, be sure to store the old value first. Some of us prefer to switch auto run off permanently and won't be too happy if the story suddenly makes you always run when you've finished talking to Elton Garfield. ;)

And you probably don't need the 'vcskip' for Turks Port. The "Assassin" storyline has a modified version of the "Hard Labours of an Assassin" sidequest in which Pepin Bertillon and his sidekicks are in Turks Port rather than Nevis Pirate Settlement. There's no 'vcskip'. I've played the storyline many times and never had Pepin Bertillon fail to show up. Which means...

To be honest i don't really want to use vcskip in towns, i want to keep them lively and just add the additional npcs that i need, i want to keep it as immersive as i can, of course i can just add npcs in the code after using vcskip, then reset it all and disable vcskip, but as you know it's just some additional work...
... you don't need to use 'vcskip' in most towns. Tortuga has a lot of characters and needs 'vcskip' to prevent random NPC's from taking up the rest of the 32 slots and blocking quest NPC's from appearing. Havana port is another place which sometimes has trouble.

Otherwise, don't bother. If your quest NPC fails to appear, check "compile.log", and if it complains about many characters then that's the clue that you need to use 'vcskip'.

When do you plan to release the next update ? Maybe i can try to hurry a bit and get some DMC stuff into it if you are not against it ? Would be really cool if you could play trough what i have right now if you have any free time, it's not long right now, and allows the player to do whatever he wants after it. As what we have right now is a cliffhanger anyways without my continuation.
Better yet, upload your DMC stuff so that I can give it a try, and maybe so can some other people. If it works, then it can go into the next update. That's going to be the acid test, letting someone else play it. You know what's supposed to happen and will play accordingly. I don't know what's supposed to happen so I'll be relying on questbooks and NPC dialog to guide me. (Especially since I haven't watched the film "Dead Man's Chest" for some time and can't remember much of what happens, so I can't even use that as a guide.) The story doesn't need to be complete, it just needs to be playable to a sort of conclusion, maybe complete a quest or two. Once that part is working properly, it can go into an update, then you can do the next part, which will go into the next next update, and so on.

When I was writing "Ardent", someone else was in charge of updates. The first version of the storyline which I uploaded for inclusion was just escaping from prison, rescuing your crew and returning to town. It would be some time before the full storyline was complete!
 
You probably don't need 'AlwaysRunToggle = false'. You're about to put the player into "Actor" mode

If player has set it to always run, when in Actor mode he still has it on and even when using gotolocator actor runs, have not thought about storing the previous value, will try do do it in the futute!

While it is true that sailors slept in hammocks on the gun deck in reality, the gun deck has no hammocks in the game so you can't have sleeping sailors there.

According to many documentaries, sailors didn't even have the luxury of hammocks most of the time back then, and had to enjoy an "oh so comfy" ship's floor, but you are right, more ships have crews quarters so ill use that instead :)

Thank you for your help Roger, you have answered all my questions and i now have a clear vision of what to do, back to coding it is!

Better yet, upload your DMC stuff so that I can give it a try, and maybe so can some other people. If it works, then it can go into the next update.

Oh sorry, i think because of my barrage of questions you might have missed that i have updated my first post, you can download it there, and there is a description on how to start i right away! I was hoping that other members will jump in as well and give me some feedback, but please do try it if you can, i will be grateful. :diomed

Once that part is working properly, it can go into an update, then you can do the next part, which will go into the next next update, and so on.

When I was writing "Ardent", someone else was in charge of updates. The first version of the storyline which I uploaded for inclusion was just escaping from prison, rescuing your crew and returning to town. It would be some time before the full storyline was complete!

You are reading my thoughts exactly, and as with your Ardent questline, mine is in a very similar state at the moment :D but it should be stable aside from a few idiot-proofing moments that you have described previously.
 
Last edited:
I have messed a bit after player escapes the prison, after dialogue on deck, i have set the reload to sea to antigua instead of turks, my bad :unsure fixed now.

Code:
//check deck sring from bigger to smaller decks
        case "tp_deck_after_prison_deck_check":
            switch(GetCharacterShipQDeck(pchar))
            {
                case "ShipDeck7":
                    LAi_QuestDelay("tp_deck_after_prison6and7", 0.0);;
                break;

                case "ShipDeck6":
                    LAi_QuestDelay("tp_deck_after_prison6and7", 0.0);
                break;

                default:
                LAi_QuestDelay("dialogue_start_deck_turks_other", 0.0);
            }
        break;

Your idea with the switch works as intended, thanks! And i will test it with most of the ships/decks and set locators and spawn methods accordingly now, So this method will be used for after the prison escape scene too now! I'm making good progress on later scenes now as well, almost ready for the cannibal island, i might have enough time to finish about 1/4 of DMC questline next week.

"reload", "boatr" seems to work on any ship as a safe reload locator :) tested with tartane, steam frigate, ship of the line rate 1 and 2.


For a start, that means we'll need to figure out a different way of checking whether the player is in a tartane because the schooner uses the same quarterdeck, "ShipDeck4". For another, you can see there that the ship has one cargo hold, no gun decks, and cabin type "Cabin_small".

We can check if = shipdeck4 and then if ship's cabin != null or != 0 or something like that i assume for tartane.
 
Last edited:
Back
Top