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

Simplified Code for Build 14 Beta 3.3

Status
Not open for further replies.
Hello,

sorry, don't find these dialogues.

First I searched for Simon Blunden - but I think this is futile, because there is no dialogue with him. The quest-dialoge is done with Martiniques governor, Antoine de Chávez. But I don't find him, either.
No idea where this is hidden ... I don't find it.

Question is, if this is a big issue. The governor probably is a busy man and a landlubber, who can't tell a brig from a galleon, and he says "corvette" and just means "ship"? :facepalm


Ah ... and it is really a pirate ship, not an english ship ... look:
Pirate Corvette.jpg
 
His dialog file is named after the STOCK GAME Martinique governor. Can't remember his name by the top of my head.
The "Antoine de Chávez" name is just a period-dependent change that only shows up in the game. But he still uses the old code file that he always did, despite his different ingame name.

So the fort has a chance to recognize me?
Yes. But only one chance at the time you enter 3D sailing mode at that island.

Errm ... not entirely sure, but from memory, I think that wouldn't be necessary. It may be a english character, but it surely is a pirate ship under a pirate flag. And pirates make fine enemies to civilized nations at any era, so I don't think this needs to be changed.
Fair enough. :doff

Ah fine, so I can exclude the above plus Hornblower and Rogers from the changes?
Yep. The guy wouldn't be there for you to find anyway. ;)

If you add your game folder to the Windows Search path, that allows you to search for content INSIDE the files very quickly.
That is ridiculously useful for modding purposes, since it allows you to do so many things. For example, type in a character ID and find everywhere he is used.
 
One thing I can think of doing is to automatically hoist your personal flag as soon as a ship recognizes you.
That should update the fort relations too.
Please don't. I don't know if anyone (apart from pirates) ever flew a personal flag instead of a national flag. In the absence of such knowledge, I'm behaving like some commerce raiders of WW1 and WW2, when it was perfectly legal to fly a false flag provided you didn't fight. Before opening fire you had to show your true nationality. So I never use a personal flag, instead changing national flag as and when it suits me. The snag at the moment is that, once battle has started, you can't change flag; so if I'm flying a British flag and meet a Portuguese ship who recognises me as the Spanish-serving star of the "Assassin" storyline, I'm stuck with the British flag until the battle is over.

What would be really nice is if (a) you can change flag after an enemy has started firing at you, and (b) if you start firing while under a flag friendly to the enemy, you lose a lot of reputation. So if an enemy ship recognises you while you're in port and attacks you, you either keep your current flag when you defend yourself and lose reputation, you raise a flag hostile to the ship and the fort joins in, or you run away and the fort never knows which of you was really its friend.

Is there a piece of code somewhere which actively prevents forts from recognising you? Possibly so you're not attacked by the fort the moment you put to sea?
 
Thanks Pieter, the hint about windows search path greatly helped.

Ok, the progress is this: :aar
First I looked at the Devlin Opera, because there I could test the results most quickly.
- changed pirate ship type from "Corvette" to "Light Fleut of War" (FleutWar)
- changed ship type in dialog file from "corvette" to "Fleut" ( I saw no need to tell the precise ship type, fleut should be sufficiant)
- did this for LaCroix, too, with 6th rate (PiratPostillionen).

I tested it in Devklin Opera. Both ship type and dialog work fine as far I saw. I couldn't test all aspects - there is a possibility to haggle with the governor, but I think only with sufficiant fame or whatever. It did not work for me. But since I replaced "corvette" with "fleut" in the whole file, it should work.

I can do this for the LaCroix-storyline, too.

Setbacks: :wp
- I still can't find what files I must change in BraveBlackFlag. Sorry, no idea.
- while the ship type is replaced in both the game and the dialog, it is still wrong in the quests name, which still is about a pirate corvette. But I didn't like the idea to toggle with a quests name, so I let this be.

Any further hints are welcome. :bird:


Other topic:
I sign Grey Roger here.
Additionally, the described use of flags was not only true for WW1 and 2, but also for a good part of the age of sails. Usually, you had to show your true flag befor you open fire.

So, I perfectly agree, not beeing able to change flag after the enemy started combat is not so good.

I disagree about the personal flag though. I mainly use this one when I play a merchant (or smuggler) and don't want any warship to hunt me down. I use national flags for two purposes:
- to boost my relation for a given nation by flying their flag when sinking their enemies
- when I play a military character with a letter of marque
 
Last edited:
Please do not change the fort recognition system. Flying that countries flag is the only way to keep the fort from firing at me while any ships around WILL recognize me. This is true from level 1 to level31.
 
Please don't. I don't know if anyone (apart from pirates) ever flew a personal flag instead of a national flag.
The only alternate method would be to hoist not your personal flag, but a flag hostile to the ship that recognized you.
But which nation then? Any random one? Going with personal would be much, much simpler.

