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.

How to create nation, add music and create a new quests-book?

Discussion in 'Hoist the Colours (Jack Sparrow)' started by chri, May 14, 2016.

  1. chri

    chri Sailor Apprentice

    Joined:
    Apr 14, 2016
    Messages:
    53
    Gender:
    Male
    1) Hello everyone, I would like to create new nations with new flags. Is there a way to do this?
    2) Can be add more music during a battle?
    3) How do you create quests-book?
     
  2. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,869
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    In theory, yes. We added the United States that way. But don't count on it being easy.
    A nation requires more than just flags; you need soldier uniforms as well, for example.
    What exactly do you have in mind?

    Add the sound files as OGG in RESOURCE\Sounds\MUSIC .
    Then in PROGRAM\sound\ALIAS\music_standard.c add your new music to this section:
    Code:
       //============= SEA BATTLE =========================
       tmpref.music_sea_battle.f1.name = "MUSIC\Sea_battle01.ogg";
       tmpref.music_sea_battle.f2.name = "MUSIC\Sea_battle02.ogg";
       tmpref.music_sea_battle.f3.name = "MUSIC\Sea_battle03.ogg";
       tmpref.music_sea_battle.f4.name = "MUSIC\Sea_battle04.ogg";             // PB: Sea Dogs
       tmpref.music_sea_battle.f5.name = "MUSIC\Sea_battle05.ogg";             // PB: Cutthroat Island
    
    Files are in RESOURCE\INI\TEXTS\ENGLISH\QUESTBOOK .
    Then you use line of code such as these:
    Code:
           SetQuestHeader(questbookname);
           AddQuestRecord(questbookname, 1);
    
     
  3. Talisman

    Talisman Smuggler Storm Modder

    Joined:
    Apr 29, 2009
    Messages:
    2,825
    Gender:
    Male
    Location:
    Hiding From The Coastguard
    Hi,

    Have a read of the New Horizons Tutorials & History.pdf file in the Documents folder of your game.

    A Lot of information on how to change things & create new things in the game is in there.

    :read
     
  4. chri

    chri Sailor Apprentice

    Joined:
    Apr 14, 2016
    Messages:
    53
    Gender:
    Male
    OK thanks.
    However by country I intend to add sails of ships in this case.
     
  5. Yo ho ho!

    Yo ho ho! Powder Monkey

    Joined:
    May 8, 2016
    Messages:
    43
    Gender:
    Male
    4) E to increase the defense of the ships? Because after 3-4 shots sink right away ...
    5) As soon as my ship sinks, I will return the menu. Is there a way to continue to see the battle? I would like to see if my ships manage to sink the other ...
     
  6. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,869
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    What kind of sails do you want to add and what ships should use them?
    That is probably a lot more doable than adding a fully new nation.

    The actual sail textures are here: RESOURCE\Textures\Ships\Sails
    If the sails are for player use only, then the only coding required is to increase the relevant numbers here in PROGRAM\InternalSettings.h:
    Code:
    // CUSTOM SAILS -------------------------
    #define QTY_LOGOSAILS_WHOLE_WHITE     17     // INT - increase this when you add new whole white sails.
                             // The files should be named sails_whole_white_pirate0.tga.tx, sails_whole_white_pirate1.tga.tx, sails_whole_white_pirate2.tga.tx, etc.
                             // So if the value above is set, for example, to 15, then the file numbers should be 0 - 14
                             // They should be put in RESOURCE/Textures/Ships/
    #define QTY_LOGOSAILS_TORN_WHITE     15     // INT - increase this when you add new torn white sails. the files should be named sails_torn_white_pirate0.tga.tx etc.
    #define QTY_LOGOSAILS_WHOLE_RED       17     // INT - increase this when you add new whole red sails. the files should be named sails_whole_red_pirate0.tga.tx etc.
    #define QTY_LOGOSAILS_TORN_RED       15     // INT - increase this when you add new torn red sails. the files should be named sails_torn_red_pirate0.tga.tx etc.
    #define QTY_LOGOSAILS_WHOLE_BLACK     17     // INT - increase this when you add new whole black sails. the files should be named sails_whole_black_pirate0.tga.tx etc.
    #define QTY_LOGOSAILS_TORN_BLACK     16     // INT - increase this when you add new torn black sails. the files should be named sails_torn_black_pirate0.tga.tx etc.
    
    What ships do you have and what are you skills? Small ships with low skills sink quickly.

    You can change the survival chance setting so that you'll be reloaded to sea again in a lifeboat.
     
  7. Yo ho ho!

    Yo ho ho! Powder Monkey

    Joined:
    May 8, 2016
    Messages:
    43
    Gender:
    Male
    ok, but if I would like to add music to a point, for example: when the kraken attacks, how do I?
     
  8. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,869
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Find the code that gets executed. Search for Kraken in NK.c
     
  9. Yo ho ho!

    Yo ho ho! Powder Monkey

    Joined:
    May 8, 2016
    Messages:
    43
    Gender:
    Male
    Hmm... the code of the kraken can not find it ..
     
  10. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,869
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Right where I said it was:
    Code:
    void KrakenAttack(aref rCharacter, int iSwimQuantity)
    // Character and number of tentacles
    {
       if (!bSeaActive) return;
       ref pchar = GetMainCharacter();
       int delay = 0;
       for (int i=0; i < iSwimQuantity; i++)
       {
         PostEvent("CreateKrakenTentacle", delay, "i", rCharacter);
         delay = delay + rand(1000);
       }
       if(IsMainCharacter(rCharacter)) LogIt("Captain, we're being attacked by the Kraken!");
       else
       {
         LogIt("Captain, the " + rCharacter.ship.name + " is under attack by the Kraken!");
         pchar.KrakenAttack = true;
       }
       PostEvent("KrakenAttackFinished", delay, "i", rCharacter);
    }
    
    And a bit further down, you can find this music-playing code for when the Dutchman emerges from the depths:
    Code:
            PauseAllSounds();
             FadeOutMusic(150);
             PlaystereoOGG("music_emerge_dutchman");
             //FadeOutMusic(500);
             if (!bDisableMapEnter)   PostEvent("LoadSceneSound", 110000);
             else           PostEvent("LoadSceneSound", 41500);
    
    Music is defined in PROGRAM\sound\ALIAS\music_standard.c:
    Code:
      //============ DUTCHMAN EMERGE =======
       tmpref.music_emerge_dutchman.f1.name = "MUSIC\dutchemerge.ogg";           // Pillat: PotC
       tmpref.music_emerge_dutchman.f2.name = "MUSIC\dutchemerge2.ogg";         // Pillat: PotC
    
    And the music itself is of course in RESOURCE\Sounds\MUSIC .

    I think that should be just about all the clues you need.
     
  11. Yo ho ho!

    Yo ho ho! Powder Monkey

    Joined:
    May 8, 2016
    Messages:
    43
    Gender:
    Male
    ok ... this is for when the Dutchman's ship emerges, but when the kraken attacks, I have to put a precise code in PROGRAM \ sound \ ALIAS \ music standard.c?
     
  12. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,869
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    You do of course need to adapt it for your specific use.
    That is what modding is all about: You make use of what already exists and create something that is new.
    I have given you the examples of what exists. The rest is up to you.
     
  13. Yo ho ho!

    Yo ho ho! Powder Monkey

    Joined:
    May 8, 2016
    Messages:
    43
    Gender:
    Male
    ok thank
     
  14. Yo ho ho!

    Yo ho ho! Powder Monkey

    Joined:
    May 8, 2016
    Messages:
    43
    Gender:
    Male
    Ah .. and about the quest ... is there a way to create a game with messages such as, characters etc? I would like to create similar quests, such as: talk to (model) and tells you to go to (island) to capture a pirate and bring it back to him. Then there is a way to create a quest similar to what I did
     
  15. Grey Roger

    Grey Roger Sea Dog Staff Member Storm Modder

    Joined:
    Feb 12, 2007
    Messages:
    5,861
    Yes, you're talking about writing quests. Pick a quest with which you're familiar - one you've played a few times and know what it does. Then try to find the code which does it.

    For storylines, much of the code is in "PROGRAM\Storyline\<story name>", though there's an initial set-up file one level up, in "PROGRAM\Storyline". For example, for "Hoist the Colours", alias "JackSparrow", you'll find "PROGRAM\Storyline\JackSparrow.c" which does some initial stuff, then most of the code is in "PROGRAM\Storyline\JackSparrow".

    There are also side quests. Most of their code is in "PROGRAM\QUESTS\quests_side.c". Dialog control files are in "PROGRAM\DIALOGS" and text files are in "PROGRAM\DIALOGS\ENGLISH".
     
  16. chri

    chri Sailor Apprentice

    Joined:
    Apr 14, 2016
    Messages:
    53
    Gender:
    Male
    @ Pieter Boelen
    When the kraken attacks, the music is not there. I tried to put it, but I probably have not yet learned well
     
  17. chri

    chri Sailor Apprentice

    Joined:
    Apr 14, 2016
    Messages:
    53
    Gender:
    Male
    please see if I done correctly: (see attacked)
     

    Attached Files:

  18. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,869
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Remind me next week. At the moment I have no access to my game.

    If it works, then you did it correctly. ;)
     
  19. chri

    chri Sailor Apprentice

    Joined:
    Apr 14, 2016
    Messages:
    53
    Gender:
    Male
    He has managed to get access to the game?
     
  20. Pieter Boelen

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

    Joined:
    Nov 11, 2004
    Messages:
    65,869
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Thanks for reminding me. Try attached files instead.
     

    Attached Files:

Share This Page