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

Raise the flag mod

Pieter Boelen

Navigation Officer
Administrator
Storm Modder
Hearts of Oak Donator
Recently, a lot of things got changed by pirate_kk with the usage of flags and what impact that has on the relation of other nations towards you. This greatly improves the freedom of the player and makes for a more interesting game. But since this is a rather large change in the game and has made for some confusion with people playing the game, I thought I'd open up a new thread just for this mod where people can explain their views on it.

Please read below text for explanation about this mod. This text can also be found in your buildinfo folder if you are using the Post Build 12 mods in the "KK Mod ReadMe.txt" file.
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->KK mod ver. 1.0

I made some changes to increase a freedom of movements which player can
make. All of them might be set up in BuildSettings.h. This mod works on
top Post Build Release from 21 November 2005 with upgrade from 21 November
2005.

1. Opponents reaction when using different flags.
In a stock PotC, player couldn't use a flag of nation which relation to
Nathaniel Hawk was hostile. I decided to chenge rules: the player can use
any flag he wants, but reaction of opponents will be adequate to flag he's
carrying during battle. The change of banner is blocked only during battle
when entering the map is blocked. However, after the change ships which
were hostile will be still enemy.

This mod might be turned off by setting ENABLE_FLAGS in BuildSettings.h to
0.

When NATIONS_ENEMY_TO_FLAG_ALWAYS_HOSTILE is set to 1, ships of every
nation which is hostile to that of Nathaniel will be also hostile to
him, even if he has a LoM (i.e., if he has british LoM and is sailing
under duch colors, when he meets british ships, they'll be hostile. Sinking
them will cause a drop of RMRelation points, and when they drop below 0
LoM will be lost). If NATIONS_ENEMY_TO_FLAG_ALWAYS_HOSTILE = 0, vessels
belonging to nations which Nathaniel has LoM with are friendly (in
situation as in above example, british ships would be friendly).

