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

Mod Release Build 14 Gamma Version [Last update: 19th September 2024]

Likewise.
It looks like erroneous code to me.
I propose the attached instead.

Actually, it can. For reasons unknown, those reload locators show up briefly in the correct language and then switch to English. Fine if you're playing in English, not so fine if you're playing in Spanish or Russian.
Huh? That's BIZARRE!
@Jack Rackham, do you have strong objections to this being removed...?

Presumably it's needed for the same reason as the similar line to make smugglers fight against coastguards.
I'd assume so, yes.
Might be it's needed in Maelstrom; and doesn't do harm in Storm 2.0 .
In that case, I'd suggest adding it to the main mod.
The more similar we keep the versions, the less headache it'll be.

What is that supposed to do, and what are the other changes supposed to do?
Honestly, I'm not sure about that Philippe section.
@Mirsaneli, do you have any clues?

At first glance, I'd say it cannot hurt to have that code; because it only runs when a character has that attribute.
On the other hand, if I see correctly, that attribute is only set by this function:
Code:
// =================================================================================================
// Character Relation
// =================================================================================================
void SetCharacterRelationAsOtherCharacter(int iCharacterIndex1, int iCharacterIndex2)
{
    Characters[iCharacterIndex1].relation.UseOtherCharacter = iCharacterIndex2;
}
And that function is used twice in the Standard quests_reaction.c and both times it is commented out.
So I don't know where this one came from; or why. o_O

The other changes are clearer though:
1. Prevent masts taking damage for immortal characters
2. Prevent grapeshots from demasting ships
3. This section is up for debate:
Code:
    // if(iRealismMode>0)
    // {
    //     int MinSailCrew = GetCharacterShipHP(rCharacter)/100;    // crew needed for sailing, intentionally not using mininum crew here
    //     if (MinSailCrew >= 100000/100) MinSailCrew = 100;        // Cursed ships are a special case
    //     CrewQuantity -= MinSailCrew;
    // }
At least one player reported problems related to the way this used to be by default.
4. These lines are your own changes that you seem to have lost, but I restored in my files for you:
Code:
//    if(!IsMainCharacter(rOurCharacter)) return; // PB: Collision damage for player ship only, GR: let NPC ships take damage
5. This cannot do any harm; but would prevent an error.log entry under certain weird conditions:
Code:
        float fRotate = 0.0;
        if(CheckAttribute(arCharShip, "Impulse"))
            stf(arCharShip.Impulse.Rotate.y);
 

Attachments

  • TradeBook.c
    25.4 KB · Views: 52
@Bartolomeu?
@Bartolomeu o Portugues or @Mirsaneli, is this another Maelstrom thing?

That is intentional. Purpure's story is set in 1840. Setting the date to 1840 earlier in the game causes a crash because the game can't figure out the period, unless we change the definition of "Napoleonic", currently ending in 1830.
Yeah, I got that when I scrolled further down. :facepalm

That said, would there be any harm in just changing the period definition by 10 years?

Possibly.
Definitely.
At the very least that sound file?
 
About box43 etc. Much of the mountain climbing at Bishops_hostel is reworked by adding a new walk patch instead of jumping from
spot to spot. Which explains why many boxes are not used/deleted.
Nice improvement! :cheers

Pchar. = "no";
GetTime(){ return stf(Environment.time); }
Both these have been there for a very long time. The first one is an obvious mstake the other one I don't know where it came from.
Guess both can be deleted.
Seems to do no harm; but it's probably better gone anyway.
I only spotted them by accident.
 
Serathion said:
I am now at the part where you are supposed to escort the French barque from Martinique. As soon as I go to the sea screen, the fort starts shelling me from point blank range despite me having set a French flag and not doing any crime in town. Did I miss something there?
Image
I think it might be because of this in "PROGRAM\Storyline\standard\quests\quests_reaction.c":
Code:
        case "Story_Follow_Rabel_And_Counterspy_2":
            Group_SetTaskAttack("Story_French_Squadron", PLAYER_GROUP, true);
            Group_LockTask("Story_French_Squadron");
