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.

Linking cargo type to encounter type

Discussion in 'Build Beta and Brainstorming' started by Grey Roger, Oct 10, 2017.

  1. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    641
    Gender:
    Male
    I think that cuts out lower value goods for the more protected encounters as for example merchant 2 with the bottom 5 definitely gone plus a random extra squeeze.
    I think you also need to add a squeeze on the more valuable goods so for the unescorted merchant add 6 to iStart inside case 0 so no gold,silver,coffee,cinnamon,mahogany or ebony, then say add 1 for light escort inside case 1 - so no gold etc however the balance works out - or maybe a random element to the squeeze on the high value goods too.
     
  2. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    255
    Gender:
    Female
    yeah my biggest problem with this versus an array is that I'm not very good at maths. I'm a non-linear kinda gal, but I have a much harder time coming up with ways to non-linearly affect the odds :p with arrays it's just "case Merchant1: if(rand(10) <= 1) GetFantasticLoot; break;"

    the unescorted merchants are already practically clamped since 8 - iShipClass is realistically never going above 5 since MaxMerchantClass or whatever its called is set to 3 as standard, so iBootyQuality will never go above 27 which means they will never have anything better than oil, which I almost think is maybe too harsh. I'd like it to be possible but increasingly unlikely to get better goods. I'm just too dumb to understand all the cool math functions in utils.c to make it happen :8q I'd love to learn tho, if anyone has any ideas
     
  3. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,570
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I definitely appreciate you working on this, @DeathDaisy!
    But I have to admit, I am severely short on time so I can't really look into it properly to think of any ideas... :oops:
     
  4. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    255
    Gender:
    Female
    no worries, I totally get it. life is life :flower
     
    Pieter Boelen likes this.
  5. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    641
    Gender:
    Male
    Hmm I should have looked how you were using iBootyQuality :confused:which did indeed restrict what an unescorted trader could have. However there is a loop randGoods within which you place goods of iBootyQuality type which will see the same good everytime round it I think.

    So I suggest something like
    Code:
    int iStart = GOOD_PLANKS + 1;// TIH we start after repair goods now for random cargo
        int iBootyQuality = 0;
         int iBooty;
        switch(iGetEncType){
            case 0: // Merchant 0: single merchant
                iBootyQuality = GOODS_QUANTITY ; //include down to the least valuable
            iStart += 6;// omit the 6 most valuable
            break;
            case 1: // Merchant 1: merchants with a light escort
                iBootyQuality = GOODS_QUANTITY - rand((8 - iShipClass) + 1); // remove a random amount of the least valuable
            iStart += 2;// omit gold and silver
            break;
            case 2: // Merchant 2: a single merchant with heavy escort
                iBootyQuality = GOODS_QUANTITY - 5 - rand((8 - iShipClass) + (iGetNumWarShips*2));// remove at least 5 of the less valuable and a further random amount
            break;
            case 3: // Patrol: a small patrol
                iBootyQuality = GOODS_QUANTITY - rand(5);
            break;
            case 4:
           
        }
     
       // iBootyQuality = iClamp(iStart,GOODS_QUANTITY,iBootyQuality);
    
        // TIH --> we generate random different types now, instead of always 7 different types
        int randGoods = 1 + rand(6);
        for (int r=0;r<randGoods;r++)
        {  
        iBooty = iStart + rand(iBootyQuality - iStart - 1)// PW not sure about the -1 I think this excludes the lowest value cargo
        iBooty = iClamp(iStart,GOODS_QUANTITY,iBooty);
        Fantom_SetCharacterGoods(rFantom, iBooty, makeint(iMultiply * rand(iRandMultiply * 3)) );
           
            //Fantom_SetCharacterGoods(rFantom, iBootyQuality, makeint(iMultiply * rand(iRandMultiply * 3)) );
            //Fantom_SetCharacterGoods(rFantom, iStart + rand(GOODS_QUANTITY - iStart - 1), makeint(iMultiply * rand(iRandMultiply * 3)) );
        }
    but there is also this code lower down the function that would need similar treatment
    Code:
    if(rFantom.FantomType == "trade")
        {
            int fillCargo = iStart + rand(GOODS_QUANTITY - iStart - 1);// random pick a good to be maxed
            int fillQuantity = GetCargoGoods(rFantom,fillCargo) + GetCharacterFreeSpace(rFantom,fillCargo);// fill up the hold
            Fantom_SetCharacterGoods(rFantom, fillCargo, fillQuantity);
        }
    - since iBooty would be set the last time through the loop can just put that in place of the random choice and fill any space with the last good chosen. EDIT Actually could just use fillCargo as the variable throughout and save on an integer (iBooty) .:)
     
  6. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    255
    Gender:
    Female
    yeah I had discovered the same thing with iBootyQuality generating the same goods, so I have since moved the whole thing to inside the for(int r=0;r<randGoods;r++). but this caused the problem that I cant use it in the fillCargo part since its all inside another function, and its probably unnecessarily messy to put the whole switch there as well, so probably your version will work better. what do you think?

    Code:
    int iStart = GOOD_PLANKS + 1;// TIH we start after repair goods now for random cargo
        int iBootyQuality;
    
    
        // TIH --> we generate random different types now, instead of always 7 different types
        int randGoods = 1 + rand(6);
        for (int r=0;r<randGoods;r++)
        {
            // DeathDaisy: Loot based on encounter type, fleet size, maybe other things
            switch(iGetEncType){
                case 0: // Merchant 0: single merchant
                    iBootyQuality = GOODS_QUANTITY - rand(8 - iShipClass);
                break;
                case 1: // Merchant 1: merchants with a light escort
                    iBootyQuality = GOODS_QUANTITY - rand((8 - iShipClass) + 2);
                break;
                case 2: // Merchant 2: a single merchant with heavy escort
                    iBootyQuality = GOODS_QUANTITY - 5 - rand((8 - iShipClass) + (iGetNumWarShips*2));
                break;
                case 3: // Patrol: a small patrol
                break;
                case 4: // Fleet: warships
                break;
                case 5: // Corsar: -->PIRATE ONLY<--, warships
                break;
                case 6: // Pirate: -->PIRATE ONLY<--, small craft
                break;
                case 7: // Punitive Squadron: a rag-tag bunch
                break;
                case 8: // L - Merchant 0: Shallow Waters Merchant Fleet, a group of merchants
                    iBootyQuality = GOODS_QUANTITY - rand((8 - iShipClass) + (roundup(iGetNumMerchantShips/2)));
                break;
                case 9: // L - Merchant 1: Coastal Waters Merchant Fleet, an escorted group of merchants
                    iBootyQuality = GOODS_QUANTITY - round(GOODS_QUANTITY/4) - rand((8 - iShipClass) + iGetNumMerchantShips + iGetNumWarShips);
                break;
                case 10: // L - Merchant 2: -->SPAIN ONLY<--, Trans-Atlantic Treasure Fleet, a convoy
                    iBootyQuality = GOODS_QUANTITY - round(GOODS_QUANTITY/3) - rand((8 - iShipClass) + iGetNumMerchantShips + (iGetNumWarShips*2));
                    iBootyQuality = iClamp(iStart,roundup(GOODS_QUANTITY/2),iBootyQuality);
                break;
                case 11: // L - Patrol: Regional Patrol, a large patrol
                break;
                case 12: // L - Fleet: Regional Patrol, a small fleet
                break;
                case 13: // L - Corsar: ARMADA, a battle fleet
                break;
                case 14: // L - Pirate, -->PIRATE ONLY<--, a rag-tag bunch
                break;
                case 15: // L - Punitive Squadron, a scratch patrol
                break;
            }
            iBootyQuality = iClamp(iStart,GOODS_QUANTITY,iBootyQuality);
           
            Fantom_SetCharacterGoods(rFantom, iBootyQuality, makeint(iMultiply * rand(iRandMultiply * 3)) );makeint(iMultiply * rand(iRandMultiply * 3)) );
        }
    
        // TIH --> better method, prevents overloaded ships due to innept mathmatics Sep3'06
        if(rFantom.FantomType == "trade")
        {
            int fillCargo = iBootyQuality;// random pick a good to be maxed | DeathDaisy: THIS WONT WORK you dummy, but would rather not put the whole switch here again
            int fillQuantity = GetCargoGoods(rFantom,fillCargo) + GetCharacterFreeSpace(rFantom,fillCargo);// fill up the hold
            Fantom_SetCharacterGoods(rFantom, fillCargo, fillQuantity);
        }
    this is elegant, I like it.
     
  7. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    641
    Gender:
    Male
    I was just reading the code and thinking aloud - It's your thing so whatever you like that works :popcorn:the main crux was getting the info about the encounter to feed into your switches
     
  8. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    255
    Gender:
    Female
    I went with your idea anyway because it was much tidier, and ultimately easier to work with xD
    Code:
    int iBootyQuality = 0;
        int iBooty;
       
        switch(iGetEncType){
                case 0: // Merchant 0: single merchant
                    iBootyQuality = GOODS_QUANTITY; //include down to the least valuable
                    iStart += 6;// omit the 6 most valuable
                break;
                case 1: // Merchant 1: merchants with a light escort
                    iBootyQuality = GOODS_QUANTITY - rand((8 - iShipClass) + 1); // remove a random amount of the least valuable
                    iStart += 2;// omit gold and silver
                break;
                case 2: // Merchant 2: a single merchant with heavy escort
                     iBootyQuality = GOODS_QUANTITY - 5 - rand((8 - iShipClass) + (iGetNumWarShips*2));// remove at least 5 of the less valuable and a further random amount
                break;
                case 3: // Patrol: a small patrol
                break;
                case 4: // Fleet: warships
                break;
                case 5: // Corsar: -->PIRATE ONLY<--, warships
                break;
                case 6: // Pirate: -->PIRATE ONLY<--, small craft
                break;
                case 7: // Punitive Squadron: a rag-tag bunch
                break;
                case 8: // L - Merchant 0: Shallow Waters Merchant Fleet, a group of merchants
                    iBootyQuality = GOODS_QUANTITY - rand((8 - iShipClass) + (roundup(iGetNumMerchantShips/2))); // cut out shipclass
                    iStart += 4; // omit 4 most valuble
                break;
                case 9: // L - Merchant 1: Coastal Waters Merchant Fleet, an escorted group of merchants
                    iBootyQuality = GOODS_QUANTITY - round(GOODS_QUANTITY/4) - rand((8 - iShipClass) + iGetNumMerchantShips + iGetNumWarShips); // omit the bottom quarter of cheap goods and another couple depending on chance and how large the fleet
                    iStart += 2; // omit gold, enough protection for maybe silver? omitted too for now. treasure fleets are supposed to be the big haul after all
                break;
                case 10: // L - Merchant 2: -->SPAIN ONLY<--, Trans-Atlantic Treasure Fleet, a convoy
                    iBootyQuality = GOODS_QUANTITY - round(GOODS_QUANTITY/3) - rand((8 - iShipClass) + iGetNumMerchantShips + (iGetNumWarShips*2)); // cut out bottom 3rd cheap goods, another few based on chance, number of merchant ships and TWICE the number of war ships. might be too good even. jackpot!
                    //iBootyQuality = iClamp(iStart,roundup(GOODS_QUANTITY/2),iBootyQuality);
                break;
                case 11: // L - Patrol: Regional Patrol, a large patrol
                break;
                case 12: // L - Fleet: Regional Patrol, a small fleet
                break;
                case 13: // L - Corsar: ARMADA, a battle fleet
                break;
                case 14: // L - Pirate, -->PIRATE ONLY<--, a rag-tag bunch
                break;
                case 15: // L - Punitive Squadron, a scratch patrol
                break;
            }
            //iBootyQuality = iClamp(iStart,GOODS_QUANTITY,iBootyQuality);
    
    
        // TIH --> we generate random different types now, instead of always 7 different types
        int randGoods = 1 + rand(6);
        for (int r=0;r<randGoods;r++)
        {
           
            iBooty = iStart + rand(iBootyQuality - iStart - 1) // PW not sure about the -1 I think this excludes the lowest value cargo
            iBooty = iClamp(iStart,GOODS_QUANTITY,iBooty);
           
            Fantom_SetCharacterGoods(rFantom, iBooty, makeint(iMultiply * rand(iRandMultiply * 3)) );
        }
        // TIH <--
    
        // TIH --> better method, prevents overloaded ships due to innept mathmatics Sep3'06
        if(rFantom.FantomType == "trade")
        {
            iBooty = iStart + rand(iBootyQuality - iStart - 1) // PW not sure about the -1 I think this excludes the lowest value cargo
            iBooty = iClamp(iStart,GOODS_QUANTITY,iBooty)
            int fillQuantity = GetCargoGoods(rFantom,iBooty) + GetCharacterFreeSpace(rFantom,iBooty);// fill up the hold
            Fantom_SetCharacterGoods(rFantom, iBooty, fillQuantity);
        }
    this should work I think, but I havent had much chance to test it.

    also still don't quite know what to do with the warships. it seems theyre given a bit of goods, and if I read the code right, with what I've done above they'll always end up with gold :p not the best. but I don't know if I should give them no stuff, less valuable stuff or just the same stuff but less of it(which is how it was before).
     
  9. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,570
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I figure warships only need supplies.
    Maybe extra cannonballs, powder and rations or so.
     
  10. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    6,375
    Pirate ships, on the other hand, could be carrying random loot.

    For that matter, warships could very well be carrying gold. The Girona certainly carried plenty of treasure. Beyond that, although naval captains weren't supposed to indulge in private trade, some of them did anyway.
     
    Mad Jack Wolfe likes this.
  11. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    255
    Gender:
    Female
    hm, maybe warships could by default not carry any nonessential goods, but have a small chance of carrying something of arbitrary value, so it could be anything from bricks to gold?

    pirates should definitely carry random stuff! xD just havent figured out quite what and how much yet :p
     
    Mad Jack Wolfe and Pieter Boelen like this.
  12. Mad Jack Wolfe

    Mad Jack Wolfe Deck Scrubber, 2nd Class Staff Member Storm Modder

    Joined:
    Apr 8, 2017
    Messages:
    71
    Gender:
    Male
    Occupation:
    Writer and historian
    Location:
    Treasure Coast bound
    Smaller, faster warships were commonly used for transporting military payrolls. Troop ships were also used for this purpose. Other entities, such as the EITC and VOC, used refitted fast merchantmen with extra armament for moving wealth around. Spain had fast galleons, war galleons, and those floating fortresses known as Manila galleons for the same purpose.

    Any of these would make for good hunting. :ship
     
    DeathDaisy likes this.
  13. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    255
    Gender:
    Female
    Code:
        int iStart = GOOD_PLANKS + 1;// TIH we start after repair goods now for random cargo
        int iBootyQuality = 0;
        int iBooty;
       
        switch(iGetEncType){
                case 0: // Merchant 0: single merchant
                    iBootyQuality = GOODS_QUANTITY; //include down to the least valuable
                    iStart += 6;// omit the 6 most valuable
                break;
                case 1: // Merchant 1: merchants with a light escort
                    iBootyQuality = GOODS_QUANTITY - rand((iShipClass) + 1); // remove a random amount of the least valuable
                    iStart += 2;// omit gold and silver
                break;
                case 2: // Merchant 2: a single merchant with heavy escort
                     iBootyQuality = GOODS_QUANTITY - 5 - rand((iShipClass) + (iGetNumWarShips*2));// remove at least 5 of the less valuable and a further random amount
                break;
                case 3: // Patrol: a small patrol
                    iBootyQuality = GOODS_QUANTITY;
                    iStart += 10; // omit the 10 most valuable! it's a lonely, small warship after all
                break;
                case 4: // Fleet: warships
                    iBootyQuality = GOODS_QUANTITY; // could carry anything!
                break;
                case 5: // Corsar: -->PIRATE ONLY<--, warships
                    iBootyQuality = GOODS_QUANTITY - iShipClass; // ditto! but remove the least expensive goods to reward the player for taking on warships
                break;
                case 6: // Pirate: -->PIRATE ONLY<--, small craft
                    iBootyQuality = GOODS_QUANTITY; // ditto!!!
                    iStart += 2; // maybe shouldn't carry gold and silver
                break;
                case 7: // Punitive Squadron: a rag-tag bunch
                    iBootyQuality = GOODS_QUANTITY - rand(iShipClass); // governor comendeered all ships, they might have been carrying anything too
                break;
                case 8: // L - Merchant 0: Shallow Waters Merchant Fleet, a group of merchants
                    iBootyQuality = GOODS_QUANTITY - rand(iShipClass) + (roundup(iGetNumMerchantShips/2))); // cut out shipclass
                    iStart += 4; // omit 4 most valuble
                break;
                case 9: // L - Merchant 1: Coastal Waters Merchant Fleet, an escorted group of merchants
                    iBootyQuality = GOODS_QUANTITY - round(GOODS_QUANTITY/4) - rand(iShipClass + iGetNumMerchantShips + iGetNumWarShips); // omit the bottom quarter of cheap goods and another couple depending on chance and how large the fleet
                    iStart += 2; // omit gold, enough protection for maybe silver? omitted too for now. treasure fleets are supposed to be the big haul after all
                break;
                case 10: // L - Merchant 2: -->SPAIN ONLY<--, Trans-Atlantic Treasure Fleet, a convoy
                    iBootyQuality = GOODS_QUANTITY - round(GOODS_QUANTITY/3) - rand(iShipClass + iGetNumMerchantShips + (iGetNumWarShips*2)); // cut out bottom 3rd cheap goods, another few based on chance, number of merchant ships and TWICE the number of war ships. might be too good even. jackpot!
                break;
                case 11: // L - Patrol: Regional Patrol, a large patrol
                    iBootyQuality = GOODS_QUANTITY;
                    iStart += 6; // Regional patrols are probably not doing any heavy duty trading on the side?
                break;
                case 12: // L - Fleet: Regional Patrol, a small fleet
                    iBootyQuality = GOODS_QUANTITY;
                    iStart += 2; // Regional fleets might?
                break;
                case 13: // L - Corsar: ARMADA, a battle fleet
                    iBootyQuality = GOODS_QUANTITY - rand(iShipClass*2); // potentially very high value loot. should get rewarded for taking on a battle fleet?
                break;
                case 14: // L - Pirate, -->PIRATE ONLY<--, a rag-tag bunch
                    iBootyQuality = GOODS_QUANTITY - rand(iShipClass); // can carry anything
                break;
                case 15: // L - Punitive Squadron, a scratch patrol
                    iBootyQuality = GOODS_QUANTITY; // any and all ships the governor could muster. random loot!
                    if(rand(100) < 20) iStart += 2; // could sometimes in a blue moon carry noble metals!
                break;
            }
    
    
        // TIH --> we generate random different types now, instead of always 7 different types
        if(rFantom.FantomType == "trade" || rFantom.FantomType == "pirate" || rFantom.FantomType == "war" && rand(100) < 15){ // DeathDaisy: an if argument to have a separate chance for warships to carry extra cargo?
            int randGoods = 1 + rand(6);
            for (int r=0;r<randGoods;r++)
            {
                iBooty = iStart + rand(iBootyQuality - iStart); // PW not sure about the -1 I think this excludes the lowest value cargo | DeathDaisy: agree about the -1, removed it for now, but it might return!
                iBooty = iClamp(iStart,GOODS_QUANTITY,iBooty);
               
                Fantom_SetCharacterGoods(rFantom, iBooty, makeint(iMultiply * rand(iRandMultiply * 3)) );
            }
            // TIH <--
        }
    
        // TIH --> better method, prevents overloaded ships due to innept mathmatics Sep3'06
        if(rFantom.FantomType == "trade")
        {
            iBooty = iStart + rand(iBootyQuality - iStart); // random pick a good to be maxed
            iBooty = iClamp(iStart,GOODS_QUANTITY,iBooty);
            int fillQuantity = GetCargoGoods(rFantom,iBooty) + GetCharacterFreeSpace(rFantom,iBooty);// fill up the hold
            Fantom_SetCharacterGoods(rFantom, iBooty, fillQuantity);
        }
    the big changes:
    -added iBootyQuality calcs for all cases, dont know if they are completely/remotely balanced?
    -added if(rFantom.FantomType == "trade" || rFantom.FantomType == "pirate" || rFantom.FantomType == "war" && rand(100) < 15) to give warships a 15%ish chance of generating cargo. too little? does mixing || and && that way work for what Im trying to do?
    -discovered iShipClass already had the 8 - shipclass to make higher classes return higher numbers, so that's fixed
     
    Mad Jack Wolfe likes this.
  14. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    66,570
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    I don't think the PotC code handles that correctly.
    You may want to use a temporary Boolean instead, just to be safe.
     
  15. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    641
    Gender:
    Male


    You could try

    Code:
    // TIH --> we generate random different types now, instead of always 7 different types
           int randGoods = 1 + rand(6);
            if (rFantom.FantomType == "war" && rand(100) > 15) randGoods = 0;
        for (int r=0;r<randGoods;r++)
            {
                iBooty = iStart + rand(iBootyQuality - iStart); // PW not sure about the -1 I think this excludes the lowest value cargo | DeathDaisy: agree about the -1, removed it for now, but it might return!
                iBooty = iClamp(iStart,GOODS_QUANTITY,iBooty);
          
                Fantom_SetCharacterGoods(rFantom, iBooty, makeint(iMultiply * rand(iRandMultiply * 3)) );
            }
            // TIH <--
        }
    Which I think should skip the setting loop for "war" around 85% of the time -but I don't know for sure how a non execution of a loop even once would react.
    Incidentally I think this line needs changing to greater than?
    Code:
     if(rand(100) < 20) iStart += 2; // could sometimes in a blue moon carry noble metals!
     
    Last edited: Nov 8, 2017
  16. Pieter Boelen

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

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

    I'd expect that to work just fine. Worth a test, though.
     
  17. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    255
    Gender:
    Female
    sounds very nice :onya gonna try it out! if it works I think I'm more or less done unless I have forgotten something, then it just needs balancing xD

    yes indeed :eek:
     
  18. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    255
    Gender:
    Female
    I realised me testing it for function and balance alone maybe isnt the most efficient way :p I think this is the only file Ive touched, so sharing what I got so far! xD it's from SEA_AI

    EDIT: actually I ofc rearranged the goods in STORE\goods.h too, so attaching that as well
     

    Attached Files:

    Last edited: Nov 9, 2017
    Mad Jack Wolfe and Pieter Boelen like this.
  19. Mad Jack Wolfe

    Mad Jack Wolfe Deck Scrubber, 2nd Class Staff Member Storm Modder

    Joined:
    Apr 8, 2017
    Messages:
    71
    Gender:
    Male
    Occupation:
    Writer and historian
    Location:
    Treasure Coast bound
    I merged your changes into my game setup to help with testing. Time to for a little cruise, says I. :sail
     
    DeathDaisy and Pieter Boelen like this.
  20. DeathDaisy

    DeathDaisy Freebooter Storm Modder

    Joined:
    Aug 18, 2017
    Messages:
    255
    Gender:
    Female
    hm, getting loads of errors, mostly about array size.. I dont know where it would output a number that isnt within 33. I didnt sink any ships so I couldnt tell if they got cargo anyway, but my guess is that iBooty outputs a weird number. it shouldnt, because it's an int, but stranger things has happened :shrug for example this excerpt from error.log
    Code:
    RUNTIME ERROR - file: sea_ai\AIFantom.c; line: 641
    Unknown data type
    thats this line:
    Code:
            int fillQuantity = GetCargoGoods(rFantom,iBooty) + GetCharacterFreeSpace(rFantom,iBooty);// fill up the hold
    
    iBooty not putting out a proper number is my best guess, unless this error existed before me messing with it :eek: why it would do that is a mystery to me
     

    Attached Files:

Share This Page