Parameter CHANCE_DETECT_FALSE_FLAG defines probability that enemy nation
will recognize Nathaniel and attack him. Only during escape from Oxbay
at the beginning Nathaniel has 100% chance of remaining undetected. This
parameter should be a float value in the range from 0 (Nathaniel is never
recognized) to 1 (he'll be always recognized).

2. Capturing ships blocking Oxbay.
French have send a squadron of three ships (battleship Belette and frigates
Cleopatre and Semillante) to guard captured colony of Oxbay. Their main
role was to attack corvette Rivoli when her captain, Rabel Yverneau,
defected to British. Originally they couldn't be boarded. But when
ENABLE_CAPTURE_FRENCH_SQUADRON is 1, the possibility of boarding and
capturing them exists. Those ships can be even taken during quest on
Rivoli, because now only one officer is sent onboard Nathaniel's ship to
Redmond, while the rest remains. Rabel might be removed from officer's slot
and Rivoli might be sold or berthed, but not on Redmond. If Nathaniel have
no officers, he can put Rabel in charge of commanding a ship, but unless
it will be sold or berthed before arriving at Redmond this ship will be
lost.

When value of ENABLE_RESTORE_OF_FRENCH_SQUADRON is 0, captured or sunk
ships which were belonging to the squadron won't be replaced. If it's set
to 1, any ship lost by the French will be replaced by another one of the
same type during escape from Oxbay on Yverneau ship.

3. Merged with CCC's mod.
When Nathaniel uses HoistFlag command he will become pirate and can
capture friendly or neutral ships. After entering the map he will use his
previous flag and all relations will be restored. However, he may be
recognized later when walking in the town.

4. Less important changes.
If ENABLE_FLAGS is enabled after leaving Oxbay for the first time Nathaniel
goes to his ship and can enter map only when Enter Map icon is visible.

When Nathaniel goes together with Tobias to shipyard he isn't attacked by
French soldiers anymore, while before (in the pure Build 12 mod) he had to
fight with many of them. I changed a french attitude toward Nathaniel that
he is attacked by four soldiers guarding the entrance.

Nathaniel escapes from Oxbay under French colors, although french ships
will attack him anyway - I assume that only complete fool could show
british flag in similar circumstances.

Any improvements or suggestions are welcome.

pirate_kk<!--QuoteEnd--></div><!--QuoteEEnd-->
<b>My views on this mod:</b>
I really like this mod myself, but think it would be up for some improvement. I have sent the following suggestions to pirate_kk, but also post them here in case someone else might have some comments on them:

Now that we can fly any colours we want, that does give a few strange effects. For example, if you sail under the English flag, like you usually do in the beginning of the game, almost all ships you encounter will think you are English and will thus be at war with you, including Dutch and Spanish ships that normally wouldn't be at war with you. Also: If you raise Portugese colours, only pirates are at war with you. Something strange that also happens: If you raise neutral colours, you will get a Letter of Marquee with "No Nation" and you will keep your previous relations with all other nations. Another problem is that now the relations interface shows your actual relations, but not the relations you have based on your flag. So that's a bit confusing. I have some suggestions for this mod to possibly make it better:

- If you raise a neutral flag, you should get your actual relations with all nations (because then other ships will see that you are not a ship from another nation). You should also not get a LoM from "No Nation"; that looks weird.

- If you raise pirate colours through the relations interface, you should also be branded a traitor (I don't know if that happens yet).

- You should get a higher chance of being recognized for your true nation when you have a higher rank*. So in the beginning of the game, you'll be able to fool other ships, but once you become known, you can't fool them anymore.
* if possible, not player's rank, but how known you are as a pirate (shown in the nation relations interface). So if you are the Scourge of the Seven Seas, it won't matter what flag you fly anymore; you will be recognized for who you are anyway.

- If you raise, for example Portugese colours and sail near French ships and you are recognized, the French ships should attack you (if you are personally at war with France). But it should also work the other way around: if you are flying English colours and are sailing near Dutch ships and you are recognized, the Dutch ships shouldn't attack you, even though England is at war with the Netherlands if you personally are not at war with the Netherlands.
 
<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/hi.gif" style="vertical-align:middle" emoid=":gday" border="0" alt="hi.gif" /> Pirates,

I completly agree with Pieters's suggestion, also I would suggest few ideas for this mod;

1) When I get the LoM from a nation I should get the same nation relation.

2) I can raise every nation flag, but more I next to the enemy ship more is the probably to be recognized.
When I'm recognized I have to raise the right flag.

3) I should attack an enemy ship only after have raise the correct flag, even if I lost all my reputation point.

4) I can take LoM from more Nation, but if I take a LoM from two nation at war I loose the first LoM.

5) When I attack an enemy ship my flag should automatically raise, and so the nation relation should be restore to the original.

6) If I attack a ship without any LoM I became a Pirate and automatically raise pirate flag.


I think with this modification the game should be more historically realistic, what do you think about?

<img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" /> bye,bye,
giuliootto
 
I'm really liking the new flag mod so far, although I'll need to test it some more to be able to form a really solid opinion of it. It's great to finally have some good functionality in using different flags. I also like the ideas proposed by Pieter and giuliootto. I think this mod will be subject to a lot of fine tuning for a while to get it right but, hey this is a great start.

As we all know flags were used as a ruse by most good captains to gain tactical advantage, whether to help avoid contact or to close and attack, and having a good flag function is a great addition to the game.

Cheers <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Seems like there is some sort of bug in this mod:<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 1060
integer function return string value
RUNTIME ERROR - file: nations\nations.c; line: 1060
integer function return string value
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898
function 'GetActualRMRelation' stack error<!--QuoteEnd--></div><!--QuoteEEnd-->Anyone knows how to fix it? <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Interesting...