// KK -->
            characters[GetCharacterIndex("Rabel Iverneau")].AbordageMode = 0;
            if (GetRMRelation(pchar, FRANCE) > REL_WAR) SetRMRelation(pchar, FRANCE, REL_WAR);
            HoistFlag(FRANCE);
            iForceDetectionFalseFlag = 1;
// <-- KK
            AddCharacterGoods(pchar, GOOD_WHEAT, 40);  // Cat
            AddCharacterGoods(pchar, GOOD_RUM, 20);  //  Cat
        break;
iForceDetectionFalseFlag = 1 means your false flag will ALWAYS be detected.
Two lines before, you're forced into war with France.
And for some strange reason, in-between you automatically get a French flag hoisted or you.
Which is completely useless, because you're being forced into hostility here anyway.

I suspect this code may not be doing what was actually intended.
@Grey Roger, do you know what's up with this one? o_O

EDIT: On the other hand...
Aren't I mixing up story sections??
Rabel_And_Counterspy is much later, isn't it?
It does seem a bit weird to me still, but it's probably not the problem after all.
 
Last edited:
What does this do?
Code:
            Pchar.quest.Story_Sink_Oiseau1.win_condition.l1 = "Ship_HP";
            Pchar.quest.Story_Sink_Oiseau1.win_condition.l1.character = "Virgile Boon";
            Pchar.quest.Story_Sink_Oiseau1.win_condition.l1.quantity = 1;
            Pchar.quest.Story_Sink_Oiseau1.win_condition.l1.operation = "<";
Quantity of WHAT is being checked? :confused:

By the way @Grey Roger, didn't you add some code so that forts (and maybe ships?) would reset their memory if you change your ship's name?
I have some vague recollection of that...
But looking at what I think is the relevant code now, I don't see a trace of that (anymore).
 
I think it might be because of this in "PROGRAM\Storyline\standard\quests\quests_reaction.c":
Code:
        case "Story_Follow_Rabel_And_Counterspy_2":
            Group_SetTaskAttack("Story_French_Squadron", PLAYER_GROUP, true);
            Group_LockTask("Story_French_Squadron");
// KK -->
            characters[GetCharacterIndex("Rabel Iverneau")].AbordageMode = 0;
            if (GetRMRelation(pchar, FRANCE) > REL_WAR) SetRMRelation(pchar, FRANCE, REL_WAR);
            HoistFlag(FRANCE);
            iForceDetectionFalseFlag = 1;
// <-- KK
            AddCharacterGoods(pchar, GOOD_WHEAT, 40);  // Cat
            AddCharacterGoods(pchar, GOOD_RUM, 20);  //  Cat
        break;
iForceDetectionFalseFlag = 1 means your false flag will ALWAYS be detected.
Two lines before, you're forced into war with France.
And for some strange reason, in-between you automatically get a French flag hoisted or you.
Which is completely useless, because you're being forced into hostility here anyway.

I suspect this code may not be doing what was actually intended.
@Grey Roger, do you know what's up with this one? o_O

EDIT: On the other hand...
Aren't I mixing up story sections??
Rabel_And_Counterspy is much later, isn't it?
It does seem a bit weird to me still, but it's probably not the problem after all.
Well, this is quite odd:
Code:
FLAGS: The 'Saint Pierre Fort' remembers us as personal
But if that is the case, then how did he get IN without being shot at?

I also discovered that this here does NOT work against characters that still remember you:
Code:
SafePortLeave(GetCurrentLocationNation(), true);
Which perhaps should be changed...?
That function does serve a purpose after all.

