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

Need Help Sails are always at 99/100 repaired

Sheepie

Powder Monkey
Okay, this happened after I got the Meifeng in the Dutch Gambit. Before I was commandeering the starting lugger, Eternal Glory. It's a fabulous ship for a lugger. Now fully repairing the Meifeng returns sails to 99/100. I sold it and captured a Galleon from the sea but it is 99/100 too. Whenever I repair it becomes 100/100, then goes back to 99/100 as soon as I'm back to port. Can I fix this glitch or just ignore it? Only using Hook mod and ActiveMap mod. Also the NewStartKit mod, but sparingly. Is every ship now glitched? So far, the Eternal Glory is not affected. I'm guessing I have to get another quest ship to fix this glitch.

Please help :(. It's rubbing on my OCD like a gnat:modding
 
Okay, this happened after I got the Meifeng in the Dutch Gambit. Before I was commandeering the starting lugger, Eternal Glory. It's a fabulous ship for a lugger. Now fully repairing the Meifeng returns sails to 99/100. I sold it and captured a Galleon from the sea but it is 99/100 too. Whenever I repair it becomes 100/100, then goes back to 99/100 as soon as I'm back to port. Can I fix this glitch or just ignore it? Only using Hook mod and ActiveMap mod. Also the NewStartKit mod, but sparingly. Is every ship now glitched? So far, the Eternal Glory is not affected. I'm guessing I have to get another quest ship to fix this glitch.

Please help :(. It's rubbing on my OCD like a gnat:modding
:ahoyWelcome to the community @Sheepie ! Lol, that's something unusual xD Anyway, do you have a carpenter on board and do you or your carpenter possess the skill(s)/ability to repair a ship? That might be one of the reasons since our ship(s) get damaged overtime while at sea especially when you're caught up in a storm.

I think I did notice that myself when I playing but didn't really bother me much. Since I got all the necessary perks for myself and officers they auto-repair the ship while we're underway. I do a lot of fighting especially with the pirates and have my hull and sails fully repaired after a few hours/days depending on how much damage my ship took and provided you have the necessary materials onboard the ship.

Oh and I also have all the MODs you mentioned.

EDIT: Also you might want to edit the file named "tehomod_hookmod.ini" and remove the required version. The new update on steam has messed up some of its features and removing that line or just the version fixes it.
It should look like this just plain blank Capture.JPG
 
Last edited:
:ahoyWelcome to the community @Sheepie ! Lol, that's something unusual xD Anyway, do you have a carpenter on board and do you or your carpenter possess the skill(s)/ability to repair a ship? That might be one of the reasons since our ship(s) get damaged overtime while at sea especially when you're caught up in a storm.

I think I did notice that myself when I playing but didn't really bother me much. Since I got all the necessary perks for myself and officers they auto-repair the ship while we're underway. I do a lot of fighting especially with the pirates and have my hull and sails fully repaired after a few hours/days depending on how much damage my ship took and provided you have the necessary materials onboard the ship.

Oh and I also have all the MODs you mentioned.

EDIT: Also you might want to edit the file named "tehomod_hookmod.ini" and remove the required version. The new update on steam has messed up some of its features and removing that line or just the version fixes it.
It should look like this just plain blank View attachment 35374
Thanks Davy, but this really is a bug. I've got all officers and carpenter is good at repairing. But he repairs up to 99. I tried your fix but this seems unrelated. As I said, I've docked Eternal Glory in Saint-Pierre and picked it up to check if the bug persists. I think mission generated ships should fix it.

EDIT: It seems Hook also encountered this problem: https://steamcommunity.com/app/223330/discussions/1/350542145709554405/

QUOTE:

A couple of things I didn't try... I didn't exit and reload Steam, and I didn't try swapping ships. My companion was the Meifeng, and that may be part of the problem. For some reason, the sails are at 99/100 and while I can repair them, they go right back quickly. I may sell that thing; I don't care for it much anyway and I've already got a normal Xebec which is better, if a bit slower.

@LarryHookins do you know this?
 
Last edited:
There was a similar bug in PoTC. I wonder if the same fix which applied there would work here as well? If there's a file "PROGRAM\battle_interface\utils.c" in TEHO, can someone please upload it?
 
There was a similar bug in PoTC. I wonder if the same fix which applied there would work here as well? If there's a file "PROGRAM\battle_interface\utils.c" in TEHO, can someone please upload it?

Isn't TEHO locked? I coudn't find any C file to edit.

I'm an idiot, so ignore me. Apparently there are files but I was just looking for cheats
 
Last edited:
You just paste it.

With the default settings, the Tehomod checks for unpacked files and those that are not found are loaded from the packed files, So the game will use the file you copied. ;)
 
You just paste it.

With the default settings, the Tehomod checks for unpacked files and those that are not found are loaded from the packed files, So the game will use the file you copied. ;)
Tried it, didn't work. Sail is still at 99. I'm starting to think this glitch is baked into Meifeng. When I supported thr English and got Mirage it didn't occur.
 