<!--quoteo(post=137210:date=Jan 5 2006, 05:01 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Jan 5 2006, 05:01 PM) [snapback]137210[/snapback]</div><div class='quotemain'><!--quotec-->function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898<!--QuoteEnd--></div><!--QuoteEEnd-->

This looks like the function GetActualRMRelation was called too often - but I don't understand how. As I remember it isn't called recursively anywhere.

<!--quoteo(post=137210:date=Jan 5 2006, 05:01 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Jan 5 2006, 05:01 PM) [snapback]137210[/snapback]</div><div class='quotemain'><!--quotec-->RUNTIME ERROR - file: nations\nations.c; line: 1060
integer function return string value<!--QuoteEnd--></div><!--QuoteEEnd-->

This should be fixed by changing the line 1060 of nations.c from:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->       return PChar.nation;<!--c2--></div><!--ec2-->
to
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->       return sti(PChar.nation);<!--c2--></div><!--ec2-->

I never got this... When this log occured?
 
While playing the game. Maybe it happened after I raised the French flag to escape Oxbay in the beginning.
 
<!--quoteo(post=137163:date=Jan 4 2006, 02:12 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Jan 4 2006, 02:12 PM) [snapback]137163[/snapback]</div><div class='quotemain'><!--quotec-->- You should get a higher chance of being recognized for your true nation when you have a higher rank*. So in the beginning of the game, you'll be able to fool other ships, but once you become known, you can't fool them anymore.
* if possible, not player's rank, but how known you are as a pirate (shown in the nation relations interface). So if you are the Scourge of the Seven Seas, it won't matter what flag you fly anymore; you will be recognized for who you are anyway.<!--QuoteEnd--></div><!--QuoteEEnd-->
After some playtesting today, it seems that how known you are is directly linked with your current personal wealth*, so that might be how you can code it in. This would also suggest that having blacksmiths paid out of your personal wealth might not be such a good idea after all... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
* By using the give money cheat, I gave myself a lot of money and was already know as "Cutthroat"! <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/piratesing.gif" style="vertical-align:middle" emoid=":shock" border="0" alt="piratesing.gif" />
 
<!--quoteo(post=137210:date=Jan 5 2006, 05:01 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Jan 5 2006, 05:01 PM) [snapback]137210[/snapback]</div><div class='quotemain'><!--quotec-->function 'GetActualRMRelation' stack error
RUNTIME ERROR - file: nations\nations.c; line: 898<!--QuoteEnd--></div><!--QuoteEEnd-->

I <i>think</i> I have discovered the source of the problem. Formerly I have defined function 'GetActualRMRelation' differently and I have left incorrect function call. (!!!) <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/urgh.gif" style="vertical-align:middle" emoid=":urgh" border="0" alt="urgh.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" /> <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />

I'll send corrected version to Peter...

I think I should change my nickname from pirate_kk to pirate_total_idiot

Thanks for help.
pirate_{...}
 
Excellent feature which gives us more variations in tactics and gameplay. That will surely make PotC more interesting, thank you, KK <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" /> (And don't you insult yourself just because you wrote a bug. You just can't avoid that if you write a more complicated mod <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" /> Thanks for sticking around and fixing your stuff <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> )


I'd say that by raising a certain flag you state(honestly or not) "I will fight for this flag", in the same fashion as striking a flag states "I won't fight anymore". So the enemies of your current flag should fight you, no matter how your "personal" relation with them is.
Would any captain or fortcommander leave some ship with an enemyflag alone because it is actually captained by the friendly Nat Hawk? Could he recognize your PERSON anyway?

OTOH a vigilant captain could recognize a false flag if the swindler didn't know the private signals or didn't behave or look like the type of ship he pretended to be. And if he saw someone trying to fool him he'd fire on the swindler, just to make sure that he didn't fall in some trap. So I'd propose that if you use a flag and are recognized you would be attacked, regardless of your personal or true relation.

That would also make the use of a false flag more risky. Which is a good thing cause this option might become a sort of cheat if it were to easy.

