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

Mission to defend Bridgetown, the fort wrongly shoot at me

Locker

Landlubber
On latest New Horizons + latest Gamma

In the Hawk campaign, i was at the mission in which you need to conquer bridgetown with Danielle to free the professor in order to decrypt the tablet.

I did it, managed to destroy the fort, invaded the town and destroyed the truckload of english soldiers defending the streets.
Then we went to the prison, spoke to the professor and i was left alone, i repaired my ships, sold 2 of my 4 ships (that were there to distract the fort during the battle mostly) .

Spent a night at the tavern and on the next morning got warned the english fleet was coming , Danielle went to the fort while i was forced to go to my ships to fight off the english navy.

Battle started, the fort immediately unloaded all its canons on my 2 ships.
Reloaded, did dialogues and etc... battle start ... the fort is still shooting all it had to my 2 ships.

As Edward Teach would have said
WTF is that crap Danielle, you filthy backstabbing bastard

So i checked and tested around my save and found what seem to be the source of this stupid bug.

On my save my ships have a pirate flag, on the Relations i am Neutral with pirates (in term of score it's slightly negative but still considered as Neutral).
But on the Colonies panel i notice that Bridgetown does not have the pirate flag like i thought it was going to have but have the "personnal flag".

So as my save happens before spending the night at the tavern i went to my ship changed my flag to that "personnal" one and came back
Slept at the tavern and went to battle and this time the fort worked.

Considering the town is yours, the fort should be your ally regardless of the flag you're using.
 
Relations are governed purely by flags. I don't know why Danielle is firing at you while you're under a pirate flag if you (and therefore Personal) are not hostile to pirates.

Load your savegame again, with you under a pirate flag. When the fort starts shooting, quit the game, then post "compile.log". Or upload the savegame itself so I can take a look. You'll need to use something like 7-Zip to compress the savegame before uploading it.
 
I wonder if the "recognized" attribute is messing things up.
Perhaps that got set prior to the fort changing nation to Personal?
 
Isn't the "recognized" attribute assigned to the fort commander? "Greenford Commander" might have it, but at this point in the game he's not the fort commander, Danielle is. She certainly shouldn't have the "recognized" attribute, and if she did, she'd fire on you regardless of which flag you were flying.
 
Isn't the "recognized" attribute assigned to the fort commander? "Greenford Commander" might have it, but at this point in the game he's not the fort commander, Danielle is.
Good point. :facepalm

She certainly shouldn't have the "recognized" attribute, and if she did, she'd fire on you regardless of which flag you were flying.
Truth again.

Guess we can cancel my hypothesis.
Clearly I don't even remember how my own system works. :modding
 
The compile.log just after the fort try to kill my boats

----------------------------------------
Build 14 (21st December 2022)
Savegame Compatibility: 14.943
----------------------------------------

Gauging: StartGauging
Gauging: starting init
Gauging: interface
Gauging: Storylines
Gauging: Profiles
Gauging: starting init
==> BuildSettings: Sets to default
==> BuildSettings: New settings applied
Gauging: load build settings
Gauging: periods
InitNations: NATIONS_QUANTITY=6, bGuest1NationExists=0, bGuest2NationExists=0
Gauging: nations
Gauging: preprocessor
Init encounters complete.
Gauging: enc
Gauging: cann
Gauging: goods
Gauging: ships
IslandsInit: 22 islands loaded.
Gauging: islands
Init weathers complete. 0 weathers found.
Gauging: weather
InitSounds (English): created 19 entries.
InitMusic: created 108 entries.
Gauging: Aliases
Gauging: sound
Main_LogoVideo() 0
PauseAllSounds
ResumeAllSounds
Main_LogoVideo() 1
PauseAllSounds
ResumeAllSounds
Main_LogoVideo() 2
PauseAllSounds
ResumeAllSounds
Main_LogoVideo() 3
PauseAllSounds
ResumeAllSounds
Main_LogoVideo() 4
Gauging: initgame start
Gauging: createlayers
Gauging: stores
Gauging: sound
Gauging: delete sea env
Gauging: towns
Number of locations: 846
Gauging: locations
IslandsInit: 22 islands loaded.
Gauging: islands
Gauging: wdmap
Gauging: dialogs
Gauging: teleport
bool CreateParticleEntity()
Gauging: particles
Items initialization complete. Loaded 1548 items.
Gauging: items
Gauging: quests
Gauging: sea ai groups
Gauging: questmapenc
Gauging: landenc
==> BuildSettings: Sets to default
==> BuildSettings: New settings applied
Gauging: load options
Gauging: models - Total number of models: 1209
InitSounds (English): created 19 entries.
InitMusic: created 108 entries.
Gauging: Aliases
Gauging: infoshow
Gauging: initgame done
Init character names complete.
SETTING MUSIC: music_main_menu
storyline\standard\SL_utils.c was loaded, unloading now...
storyline\standard\quests\both_reaction.c was loaded, unloading now...
storyline\standard\quests\quests_reaction.c was loaded, unloading now...
Done loading
storyline\standard\quests\both_reaction.c not loaded, loading now!
storyline\standard\quests\quests_reaction.c not loaded, loading now!
bool CreateParticleEntity()
!!! Reload to Greenford_Tavern (index=127)
ItemLogic: On load location Greenford_Tavern
ItemLogic: found 0 buttons
==> BuildSettings: New settings applied
==> BuildSettings: New settings applied
SETTING MUSIC: music_tavern_personal
SETTING MUSIC: music_tavern_personal
Reload: Process started for locator_name = fakeReload and lockedReloadLocator =
reload_cur_island_index = -1
reload_cur_location_index = 127
reload_island_index = -1
reload_location_index = 128
Start reload
Quest name sleep_in_tavern FOUND in CommonQuestComplete
PauseAllSounds
ReloadStartFade
ItemLogic: On unload location
ReloadEndFade
ItemLogic: On load location Greenford_tavern_upstairs
ItemLogic: found 0 buttons
trying to spawn item: medical1 with rarity=0.41306 itemProb=1.28
trying to spawn item: medical2 with rarity=0.27316 itemProb=0.48
trying to spawn item: potion1 with rarity=0.70273 itemProb=0.24
trying to spawn item: medical1 with rarity=0.78528 itemProb=1.28
trying to spawn item: potion1 with rarity=0.47391 itemProb=0.24
trying to spawn item: 100gp with rarity=0.75705 itemProb=0.48
trying to spawn item: lockpick with rarity=0.67798 itemProb=0.16
trying to spawn item: jewelry5 with rarity=0.74063 itemProb=0.16
trying to spawn item: indian5 with rarity=0.43033 itemProb=8.e-002
trying to spawn item: potion1 with rarity=0.56207 itemProb=0.24
trying to spawn item: medical2 with rarity=0.95441 itemProb=0.48
trying to spawn item: spyglass4 with rarity=0.43903 itemProb=1.6e-002
trying to spawn item: potion1 with rarity=0.38803 itemProb=0.24
trying to spawn item: mineral2 with rarity=0.68051 itemProb=0.144
trying to spawn item: medical1 with rarity=0.66635 itemProb=1.28
Quest name Story_WaitInGreenfordEnd FOUND in QuestComplete
Quest name restore_hp FOUND in CommonQuestComplete
SETTING MUSIC: music_house
SETTING MUSIC: music_house
Reload: Process started for locator_name = reload1 and lockedReloadLocator =
reload_cur_island_index = -1
reload_cur_location_index = 128
reload_island_index = -1
reload_location_index = 127
Start reload
PauseAllSounds
ReloadStartFade
ItemLogic: On unload location
ReloadEndFade
ItemLogic: On load location Greenford_Tavern
ItemLogic: found 0 buttons
SETTING MUSIC: music_tavern_personal
SETTING MUSIC: music_tavern_personal
Quest name Story_DanielleStartsTalkAboutResearcher_1 FOUND in QuestComplete
Quest name Story_DanielleStartsTalkAboutResearcher_2 FOUND in QuestComplete
Quest name player_back FOUND in CommonQuestComplete
Quest name danielle_BeforeEnglishSiege_exit FOUND in QuestComplete
Quest name player_back FOUND in CommonQuestComplete
Quest name Story_DanielleOffersToBecomeFortCommander FOUND in QuestComplete
Quest name danielle_RepelEnglishAssault_exit FOUND in QuestComplete
PauseAllSounds
ItemLogic: On unload location
SEA: SeaLogin begin
** Whr: CreateWeatherEnvironment - iCurWeatherhour = 22, theHour = 17
!gWeatherInit Whr_Generator() - Initialized
SEA: sealogin loading island Oxbay
SEA: added pchar to sea
Force_GetShipType: Maxclass = 1, Minclass = 8, Per = Colonial Powers, Nat = Holland, Type = war, Loop = 0, Ship ID = Ketch
Equip Character Claestgen De Vriend with bladeC11 his nation: 4 blade nation=
CARGO: Fantom_SetGoods: adding 20 of 'Ale'
CARGO: Fantom_SetGoods: adding 10 of 'Silver'
CARGO: Fantom_SetGoods: adding 0 of 'Oil'
CARGO: Fantom_SetGoods: adding 0 of 'Leather'
CARGO: Fantom_SetGoods: adding 30 of 'Silver'
CARGO: Fantom_SetGoods: adding 0 of 'Mahogany'
CARGO: Fantom_SetGoods: adding 0 of 'Ebony'
Force_GetShipType: Maxclass = 1, Minclass = 8, Per = Colonial Powers, Nat = Holland, Type = war, Loop = 0, Ship ID = NL_Amsterdam
Equip Character Valenciennes Hoppen with bladeC35-1 his nation: 4 blade nation=
CARGO: Fantom_SetGoods: adding 0 of 'Mahogany'
CARGO: Fantom_SetGoods: adding 20 of 'Cinnamon'
CARGO: Fantom_SetGoods: adding 30 of 'Clothes'
CARGO: Fantom_SetGoods: adding 10 of 'Linen'
CARGO: Fantom_SetGoods: adding 10 of 'Cotton'
Force_GetShipType: Maxclass = 3, Minclass = 8, Per = Colonial Powers, Nat = personal, Type = trade, Loop = 0, Ship ID = SP_Hoy
Equip Character Hipólito Vento with blade7+1 his nation: -1 blade nation=
CARGO: Fantom_SetGoods: No block on treasure due to encounter type
CARGO: Fantom_SetGoods: adding 108 of 'Oil'
CARGO: Fantom_SetGoods: adding 108 of 'Linen'
CARGO: Fantom_SetGoods: adding 72 of 'Silk'
CARGO: Fantom_SetGoods: adding 0 of 'Clothes'
CARGO: Fantom_SetGoods: filling hold with 69 of 'Mahogany'
Force_GetShipType: Maxclass = 3, Minclass = 8, Per = Colonial Powers, Nat = personal, Type = trade, Loop = 0, Ship ID = Barque3_50
Equip Character Baertoud Wanner with bladeC18-1 his nation: -1 blade nation=
CARGO: Fantom_SetGoods: No block on treasure due to encounter type
CARGO: Fantom_SetGoods: adding 60 of 'Chocolate'
CARGO: Fantom_SetGoods: adding 30 of 'Linen'
CARGO: Fantom_SetGoods: adding 180 of 'Silver'
CARGO: Fantom_SetGoods: adding 150 of 'Gold'
CARGO: Fantom_SetGoods: adding 60 of 'Oil'
CARGO: Fantom_SetGoods: adding 270 of 'Cotton'
CARGO: Fantom_SetGoods: filling hold with 0 of 'Paprika'
Force_GetShipType: Maxclass = 3, Minclass = 8, Per = Colonial Powers, Nat = Portugal, Type = trade, Loop = 0, Ship ID = PO_Hoy
Equip Character Aquiles Travada with blade49-1 his nation: 5 blade nation=
CARGO: Fantom_SetGoods: No block on treasure due to encounter type
CARGO: Fantom_SetGoods: adding 34 of 'Sugar'
CARGO: Fantom_SetGoods: adding 0 of 'Bricks'
CARGO: Fantom_SetGoods: adding 102 of 'Copra'
CARGO: Fantom_SetGoods: adding 204 of 'Sandal'
CARGO: Fantom_SetGoods: adding 68 of 'Linen'
CARGO: Fantom_SetGoods: adding 170 of 'Coffee'
CARGO: Fantom_SetGoods: adding 136 of 'Leather'
CARGO: Fantom_SetGoods: filling hold with 0 of 'Gold'
Force_GetShipType: Maxclass = 3, Minclass = 8, Per = Colonial Powers, Nat = Portugal, Type = trade, Loop = 0, Ship ID = FastMerchantman1
Equip Character João das Marinas with bladeC35+1 his nation: 5 blade nation=
CARGO: Fantom_SetGoods: No block on treasure due to encounter type
CARGO: Fantom_SetGoods: adding 84 of 'Ale'
CARGO: Fantom_SetGoods: adding 140 of 'Medicines'
CARGO: Fantom_SetGoods: adding 168 of 'Chocolate'
CARGO: Fantom_SetGoods: adding 168 of 'Bricks'
CARGO: Fantom_SetGoods: adding 28 of 'Chocolate'
CARGO: Fantom_SetGoods: adding 0 of 'Gold'
CARGO: Fantom_SetGoods: filling hold with 587 of 'Coffee'
SEA: Did CRs
SEA: Did any groups
SEA: added ships
SEA: Set tasks
updated AISea
Seafoam done
Telescope initiated
SETTING MUSIC: music_day_sailing
SETTING MUSIC: music_day_sailing
ResumeAllSounds
SEA: SeaLogin end
Sea_FirstInit
FLAGS: The 'Bridgetown Fort' has spotted us at 177.8, but is not interested as we are not hostile
FLAGS: The HMS 'Vengeance' turned hostile as they have recognized us
FLAGS: The HMS 'Desperate' turned hostile as they have recognized us
FLAGS: The HMS 'Black Prince' turned hostile as they have recognized us
FLAGS: The 'Starling' has spotted us at 424.01, but is not interested as we are not hostile
FLAGS: The 'Lydia' has spotted us at 540.43, but is not interested as we are not hostile
FLAGS: The 'SÝo JoÝo Baptista' has spotted us at 677.63 and will remember us as Pirate in Model_NL_FWzP with visibility=890.
FLAGS: The 'Princesa de Brazil' has spotted us at 797.62 and will remember us as Pirate in Model_NL_FWzP with visibility=1110.
Sea_FirstInit done
For character 1647 fall Mast name mast3 has index 3

the zipped saved game used :

On this save you're still using the pirate flag.
You're in the tavern, just ask for a night, then when you get down from your room, you'll get Danielle dialogue then a random crew member will tell you about the attack, Danielle will tell you she'll go to the fort and you'll be teleported to the battle.
Like that the Fort will start by shooting both your ships (the compile.log is from doing just that).

Now if before spending the night you first go to your ship and change your flag to the personnal one , then spend night, the Fort will open fire to the enemy ships and not at yours as it should
 
Last edited:
This is an odd one. According to that "compile.log", Danielle shouldn't have been attacking you:
Code:
FLAGS: The 'Bridgetown Fort' has spotted us at 177.8, but is not interested as we are not hostile
FLAGS: The HMS 'Vengeance' turned hostile as they have recognized us
FLAGS: The HMS 'Desperate' turned hostile as they have recognized us
FLAGS: The HMS 'Black Prince' turned hostile as they have recognized us
FLAGS: The 'Starling' has spotted us at 424.01, but is not interested as we are not hostile
FLAGS: The 'Lydia' has spotted us at 540.43, but is not interested as we are not hostile
'Starling' and 'Lydia' are presumably Personal. You're not hostile to pirates, therefore neither are Personal ships, so they don't care about your pirate flag.

Of particular significance is the line about 'Bridgetown Fort', which also does not regard you as hostile. So Danielle should not attack you. Nevertheless, when I loaded that savegame, the fort certainly attacked me, it wasn't accidentally hitting me while firing at the British ships. Moreover, when I turned to bring my guns to bear and pressed 'Space' (auto-aiming, not manual firing), my guns fired at the fort. So the fort is definitely hostile despite that "FLAGS" report.

A 'DumpAttributes' on Danielle showed a clue, an attribute I'd not seen before - "relation_to_pirates". Set to hostile, this attribute seems only to be checked in one place, which is function 'GetFortRelationToPirates' in "PROGRAM\Screwface_functions.c". This appears to be part of the system to allow certain forts to not attack pirates when their owners would normally be hostile, e.g. La Tortue, alias Tortuga, which is French but allows you to approach while flying a pirate flag. Here it's doing the exact opposite - any fort commander which doesn't have the "relation_to_pirates" attribute, including Danielle, gets it set to hostile in this function. And so, regardless of the fact that Personal is not hostile to Pirates, Danielle is.

First thought: easy fix, give Danielle the "relation_to_pirates" attribute in the storyline code. Second thought: this is a wider problem, as you'll be attacked by your own fort if you fly a pirate flag, conquer a town and put your own officers in charge, at any other time and in any storyline. So, instead of patching the story code, I've added some checks to 'GetFortRelationToPirates'. Personal fort commanders shouldn't bother with "relation_to_pirates", they'll set their relation to pirates based on your own relation, but will still apply town exceptions - Tortuga will still tolerate other pirate ships even if you don't, so if you want any pirates sunk near Tortuga then you'll have to do it yourself!

@Locker: download this and put it in the "PROGRAM" folder. I've tried it with your savegame and the fort no longer fires at me, it attacks the British ships as it's supposed to.
 

Attachments

  • Screwface_functions.c
    26.3 KB · Views: 35
Thank you, that will sure be usefull on future fort conquests.

I had completed that battle several days ago (even managed to capture the Vengeance ! that is now my ship since then) after doing the quick switch to Personnal flag to avoid the fort shooting at me.
But i had to reload 3 times , as the 2 first times i captured the Vengeance (softening it a lot with anti-crew shells) during that battle the game crashed as soon as i quit the screen in which you can swap ship/assign crew/captain , only the 3rd time it worked.
Didn't thought to keep the save or check the log unfortunately.
 
First thought: easy fix, give Danielle the "relation_to_pirates" attribute in the storyline code. Second thought: this is a wider problem, as you'll be attacked by your own fort if you fly a pirate flag, conquer a town and put your own officers in charge, at any other time and in any storyline.
In fact, it's not as bad as that. I tried flying a pirate flag, capturing a town for myself, then sailing away still under a pirate flag, and the fort didn't fire. That's not because the fort was still out of action; even when I went away, then returned, the fort didn't fire. That's because, if a new fort commander doesn't have the "relation_to_pirates" attribute, function 'GetFortRelationToPirates' tries to figure out what it should be from the commander's "town" attribute. The "replacement" commander is actually the original commander, now with the face, name and skills of the officer you assigned. He presumably loses the "relation_to_pirates" attribute, then gets it again when 'GetFortRelationToPirates' figures out that his town is now friendly to pirates (assuming that you are personally friendly to them). Danielle is genuinely assigned as Bridgetown fort commander and has no "town" attribute because she's never been a fort commander before, so she can't have "relation_to_pirates" set based on her town, so she gets the default hostile relation.

I'm still inclined to keep the fixed version of 'GetFortRelationToPirates' anyway for one reason. Nations never change their relations to pirates, they're always hostile. You, however, can change. If you start out as hostile to pirates and capture a few colonies, their forts will remain hostile to pirates. If you then become a pirate yourself, those forts will attack you. That won't be a problem with the new version of "Screwface_functions.c" because Personal fort commander always check their town's relation to pirates every time you visit, so if your relation to pirates changes, theirs does too. (It can go the other way. You start out as a pirate, capture a colony for yourself, and it's friendly to pirates. Then you buy amnesty plus a LoM and turn against the pirates. Your colony will now attack any other pirates it sees, including any annoying raiders that get too close to the port.)
 
A 'DumpAttributes' on Danielle showed a clue, an attribute I'd not seen before - "relation_to_pirates". Set to hostile, this attribute seems only to be checked in one place, which is function 'GetFortRelationToPirates' in "PROGRAM\Screwface_functions.c". This appears to be part of the system to allow certain forts to not attack pirates when their owners would normally be hostile, e.g. La Tortue, alias Tortuga, which is French but allows you to approach while flying a pirate flag. Here it's doing the exact opposite - any fort commander which doesn't have the "relation_to_pirates" attribute, including Danielle, gets it set to hostile in this function. And so, regardless of the fact that Personal is not hostile to Pirates, Danielle is.
OH BUGGER!
That's most unfortunate.
And my fault.
Apparently.

Thank you for catching this one! :cheers
 
Back
Top