EDIT: Going further...
I see the same line of code TWICE:
Code:
        case "Convoy_Virgile_Boon2":
            SetCharacterRemovable(characterFromID("Virgile Boon"), true);
            pchar.quest.Convoy_Virgile_Boon.over = "yes";
            Pchar.quest.Story_Convoy_Virgile_Boon_1.over = "yes";
            Pchar.quest.Story_Convoy_Virgile_Boon_2.over = "yes";
            Pchar.quest.Story_Convoy_Virgile_Boon_3.over = "yes";
            Pchar.quest.Story_Convoy_Virgile_Boon_4.over = "yes";
            Pchar.quest.Story_Convoy_Virgile_Boon_5.over = "yes";
            Pchar.quest.Story_Convoy_Virgile_Boon_6.over = "yes";
            Pchar.quest.Story_Convoy_Virgile_Boon_7.over = "yes";
            Pchar.quest.Story_Convoy_Virgile_Boon_8.over = "yes";
            Pchar.quest.Story_Blaze_and_Boon_leaving.over = "yes";

            bQuestDisableMapEnter = true;
            Island_SetReloadEnableGlobal(PChar.location, false);
            PChar.quest.boonelockedisland = PChar.location;// TIH store what island was locked Oct31'06

            RemoveCharacterCompanion(Pchar, characterFromID("Virgile Boon"));
            SetCharacterRemovable(characterFromID("Virgile Boon"), true); // NK
I'm not convinced this works anymore with my rewritten Nations Relations system:
Code:
            SetCharacterRelationBoth(GetCharacterIndex("Redmond Commander"),GetCharacterIndex("Virgile Boon"),RELATION_ENEMY);
            SetCharacterRelationBoth(GetCharacterIndex("Greenford Commander"),GetCharacterIndex("Virgile Boon"),RELATION_ENEMY);
            SetCharacterRelationBoth(GetCharacterIndex("FalaiseDeFleur Commander"),GetCharacterIndex("Virgile Boon"),RELATION_FRIEND);
            SetCharacterRelationBoth(GetCharacterIndex("Virgile Boon"),GetMainCharacterIndex(),RELATION_ENEMY);
Also, if this is desired, why limit to only three of the forts when there are so many more in the game??
And this code doesn't look great either, considering we've got a ton more islands now:
Code:
            //------------Выдача Квестов на нападение Буна на игрока
            Pchar.quest.Story_Convoy_Virgile_Boon_1.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_1.win_condition.l1.location = "Oxbay";
            Pchar.quest.Story_Convoy_Virgile_Boon_1.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_2.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_2.win_condition.l1.location = "Redmond";
            Pchar.quest.Story_Convoy_Virgile_Boon_2.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_3.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_3.win_condition.l1.location = "IslaMuelle";
            Pchar.quest.Story_Convoy_Virgile_Boon_3.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_4.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_4.win_condition.l1.location = "Conceicao";
            Pchar.quest.Story_Convoy_Virgile_Boon_4.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_5.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_5.win_condition.l1.location = "Douwesen";
            Pchar.quest.Story_Convoy_Virgile_Boon_5.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_6.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_6.win_condition.l1.location = "QuebradasCostillas";
            Pchar.quest.Story_Convoy_Virgile_Boon_6.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_7.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_7.win_condition.l1.location = "KhaelRoa";
            Pchar.quest.Story_Convoy_Virgile_Boon_7.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_8.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_8.win_condition.l1.location = "";
            Pchar.quest.Story_Convoy_Virgile_Boon_8.win_condition = "Convoy_Virgile_Boon2";
Anyway, one proposal of mine is to add that second line marked PB here in quests.c:
Code:
void SafePortLeave(int iNation, bool bOverride)
{
    ref mchr = GetMainCharacter();
    if (GetNationRelation2MainCharacter(iNation) == RELATION_ENEMY || bOverride) // Only if Required
    {
        mchr.quest.Safe_Port_Leave.flag = GetCurrentFlag();
        mchr.quest.Safe_port_leave.win_condition.l1 = "MapEnter";
        mchr.quest.Safe_port_leave.win_condition = "Safe_port_leave";

        HoistFlag (iNation); // PB: Hoist False Flag
        ResetForts(iNation); // PB: Make sure any applicable forts BELIEVE your false flag, regardless of how you came in

        iForceDetectionFalseFlag = -1;
    }
}
I see you already had an idea along these same lines in Virgile Boon_dialog.c:
Code:
//                iForceDetectionFalseFlag = -1;// KK
                SafePortLeave(FRANCE, false); // GR
 
