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

I tried to merge the various copies of the file.
@Grey Roger, @Sebrian and @Jack Rackham, could you check if the attached makes sense to you?
I think I may have merged a bit too much... :unsure
Meanwhile, I've been doing the same. This one has quest cases arranged a bit differently but it should all be there, including @Jack Rackham's Singapore code.

@Sebrian: it won't help with the shooting problem, but:
Code:
GiveItem2Character(sld, "bladearrows");
GiveItem2Character(sld, "bladearrows");
GiveItem2Character(sld, "bladearrows");'
GiveItem2Character' is simply a call on 'TakeNItems' with the number of items set to 1. So three calls on 'GiveItem2Character' for the same item could be replaced by...
Code:
TakeNItems(sld, "bladearrows", 3);
 

Attachments

  • quests_reaction.c
    614.7 KB · Views: 19
This is basically what used to work for me, but it was always a bit strange that there was no simple function for it...

Code:
case "davyshootsme":
            LAi_SetPlayerType(pchar);
            LAi_SetActorType(characterFromID("Davy Jones"));
            LAi_ActorAttack(characterFromID("Davy Jones"), pchar, "");
            LAi_QuestDelay("davyhurtme", 2.7);
        break;

        case "davyhurtme":
            bSuppressResurrection = true;
            LAi_SetStayType(CharacterFromID("Davy Jones"));
            Lai_KillCharacter(pchar);
            LAi_QuestDelay("preroomcayman", 3.0);
            LAi_QuestDelay("goroomcayman", 6.0);
        break;
 
I don't think I have forced any enemies to shoot.
Enemies with pistolbows do use them if they are attacking you.

Maybe try
LAi_SetActorType(characterFromID("Brthug1"));
LAi_ActorAttack(CharacterFromID("Brthug1"), Pchar, "");
(and give them some bladearrows just to be sure)
 
Here are the three last packages I uploaded for @Sebrian.
They should be added in order 6 - 7 - 8.
There is a mistake in "8 Bathouse files.7z". "RESOURCE\MODELS\Locations\Inside\Dungeon1" should be "Dungeon_1". I found that when I tried the new files, used console to teleport myself to Singapore, then tried to walk to the bathhouse stairs and the screen went black - "system.log" had a message about "Dungeon_1\d01_l_Bathhouse.gm" not being found. After I moved the file to "Dungeon_1", I was able to enter the stairs and go to the bathhouse.

And i have discovered that the new engine does few things different as it seems, i can't make the scene with shooting a bow work, it used to function just fine before, maybe @Jack Rackham or you could help me out ?
Do you mean that there is no animation, or that something else is going wrong? Do the cannibals not use their bows, not attack at all, or something else?
 
Do you mean that there is no animation, or that something else is going wrong? Do the cannibals not use their bows, not attack at all, or something else?

In the scene we make actors run up to a locator, then the cannibals are supposed to run out of their cover for a bit (using either attack or follow function) which they do, then they are made stay type, and shoot their bow at the player: the issues

If i leave code as it was in new horizons they ignore the stay type and just run up to player and melee them.
Or in some cases they draw their weapon, then sheathe it, follow for a bit and stop, not using their bow. (I honestly forgot what combination of code did this)
If i use LAI_FireExcecute funtion, after making them actor stay type, we can hear the sound of the bow being shot, but they do not draw the bow (no animation of shooting)

Making an npc shoot was always a bit janky, but now I'm out of ideas for now, a bummer cuz i spent a good while making that scene play out nicely.
 
It's weird; because TEHO has a character standing still and shooting early in the game too.
That's basically the same version of the engine.
So why would BNH be any different?? :facepalm
 
It's weird; because TEHO has a character standing still and shooting early in the game too.
That's basically the same version of the engine.
So why would BNH be any different?? :facepalm
Oh... would it be possible for you to check that game's scripts to see how they coded it there ?
 
Oh... would it be possible for you to check that game's scripts to see how they coded it there ?
Looking into it now, I fear it's not going to do us much good after all.
I must admit I don't quite understand it, but I assume it's got something to do with this "sld.MusketerDistance":
Code:
    case "RescueDaughter_KillIndiansLand":
        LAi_group_Delete("EnemyFight");
        sld = characterFromId("RD_Prosper");
        if (LAi_GetCharacterHP(sld) > 0)
        {
            LAi_SetActorType(sld);
            sld.MusketerDistance = 20;
            LAi_ActorDialog(sld, pchar, "", -1, 0);
        }
        else
        {
            AddQuestRecord("Sharlie", "F6");
            LocatorReloadEnterDisable("Martinique_CaveEntrance", "reload1_back", false);
            pchar.quest.Sharlie_RescueDaughter2.win_condition.l1 = "location";
            pchar.quest.Sharlie_RescueDaughter2.win_condition.l1.location = "Martinique_Grot";
            pchar.quest.Sharlie_RescueDaughter2.function = "RescueDaughter_CreateIndiansGrot";
            pchar.questTemp.Sharlie.RescueDaughter.KillProsper = "true";
        }
    break;
 