Try this.

Here's the code in question:
Code:
float ProcessSailRepair(ref chref, float repPercent)
{
   float dmg = 100.0-GetSailPercent(chref);
   if(dmg==0.0) return 0.0;
   if(repPercent>dmg) repPercent=dmg;

   float fMakeRepair = repPercent;
And here's the fix provided by @Serge Grey and @PaterBrown:
Code:
float ProcessSailRepair(ref chref, float repPercent)
{
   float dmg = 100.0-GetSailPercent(chref);
   if(dmg==0.0) return 0.0;
   if(repPercent>dmg) repPercent=dmg;

//   float fMakeRepair = repPercent;
   float maxShipSP = GetCharacterShipSP(chref); // new line by PaterBrown. Serge Grey have made tests ;)
   float fMakeRepair = (repPercent * maxShipSP)/100; // new line, was float fMakeRepair = repPercent;
This change, applies to very similar code, fixed the same problem in PoTC, so hopefully it will do the same in TEHO as well.
 

Attachments

  • utils.c
    16.7 KB · Views: 223
Try this.

Here's the code in question:
Code:
float ProcessSailRepair(ref chref, float repPercent)
{
   float dmg = 100.0-GetSailPercent(chref);
   if(dmg==0.0) return 0.0;
   if(repPercent>dmg) repPercent=dmg;

   float fMakeRepair = repPercent;
And here's the fix provided by @Serge Grey and @PaterBrown:
Code:
float ProcessSailRepair(ref chref, float repPercent)
{
   float dmg = 100.0-GetSailPercent(chref);
   if(dmg==0.0) return 0.0;
   if(repPercent>dmg) repPercent=dmg;

//   float fMakeRepair = repPercent;
   float maxShipSP = GetCharacterShipSP(chref); // new line by PaterBrown. Serge Grey have made tests ;)
   float fMakeRepair = (repPercent * maxShipSP)/100; // new line, was float fMakeRepair = repPercent;
This change, applies to very similar code, fixed the same problem in PoTC, so hopefully it will do the same in TEHO as well.
Thanks for the code! Anyway, the problem has fixed itself when I lost my ship to Caleuche. I knew it was related to Meifeng! When I took the Meifeng it glitched every ship I replaced with. Then another mission (Caleuche) kind of scourged the glitch with their own script. I think that's what happened. Now my Heavy Frigate is 100/100
 
Thanks for the code! Anyway, the problem has fixed itself when I lost my ship to Caleuche. I knew it was related to Meifeng! When I took the Meifeng it glitched every ship I replaced with. Then another mission (Caleuche) kind of scourged the glitch with their own script. I think that's what happened. Now my Heavy Frigate is 100/100
I don't remember this when using the Meifeng, probably it could happen to any ship but it just happened with the Meifeng in your case.
 
Thank neptunes beard. All my sailcloth was slowly being used up by my shipwright trying to repair all my fleets sails all the time. I noticed the bug during the FTJR questline after I traded my Unique Ketch in.
 
Last edited:
Back
Top