1. 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
  2. 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
  3. New Horizons logo

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

  4. 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.

Need Help Gentlemen of Luck Pirate ship

Discussion in 'City of Abandoned Ships Gameplay & Tips' started by Ben Coats, Aug 26, 2013.

  1. Ben Coats

    Ben Coats Freebooter

    Joined:
    Mar 28, 2012
    Messages:
    390
    Gender:
    Male
    Occupation:
    Firefighter
    Location:
    CSA
    start 2013-08-26 05-44-10-80.jpg for the love of God,.......i keep running into this guy every few wks @ sea or so, all over the map, i defeat him and he comes back next month, sure is a drag always being chaced or encountering GoLPS, rather deal with bounty hunters than this mosquito.
    :nogood:thumbsdown2:modding:mad:
     
  2. Luke159

    Luke159 Buccaneer Storm Modder

    Joined:
    May 27, 2009
    Messages:
    2,953
    Gender:
    Male
    Location:
    Somewhere in the caribbean
    Lol, you only encounter the gentlemen of luck when you are doing merchant trips for the store owners. If you don't do those trade quests, then you won't see them. If you do your own buying and selling of goods, then you won't see them either.
     
  3. belzeburg

    belzeburg Sailor Apprentice

    Joined:
    Aug 21, 2011
    Messages:
    54
    Well I think you`re lucky hehe. Instead of meeting 4 big military wessel starting to pounder you with their bullits and the wind stops to blow
     
  4. Ben Coats

    Ben Coats Freebooter

    Joined:
    Mar 28, 2012
    Messages:
    390
    Gender:
    Male
    Occupation:
    Firefighter
    Location:
    CSA
    im not doing any missions for store owners @ all, can stand them runs. the only missions i accept are church, citizen "find so and so", and gov missions excluding pirate hunting, cuz i never do find it in 17 day time allowed. but i always run into the GoLPS every two wks for some reason or another, i ussually go after the big merchant convoys of between 4 to 8 ships. ok here's basically what ussually happens.
    i sail out of port, toward another port and run into a convoy: 4 to 5 ships, i attack, board, and loot/capture the ships, then i sail to the nearest friendly port, sale the captured goods, sell the ships and head back out to sea, and run into maybe a couple of weak pirates, i dont engage, low and behold GoLPS starts chasing me, i either outrun or engage/defeat him, then sail to port sell his stuff and head back out, take another convoy, then port, sell, and sail back out and run into the GoLPS again........ ill make a vid of it sometime soon.
     
  5. modernknight1

    modernknight1 Field Marshall of Hot Tubs Banned

    Joined:
    Sep 7, 2009
    Messages:
    2,092
    Gender:
    Male
    Occupation:
    underwater BB stacker and amatuer basket weaver
    Location:
    USA
    I have really tried to change the Gentlemen of Luck behaviors with very little success unfortunately. I notice that they get increasingly powerful and with larger fleets as you get stronger or have more ships. I notice they love to attack when you have three or more ships. I would love to figure out how to limit there numbers and keep them from ever getting ships above Class 3 or 4.

    A taut of rum to anyone that can tell me this secret..... Seriously....really good top of the line Puerto Rican rum spiced and aged to perfection. I will send it carefully padded and packed via express mail to whatever address you like...anyone?

    :rumgone
     
    Ben Coats likes this.
  6. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,051
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Encounters init file, by any chance? That's what I've been looking at for PotC lately, at least. :shrug
     
  7. modernknight1

    modernknight1 Field Marshall of Hot Tubs Banned

    Joined:
    Sep 7, 2009
    Messages:
    2,092
    Gender:
    Male
    Occupation:
    underwater BB stacker and amatuer basket weaver
    Location:
    USA
    I've looked there Pieter....and changed the compositions of the pirate encounters....but Gentlemen of Luck seem to have a completely different set of rules. Wish I could find out how to control them. They even use ships that I've commented out when no one else does. I can zero out those ships in the nations code and I can put War=false Trade=false in the Ships_init file. I've even deleted INI info on those ships, but still they will appear in Gentlemen of Luck convoys with no information about them except a random christened name. I'm at the point where I'd just like to figure out how to disable them altogether.

    Rum offer stands...Mmmmm

    MK
     
  8. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,051
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Do you know of ANY code related to those encounters that you could show here?
    I am not at all familiar with either the CoAS code or how the game works, so don't know where to begin the search for these guys.
    For example, are they actually called "Gentlemen of Fortune" in the game? How/when are they generated? What is their function?

    Searching for "fortune" in the entire PROGRAM folder only gives me results related to the fortune skill.
    Nothing related to any sort of encounters.
     
  9. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,051
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I think I'm onto something. The text "Tresure_2" translates as "Gentlemen of Luck" through RESOURCE\INI\texts\russian\dialogsource.txt .
    This is referenced in PROGRAM\scripts\Treasure.c where they are generated.
    Their ship type is chosen by the SetShipHunter function in PROGRAM\scripts\bountyhunters.c:
    Code:
    void SetShipHunter(ref Hunter)
    {
      int ShipsHunter, hcrew;
    
      if(makeint(pchar.rank) > 10)
      {
      ShipsHunter = SHIP_FLEUT + rand(makeint(SHIP_BATTLESHIP - SHIP_FLEUT));
      }
    
      if(makeint(pchar.rank) > 6 && makeint(pchar.rank) < 11)
      {
      ShipsHunter = SHIP_FLEUT + rand(makeint(SHIP_PINNACE - SHIP_FLEUT));
      }
    
      if(makeint(pchar.rank) < 7)
      {
      ShipsHunter = SHIP_LUGGER + rand(makeint(SHIP_SCHOONER - SHIP_LUGGER));
      }
    I think that is what you need to edit.
     
  10. Hylie Pistof

    Hylie Pistof Curmudgeon Staff Member QA Tester Storm Modder

    Joined:
    Jan 15, 2010
    Messages:
    13,641
    Gender:
    Male
    It sounds like Pieter likes rum! :cheers
     
  11. Ben Coats

    Ben Coats Freebooter

    Joined:
    Mar 28, 2012
    Messages:
    390
    Gender:
    Male
    Occupation:
    Firefighter
    Location:
    CSA
    ive noticed that too, that they get stronger/bigger fleets as you go up in rank, so far ive destroyed every GoLPS ive come across. what would be interesting tho is say for instantce:
    you have a price on your head from a nation, (thats the best way i found if i want to capture the pearl, QAR, or TFD) all the captians i fight during the boarding actions are military or pirate men, what bout the actual characters from POTC, like on the pearl--Barbossa or Sparrow
    QAR--Teach or Barbossa
    TFD--Jones or Turner
    since they were all capts. of those ships @ one point or another.....:shrug:nerbz
     
  12. modernknight1

    modernknight1 Field Marshall of Hot Tubs Banned

    Joined:
    Sep 7, 2009
    Messages:
    2,092
    Gender:
    Male
    Occupation:
    underwater BB stacker and amatuer basket weaver
    Location:
    USA
    Well I had looked at that code before. I also changed the ships that could be selected. I thought this code was for bountyhunters, but you may be on to something here. I didn't notice before that the code is convoluted as far as rank is concerned. It doesn't specify anything above rank 11. I have added several additional lines of code specifying what ships I'd like to see above rank level 11.

    What I'm wondering is......why does the game select five to eight ships of the largest size once it has no more guidance. I would think it would continue to produce the same ships that are already specified. I would like to know what code its defaulting to to make the decision to spawn tons of really large ships.

    I will test this now and see if the new ships that I've specified show up above level 11 and level 20. If this works.....Pieter gets the Rum! I really hope Pieter gets the rum because I REALLY want this to work! :modding

    MK
     
  13. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,051
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    That stock game code, at least, DOES specify above rank 11:
    Code:
      if(makeint(pchar.rank) > 10)
      {
      ShipsHunter = SHIP_FLEUT + rand(makeint(SHIP_BATTLESHIP - SHIP_FLEUT));
      }
     
  14. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,051
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    That code looks like it could potentially override all sorts because it just takes a random ship between the index of the Fleut and the Battleship.
    You might want to replace it with something like this:
    Code:
    switch(rand(2))
    {
      case 0:
         ShipsHunter = SHIP_FLEUT;
       break;
       case 1:
         ShipsHunter = SHIP_BATTLESHIP;
       break
       case 2:
         ShipsHunter = SHIP_WHATEVER_YOU_WANT;
       break;
    }
    This will make the game select ONLY from those ships you specify instead of using the whole range inbetween.
    Still MUCH less advanced than the PotC code that checks against minimum and maximum class and period/nation chance values, but it should be some improvement at least. :shrug
     
    Ben Coats likes this.
  15. modernknight1

    modernknight1 Field Marshall of Hot Tubs Banned

    Joined:
    Sep 7, 2009
    Messages:
    2,092
    Gender:
    Male
    Occupation:
    underwater BB stacker and amatuer basket weaver
    Location:
    USA
    OK so I think we are close and that you are going to win the rum Pieter. However, now I am getting Gentlemen of Luck convoys that are all the same ship. Can you see anything wrong here???

    void SetShipHunter(ref Hunter)
    {
    int ShipsHunter, hcrew;

    if(makeint(pchar.rank) > 10)
    {
    ShipsHunter = SHIP_Guineaman + rand(makeint(SHIP_Polacker - SHIP_Fregates_Legeres));
    }

    if(makeint(pchar.rank) > 6 && makeint(pchar.rank) < 11)
    {
    ShipsHunter = SHIP_FRIGATE + rand(makeint(SHIP_FLEUT - SHIP_SCHOONER_L));
    }
    if(makeint(pchar.rank) > 20)
    {
    ShipsHunter = SHIP_THEBLACKPEARL + rand(makeint(SHIP_XebecVML - SHIP_Fortune));
    }
    if(makeint(pchar.rank) < 7)
    {
    ShipsHunter = SHIP_VEINARD + rand(makeint(SHIP_LUGGER - SHIP_SPEEDY));
    }

    Seems that it is ignoring the specified ship and picking all in withing the range I've set in the parenthesis.

    Here's a pic... I've verified this wasn't just a fluke and that this is not random chance. Last time I got attacked by 5 corvettes. This time I got attacked by Magellan and his fleet of Naos.

    Help :shrugxD start_130903_0024042.JPG start_130903_0024547.JPG ....MK
     
  16. Luke159

    Luke159 Buccaneer Storm Modder

    Joined:
    May 27, 2009
    Messages:
    2,953
    Gender:
    Male
    Location:
    Somewhere in the caribbean
    Code:
    void SetShipHunter(ref Hunter)
    {
      int ShipsHunter, hcrew;
      if(makeint(pchar.rank) > 10)
      {
      ShipsHunter = SHIP_FLEUT + rand(makeint(SHIP_BATTLESHIP - SHIP_FLEUT));
      }
      if(makeint(pchar.rank) > 6 && makeint(pchar.rank) < 11)
      {
      ShipsHunter = SHIP_FLEUT + rand(makeint(SHIP_PINNACE - SHIP_FLEUT));
      }
      if(makeint(pchar.rank) < 7)
      {
      ShipsHunter = SHIP_LUGGER + rand(makeint(SHIP_SCHOONER - SHIP_LUGGER));
      }

    Couldn't you simply change the middle ship from Battleship to something lower down the list, because its taking any ship that's listed in Ships.H from Fleut to Battleship. So for the last entry in the list above, Lugger - Schooner - Lugger. For GOF 2 that uses all ships from Class 7 and class 6, if I want rand>6 to carry on from that, then I would need to change Fleut - Pinnace - Fleut to Schooner - Frigate - Schooner. Now any ship can be picked between class 4 and 5. But it should also be possible to add in your own rands, so each rand adds a new class to it. If you really want to keep it random then you could have the first and final ship as Lugger and the middle ship what ever you want.

    Example:

    Code:
    void SetShipHunter(ref Hunter)
    {
      int ShipsHunter, hcrew;
      if(makeint(pchar.rank) > 10)
      {
      ShipsHunter = SHIP_LUGGER + rand(makeint(SHIP_BATTLESHIP - SHIP_LUGGER));
      }
      if(makeint(pchar.rank) > 6 && makeint(pchar.rank) < 11)
      {
      ShipsHunter = SHIP_LUGGER + rand(makeint(SHIP_PINNACE - SHIP_LUGGER));
      }
      if(makeint(pchar.rank) < 7)
      {
      ShipsHunter = SHIP_LUGGER + rand(makeint(SHIP_SCHOONER - SHIP_LUGGER));
      }
    To see what that means we need to look in Ships.H

    Code:
    //7
    #define SHIP_TARTANE 0
    #define SHIP_WAR_TARTANE 1
    #define SHIP_LUGGER 2
    #define SHIP_BERMSLOOP  3
    #define SHIP_HANNAH 4
    #define SHIP_KETCH 5
    #define SHIP_BOUNTY 6
    #define SHIP_EMPRESS 7
    #define SHIP_LYON 8
    //6
    #define SHIP_SLOOP 9
    #define SHIP_BARQUE 10
    #define SHIP_BARKENTINE 11
    #define SHIP_BRIGANTINE 12
    #define SHIP_FLEUT 13
    #define SHIP_BRIG 14
    #define SHIP_PINNACE 15
    #define SHIP_LUGGER_H 16
    #define SHIP_GALEOTH_H 17
    #define SHIP_YACHT 18
    #define SHIP_SPEEDY 19
    #define SHIP_SOPHIE 20
    #define SHIP_CASTELF 21
    #define SHIP_INTERCEPTOR 22
    #define SHIP_DERFFLINGER 23
    #define SHIP_NEPTUNUS   24
    #define SHIP_CARAVELR   25
    //5
    #define SHIP_SCHOONER 26
    #define SHIP_GALEON_L 27
    #define SHIP_DUTCHPINNACE 28
    #define SHIP_PINNACEBERLIN 29
    #define SHIP_GREYHOUND 30
    #define SHIP_28GUNFRIGATE 31
    #define SHIP_PDN 32
    #define SHIP_PACKET_BRIG   33
    #define SHIP_ENTERPRISE   34
    #define SHIP_SLOOPOFWAR 35
    #define SHIP_BRIG_20_GUN1_18 36
    #define SHIP_SCHOONER_L 37
    #define SHIP_SHNYAVA 38
    #define SHIP_HOOKER1 39
    #define SHIP_BRIG3 40
    //4
    #define SHIP_CARAVEL 41
    #define SHIP_CORVETTE 42
    #define SHIP_GALEON_H 43
    #define SHIP_FELIPE 44
    #define SHIP_SURPRISE 45
    #define SHIP_CORVFRIG2_50 46
    #define SHIP_RaaFrigate 47
    #define SHIP_BLACKPEARL 48
    #define SHIP_NIGHTMARE 49
    #define SHIP_UNICORN 50
    #define SHIP_FASTGALLEON1 51
    #define SHIP_GALEON1 52
    #define SHIP_PO_FLEUT50 53
    //3
    #define SHIP_FRIGATE 54
    #define SHIP_LINESHIP 55
    #define SHIP_QueenAnnesRevenge 56
    #define SHIP_Revenge 57
    #define SHIP_BOUSSOLE 58
    #define SHIP_SALAMANDER 59
    #define SHIP_LINEFRIGATE 60
    #define SHIP_TWODECKER1_47 61
    #define SHIP_USS_CONSTITUTION 62
    #define SHIP_LA_LICORNE 63
    #define SHIP_CURSEDDUTCHMAN 64
    #define SHIP_RN_BATTLEFRIGATE 65
    #define SHIP_BATTLEFRIGATE 66
    //2
    #define SHIP_WARSHIP 67
    #define SHIP_POSEIDON 68
    #define SHIP_COURONNE 69
    #define SHIP_FR_SUPERIORWARSHIP1 70
    #define SHIP_SUPERBE 71
    #define SHIP_LINK 72
    //1
    #define SHIP_BATTLESHIP 73
    #define SHIP_BELLONA 74
    #define SHIP_NEPTUNE 75
    #define SHIP_MANOWAR 76
    #define SHIP_HMS_VICTORY 77
    #define SHIP_BATTLEMANOWAR 78
    //quest ships
    #define SHIP_SOLEYRU 79
    #define SHIP_BRIGQEEN 80
    #define SHIP_BRIGSW 81
    #define SHIP_XebekVML 82
    #define SHIP_CORVETTE_QUEST 83
    #define SHIP_ARABELLA 84
    #define SHIP_FLYINGDUTCHMAN 85
    //
    #define SHIP_BOAT   86
    #define SHIP_FORT   87
    #define SHIP_NOTUSED  1000
    #define SHIP_NOTUSED_TYPE_NAME "Not Used"
    #define SHIP_NAME_NOTUSED "Noname"
    To make it easier we will go by the ship numbers, which start from 0 and end at 85.

    So the first one is.

    Code:
      if(makeint(pchar.rank) < 7)
      {
      ShipsHunter = SHIP_LUGGER + rand(makeint(SHIP_SCHOONER - SHIP_LUGGER));
      }
    This means any ship from no 2 to no 26 can be generated. And the next entry is.

    Code:
      if(makeint(pchar.rank) > 6 && makeint(pchar.rank) < 11)
      {
      ShipsHunter = SHIP_LUGGER + rand(makeint(SHIP_PINNACE - SHIP_LUGGER));
      }
    This means any ship can be generated between no 2 and no 15 (this needs changing for GOF 2 because this uses a new ship class system, for vanilla it would be between Battleship and Frigate I think).

    The final entry though, is higher.

    Code:
      if(makeint(pchar.rank) > 10)
      {
      ShipsHunter = SHIP_LUGGER + rand(makeint(SHIP_BATTLESHIP - SHIP_LUGGER));
      }
    Any ship from no 2 to no 73 can be generated. So changing the centre ship to the maximum for each rand will allow us to fine tune this to our liking.
     
  17. modernknight1

    modernknight1 Field Marshall of Hot Tubs Banned

    Joined:
    Sep 7, 2009
    Messages:
    2,092
    Gender:
    Male
    Occupation:
    underwater BB stacker and amatuer basket weaver
    Location:
    USA
    Take another look at the code that I posted Luke, I haven't had the Battleship in there for quite some time.

    Here's my ships for Eras. Just because some of them are here doesn't mean they will appear. Many are restricted and it was easier just to leave them in even thought they aren't the correct period. However, you will never see the non-period ships in the game.

    //7
    #define SHIP_TARTANE 0

    #define SHIP_TARTANE2 1
    #define SHIP_ArmedTartane 2
    #define SHIP_WAR_TARTANE 3
    #define SHIP_BarcoCostero 4
    #define SHIP_GUNBOAT 5
    #define SHIP_BERMSLOOP 6
    #define SHIP_HANNAH 7
    #define SHIP_KETCH 8
    #define SHIP_BOUNTY 9
    #define SHIP_LUGGER 10
    #define SHIP_CARAVELR 11

    //6
    #define SHIP_EDINBURG 12
    #define SHIP_CUTTER 13
    #define SHIP_LUGGERVML 14
    #define SHIP_PINK 15
    #define SHIP_LUGGER_H 16
    #define SHIP_LYON 17
    #define SHIP_GALEOTH_H 18
    #define SHIP_SLOOP 19
    #define SHIP_Sloop2 20
    #define SHIP_VEINARD 21
    #define SHIP_Mirage 22
    #define SHIP_YACHT 23
    #define SHIP_SPEEDY 24
    #define SHIP_SOPHIE 25
    #define SHIP_BRIG_N1 26
    #define SHIP_USS_ENTERPRISE 27
    #define SHIP_HANNAH_P 28
    #define SHIP_HEBEK 29
    #define SHIP_BARQUE 30
    #define SHIP_SHNYAVA 31
    #define SHIP_SCHOONER 32
    #define SHIP_Schooner2 33
    #define SHIP_ArmedSchooner 34
    #define SHIP_XEBEC 35
    #define SHIP_BRIGANTINE 36
    #define SHIP_CASTELF 37
    #define SHIP_BRIG 38
    #define SHIP_BARKENTINE 39
    #define SHIP_INTERCEPTOR 40
    #define SHIP_DutchFluyt 41
    #define SHIP_FLEUT 42
    #define SHIP_Nao 43
    #define SHIP_BATTLEXEBEC 44
    #define SHIP_BRIG_20_GUN1_18 45
    #define SHIP_EnglishPinnace 46
    #define SHIP_PINNACE 47
    #define SHIP_Pinaza 48
    #define SHIP_Guineaman 49
    #define SHIP_ChasseMaree 50
    #define SHIP_Polacre 51
    #define SHIP_Valciria 52
    #define SHIP_GALEON_L 53
    #define SHIP_XEBECLIGHT 54
    #define SHIP_BARQUE_L 55
    #define SHIP_SCHOONER_L 56

    //5
    #define SHIP_HOOKER1 57
    #define SHIP_COLONIALSCHOONER 58
    #define SHIP_XEBEC_FRANCE 59
    #define SHIP_FLEUT4_50 60
    #define SHIP_PO_FLEUT50 61
    #define SHIP_BRIG3 62
    #define SHIP_PACKET_BRIG 63
    #define SHIP_ENTERPRISE 64
    #define SHIP_SLOOPOFWAR 65
    #define SHIP_NEPTUNUS 66
    #define SHIP_NEPTUNUS2 67
    #define SHIP_CorsairChebec 68
    #define SHIP_PINNACE3_50 69
    #define SHIP_CARAVEL 70
    #define SHIP_CARAVEL2 71
    #define SHIP_DutchGalleon 72
    #define SHIP_XEBECAS 73
    #define SHIP_PINNACE11 74
    #define SHIP_BLACKANGEL 75
    #define SHIP_BATTLECORVETTE 76
    #define SHIP_BATAVIA2 77
    #define SHIP_CRIMSONBLOOD 78
    #define SHIP_BATAVIA 79
    #define SHIP_CORVFRIG2_50 80
    #define SHIP_GREYHOUND 81
    #define SHIP_FRIGATE_L 82
    #define SHIP_FELIPE 83
    #define SHIP_28GUNFRIGATE 84
    #define SHIP_Postillionen 85
    #define SHIP_PDN 86
    #define SHIP_Polacker 87
    #define SHIP_GALEON_H21 88
    #define SHIP_DUTCHPINNACE 89
    #define SHIP_PINNACEBERLIN 90
    #define SHIP_RaaFrigate 91
    #define SHIP_VOCEscort 92
    #define SHIP_Fregates_Legeres 93
    #define SHIP_32GunFrigate 94

    //4
    #define SHIP_BATTLEFRIGATE 95
    #define SHIP_CORVETTE5 96
    #define SHIP_FLEUT2 97
    #define SHIP_PINNACE2 98
    #define SHIP_THEBLACKPEARL 99
    #define SHIP_BLACKPEARL 100
    #define SHIP_30GunFrigate 101
    #define SHIP_SURPRISE 102
    #define SHIP_CORVETTE 103
    #define SHIP_LYDIA 104
    #define SHIP_JAMAICASHIP 105
    #define SHIP_NIGHTMARE 106
    #define SHIP_COLONIALFRIGATE 107
    #define SHIP_BOUSSOLE 108
    #define SHIP_LIGHTFRIGATE 109
    #define SHIP_GALEON_H 110
    #define SHIP_FlemishGalleon 111
    #define SHIP_FASTGALLEON1 112
    #define SHIP_MERMAIDGRIEF 113
    #define SHIP_FRIGATE_SAT 114
    #define SHIP_DUTCHFRIGATE 115
    #define SHIP_HOLLANDFRIGATE 116
    #define SHIP_FRIGATE 117
    #define SHIP_FLEUTOFWAR34G 118
    #define SHIP_GALEON1 119
    #define SHIP_INDIAMAN 120
    #define SHIP_SIRIUS1 121
    #define SHIP_UNICORN 122
    #define SHIP_Fiftygunner 123
    #define SHIP_FrenchFifty 124
    #define SHIP_R_Frigate 125
    #define SHIP_XebecVML 126
    #define SHIP_LINEFRIGATE 127
    #define SHIP_MERCHANT1 128
    #define SHIP_DERFFLINGER 129
    //3
    #define SHIP_FEARLESS 130
    #define SHIP_LINESHIP47 131
    #define SHIP_GALEON 132
    #define SHIP_REVENGE 133
    #define SHIP_AMSTERDAM 134
    #define SHIP_MORDAUNT 135
    #define SHIP_Fortune 136
    #define SHIP_WAR_PINNACE 137
    #define SHIP_CENTURION 138
    #define SHIP_TWODECKER1_47 139
    #define SHIP_LA_LICORNE 140
    #define SHIP_LINESHIP5 141
    #define SHIP_LINESHIP 142
    #define SHIP_WARGALLEON2 143
    #define SHIP_CURSEDDUTCHMAN 144
    #define SHIP_DUTCHLINESHIP 145
    #define SHIP_DUTCHLINESHIP2 146
    #define SHIP_WARSHIP 147
    #define SHIP_COURONNE 148
    #define SHIP_DUTCHSHIP 149
    #define SHIP_WARSHIP1 150

    //2
    #define SHIP_SEVENPROVINCIEN 151
    #define SHIP_HEAVYWARSHIP 152
    #define SHIP_BATTLESHIP 153
    #define SHIP_BELLONA 154
    #define SHIP_POSEIDON 155
    #define SHIP_FR_SUPERIORWARSHIP1 156
    #define SHIP_BATTLESHIP1 157
    #define SHIP_SUPERBE 158
    #define SHIP_LINK 159
    #define SHIP_NEPTUNE 160

    //1
    #define SHIP_MANOWAR_FAST 161
    #define SHIP_MANOWAR 162
    #define SHIP_TRINITY 163
    #define SHIP_SOLEILROYAL 164
    #define SHIP_SANFELIPE 165

    //Quest Ships
    #define SHIP_SOLEYRU 166
    #define SHIP_BRIGQEEN 167
    #define SHIP_BRIGSW 168
    #define SHIP_XebekVML 169
    #define SHIP_CORVETTE_QUEST 170
    #define SHIP_ARABELLA 171
    #define SHIP_FLYINGDUTCHMAN 172
     
    Ben Coats likes this.
  18. Ben Coats

    Ben Coats Freebooter

    Joined:
    Mar 28, 2012
    Messages:
    390
    Gender:
    Male
    Occupation:
    Firefighter
    Location:
    CSA
    what no QAR? queen anne revenge?? i didnt see it listed, but love to sail it along with the pearl and dutchman in gof 1.2
     
  19. Luke159

    Luke159 Buccaneer Storm Modder

    Joined:
    May 27, 2009
    Messages:
    2,953
    Gender:
    Male
    Location:
    Somewhere in the caribbean
    How I see the code working is (using GOF 2 example because I don't know any of the ships in era mod). Using the bellow as an example, the e entries for Lugger are acting like brackets, telling the game that anything between Lugger and Pinnace can be generated. So its like pinging, your game reads the code and the ping starts from Lugger and crosses through each ship till it reaches the Pinnace and then it pings back to Lugger. Then iy rolls the dice to see which ships are generated.

    Code:
      if(makeint(pchar.rank) > 6 && makeint(pchar.rank) < 11)
      {
      ShipsHunter = SHIP_LUGGER + rand(makeint(SHIP_PINNACE - SHIP_LUGGER));
      }
    So try this and see if it fixes your problem.

    Code:
    void SetShipHunter(ref Hunter)
    {
    int ShipsHunter, hcrew;
    if(makeint(pchar.rank) > 10)
    {
    ShipsHunter = SHIP_Guineaman + rand(makeint(SHIP_Polacker - SHIP_Guineaman));
    }
    if(makeint(pchar.rank) > 6 && makeint(pchar.rank) < 11)
    {
    ShipsHunter = SHIP_FRIGATE + rand(makeint(SHIP_FLEUT - SHIP_FRIGATE));
    }
    if(makeint(pchar.rank) > 20)
    {
    ShipsHunter = SHIP_THEBLACKPEARL + rand(makeint(SHIP_XebecVML - SHIP_THEBLACKPEARL));
    }
    if(makeint(pchar.rank) < 7)
    {
    ShipsHunter = SHIP_VEINARD + rand(makeint(SHIP_LUGGER - SHIP_VEINARD));
    }
    You might want to change the centre ship for this one though., (see further down for why).

    Code:
    void SetShipHunter(ref Hunter)
    {
    int ShipsHunter, hcrew;
    if(makeint(pchar.rank) > 10)
    {
    ShipsHunter = SHIP_Guineaman + rand(makeint(SHIP_Polacker - SHIP_Guineaman));
    }
    As it stands the code above is only able to pick from the following ships, so changing the centre ship_name to something further down the list will allow for more random generations.

    Code:
    #define SHIP_Guineaman 49
    #define SHIP_ChasseMaree 50
    #define SHIP_Polacre 51
     
  20. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,051
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Luke definitely has a point. This line, for example, would translate as:
    Code:
    ShipsHunter = 49 + rand(makeint(87 - 93));
    Which equals:
    Code:
    ShipsHunter = 49 + rand(-6);
    I don't think the rand function works for negative numbers anyway, so this would always return number 49, which is the SHIP_Guineaman .

    There are two things you can do:
    1. If you DO want to specify a RANGE of ships to be used as per the original code, use this:
    Code:
    ShipsHunter = FIRST_SHIP_IN_RANGE + rand(makeint(LAST_SHIP_IN_RANGE - FIRST_SHIP_IN_RANGE));
    You have to make sure that the FIRST_SHIP_IN_RANGE is used twice in there as per this example; otherwise you'll get weird results.
    This will allow any ship between those two to be generated.
    2. If you want to have only specific ships used, you should make use of a switch with rand in it like in my earlier post:
    By adding more cases to the switch, you can specify whatever number of ships you want.
    Note then that you also have to replace rand(2) with the number of ship cases you add.
     

Share This Page