• 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!

Need Help Hoist the colors (For the 125431th time)

Have you found the spot where you can get a little headache? :ko

Yes, they don't make ladders like they used to... :D

The port music sounds good. I see it's an .ogg, so is it already in or do you want me to do something?

I have already added it to the port's sound scheme, just wanted you to take a listen.

Now i will have to find some asian character models to add as merchants etc. And i will try to look for some more asian looking interiors, maybe they are present in some of the storm engine games, would be a shame to use the ones we have with this town...
 
Everything looks good besides this:

2. Still the darn question about the tentacles, in the movie they attack the ship's deck, and crew is shooting/attacking them to fend off the Kraken, i have not yet figured out a way to do this, trying to make the tentacles using building items was janky at best.

They are supposed to surround your ship and have HP / be attackable, and again the same question about locators above applies here.

Can't figure it out still, another way is just to make kraken sink the ship, wouldn't be as cool as trying to fight it off of course, but i'm running out of ideas here.

@Grey Roger , maybe you can help me out with some brainstorming ?
 
I'm not sure if it would be possible to make tentacle characters which could be fought. They're created in "PROGRAM\NK.c", function 'KrakenTentacle()'. I'm not sure exactly how it works but it appears to be placing a random tentacle model as if it were a piece of floating cargo, and the tentacle models themselves are in the same folder as floating cargo, "RESOURCE\MODELS\SwimGoods". They're also placed some way out from the ship with the curvature of the tentacle bringing the tip closer. So even if you were able to make a tentacle character, it would be out of melee range. (Or it would look weird as the base of the tentacle is somewhere nearby, while the rest of the tentacle probably goes through the ship and ends up behind the player.)

Besides, what's the point of going to all this effort just to set up a fight which will have to end after a finite time with the ship sinking anyway? (If it's possible to fight the tentacles, you either need to rig the fight so that the player can't win, which isn't much fun for the player; or you have to account for what happens if the player does win and kills all the tentacles.)
 
Besides, what's the point of going to all this effort just to set up a fight which will have to end after a finite time with the ship sinking anyway? (If it's possible to fight the tentacles, you either need to rig the fight so that the player can't win, which isn't much fun for the player; or you have to account for what happens if the player does win and kills all the tentacles.)

The main point is just to make the kraken's attack more interesting/engaging, but indeed it's a lot of effort just to do it, i shall scrap the idea of fighting off the tentacles.

Maybe it's possible to make this function to work on the ship's model when you are on a deck location ? I can then just show off the tentacles trying to attack the ship, just for the visuals of it, and add some effects on top of it, there is a scene where player is in a boat, looking at his ship from afar, and has to choose to leave his ship to be destroyed and continue in a freeplay or return and try to save it.

Maybe @Pieter Boelen has some more knowledge of how to make this work, but i bet he has bigger problems to worry about right now.
 
Maybe make BuildingSet tentacles?
Those are technically connected to character models and can therefore be targeted with sword and gun.


@Jack Rackham probably has tricks up his sleeve for this.
 
Sorry but I can't do animations.

Animations aren't really needed, just a good way to make the tentacles appear on a deck location or near deck, here is the code used to create them as cargo items in sea...

