• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

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

chri

Sailor Apprentice
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?
 
Hello everyone, I would like to create new nations with new flags. Is there a way to do this?
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?

Can be add more music during a battle?
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

How do you create quests-book?
Files are in RESOURCE\INI\TEXTS\ENGLISH\QUESTBOOK .
Then you use line of code such as these:
Code:
       SetQuestHeader(questbookname);
       AddQuestRecord(questbookname, 1);
 
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) 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 ...
 
However by country I intend to add sails of ships in this case.
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.

E to increase the defense of the ships? Because after 3-4 shots sink right away ...
What ships do you have and what are you skills? Small ships with low skills sink quickly.

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 ...
You can change the survival chance setting so that you'll be reloaded to sea again in a lifeboat.
 
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.
 
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?
 
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?
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.
 
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
 
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".
 
@ Pieter Boelen
When the kraken attacks, the music is not there. I tried to put it, but I probably have not yet learned well
 
please see if I done correctly: (see attacked)
 

Attachments

  • krakenattack.rar
    697.7 KB · Views: 327
Remind me next week. At the moment I have no access to my game.

If it works, then you did it correctly. ;)
 
Back
Top