Just my personal opinion. Whatever you decide, it will be a great feature <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
 
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Excellent feature which gives us more variations in tactics and gameplay. That will surely make PotC more interesting, thank you, KK (And don't you insult yourself just because you wrote a bug. You just can't avoid that if you write a more complicated mod Thanks for sticking around and fixing your stuff )<!--QuoteEnd--></div><!--QuoteEEnd-->

Yeah, very nice work there KK. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->I'd say that by raising a certain flag you state(honestly or not) "I will fight for this flag", in the same fashion as striking a flag states "I won't fight anymore". So the enemies of your current flag should fight you, no matter how your "personal" relation with them is.
Would any captain or fortcommander leave some ship with an enemyflag alone because it is actually captained by the friendly Nat Hawk? Could he recognize your PERSON anyway?

OTOH a vigilant captain could recognize a false flag if the swindler didn't know the private signals or didn't behave or look like the type of ship he pretended to be. And if he saw someone trying to fool him he'd fire on the swindler, just to make sure that he didn't fall in some trap. So I'd propose that if you use a flag and are recognized you would be attacked, regardless of your personal or true relation.

That would also make the use of a false flag more risky. Which is a good thing cause this option might become a sort of cheat if it were to easy.

Just my personal opinion. Whatever you decide, it will be a great feature<!--QuoteEnd--></div><!--QuoteEEnd-->

Yep, I agree. <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

Cheers <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
I managed to find some time for improving RaiseFlag mod.

I have fixed the problem with Neutral colors and acquiring LoM from No Nation. Currently it sets all nations relations to neutral except for Pirates, which are hostile. It didn't work properly because I didn't change anything in the code regarding NEUTRAL_NATION, so this case was incompatible with the mod. I planed to make neutral colors as something like that:
- when raised during battle it would mean surrendering to the enemy. Nathaniel's ship would be boarded by closest enemy ship. Nathaniel and his crew would start on boarding deck with unequiped weapons. Enemy captain would do following:
1) Try to kill Nathaniel - everyone has right for self-defense, so he and members of his boarding party could equip swords and firearms and fight.
2) Ransom Nathaniel - if Nathaniel has any LoM he would end without his ship and money (but with his officers) in the governor residence. The governor will loan some money to buy a small ship, but Nathaniel will have to repay this plus ransom cost in specified period of time.
3) Release Nathaniel - leaving him and his officers in a boat without money.
If Nathaniel have more than one ship, the rest could escape and remain in his fleet.
- other time it would mean a neutral country.
However, after thinking about this more I decided not to implement this feature - I don't think somebody would want to use this.

I'll send this fix a bit later, when I make sure that there are no errors or 'undocumented features' caused by changes I've made.

Currently the chance of detection of the false flag is constant. I wanted to make it increasing with growth of Nathaniel's fame, but I must define some function which would have a sense.

As I read the posts on the this thread, the Couchcaptain Charles idea is closest to mine. I would add a "loyalty bound" - you can get LoMs from nations which are at war with each other, but you will loose one of them after attacking ships/forts of one of those countries.

I'm waiting for suggestions or information about possible bugs.

Best regards.
pirate_kk
 
I think Nathaniel using a neutral flag to surrender indeed won't be used much. I thought, maybe if you raise neutral flag, you will have your true relations to the other countries instead of the relations of the country whose flag you are flying. It won't really be a neutral flag feature then, but more like a "Nathaniel Hawk's own flag" feature, so others ships can recognize him for being Nathaniel.
I think what you suggest will be rather complicated to code... <img src="http://www.piratesahoy.com/forum/style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />

If you want to use the fame of the character in a function, you can use the character's current wealth. That is what fame is apparently based on.

I'll be looking forward to your new bugfixes. I hope you can send them to me by Saturday or so; I'll be working on a new modpack update Saturday.
 
Back
Top