C:
#event_handler("CreateKrakenTentacle", "KrakenTentacle");
void KrakenTentacle()
{
    if (!bSeaActive) return;
    aref rCharacter = GetEventData();
    if(CheckAttribute(rCharacter,"Ship"))
    {
        switch(rand(15))
        {
            case  0: Direct_AddGood(rCharacter, "Oil", "tentacle1_0",  0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(135.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  1: Direct_AddGood(rCharacter, "Oil", "tentacle1_90", 0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(225.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  2: Direct_AddGood(rCharacter, "Oil", "tentacle1_180",0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(315.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  3: Direct_AddGood(rCharacter, "Oil", "tentacle1_270",0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(45.0) -stf(rCharacter.Ship.Ang.y)); break;
            case  4: Direct_AddGood(rCharacter, "Oil", "tentacle2_0",  0.0,105, 5+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(70.0) -stf(rCharacter.Ship.Ang.y)); break;
            case  5: Direct_AddGood(rCharacter, "Oil", "tentacle2_90", 0.0,105, 5+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(160.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  6: Direct_AddGood(rCharacter, "Oil", "tentacle2_180",0.0,105, 5+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(250.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  7: Direct_AddGood(rCharacter, "Oil", "tentacle2_270",0.0,105, 5+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(340.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  8: Direct_AddGood(rCharacter, "Oil", "tentacle3_0",  0.0,105,10+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(90.0) -stf(rCharacter.Ship.Ang.y)); break;
            case  9: Direct_AddGood(rCharacter, "Oil", "tentacle3_90", 0.0,105,10+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(180.0)-stf(rCharacter.Ship.Ang.y)); break;
            case 10: Direct_AddGood(rCharacter, "Oil", "tentacle3_180",0.0,105,10+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(270.0)-stf(rCharacter.Ship.Ang.y)); break;
            case 11: Direct_AddGood(rCharacter, "Oil", "tentacle3_270",0.0,105,10+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(0.0)  -stf(rCharacter.Ship.Ang.y)); break;
            case 12: Direct_AddGood(rCharacter, "Oil", "tentacle4_0",  0.0,105, 5+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(90.0) -stf(rCharacter.Ship.Ang.y)); break;
            case 13: Direct_AddGood(rCharacter, "Oil", "tentacle4_90", 0.0,105, 5+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(180.0)-stf(rCharacter.Ship.Ang.y)); break;
            case 14: Direct_AddGood(rCharacter, "Oil", "tentacle4_180",0.0,105, 5+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(270.0)-stf(rCharacter.Ship.Ang.y)); break;
            case 15: Direct_AddGood(rCharacter, "Oil", "tentacle4_270",0.0,105, 5+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(0.0)  -stf(rCharacter.Ship.Ang.y)); break;
        }
    }
}
 
Sorry but I can't do animations.
Are you able to turn the static Kraken tentacle "floating goods" models into Building-set weapons?

With the Storm 2 engine, I don't think we could animate those tentacles one way or another; even if you could do them.

Animations aren't really needed, just a good way to make the tentacles appear on a deck location or near deck, here is the code used to create them as cargo items in sea...

C:
#event_handler("CreateKrakenTentacle", "KrakenTentacle");
void KrakenTentacle()
{
    if (!bSeaActive) return;
    aref rCharacter = GetEventData();
    if(CheckAttribute(rCharacter,"Ship"))
    {
        switch(rand(15))
        {
            case  0: Direct_AddGood(rCharacter, "Oil", "tentacle1_0",  0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(135.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  1: Direct_AddGood(rCharacter, "Oil", "tentacle1_90", 0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(225.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  2: Direct_AddGood(rCharacter, "Oil", "tentacle1_180",0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(315.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  3: Direct_AddGood(rCharacter, "Oil", "tentacle1_270",0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(45.0) -stf(rCharacter.Ship.Ang.y)); break;
            case  4: Direct_AddGood(rCharacter, "Oil", "tentacle2_0",  0.0,105, 5+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(70.0) -stf(rCharacter.Ship.Ang.y)); break;
            case  5: Direct_AddGood(rCharacter, "Oil", "tentacle2_90", 0.0,105, 5+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(160.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  6: Direct_AddGood(rCharacter, "Oil", "tentacle2_180",0.0,105, 5+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(250.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  7: Direct_AddGood(rCharacter, "Oil", "tentacle2_270",0.0,105, 5+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(340.0)-stf(rCharacter.Ship.Ang.y)); break;
            case  8: Direct_AddGood(rCharacter, "Oil", "tentacle3_0",  0.0,105,10+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(90.0) -stf(rCharacter.Ship.Ang.y)); break;
            case  9: Direct_AddGood(rCharacter, "Oil", "tentacle3_90", 0.0,105,10+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(180.0)-stf(rCharacter.Ship.Ang.y)); break;
            case 10: Direct_AddGood(rCharacter, "Oil", "tentacle3_180",0.0,105,10+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(270.0)-stf(rCharacter.Ship.Ang.y)); break;
            case 11: Direct_AddGood(rCharacter, "Oil", "tentacle3_270",0.0,105,10+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(0.0)  -stf(rCharacter.Ship.Ang.y)); break;
            case 12: Direct_AddGood(rCharacter, "Oil", "tentacle4_0",  0.0,105, 5+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(90.0) -stf(rCharacter.Ship.Ang.y)); break;
            case 13: Direct_AddGood(rCharacter, "Oil", "tentacle4_90", 0.0,105, 5+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(180.0)-stf(rCharacter.Ship.Ang.y)); break;
            case 14: Direct_AddGood(rCharacter, "Oil", "tentacle4_180",0.0,105, 5+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(270.0)-stf(rCharacter.Ship.Ang.y)); break;
            case 15: Direct_AddGood(rCharacter, "Oil", "tentacle4_270",0.0,105, 5+rand(20),Degree2Radian(rand(20)-10)+Degree2Radian(0.0)  -stf(rCharacter.Ship.Ang.y)); break;
        }
    }
}
Ah, what memories.
When me young brother pointed out that I had missed a spot.
(Sorry; couldn't find what I was looking for, so I just made that above link point something else that seems cool.
 
Are you able to turn the static Kraken tentacle "floating goods" models into Building-set weapons?
I made a quick test trying to make a tentacle a blade. It looked so terrible I deleted it.
 
just a good way to make the tentacles appear on a deck location or near deck
That would mean making the distance to the tentacles shorter. Changing these ones?

switch(rand(15))
{
case 0: Direct_AddGood(rCharacter, "Oil", "tentacle1_0", 0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(135.0)-stf(rCharacter.Ship.Ang.y)); break;
case 1: Direct_AddGood(rCharacter, "Oil", "tentacle1_90", 0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(225.0)-stf(rCharacter.Ship.Ang.y)); break;
 
That would mean making the distance to the tentacles shorter. Changing these ones?

switch(rand(15))
{
case 0: Direct_AddGood(rCharacter, "Oil", "tentacle1_0", 0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(135.0)-stf(rCharacter.Ship.Ang.y)); break;
case 1: Direct_AddGood(rCharacter, "Oil", "tentacle1_90", 0.0,105,10+rand(40),Degree2Radian(rand(20)-10)+Degree2Radian(225.0)-stf(rCharacter.Ship.Ang.y)); break;

I'm not sure that this function will work at all if you are not 3D sailing, i tried it out a while back and nothing happened when not sailing your ship. I will mess around a bit more with this...
 
I'm taking a little break from the quest itself to work on Singapore, and a question arose, where do i add npc's that are supposed to be permanent residents of this city ? Like tavern keepers, random traders, citizens etc. And how do i make npc's wonder around town ? Is it related to a certain patrol locator or something ?

Thanks in advance!
 
I'm taking a little break from the quest itself to work on Singapore, and a question arose, where do i add npc's that are supposed to be permanent residents of this city ? Like tavern keepers, random traders, citizens etc. And how do i make npc's wonder around town ? Is it related to a certain patrol locator or something ?

Thanks in advance!
If Singapore is only available in HtC, you can probably add them wherever you want. As for the general character files outside of the storyline folders, there's a system to it with e.g. all the tavern keepers of all towns in one file, but the citizens in the file of the island.

Somewhere in every character definition is something like this:

LAi_SetCitizenType(ch);
This makes the character spawn on the assigned locator and then randomly wander around and stand still from time to time, like citizens do. Other possibilities include:

LAi_SetStayType(ch); (character is standing still)
LAi_SetGuardianType(ch); (character is standing still and will defend himself when attacked)
LAi_SetPatrolType(ch); (character is walking around and will defend himself when attacked)
LAi_SetWarriorType(ch); (don't know the exact difference to PatrolType)
LAi_SetMerchantType(ch); (character is standing still and occasionally promoting his goods by making gestures and playing some "I've got everything you need" clip)
LAi_SetBarmanType(ch); (character is standing still and will ocsasionally check cupboards behind him)
LAi_SetSitType(ch); (character is sitting)
LAi_SetHuberType(ch); (character is sitting relaxed like governors do)
LAi_SetPoorType(ch); (character is sitting on the floor)
LAi_SetLayType(ch); (character is lying on the floor like a corpse)
 
Thank you!

This makes the character spawn on the assigned locator and then randomly wander around and stand still from time to time, like citizens do. Other possibilities include:

What is the wander radius, is it set somewhere or .... ?

I think it would be better to add it outside of the storyline folders, in case it might be useful for someone later on.
 
As these would be characters specific to the storyline, they'll probably need to be defined in one of the files in "PROGRAM\Storyline\JackSparrow\characters\init". There are already local versions of "QuebradasCostillas.c" and "Redmond.c", so you might get away with a local version of "Taverns.c" for the tavern owner. Otherwise just put the whole lot into either "Story.c" or "TempQuest.c".

I'd advise against using 'LAi_SetWarriorType'. Problems have been reported with characters in taverns becoming incommunicative, the reason being they've switched to "Warrior" type after a fight in the tavern. So the main difference between 'LAi_SetWarriorType' and 'LAi_SetPatrolType' is that the former won't talk but the latter will. (There is another command, 'LAi_warrior_DialogEnable', which can allow warrior types to talk. But you're probably better off not using the type at all for character definitions.)

'LAi_SetGuardianType' and 'LAi_SetPatrolType' are for soldiers and will set up the character with default soldier weapons, and probably have other side effects. There are also:
'LAi_SetCivilianGuardianType' and 'LAi_SetCivilianPatrolType' (put the character into the same AI group as soldiers but don't do other soldier stuff);
'LAi_SetGuardianTypeNoGroup' and 'LAi_SetPatrolTypeNoGroup' (don't do any soldier stuff at all).

I don't think there's a wander radius. Wandering characters will probably simply pick a "goto" locator in the area and go to it.
 
What is the wander radius, is it set somewhere or .... ?
As @Grey Roger said, they probably just randomly walk around between locators. Rys Bloom, who spawns right near the harbour masters office, might end up near the far away house that is used for the Devlin Opera jumpstart. Sometimes a citizen character starts walking immediately when you enter a location and sometimes he prefers standing around on his original locator for a while. It's all pretty random.
 
Okay, cool!

Last few questions:

1. Where do i define the "ChangeCharacterAddressGroup" for Singapore, i can leave it just for the HTC story or define it somewhere as with other cities that can be accessed normally (dunno where it's done yet) ?

2. What are the "dialog.currentnodedialogue" files for merchants and Tavern keepers and Shipyards, and how do i change which ship upgrades/ships the shipyard will sell ?

3. And do we leave Singapore as HTC exclusive town ?
 
1: Use 'ChangeCharacterAddressGroup' to move a character to your choice of location. You'd probably do it at the appropriate part of the quest code when the character needs to move there. The command takes arguments for character being moved, location to move to, locator group and locator name, e.g.:
Code:
ChangeCharacterAddressGroup(characterFromID("Teague Sparrow"), "Grand_Cayman_townhall", "sit", "sit1");

In a character definition, you wouldn't use the command, you'd just assign the character to a location by attributes, e.g. Joshamee Gibbs, alias "Storyteller", is placed in "Story.c":
Code:
ch.location    = "Tortuga_tavern";
ch.location.group = "candles";
ch.location.locator = "sit5";
Or you can leave those attributes blank for a character who isn't supposed to be anywhere at game start, then use 'ChangeCharacterAddressGroup' to place the character where and when needed in a quest.

2: Merchants, tavern keepers and shipyard owners all have their own dialog files. Additionally, shipyard owners can have a group dialog file so that they can give fetch quests, though I'm not sure exactly how the fetch quest system detects which shipyard owners are available. For example, for Roger Murray, the shipyard owner in Port Royale:
Code:
ch.Dialog.Filename = "Roger Murray_dialog.c";
ch.Dialog.Filename.GroupDialog = "shipyard.c";

By default, a character will start dialog at case "First Time". Unless there's a quest reason for a merchant, tavern keeper or shipyard owner to do something else, you don't need to bother with 'dialog.currentnode'. Their "First Time" should be the starting point for their normal business dialog.

All upgrades should be available at any shipyard, apart from "Corsair Refit" which is only available at Pirate shipyards. I've no idea what governs which ships are for sale - possibly the town's economic status. Additionally, you won't be able to buy warships unless you have a LoM from the shipyard's nation, and sufficiently high rank on it.

3: Singapore is nowhere near the Caribbean and has no role in any other storyline, so I'd suggest leaving it specific to HTC. It shouldn't even be Chinese, it's Malayan.
 
Alright, thanks for help guys.

Unfortunately i didn't find any Asian themed interiors that i could use, and no "bathhouse" location either for a certain movie scene, maybe @Jack Rackham has something ported already, if not i will just use what we have right now.

@Grey Roger maybe you have list of Asian character models ? I only found two so far not including Sao Feng of course :)

And just a little reminder, maybe when/if you have time you could make a better model for Norrington (pics below) as it is used in the story now. And slap a barnacle to bootstraps face for the cursed model while at it. xD

Back to coding... :keith
 

Attachments

  • pc2.jpg
    pc2.jpg
    72.4 KB · Views: 39
  • pic.jpg
    pic.jpg
    1.9 MB · Views: 69
Back
Top