What would be really nice is if (a) you can change flag after an enemy has started firing at you, and (b) if you start firing while under a flag friendly to the enemy, you lose a lot of reputation. So if an enemy ship recognises you while you're in port and attacks you, you either keep your current flag when you defend yourself and lose reputation, you raise a flag hostile to the ship and the fort joins in, or you run away and the fort never knows which of you was really its friend.
You already lose a lot of reputation if you fire on a ship that isn't hostile to you.

While what you describe sounds like a workable solution that may be better than the system we have now. But who is going to make it happen?
Anything relation to flag relations is a huge pain and I don't think the code for it works quite the way it should.
That makes adapting it nearly impossible. Also, it seems we have only one "coder" here (me) and I don't even have time and energy to fix the bugs that I want to.
Let alone actually modify things that aren't actually broken. So unless you can find someone else to do it, it is not going to happen.
I simply can't afford to even try.

Is there a piece of code somewhere which actively prevents forts from recognising you? Possibly so you're not attacked by the fort the moment you put to sea?
No, there isn't. There is a toggle for "safe port leave" at the beginning of some storylines, but that is disabled after the first time.
 
- I still can't find what files I must change in BraveBlackFlag. Sorry, no idea.
- while the ship type is replaced in both the game and the dialog, it is still wrong in the quests name, which still is about a pirate corvette. But I didn't like the idea to toggle with a quests name, so I let this be.
"Eng Captain Near FdF" is in TempQuest.c for BraveBlackFlag and the Standard storyline.

- while the ship type is replaced in both the game and the dialog, it is still wrong in the quests name, which still is about a pirate corvette. But I didn't like the idea to toggle with a quests name, so I let this be.
The file you need is RESOURCE\INI\TEXTS\ENGLISH\Storyline\[storyline name]\QUESTBOOK\Hire_by_france_for_defeat_england_corvette.txt .
If you edit that, looks like it also needs the governor names updating. They're probably wrong.

Please do not change the fort recognition system. Flying that countries flag is the only way to keep the fort from firing at me while any ships around WILL recognize me. This is true from level 1 to level31.
Is it realistic to have a battle under the fort's guns without anyone on the fort caring?
Easy, sure. But it doesn't make sense. o_O
 
Cheers,

thanks Pieter, I changed the quest text and name now. Now the changes apply to everything:
- different ship in dialog
- different ship in questlog
- different ship at sea

Done and tested in "Devlin Opera" and "La Croix", it works.

With your hints, I could have done the changes for "Brave Black Flack", too, but ... this one already is changed. Means, in BraveBlackFlag the former "Corvette" is already replaced by a "SuperFrigate" almost similar to the "USS_Constitution". I guess the responsible Modder did this with purpose, and I don't like to meddle in his work.

Personally I think the Constitution (built in late 1790s) does not fit into the Golden Age of Piracy-Era (1680-1739), and if a more powerful ship is needed (I guess that was intended by placing the Connie), the Pirate-Kreyser ("PiratFrigateSup") would be a good choice. Just my opinion, no offense meant.

So I leave it to you if I shall change this or not.

Next question is, how do I give you the files I changed? I never ever modded something before, and I'm not familiar with the procedure.
Shall they be zipped and uploaded somewhere, or sent directly to Pieter, in what form?

:bounce

Forts:
Yeah - Pieter is right, a Fort ignoring a battle beneath it would be unrealistic. But that is not the case here. Actually, Forts engage into battles when they spot a ship they consider an enemy. They do that by the flag. So, if one successfully masks his identity by using a false flag, why shall they fire upon him?
 
Last edited:
With your hints, I could have done the changes for "Brave Black Flack", too, but ... this one already is changed. Means, in BraveBlackFlag the former "Corvette" is already replaced by a "SuperFrigate" almost similar to the "USS_Constitution". I guess the responsible Modder did this with purpose, and I don't like to meddle in his work.

Personally I think the Constitution (built in late 1790s) does not fit into the Golden Age of Piracy-Era (1680-1739), and if a more powerful ship is needed (I guess that was intended by placing the Connie), the Pirate-Kreyser ("PiratFrigateSup") would be a good choice. Just my opinion, no offense meant.
Indeed you're right. I forgot that one was already done by @Jason Maffettone.
The ship chosen is the only one of his modified ships that I actually included in the modpack for space reasons.
She seemed the nicest of the bunch. Since she has a special name on her stern ("Iceni Queen"), she can't show up at random.
I think it was my idea to put her to use for that sidequest, since otherwise she would be another Vanderdecken ship that most people would never notice.

