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

Fixed Forts indicating Zero Crew and Cannons

Jason

Buccaneer
Storm Modder
I attacked the fort at Spreightstown. And when I put my glass on it showed 0 men and 0 cAnnons even though it was firing right along.
 
Ahoy Pieter,

This save including the first of Levis 12/6 fixes is off the coast of Barbados I attacked both Forts in succession and when you put the glass on them before your opening salvo, the Fort is 100% men 0% and canons 0%. The fire at you, you can take them and that all works fine problem on both forts, may be universal?

Also during the attack I am getting no log entries about the elimination of the forts cannon@1000pts per canon.
 

Attachments

  • -=Player=- Open Sea August 13th, 1709.rar
    606.1 KB · Views: 76
I know some spyglasses simply don't show the number of crew.
But I can't remember if they then show '0' or nothing at all.

Also during the attack I am getting no log entries about the elimination of the forts cannon@1000pts per canon.
Experience points, you mean?
 
To answer my own questions: This is on Arcade Game Mode with the MASTERWORK spyglass, so that isn't the reason.
I also confirmed the problem.

As for that "missing text", that isn't much of a mystery:
Code:
      iCrew = makeint(CalculateTownFortCrewQuantity(rFortCharacter) * (1.0 - (MakeFloat(iNumDamagedCannons) / MakeFloat(2 * iNumAllCannons)))) + rand(10) - 5;
       if (iCrew < sti(rFortCharacter.Ship.Crew.Quantity)) rFortCharacter.Ship.Crew.Quantity = iCrew;
       if (sti(rFortCharacter.Ship.Crew.Quantity) < 10) rFortCharacter.Ship.Crew.Quantity = 10;
       //if (iBallCharacterIndex == GetMainCharacterIndex()) Log_SetStringToLog(rFortCharacter.Ship.Name + " " + LanguageConvertString(iSeaSectionLang, "Fort_cannon"));

       iExp = MakeInt(1000 / iCompanionQuantity);
       if(AUTO_SKILL_SYSTEM)
         AddCharacterExpChar(rBallCharacter, "Cannons", iExp);
       else
         AddCharacterExp(rBallCharacter, iExp);
Here "Fort_cannon" becomes "cannon exploded!", in case you're wondering....

Anyway, it looks like that on-screen message was deliberately disabled at some point as shown through the "//" in front of the relevant line.
Not sure when that was, but it might have been a seriously long time ago. Which means that @Jason has a seriously good memory! :rofl

Since adding the experience DOES still occur, I've got to wonder: Should this be restored at all?
Only with the Logs Toggle set to Verbose, of course?

You can find the above lines of code in PROGRAM\SEA_AI\AIFort.c .
 
No Jason does not need to have that good of a memory as this is a recent problem. The forts normally show their cannons. Even I remember seeing them back when I was attacking forts.

Could this be related to the fact that ships no longer show how many cannons they have?
 
I do not remember that log message being disabled on purpose?

I did notice the fort showed zero cannons.
So that applies to ships now too?

Does anyone remember when all that did work right? Sort of?
 
It does not apply to ships seen in a spyglass, but to ships in the shipyard. It shows the size of cannons but not the number.
 
Number of cannons are also not being displayed, but the code for it DOES exist.
Investigating....
 
Extract attached to PROGRAM\BATTLE_INTERFACE to fix this problem.
Turned out it was me broke this. Quite a while back too! Thanks for noticing, @Jason! :cheers

This is what happened:
- Game was determining the correct values
- Then the game was checking "maximum" limits for number of crew and also cannons to ensure what is displayed doesn't exceed those values
(this applies primarily in Realistic Game Mode where the numbers fluctuate all the time)
- Because forts don't HAVE a "maximum number of crew and cannons", those become '0'
- In other words, the correct values got overridden with zeros :facepalm

To fix this, I'm now skipping those checks for forts and applying them to ships only.
That helps. :cheeky
 

Attachments

  • ispyglass.zip
    5.8 KB · Views: 76
Also during the attack I am getting no log entries about the elimination of the forts cannon@1000pts per canon.
Do you, @Hylie Pistof or anyone else care about getting that functionality back?
Looks like it would be VERY simple to do (just remove the "\\"); just not sure if we should want that back.
So you tell me. :doff
 
:shrug It's not important to me. Just extra clutter on the screen, but it seems Jason likes it.
 
Does the fix go in program or somewhere else?

I don't really care that much about the listing of the points. What ever is easier.
 
Does the fix go in program or somewhere else?
Extract attached to PROGRAM\BATTLE_INTERFACE to fix this problem.
:razz

I don't really care that much about the listing of the points. What ever is easier.
Doing nothing is easiest. But linking it to the Logs Toggle takes about a minute as well.
Your choice. If you don't care, I'll leave it as-is. At least you know it is apparently intentional then.
 
Back
Top