Looking into it now, I fear it's not going to do us much good after all.
I must admit I don't quite understand it, but I assume it's got something to do with this "sld.MusketerDistance":
Code:
    case "RescueDaughter_KillIndiansLand":
        LAi_group_Delete("EnemyFight");
        sld = characterFromId("RD_Prosper");
        if (LAi_GetCharacterHP(sld) > 0)
        {
            LAi_SetActorType(sld);
            sld.MusketerDistance = 20;
            LAi_ActorDialog(sld, pchar, "", -1, 0);
        }
        else
        {
            AddQuestRecord("Sharlie", "F6");
            LocatorReloadEnterDisable("Martinique_CaveEntrance", "reload1_back", false);
            pchar.quest.Sharlie_RescueDaughter2.win_condition.l1 = "location";
            pchar.quest.Sharlie_RescueDaughter2.win_condition.l1.location = "Martinique_Grot";
            pchar.quest.Sharlie_RescueDaughter2.function = "RescueDaughter_CreateIndiansGrot";
            pchar.questTemp.Sharlie.RescueDaughter.KillProsper = "true";
        }
    break;
Yea, doesn't help much, unless there is some magic hidden in the MusketerDistance function
 
Yea, doesn't help much, unless there is some magic hidden in the MusketerDistance function
I think that's a TEHO special.
Maybe CoAS too.
But pretty sure PotC doesn't have it.

It's not even a function; just an attribute.
I assume it's used somewhere, but I didn't search that far.
 
Looking into it now, I fear it's not going to do us much good after all.
I must admit I don't quite understand it, but I assume it's got something to do with this "sld.MusketerDistance":
`MusketerDistance` is the distance the character will try to stay from the target.
There is also a boolean attribute `isMusketer` which can be set to make an npc ranged-only

So maybe try something like
Code:
npchar.isMusketer = 1;
npchar.musketerDistance = 0;
 
`MusketerDistance` is the distance the character will try to stay from the target.
There is also a boolean attribute `isMusketer` which can be set to make an npc ranged-only

So maybe try something like
Code:
npchar.isMusketer = 1;
npchar.musketerDistance = 0;
Would that work now in BNH too?
We don't have any PROGRAM code for any of that... :shock
 
If i use LAI_FireExcecute funtion, after making them actor stay type, we can hear the sound of the bow being shot, but they do not draw the bow (no animation of shooting)
There is no animation of shooting a bow. No such animation exists, at least not in "New Horizons". The character equips the bow as a pistol and equips an arrow as a blade so that he is holding both, but then just uses the standard shooting animation as if the bow really was a pistol. If you've been attacked by random Indians in a jungle at night and have looted a bow and some arrows, you can try this by equipping the bow yourself.
 
There is no animation of shooting a bow. No such animation exists, at least not in "New Horizons". The character equips the bow as a pistol and equips an arrow as a blade so that he is holding both, but then just uses the standard shooting animation as if the bow really was a pistol. If you've been attacked by random Indians in a jungle at night and have looted a bow and some arrows, you can try this by equipping the bow yourself.
The problem isn't with the animation.
The problem is that they don't shoot at all.
Not when "forced" for quest purposes, at least...

This is on B15 BNH.

I have yet to test it myself...
 
Go into a jungle at night. Walk between jungle locations until you're attacked by Indians. Then see if they shoot arrows at you. If they do, kill them, loot their bows and arrows, and see what happens if you try to shoot a bow.
 
There is no animation of shooting a bow. No such animation exists, at least not in "New Horizons". The character equips the bow as a pistol and equips an arrow as a blade so that he is holding both, but then just uses the standard shooting animation as if the bow really was a pistol. If you've been attacked by random Indians in a jungle at night and have looted a bow and some arrows, you can try this by equipping the bow yourself.

I understand that it uses an animation of a pistol, but they should still "draw" the bow same as the player does, I'll test npchar.isMusketer = 1; soon! :)
 
Back
Top