• 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: 12th January 2024]

@Grey Roger, I checked and double-checked and this seems to be about as good as it gets from my side for now.
If you can, please also include my formatting clean-ups.
I hate ugly code and try to address that whenever I happen to be able to.
 

Attachments

  • PB_Code.7z
    1.6 MB · Views: 20
The old step_sand is so much louder that I'll get problem using the new weaker one.
What about this: I'll rename the old one to step_sand2.wav and do the changes (4 places for me)
 
The old step_sand is so much louder that I'll get problem using the new weaker one.
Yes, I found that as well. Walking on sand, I can hardly hear it, even with sound effects turned up to a point where cannonfire in a naval battle would probably annoy my neighbours. Also, the same file is used for the sound when you dig for treasure, and I couldn't hear that at all. Compared to a minor annoyance when walking on sand with time compression, I'd say the loss due to using the new "step_sand" is significantly greater than the improvement. Unless it's made louder - in which case it will probably annoy the time-compressed walkers again - I'd rather not use it.
 
Yes, I found that as well. Walking on sand, I can hardly hear it, even with sound effects turned up to a point where cannonfire in a naval battle would probably annoy my neighbours. Also, the same file is used for the sound when you dig for treasure, and I couldn't hear that at all. Compared to a minor annoyance when walking on sand with time compression, I'd say the loss due to using the new "step_sand" is significantly greater than the improvement. Unless it's made louder - in which case it will probably annoy the time-compressed walkers again - I'd rather not use it.
It’s strange why you can’t hear it, I increased the volume almost to the standard volume, but a little quieter. In the BNH this sound is heard normally. In the standard mode of the game, for some reason the sounds of sand are not heard at all, even with the old sound, as if they were not there.
 
@Grey Roger, I checked and double-checked and this seems to be about as good as it gets from my side for now.
If you can, please also include my formatting clean-ups.
I hate ugly code and try to address that whenever I happen to be able to.
Not only does that waste space in the file which people download, but you seem to be using a different setting for tabs to me which means some of your "clean-ups" actually make the code look ugly here! Additionally, it's a distraction which is taking time during the WinMerge and which may cause me to miss a real fix. Would you be able to re-upload the collection including only those files which have genuine code changes, please?
 
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
That's not as drastic but it still means that if the fort is temporarily fooled for quest reasons, it will forget about you entirely. Maybe just add another exception similar to those already present:
Code:
if (iForceDetectionFalseFlag == -1) return;
 
That's not as drastic but it still means that if the fort is temporarily fooled for quest reasons, it will forget about you entirely. Maybe just add another exception similar to those already present:
Code:
if (iForceDetectionFalseFlag == -1) return;
Ah yes, I suppose that could work too...

Not only does that waste space in the file which people download, but you seem to be using a different setting for tabs to me which means some of your "clean-ups" actually make the code look ugly here! Additionally, it's a distraction which is taking time during the WinMerge and which may cause me to miss a real fix. Would you be able to re-upload the collection including only those files which have genuine code changes, please?
I only use the software default settings.
Never changed them...
 
1 tab = 8 spaces. You're presumably using 1 tab = 4 spaces.

I have my own pet peeves, including proper indentation, and having an 'if' block like this:
Code:
if (condition)
{
        do stuff
}
... rather than...
Code:
if (condition) {
        do stuff
}
... so that it's easier to scroll down and see where blocks start and end. But although I'll sometimes "correct" them while I'm making a genuine change to the code, I'll not go searching for them just to change them, and I'll certainly not upload any files which have only been changed to satisfy my style preferences. So I'm also not interested in files which have only changed by removing a few spaces.

Talking of genuine changes, I found this added to function 'wdmEvent_PlayerInStorm()' in "PROGRAM\WorldMap\worldmap_events.c":
Code:
if (CheckAttribute(GetMainCharacter(), "stormIndex")) return; // PW storm immunity otherwise locked in storm
Characters[GetMaincharacterIndex()].stormIndex = stormIndex;//PW set up variable for storm immunity (cleared in daily crew update)
There's no "stormIndex", or any other storm code, in "DailyCrewUpdate.c". Is "stormIndex" something new to Build 15? I'm guessing this function is what yanks you out of worldmap and into direct sailing if you've entered a storm cloud on the worldmap and if "stormIndex" isn't cleared because my version of "DailyCrewUpdate.c" doesn't have it, then the first time a storm kicks you out of worldmap will also be the last.