Last edited:
Huh? That's BIZARRE!
@Jack Rackham, do you have strong objections to this being removed...?
Not at all if it causes problem. I'll need the label in WR though so I'll add two lines in StartStoryline instead.

Done.
 
Last edited:
What does this do?
Code:
            Pchar.quest.Story_Sink_Oiseau1.win_condition.l1 = "Ship_HP";
            Pchar.quest.Story_Sink_Oiseau1.win_condition.l1.character = "Virgile Boon";
            Pchar.quest.Story_Sink_Oiseau1.win_condition.l1.quantity = 1;
            Pchar.quest.Story_Sink_Oiseau1.win_condition.l1.operation = "<";
Quantity of WHAT is being checked? :confused:
Quantity of "Ship_HP". ;) The HP of Virgile Boon's ship, Oiseau, to be exact. If it's less than 1, the ship sank. It may date back to the stock game and may now be redundant because:
Code:
            Pchar.quest.Story_Sink_Oiseau2.win_condition.l1 = "NPC_Death";
            Pchar.quest.Story_Sink_Oiseau2.win_condition.l1.character = "Virgile Boon";
            Pchar.quest.Story_Sink_Oiseau2.win_condition = "Story_Sink_Oiseau";
... should trigger when the ship sinks anyway.

By the way @Grey Roger, didn't you add some code so that forts (and maybe ships?) would reset their memory if you change your ship's name?
I have some vague recollection of that...
No, they reset their memory if you have a different type of ship. And you can't have the ship in your fleet either; the fort will spot you even if you got yourself a new ship and gave the recognised ship to one of your officers. It needs to be a completely different ship, not merely a differently coloured variant, otherwise all you need to do is go into the nearest shipyard and repaint it. And merely changing the ship's name was never considered as that would be too easy and make the whole fort memory feature next to useless!
 
I think it might be because of this in "PROGRAM\Storyline\standard\quests\quests_reaction.c":
Code:
        case "Story_Follow_Rabel_And_Counterspy_2":
            Group_SetTaskAttack("Story_French_Squadron", PLAYER_GROUP, true);
            Group_LockTask("Story_French_Squadron");
// KK -->
            characters[GetCharacterIndex("Rabel Iverneau")].AbordageMode = 0;
            if (GetRMRelation(pchar, FRANCE) > REL_WAR) SetRMRelation(pchar, FRANCE, REL_WAR);
            HoistFlag(FRANCE);
            iForceDetectionFalseFlag = 1;
// <-- KK
            AddCharacterGoods(pchar, GOOD_WHEAT, 40);  // Cat
            AddCharacterGoods(pchar, GOOD_RUM, 20);  //  Cat
        break;
iForceDetectionFalseFlag = 1 means your false flag will ALWAYS be detected.
Two lines before, you're forced into war with France.
And for some strange reason, in-between you automatically get a French flag hoisted or you.
Which is completely useless, because you're being forced into hostility here anyway.

I suspect this code may not be doing what was actually intended.
@Grey Roger, do you know what's up with this one? o_O

EDIT: On the other hand...
Aren't I mixing up story sections??
Rabel_And_Counterspy is much later, isn't it?
It does seem a bit weird to me still, but it's probably not the problem after all.
That is indeed much later. It's the second part of the second mission where Tobias (alias "Counterspy") has persuaded Rabel Yverneau to defect, bringing his frigate with him. You now have to sail that frigate out of Speightstown with the fort and fleet attacking you. You're flying a French flag because you're in a French frigate. But the alarm has sounded (you were attacked by soldiers just before boarding the frigate), so the fort and fleet know what you're up to. And you're about to get a warning about firing on ships with a friendly flag if you shoot back and haven't switched flag manually.