Yeah - Pieter is right, a Fort ignoring a battle beneath it would be unrealistic. But that is not the case here. Actually, Forts engage into battles when they spot a ship they consider an enemy. They do that by the flag. So, if one successfully masks his identity by using a false flag, why shall they fire upon him?
From what I understand, the situation is this: You enter a French port under a French flag with a French fortress overseeing the bay.
A real French ship recognizes you for being an enemy of France and a battle starts right under the fort's cannons.
The fort ignores the battle. It didn't recognize you as being an enemy of France when you appeared over the horizon and it bloody well isn't going to change its mind now.

Easiest solution: Automatically hoist the player nation flag which IS hostile to France upon being recognized,
which should convince the fort to join in the battle and make life much tougher on the player.
Sure, that wouldn't be nice for the player. But it would make sense. Right?

If anyone can think of another simple solution, feel free to suggest it.
But unfortunately a perfect solution here would not be easily accomplished.
 
I wait far away and keep checking every few hours until the harbor and its surroundings are clear, then go in.

Likewise with leaving. If the harbor is full of hostile ships I go back to land and wait until it clears.
 
Yep, saw that name. Nice ship. Well then we'll leave the corvette quest as it is in Brave Black Flag.
This means I'm ready to submit files to you, Pieter, as soon I get an idea how to do so. :wp

Forts ... yeah, that was the problem. Well ... no idea, I think, I would leave it as it is. Personally, I avoid hostile forts at all costs, as long as I am not extremely fast (I recently passed by fort Bridgetoiwn with a very very fast schooner), or commanding a fleet ready to shoot the fort to pieces. With anything small, weak and slow, an enemys fort is a no go for me.

Logically, Pieters solution sounds good to me, and wouldn't harm me anyway, see above :razz
 
Presumably code has been added to prevent you from changing flag during a battle? Can that not be disabled?

You lose reputation if you fire on a friendly ship, i.e. one which is not actively shooting at you because it has a flag friendly to yours and has not recognised you as an enemy. Can that be expanded so that you lose reputation for firing at a ship with a friendly flag even if it has recognised you and already started firing? Where is the code which causes you to lose reputation for firing at a friendly ship?

Sometimes you have to enter a specific port as part of a quest. Entering the town by the back door and walking to the port doesn't always work. If that port is hostile and the fort starts shooting at you, you're not going to be able to progress the quest. This, I suspect, is why code may have been added so that forts don't recognise you even if ships do.
 
Presumably code has been added to prevent you from changing flag during a battle? Can that not be disabled?
Check PROGRAM\INTERFACE\NationRelations.c . That contains the regular flag hoisting code.
Hoisting a pirate flag is possible at all times through the [Enter] menu at sea.

I think the reason to prevent changing flags during battle is because that could mess up the relations at sea.
What if you decide to hoist a flag FRIENDLY with the enemy ships in mid-battle? Some might remain hostile, but others might then suddenly turn friendly too.

Perhaps you should only be able to hoist a flag that is already hostile to the ships that are currently around?
But then you have to check the nationality of all those ships somehow, which wouldn't exactly be easy.
And then you have to check their relations to yourseld and allow only hostile flags to be selected.
That can get REAL complicated REAL quick with a lot of work involved.

You lose reputation if you fire on a friendly ship, i.e. one which is not actively shooting at you because it has a flag friendly to yours and has not recognised you as an enemy. Can that be expanded so that you lose reputation for firing at a ship with a friendly flag even if it has recognised you and already started firing? Where is the code which causes you to lose reputation for firing at a friendly ship?
Probably PROGRAM\SEA_AI\AIShip.c or AIBalls.c . Is there a log message that usually appears on the screen if you do?
If so, search through the SEA_AI folder for that and you should be able to find it. I know it is in that folder somewhere.

Sometimes you have to enter a specific port as part of a quest. Entering the town by the back door and walking to the port doesn't always work. If that port is hostile and the fort starts shooting at you, you're not going to be able to progress the quest. This, I suspect, is why code may have been added so that forts don't recognise you even if ships do.
If necessary for quest purposes, it is possible to set a line of code that will FORCE enemy ships to believe your fake flag.
This isn't used very much, but the possibility is there. That is the way specific quest issues should be handled. Not through a general case like you describe, as that would not make any sense.
But there is no code to intentionally do that anyway. The fact that they don't recognize you as you come closer is due to game engine limitations because forts are handled differently than ships.
See an earlier post of mine, where I explained that.
 
please i need help
COMPILE ERROR - file: sea_ai\sea.c; line: 146
function LanguageCloseFile(args:0) doesnt accept 1 arguments
 
please i need help
COMPILE ERROR - file: sea_ai\sea.c; line: 146
function LanguageCloseFile(args:0) doesnt accept 1 arguments

You need help with what exactly?? Yes, that is a compile error.
 
Status
Not open for further replies.
Back
Top