And I'm still not sure what everything added to "AIShip.c" does. By your own admission, the "Philippe" code caters to an attribute which is only set by a function that is commented out in "Tales of a Sea Hawk" and not used anywhere else at all. So that code may as well also be commented out. And some of your formatting changes were to remove commented out code. If I don't add it, you don't need to delete it later. :D

The code to prevent immortal characters returns 'makefloat(0)', and so does the check for 'bSeaActive'. Why not just return '0.0'? (A few lines down is your own code to prevent damage to an NPC ship hitting land does exactly that.)

Exactly what problems were reported due to this:
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;
    }
And have you checked to make sure that commenting it out hasn't caused any more problems?

This looks very dodgy:
Code:
if(CheckAttribute(arCharShip, "Impulse"))
 stf(arCharShip.Impulse.Rotate.y);
Perhaps that should be:
Code:
if(CheckAttribute(arCharShip, "Impulse")) fRotate = stf(arCharShip.Impulse.Rotate.y);

There's no need to change "AIShip.c" to reduce the mast damage from grapeshot. That's what 'MAST_GRAPE_SCL', defined in "InternalSettings.h", is for. You could change that to 0 if you like.
 
Talking of genuine changes, I found this added to function 'wdmEvent_PlayerInStorm()' in "PROGRAM\WorldMap\worldmap_events.c":
Code:
if (CheckAttribute(GetMainCharacter(), "stormIndex")) return; // PW storm immunity otherwise locked in storm
Characters[GetMaincharacterIndex()].stormIndex = stormIndex;//PW set up variable for storm immunity (cleared in daily crew update)
There's no "stormIndex", or any other storm code, in "DailyCrewUpdate.c". Is "stormIndex" something new to Build 15? I'm guessing this function is what yanks you out of worldmap and into direct sailing if you've entered a storm cloud on the worldmap and if "stormIndex" isn't cleared because my version of "DailyCrewUpdate.c" doesn't have it, then the first time a storm kicks you out of worldmap will also be the last.
Just passing by as I said elsewhere and see my name against another issue. That looks like code from my interaction with New Horizons on Maelstrom. It seemed that with that engine I got locked in a storm that persisted and you got sucked back in quicker than you could sail out of it when it passed ad infinitum and the only way I could quickly workround past that was to set that variable/attribute. There was a cancellation in daily crew update in those files to accompany this.



Code:
    // Fudge Dragon: Changing Face of the Caribbean -->
    if (sti(GetStorylineVar(FindCurrentStoryline(), "CHANGING_RELATIONS")))
    {
        // Sulan: improved code and moved it to nations.c
        RandomNationsRelationsChange();
     }
    // Fudge Dragon: Changing Face of the Caribbean <--

    if (bCompanionMutiny) ShipMutiny(); // KK
    DeleteAttribute(pchar, "stormIndex");// PW end temporary immunity from storm
I've no idea why it would be bleeding back into build14 (and would have thought all you clever chaps moving to new engines would have a proper solution by now anyway).
 
Last edited:
Just passing by as I said elsewhere and see my name against another issue. That looks like code from my interaction with New Horizons on Maelstrom. It seemed that with that engine I got locked in a storm that persisted and you got sucked back in quicker than you could sail out of it when it passed ad infinitum and the only way I could quickly workround past that was to set that variable/attribute. There was a cancellation in daily crew update in those files to accompany this.

Code:
    // Fudge Dragon: Changing Face of the Caribbean -->
    if (bCompanionMutiny) ShipMutiny(); // KK
    DeleteAttribute(pchar, "stormIndex");// PW end temporary immunity from storm
I've no idea why it would be bleeding back into build14 (and would have thought all you clever chaps moving to new engines would have a proper solution by now anyway).
Good to see you back aboard, @pedrwyth! :cheers

The new version of "worldmap_events.c" with the code involving "stormIndex" was one of a batch of files uploaded by @Pieter Boelen. But that batch did not include a new version of "DailyCrewUpdate.c" with the line deleting the attribute. I've added it now, which means the new "worldmap_events.c" can go into the next update. If your new code helps Maelstrom work better, and provided it does no harm to "New Horizons" and "Beyond New Horizons", your new code may as well be included.
 
How can I select my "boarding party"? Since the startup settings menu is not in the B14 2022?
I select girls since I can distinguish them from the enemy and not shot or attack them... make sense?
Where in the code is the weapons for my defenders listed?
Can the startup listing be returned to the program?
Many of those settings are essential for my gaming experience.
 