As for the original problem:
Serathion said:
I am now at the part where you are supposed to escort the French barque from Martinique. As soon as I go to the sea screen, the fort starts shelling me from point blank range despite me having set a French flag and not doing any crime in town. Did I miss something there?
If Serathion was under a flag hostile to France while approaching Martinique, the fort may have spotted it. "Sail-To" can get you to St. Pierre port before the fort has a chance to react, but it will remember you and fire when you next put to sea. You can moor at the beach instead, though you may need to walk into port and talk to Faust Gasquet to find out about the escort ship for the Oiseau.
 
Well, this is quite odd:
Code:
FLAGS: The 'Saint Pierre Fort' remembers us as personal
But if that is the case, then how did he get IN without being shot at?
"SailTo" can get you to port at once, then you can dock before the fort has a chance to fire. It will get you when you leave, though.

EDIT: Going further...
...
And this code doesn't look great either, considering we've got a ton more islands now:
Code:
            //------------Выдача Квестов на нападение Буна на игрока
            Pchar.quest.Story_Convoy_Virgile_Boon_1.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_1.win_condition.l1.location = "Oxbay";
            Pchar.quest.Story_Convoy_Virgile_Boon_1.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_2.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_2.win_condition.l1.location = "Redmond";
            Pchar.quest.Story_Convoy_Virgile_Boon_2.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_3.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_3.win_condition.l1.location = "IslaMuelle";
            Pchar.quest.Story_Convoy_Virgile_Boon_3.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_4.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_4.win_condition.l1.location = "Conceicao";
            Pchar.quest.Story_Convoy_Virgile_Boon_4.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_5.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_5.win_condition.l1.location = "Douwesen";
            Pchar.quest.Story_Convoy_Virgile_Boon_5.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_6.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_6.win_condition.l1.location = "QuebradasCostillas";
            Pchar.quest.Story_Convoy_Virgile_Boon_6.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_7.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_7.win_condition.l1.location = "KhaelRoa";
            Pchar.quest.Story_Convoy_Virgile_Boon_7.win_condition = "Convoy_Virgile_Boon";

            Pchar.quest.Story_Convoy_Virgile_Boon_8.win_condition.l1 = "location";
            Pchar.quest.Story_Convoy_Virgile_Boon_8.win_condition.l1.location = "";
            Pchar.quest.Story_Convoy_Virgile_Boon_8.win_condition = "Convoy_Virgile_Boon2";
Possibly replace "KhaelRoa" with "Guadeloupe". That should then cover the most likely islands you'll hit if you directsail from Martinique - Barbados to the south, Guadeloupe to the north, La Grenade to the southwest, and Jamaica to the northwest which is your next quest destination.

Or replace the whole lot with "MapEnter".

Anyway, one proposal of mine is to add that second line marked PB here in quests.c:
Code:
void SafePortLeave(int iNation, bool bOverride)
{
    ref mchr = GetMainCharacter();
    if (GetNationRelation2MainCharacter(iNation) == RELATION_ENEMY || bOverride) // Only if Required
    {
        mchr.quest.Safe_Port_Leave.flag = GetCurrentFlag();
        mchr.quest.Safe_port_leave.win_condition.l1 = "MapEnter";
        mchr.quest.Safe_port_leave.win_condition = "Safe_port_leave";

        HoistFlag (iNation); // PB: Hoist False Flag
        ResetForts(iNation); // PB: Make sure any applicable forts BELIEVE your false flag, regardless of how you came in

        iForceDetectionFalseFlag = -1;
    }
}
Bad move. That means if you've triggered a 'SafePortLeave' from one hostile port, all forts belonging to that nation will forget you forever. Perhaps add a check on iForceDetectionFalseFlag == -1 to 'CheckInitialFlagRelations' in "Screwface_functions.c"?
 
Quantity of "Ship_HP". ;) The HP of Virgile Boon's ship, Oiseau, to be exact. If it's less than 1, the ship sank. It may date back to the stock game and may now be redundant because:
Code:
Pchar.quest.Story_Sink_Oiseau2.win_condition.l1 = "NPC_Death";
Pchar.quest.Story_Sink_Oiseau2.win_condition.l1.character = "Virgile Boon";
Pchar.quest.Story_Sink_Oiseau2.win_condition = "Story_Sink_Oiseau";
... should trigger when the ship sinks anyway.
That's what I thought...
Thanks for confirming!

