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.

Mod Release Age of Pirates: Caribbean Tales - Historical Immersion Supermod

Discussion in 'Sea Dogs: Caribbean Tales' started by Modder01, Feb 1, 2014.

  1. Hotshot

    Hotshot Master Mariner Storm Modder

    Joined:
    Jan 13, 2016
    Messages:
    238
    Gender:
    Male
    What is a "realisticly attainable" rank? Because I heard after rank 15 it gets rather... tedious^^

    If that's the case, would the following simple tweak help if one wants more then 6 ability points? I ask - although I already tried it^^ - because I don't really know why the "modulo 3" code (the original) is written so complex?!

    open "CharacterUtilite.c"
    uncomment the whole...
    Code:
            if(CheckAttribute(_refCharacter,"perks.FreePoints"))
            {  
                float fperks = stf(_refCharacter.rank)/2;
                int iPerks = sti(_refCharacter.rank)/2;
                fperks = fperks - iperks;
                if (fPerks == 0.0)
                {
                    _refCharacter.perks.FreePoints = sti(_refCharacter.perks.FreePoints) + 1;
                }
            }
            else
            {    _refCharacter.perks.FreePoints = 0;
            }
    
    and replace it with...
    Code:
            if (sti(_refCharacter.rank)%2 == 0)
            {
                _refCharacter.perks.FreePoints = sti(_refCharacter.perks.FreePoints) + 1;
            }
    
    I mean, whats the if(CheckAttribute(_refCharacter,"perks.FreePoints")) good for?
    And why didn't they use modulo?

    Hm... I'm really wondering about some of the code they wrote; I mean it works, but sometimes I don't know how or why they wrote it the way the did...
     
    Last edited: Sep 27, 2017
  2. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    There is a dev console that is in this game since v5.0 is built off of GOF, but according to Debugger.c there is no command to search for contraband goods. Therefore it would be next to impossible to find out what functions could grab that data.
     
  3. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    I have never realistically attained rank 15 in the game before. I usually finish the story line before that happens. I agree that some of their code is old compared to today's standards, however maybe Russian code was that way back then.... And what do you mean by tedious?
     
  4. Hotshot

    Hotshot Master Mariner Storm Modder

    Joined:
    Jan 13, 2016
    Messages:
    238
    Gender:
    Male
    Oh, just that I read somewhere that you need a huge amount of XP to get to ranks 16 and upwards; more of a grind, so to speak. Well, I'll see :)

    At least one doesn't have to start a new game for the aforementioned trick to work^^
     
  5. Hotshot

    Hotshot Master Mariner Storm Modder

    Joined:
    Jan 13, 2016
    Messages:
    238
    Gender:
    Male
    Man shit; I did a simple profit-calculation in Excel for all goods and now check which cargo is contraband in my game (by visiting the smugglers)
    -> and of course: those that actually are profitable are contraband goods in my game :-\
     
  6. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    There should be more profit for contraband than there is importing and exporting...
    There should be an average profit by import and export of a small amount of gold per unit (like 6-10), but smuggling runs increase the profitability of goods because in order to find them you must first board ships that are pirate vessels and take their cargo. Taking normal cargo increases profitability as well. Remember that some goods when you go to another colony (if you are set upon by pirates) you may be able to increase your profit by having cargo that you don't have to pay for if you are able to board that ship, or fish cargo out of the sea from a sinking ship.
     
    Last edited: Sep 27, 2017
  7. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    212
    It is unwise to remove the: if(CheckAttribute(_refCharacter,"perks.FreePoints"))

    Keep that check there because if the particular character being checked does not have the .FreePoints attribute, it will never get assigned that particular attribute with your change and that code will never work for that particular character going forward, no matter what rank they achieve. Other than that, yes, your code snippet with the modulo is a fine change to achieve the same result.

    I suspect that that piece of script code may have either existed from an earlier version of the engine that perhaps did not yet have the modulo feature in their internal compiler, or the particular coder was unaware of the internal compiler support of modulo when they wrote it; the game has its own compiler, hence not all features of C/C++ are supported or work exactly the same as one would expect in those languages.
     
  8. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    Don't worry, I am not the one who is making those changes and v5.0 isn't affected by that.... That change seemed a bit sketchy to say the least so that is why I have not implemented that and will have hotshot finalize before I go messing around with files.. Btw, have you found out what is going on with the quest? I messaged you with diagnostics... It appears my login and ship spawning logic will have to be redone... I don't know the locators to Grenada so if I knew a locator that I could spawn on, I could fix the spawn inside an island issue...
     
  9. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    Update:
    -All dialog files corrected from showing piastres or piasters. Gold is the currency across all dialogs....
    -Fixed the issue that the schooner had 1 less cannon on both starboard and port sides due to incorrect ships_init defs.

    Working on:
    -Dutchman Quest
    -New Credits Roll for the Modding Team (added after original devs)
     
  10. Hotshot

    Hotshot Master Mariner Storm Modder

    Joined:
    Jan 13, 2016
    Messages:
    238
    Gender:
    Male
    Ok, I totally misread this code! I guess that's the danger of changing the game to your own preference :)
    Thanks!
     
  11. ChezJfrey

    ChezJfrey Master Mariner Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    212
    Your modulo change looks fine, though. So just wrap it inside the if(CheckAttribute...) statement like before, and with else assigning
    _refCharacter.perks.FreePoints = 0, like before.
     
  12. Hotshot

    Hotshot Master Mariner Storm Modder

    Joined:
    Jan 13, 2016
    Messages:
    238
    Gender:
    Male
    Didn't get much playtime the last few days... anyway, these values are way too much! I got about 20k profit from one run (chocolate export to import). In a lowly Schooner of War :-\
    Code:
    case TRADE_TYPE_EXPORT: pRef.Goods.(goodName).RndPriceModify = frnd() * 0.05;
    case TRADE_TYPE_IMPORT: pRef.Goods.(goodName).RndPriceModify = frnd() * 0.65;
    I'm gonna try these values now:
    Code:
    pRef.Goods.(goodName).RndPriceModify = frnd() * 0.2;
    pRef.Goods.(goodName).RndPriceModify = frnd() * 0.55;
     
  13. Hotshot

    Hotshot Master Mariner Storm Modder

    Joined:
    Jan 13, 2016
    Messages:
    238
    Gender:
    Male
    Oh and is it normal that I need to pay 100.000 gold to my 77 crew (+ 1 officer)?
    That's fucking insane!
     
  14. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    The value somewhat varies, but yes it is that expensive...
     
  15. Hylie Pistof

    Hylie Pistof Curmudgeon Staff Member QA Tester Storm Modder

    Joined:
    Jan 15, 2010
    Messages:
    13,748
    Gender:
    Male
    That happened to the HMS Victory in GOF2 as well. I repaired it and still have the archive. COAS worked just fine in TOOL for me.
     

    Attached Files:

  16. Hotshot

    Hotshot Master Mariner Storm Modder

    Joined:
    Jan 13, 2016
    Messages:
    238
    Gender:
    Male
    Well, at least it's only when I make a lot of profit; nevertheless, it's shamefully high :p

    Bloody Pirates *lol*
     
    Last edited: Oct 3, 2017
  17. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    Update:
    -Added new music for each town theme. Adjusted the sound schemes accordingly.
    -Fixed the common.ini not displaying appostrophies (now in UTF-8 format).

    Still working on:
    -Dutchman Quest
     
    Last edited: Oct 5, 2017
  18. Hotshot

    Hotshot Master Mariner Storm Modder

    Joined:
    Jan 13, 2016
    Messages:
    238
    Gender:
    Male
    Hm, found a little bug me thinks...

    I traveled to Nevis port and got the following message:
    Nevis-Port Info Message (under attack by spain).PNG

    What does it say?
    There were 4 ships attacking Nevis Fort and, well, me.
     
  19. Modder01

    Modder01 Freebooter Storm Modder

    Joined:
    Feb 1, 2014
    Messages:
    294
    Gender:
    Male
    Location:
    Oxford, Michigan, USA
    These windows are showing in Russian... This is why it didn't show up right in 4.0. The bugged out strings are for AskForHelp.c and have to deal with the lack of translation back to English when cryllic is not supported in the English version of the game as opposed to in 5.0 the strings will support accents and cryllic. The fixed version is below:
    Code:
    string totalInfo = "";
    
    void InitInterface(string iniName)
    {
     
       EngineLayersOffOn(true);
       SetTimeScale(0.0);
       GameInterface.title = "titleAskForHelp";
     
       SendMessage(&GameInterface,"ls",MSG_INTERFACE_INIT,iniName);
     
       CalculateInfoData();
     
       SetFormatedText("INFO_TEXT",totalInfo);
     
       SendMessage(&GameInterface,"lsl",MSG_INTERFACE_MSG_TO_NODE,"INFO_TEXT",5);
     
       SetEventHandler("InterfaceBreak","ProcessBreakExit",0);
       SetEventHandler("exitCancel","ProcessCancelExit",0);
       SetEventHandler("ievnt_command","ProcCommand",0);
       SetEventHandler("evntDoPostExit","DoPostExit",0);
    }
    
    void ProcessBreakExit()
    {
       IDoExit( RC_INTERFACE_FOOD_INFO_EXIT );
       //wdmReloadToSea();
       SetTimeScale(1.0);
       pchar.quest.Fight_forOtherColony_temp.help = "0";
    }
    
    void ProcessCancelExit()
    {
       IDoExit( RC_INTERFACE_FOOD_INFO_EXIT );
       //wdmReloadToSea();
       SetTimeScale(1.0);
       pchar.quest.Fight_forOtherColony_temp.help = "0";
    }
    
    void IDoExit(int exitCode)
    {
       DelEventHandler("InterfaceBreak","ProcessBreakExit");
       DelEventHandler("exitCancel","ProcessCancelExit");
       DelEventHandler("ievnt_command","ProcCommand");
       DelEventHandler("evntDoPostExit","DoPostExit");
    
       interfaceResultCommand = exitCode;
       EndCancelInterface(true);
       SetTimeScale(1.0);
     
       pchar.quest.Fight_forOtherColony_temp.help = "1";
    }
    
    void ProcCommand()
    {
       string comName = GetEventData();
       string nodName = GetEventData();
    
       switch(nodName)
       {
       case "B_OK":
           if(comName=="activate" || comName=="click")
           {
               // напасть
               PostEvent("evntDoPostExit",1,"l",RC_INTERFACE_FOOD_INFO_EXIT);
               SetTimeScale(1.0);
           }
       break;
       }
    }
    
    void DoPostExit()
    {
       int exitCode = GetEventData();
       IDoExit(exitCode);
    }
    
    void CalculateInfoData()
    {
     
     
       int iHelp = sti(pchar.quest.Fight_forOtherColony_temp.help);
    
       int iEnemy = sti(pchar.quest.attack_other_fort.enemy);
       int iNation = sti(pchar.quest.attack_other_fort.nation);
       string sColony = pchar.quest.attack_other_fort.colony;
     
       if (iHelp == 2)
       {
           totalinfo = "The Governor of " + XI_ConvertString(GetNationNameByType(iEnemy) + "Gen") + "'s colonies brings his thanks to you and as a token of gratitude, awards you " + (10000 + sti(pchar.skill.commerce)*500) + " gold.";
           pchar.quest.Fight_forOtherColony_temp.help = 0;
       }
       else
       {
           totalinfo = "The Governor of" + XI_ConvertString(GetNationNameByType(iEnemy) + "Gen") + "'s colonies asks for help against the forces of " + XI_ConvertString(GetNationNameByType(iNation)+"Dat") + " who are attacking his colony.";
       }
    
       SetCurrentNode("B_OK");
    }
    
    In retrospect you could add the current island location you are at to the second string line, but you could also just say "this colony" instead of the location... The Translation is rather rough from Russian, but it fits the old style pretty well.
     
    Last edited: Oct 4, 2017
  20. Hotshot

    Hotshot Master Mariner Storm Modder

    Joined:
    Jan 13, 2016
    Messages:
    238
    Gender:
    Male
    Thanks a bunch! I'll add this and hopefully next time I understand what's being said :p
     

Share This Page