Press F2 to go to the various interfaces. Click on "Passengers". You can assign your party officers there.

You can't hurt your own officers anyway, and they can't hurt you. The same goes for the random crew during boardings.

Ah - perhaps you mean that random crew, rather than your officers? Edit "PROGRAM\InternalSettings.h". Find this part:
Code:
#define BOARDERMODEL                 "standard"    // Outfit for your boarders, insert one of these groups (Don't change spelling or the "" !):
                                                // "marine", "corsair", "masked", "skeleton", "girl", "soldier" (soldiers of current flag),
                                                // "boarder" (Nathaniel's soldiers); default: "standard"
Change "standard" to one of the others - if you want the female crew, change it to "girl". (Not "girls" - don't add the "s" or it won't be recognised!)

You can change a lot of other things in "InternalSettings.h" too.
 
Press F2 to go to the various interfaces. Click on "Passengers". You can assign your party officers there.

You can't hurt your own officers anyway, and they can't hurt you. The same goes for the random crew during boardings.

Ah - perhaps you mean that random crew, rather than your officers? Edit "PROGRAM\InternalSettings.h". Find this part:
Code:
#define BOARDERMODEL                 "standard"    // Outfit for your boarders, insert one of these groups (Don't change spelling or the "" !):
                                                // "marine", "corsair", "masked", "skeleton", "girl", "soldier" (soldiers of current flag),
                                                // "boarder" (Nathaniel's soldiers); default: "standard"
Change "standard" to one of the others - if you want the female crew, change it to "girl". (Not "girls" - don't add the "s" or it won't be recognised!)

You can change a lot of other things in "InternalSettings.h" too.
Yes, I know I can't hurt my party but I waste time, action and ammo hitting my own, and Yes I only use the descriptor in "" in the settings list so I am getting the visually identifying boarding party. I also have modified Internal Settings as I have in the past to satisfy my requirements to enjoy the play.

seems 22 has the same problem as 21... sink a ship=screen freeze... end of game... why? seems this would have been resolved from the same issue in 21?
Any idea why... I would appreciate directions to end this fault that corrupts the game making it unplayable.

Is my Win7 an issue? Was this 22 designed for W10+ the reason? I don't like the map not locking for my ship to move rather than the map moving to keep my ship in center... maybe some like it... I don't. Past games had this feature and I've gotten used to it... how to lock the map?
BTW, I hate W10+, multimedia program for I=Phones not computers... I don't want to make my notebook into an I-Phone. Tried W10 and erased it for all the confusion and background stuff going on, lack of information on features, not user friendly at all! (

22 has so many problems I'm worn out trying to cobble it into a useful program. You seem to have found a working program, did you do any mods to correct the issues I'm finding? I'm sure you are using Win10 is that my problem? Was this revision designed for 10+ and not compatible with 7? If so I'm gonna stop chasing this Chimera,

Looking for some help in solving some illogical issues in this revision... makes me wonder if I should even try B15 (Beyond) if the same problems are going to prevent play?

Thanks for the advice and help problem solving, been running these since 16 and have cobbled changes to overcome past issues, but this has a much different logic map and uses critically different changes meant for more reality in sailing in the era... Not so much fun for me since I've not adjusted to such applications in past play. I'm just looking for a playable game with past logic design but with all the "bugs" removed that made it frustrating and irritating to play and replay and replay... too much time wasted, not enough enjoyment.

Will you at least help me solve the sinking the second ship in 21 freeze? If that is the only issue keeping me from playing that would give me an enjoyable, playable game to entertain my mind.

Thanks Mate,
Ron (Coastie)
 
seems 22 has the same problem as 21... sink a ship=screen freeze... end of game... why? seems this would have been resolved from the same issue in 21?
Any idea why... I would appreciate directions to end this fault that corrupts the game making it unplayable.
Next time that happens, post the log files "compile.log", "system.log", and "error.log" if it exists. I've never seen that problem so I've no idea what's causing it.

Is my Win7 an issue? Was this 22 designed for W10+ the reason?
No, I'm using Windows 7 myself.

I don't like the map not locking for my ship to move rather than the map moving to keep my ship in center... maybe some like it... I don't. Past games had this feature and I've gotten used to it... how to lock the map?
Again, the way it is now is the way I've seen it for many a year. I've no idea how to change it.