No, they reset their memory if you have a different type of ship. And you can't have the ship in your fleet either; the fort will spot you even if you got yourself a new ship and gave the recognised ship to one of your officers. It needs to be a completely different ship, not merely a differently coloured variant, otherwise all you need to do is go into the nearest shipyard and repaint it. And merely changing the ship's name was never considered as that would be too easy and make the whole fort memory feature next to useless!
Then where does my "name changing" memory come from?? o_O
Well, I do agree with your logic.
 
I have the sound file. I've yet to compare how it sounds compared to the original. Also:
@Jack Rackham: you use "step_sand.wav" as a special effect sound for various things. Would the new version spoil those?
I found especially in BNH and MNH that the step on sand sound gets quite annoying when combined with time compression.
This version is a li'l better...
 
That is indeed much later. It's the second part of the second mission where Tobias (alias "Counterspy") has persuaded Rabel Yverneau to defect, bringing his frigate with him. You now have to sail that frigate out of Speightstown with the fort and fleet attacking you. You're flying a French flag because you're in a French frigate. But the alarm has sounded (you were attacked by soldiers just before boarding the frigate), so the fort and fleet know what you're up to. And you're about to get a warning about firing on ships with a friendly flag if you shoot back and haven't switched flag manually.
Indeed.

As for the original problem: If Serathion was under a flag hostile to France while approaching Martinique, the fort may have spotted it. "Sail-To" can get you to St. Pierre port before the fort has a chance to react, but it will remember you and fire when you next put to sea. You can moor at the beach instead, though you may need to walk into port and talk to Faust Gasquet to find out about the escort ship for the Oiseau.
I suppose it was a VERY rapid Sail-To then.
Didn't realize you could do that. :facepalm
 
Possibly replace "KhaelRoa" with "Guadeloupe". That should then cover the most likely islands you'll hit if you directsail from Martinique - Barbados to the south, Guadeloupe to the north, La Grenade to the southwest, and Jamaica to the northwest which is your next quest destination.

Or replace the whole lot with "MapEnter".
"MapEnter" makes sense to me...
Nice, simple, clean.
Is that something you'd want to do, just in case?

Bad move. That means if you've triggered a 'SafePortLeave' from one hostile port, all forts belonging to that nation will forget you forever. Perhaps add a check on iForceDetectionFalseFlag == -1 to 'CheckInitialFlagRelations' in "Screwface_functions.c"?
It would indeed have that effect.
I thought that wouldn't do too much harm?
But if not, how about this proposal?
Code:
void CheckInitialFlagRelations(ref chr, float visibility_range, float ship_range)
{
    // Initialize nations
    int iNation = GetCurrentFlag();
    int nNation = sti(chr.nation);
    float rel = GetRMRelation(GetMainCharacter(), nNation);
    bool IsFort = GetAttribute(chr, "ship.type") == SHIP_FORT_NAME;

    // Initialize relations between NPC ships
    UpdateAllShipsAtSea(chr, IsFort);

    if (IsFort && nNation == PERSONAL_NATION) return; //Do not check me if fort is mine
    if (IsCompanion    (chr)) return; // Companions don't care
    if (CharacterIsDead(chr)) return; // Already dead, don't change relation again

    if (rel <= REL_WAR && iForceDetectionFalseFlag == 1 && ship_range < visibility_range) chr.recognized = 1; // GR: obey forced recognition of false flag
    
    if (iForceDetectionFalseFlag == -1) ResetCharacterMemory(chr); // PB: So any false flag is believed again
 
Pick one at random, then.
I don't understand?

In some lines, references to direct attribute names such as "NPChar.lastname" are replaced by functions like "GetMyLastName(NPChar)". In others, the last name is handled by 'GetMyAddressForm'. And in the next version, "GetMyName(NPChar) + " " + GetMyLastName(NPChar)" is going to be simplified to "GetMySimpleName(NPChar)".
Nice and clean. :onya
 
Back
Top