1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Guide Some notes on setting the ship's crew numbers

Discussion in 'Ship Modeling' started by LarryHookins, May 11, 2009.

  1. LarryHookins

    LarryHookins Buccaneer Staff Member Storm Modder

    Joined:
    May 20, 2006
    Messages:
    2,297
    Location:
    Texas
    I ran across something while checking out a ship that I'd captured. Have a look at the following numbers from ships_init.c

    Code:
    // Wappen von Hamburg by Yo Ho Ho
    refShip.Name            = "ConvoiShip1";
    refShip.SName            = "TwoDecker1_47";
    refShip.Cannon          = CANNON_TYPE_CANNON_LBS24;
    refShip.MaxCaliber      = 32;
    refShip.CannonsQuantity = 60;
    refShip.MaxCrew         = 300;
    refShip.MinCrew         = 30;
    refShip.HP              = 5750;
    I noticed that it took a very long time to load the guns, especially with minimum crew. It's obvious when you look at the ship stats why this happens.

    Here's how cannon reload time is calculated:

    First, it requires 1% of your ship's HP in crew to sail the ship. In this case, 57 crewmen (rounded down).

    Second, it requires 10 crewmen for each gun. This is calculated by dividing the cannon weight by 2, or by 6 for carronades, then the number is limited to no more than 10.

    We figure half the guns are being loaded at one time. That's 30 guns times 10 crewmen... a reload requires 300 crew plus 57 more to sail the ship. If you have less then 357 crewmen on board your guns will reload slower. With only 30 crewmen it takes over 10 times as long to load.

    A good rule of thumb for max crew is 10 crewmen for each gun the ship carries, or in this case a max crew of 600. Minimum crew would be 20% of that, or 120. There are a lot of places in the code that assume max crew is 5 times min crew, but it doesn't have to be exact. With 120 crewmen it would still take 3 times as long to load the guns. A 60 gun ship might carry more than 600 max crew, but certainly no fewer.

    A ship that carries smaller guns needs fewer crew. A ship with 20*9 pounders would only need about 90 crew. That same ship with 12 pounders would need 120.

    I hope this information helps.

    Hook
     
  2. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Should certainly help; thanks very much! Now we ought to store this somewhere it won't get lost.
    Edit: We might as well just pin it.
     
  3. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Since I have been pre-calculating and overriding cargo capacity values anyway, how about we do the same thing for crew?
    I noticed the Gunboat's cannons load far too slowly, which is probably because she is severely under-crewed for the cannons she has.

    Based on the opening post's suggestion, I am implementing the following code in ships_init.c:
    Code:
        MinCapacity        = makeint(sti(refShip.HP)/100);
         if (sti(refShip.Cannon) != CANNON_TYPE_NONECANNON && sti(refShip.CannonsQuantity) > 0)
         {
           rCannon          = GetCannonByType(sti(refShip.Cannon));
           CrewPerGun        = stf(rCannon.caliber);
           if (rCannon.type   == CANNON_NAME_LONG)   CrewPerGun = CrewPerGun / 2.0;
           else                     CrewPerGun = CrewPerGun / 6.0;
           CrewPerGun        = fclamp(1.0, 10.0, CrewPerGun);                   // Gun crew no less than 1 and no more than 10
           MinCapacity       += makeint(0.5*CrewPerGun*sti(refShip.CannonsQuantity));       // We figure half the guns are being loaded at one time
         }
         if (sti(refShip.MinCrew) < MinCapacity)
         {
           refShip.MinCrew  = MinCapacity;
           MinCapacity      = 10*sti(refShip.CannonsQuantity);
           if (sti(refShip.MaxCrew) < MinCapacity)
           {
             refShip.MaxCrew  = MinCapacity;
           }
         }
     
  4. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,415
    One thing I did notice is that the first time I played "Bartolomeu", the jackass bark with which you start the game had a crew of about 50. It's now more like 150. It still has enough space to carry the cargo needed for the first few missions. "Ships_init.c" still lists it as having a maximum crew of 48. It has 16 guns of 6lb. It never had a problem firing its guns before, though 50 crew was a bit low for boarding the sort of ships I've been chasing. It's no longer a problem anyway because the triple size crew allowed me to capture a fast war galleon, which is a much nicer ship. :D
     
  5. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    ^ Do you suppose the above change of mine based on Hook's recommendations would have increased the MaxCrew to 150?
    What is the MinCrew value for that ship?

    If it is indeed overwritten by that code, then the MaxCrew should be 10x the number of cannons. Does she indeed have 15 cannons then?
     
  6. Hylie Pistof

    Hylie Pistof Curmudgeon Staff Member QA Tester Storm Modder

    Joined:
    Jan 15, 2010
    Messages:
    13,768
    Gender:
    Male
    I have also noticed the huge crews now. When I look at them in the spyglass even the barque shows 170 or so crew! That is far too many for boarding as my Neptunus has 141. The tiny little yacht has that many too. How could that many men even fit in a boat so tiny?
     
  7. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    If you give me some specific ships that seem to high, I suppose I can check what that new code does.
    If nobody ever had much of a problem with reload times and such, we can also just get rid of it again.
    Or link it to the capacity-related toggle so we can look at it some time later.

    After all, if it wasn't actually broken in Beta 3.4, then perhaps there is no need to overwrite it with potentially higher numbers either.
    The only real reason why I did it was because I found the reload times on the Gunboat to be quite atrocious in some tests.
    But then I was also carrying huge, huge, huge cannons at the time. :shrug
     
  8. Hylie Pistof

    Hylie Pistof Curmudgeon Staff Member QA Tester Storm Modder

    Joined:
    Jan 15, 2010
    Messages:
    13,768
    Gender:
    Male
    Just bump up the gunboat crew size. Going from 10 to 20 should do it.

    What ships have too much crew? All of the small ships. I have not looked at the medium to large ships with a spyglass. The Diligente seemed high with 46 crew and the Neptunus is normal with 141, but how is it possible to fit 200+ men onto those small ships like yachts, sloops, luggers, and barks?
     
  9. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    The numbers are linked to the calibre and amount of cannons. But indeed I'm tempted to just consider this a failed experiment and disable this code again.
     
  10. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Yep, my code is definitely affecting that ship too. 16 cannons multiplied by 10 = 160 crew.
    Time to scratch that functionality; apparently the rule of thumb from the opening post is a bit overkill for most ships.
    We can always implement it again later if somebody can think of a better rule of thumb.

    Indeed. With the current code she gets 50 max crew. That does ensure the won't get needlessly slow reloading cannons even when the large ones are installed.
    But how do you fit that many crew in a tiny tub? 20 it is and bye bye to the override.
     
  11. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,623
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands

Share This Page