Looking for some help in solving some illogical issues in this revision... makes me wonder if I should even try B15 (Beyond) if the same problems are going to prevent play?
B15 might be more reliable in that you might not have the problem with the game freezing when a ship sinks. The map probably won't work differently.

Thanks for the advice and help problem solving, been running these since 16 and have cobbled changes to overcome past issues, but this has a much different logic map and uses critically different changes meant for more reality in sailing in the era... Not so much fun for me since I've not adjusted to such applications in past play. I'm just looking for a playable game with past logic design but with all the "bugs" removed that made it frustrating and irritating to play and replay and replay... too much time wasted, not enough enjoyment.
A lot of bugs have been fixed since 2016. But I don't recall the map changing since then, and I know I was playing in 2016 because that's about the time I started work on the "Ardent" storyline. (In the Chinese zodiac, 2016 was the Year of the Monkey, which is why there's a monkey-themed Easter egg in the story.)
 
Clever, the monkey theme... consistent with mischievousness... kinda like the series of mods in the following years. NO, none of the previous versions used a ship-centered sailing unless you chose that in the setup. I'm map oriented never chose to have the map moving beneath me.. so why is 22 now using that theme? Is this not the default in the 22 you run? If not how do I reset to the old standard of the ship moving over a fixed map? Would have been nice for the programmer of this new 22 version to include a tech narrative "How to Play"? Downloaded this about 12x now and each has the same Modus Operandi... First changing the installer then changing the play dramatically.

I'm still trying to figure out how to salvage 21 and stop the second ship sinking freeze. That's really the killer in that version... anyone have knowledge or a best guess why and where in the code... since it didn't happen in earlier versions it had to be a change if code for that version.
Aren't code changes documented in case of bugs so it can be reversed? SOP? Will the person who did the changes please tell me what they changed to cause this. Is it just that the save file overflows and the game locks? How do I enlarge the save file capacity? What module&line?

Throw me a Life ring I'm going down for the third time! (

Coastie Ron
 
CoastGuard71 said:
I don't like the map not locking for my ship to move rather than the map moving to keep my ship in center... maybe some like it... I don't. Past games had this feature and I've gotten used to it... how to lock the map?

Isn´t it just to press Tab
 
Last edited:
CoastGuard71 said:
I don't like the map not locking for my ship to move rather than the map moving to keep my ship in center... maybe some like it... I don't. Past games had this feature and I've gotten used to it... how to lock the map?

Isn´t it just to press Tab
I've tried that since it is habitual from past versions, but, no, the map does not lock, the ship is centered and the map spins around... does your download not do the same?
 
Next time that happens, post the log files "compile.log", "system.log", and "error.log" if it exists. I've never seen that problem so I've no idea what's causing it.


No, I'm using Windows 7 myself.


Again, the way it is now is the way I've seen it for many a year. I've no idea how to change it.


B15 might be more reliable in that you might not have the problem with the game freezing when a ship sinks. The map probably won't work differently.


A lot of bugs have been fixed since 2016. But I don't recall the map changing since then, and I know I was playing in 2016 because that's about the time I started work on the "Ardent" storyline. (In the Chinese zodiac, 2016 was the Year of the Monkey, which is why there's a monkey-themed Easter egg in the story.)
Problem is with the screen freeze everything locks up and Windows doesn't generate an error diagnotics citing the cause for the error. Only way to reset is ctrl-del-alt reset which reboots... no clue why this is happening, not even a diagnostic! However, same freeze happened in v21 when the second ship in a usual pair is sunk... freeze, reboot, resume at last save. Coder needs to identify cause and correct seems the issue in 21 carried over into 22?
 
Again, I've never seen this problem - I've had companion ships sunk and the game did not crash. Also:
CoastGuard71 said:
I don't like the map not locking for my ship to move rather than the map moving to keep my ship in center... maybe some like it... I don't. Past games had this feature and I've gotten used to it... how to lock the map?

Isn´t it just to press Tab
I've tried that since it is habitual from past versions, but, no, the map does not lock, the ship is centered and the map spins around... does your download not do the same?
Pressing Tab does lock the map. On the left, the worldmap as it is by default - zoomed in, the map moves to keep your ship pointing ahead. On the right, the same worldmap after I press Tab - zoomed way out, the map stays static and your ship turns.
worldmap_normal.jpg worldmap_tab.jpg
 
Back
Top