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

Devlin Opera for the 65742th time

@Grey Roger

I have the game now up and running and playing Woodes Rogers once again, to get to the new Part 2.

I'm working on moving all my stuff now but it's not that easy even through WinMerge because so many things differ in the folders elsewhere. I'm definitely doing this separate folder structure now where everything Devlin related goes in. Should also be easier to transfer e.g. if anyone wants to test something.
 
I've created a jumpstart for testing, as I have reached the first part after the opening. Until now it works, but there is one thing that bothers me.

- When I start a new game, the jumpstart character (sometimes?) gets a random name. How can I stop that from happening so that he always keeps his name?
 
I have the game now up and running and playing Woodes Rogers once again, to get to the new Part 2.
You don't have to play through part 1 if you don't want to. InternalSettings at the end: set ENABLE_CHEATMODE = 1.
Start new game and talk to Blackbeard's head for fast transfer to start of part 2.
 
You don't have to play through part 1 if you don't want to. InternalSettings at the end: set ENABLE_CHEATMODE = 1.
Start new game and talk to Blackbeard's head for fast transfer to start of part 2.
Let's see, for now playing the first part is still enjoyable and a good warm-up. I can still go back and skip it.

Everyone, is bQuestDisableSeaEnter = true the correct way to disable leaving an island?

EDIT: Another question, there are currently some weird animation issues with the following NPC. I can talk to her, and all, but the face looks disfigured and she seems to stretch across the whole room. Has anybody got a quick solution?

Code:
    ch.old.name = "Isabel";
    ch.old.lastname = "Marino";
    ch.name = TranslateString("", "Isabel");
    ch.lastname = TranslateString("", "Marino");
    ch.id        = "Isabel Marino";
    ch.model = "lady04_ab";
    ch.sex = "woman";
    ch.sound_type = "female_citizen";
    ch.location    = "none";
    ch.location.group = "";
    ch.location.locator = "";
    ch.Dialog.Filename = "Isabel Marino_dialog.c";
    ch.nation = SPAIN;
    ch.rank     = 1;
    ch.reputation = "50";
    ch.experience = "0";
    ch.skill.Leadership = "2";
    ch.skill.Fencing = "1";
    ch.skill.Sailing = "3";
    ch.skill.Accuracy = "1";
    ch.skill.Cannons = "1";
    ch.skill.Grappling = "1";
    ch.skill.Repair = "1";
    ch.skill.Defence = "1";
    ch.skill.Commerce = "1";
    ch.skill.Sneak = "1";
    ch.money = "10";
    ch.quest.meeting = "0";
    LAi_SetStayType(ch);
    LAi_SetLoginTime(ch, 0.0, 24.0);
    LAi_group_MoveCharacter(ch, "SPAIN_CITIZENS");
    AddGameCharacter(n, ch);
 
Last edited:
Everyone, is bQuestDisableSeaEnter = true the correct way to disable leaving an island?
Yes. You can visit your ship's deck but you can not go to sea.

There's also bQuestDisableMapEnter = true which should disable sailing to another island or entering worldmap, useful if you've set up a sea battle and don't want the player running away from it.
 
Another question, there are currently some weird animation issues with the following NPC. I can talk to her, and all, but the face looks disfigured and she seems to stretch across the whole room. Has anybody got a quick solution?
"lady04_ab" is a character model which I imported from GoF and which does not use the normal female animation. Add this to your character's definition, just below the 'ch.model' line:
Code:
ch.model.animation = "woman_ab_PoTC";

There are some other character models which have non-standard animations. If this happens again, look in "PROGRAM\Models\initModels.c", find the character model, and see if it includes a "model.ani" line. If so, you'll need to put a corresponding "ch.model.animation" line for the character using that model.
 
Ok, but there are two bugs in part 1. At least one of them is fixed with these files.
If you get stuck let me know and I'll try to help you continue.
 

Attachments

  • Storyline.7z
    330.3 KB · Views: 92
I'm being silly here: There's a party in the mansion and I couldn't resist to invite this one

party.png
 
Question over question, but I'm making progress. I promise. :yes

I have this here:

Code:
        case "Party_begins3":
            LAi_SetPlayerType(pchar)
            pchar.quest.Dont_leave.win_condition.l1 = "locator";
            pchar.quest.Dont_leave.win_condition.l1.location = "Wedding_Ballroom";
            pchar.quest.Dont_leave.win_condition.l1.locator_group = "reload";
            pchar.quest.Dont_leave.win_condition.l1.locator = "reload1";
            pchar.quest.Dont_leave.win_condition = "Dont_leave";
        break;

Dont_leave gets triggered when I get near the door reload1. How can I make it so Dont_leave only gets triggered when I try to open reload 1 (knock on the closed door)?
 
I don't have the code here right now, but as an addition:

I have the win conditions above and in the same case "Party_begins3" I now have a second set of win conditions numbered with l2, related to a box locator and leading to a different quest case. The current issues:

- Second quest case doesn't get triggered at the box locator.
- At least the first if not both should only get triggered when interacting with the locators (knocking on door, opening box).

Can anyone point me in the right direction?
 
If you have "l1" and "l2" conditions then both conditions must be met for the quest to trigger. (I once went up to "l5". It had to be night time, two separate soldiers had to be dead, you had to be in possession of a lockpick and you had to be standing by the right door.)

If you want a different quest case to trigger when you're standing by the box locator, you'll want a set of "l1" conditions for the door and another set of "l1" conditions for the box. But if you want something to happen when you open the box, as opposed to just standing next to it, you probably need help from @Jack Rackham as he's done a lot of things with boxes.
 
@BathtubPirate, see itemLogic.c from line 1054 how box actions can be done. Remember to end your location with a return;
to avoid the box being opened. There is more to it but I can help you with that later on.
 
Thanks, this seems quite complicated... Is this also necessary for quest locations?

Basically what I want to do right now is:

- Trigger a quest case when I knock on a specific closed door
- Trigger a quest case when I get near a specific box (I don't have to open it)

The latter currently doesn't even work with simple win conditions.

Later on in the quest there might be slightly more complicated things related to boxes, items and locators
 
Triggering a quest when you get near a box just involves doing what you've already done - trigger on "locator". It certainly should work, provided you're using a valid locator as the trigger. Can you upload your code?

I've no idea how to trigger something by knocking on the door, but as an alternative strategy, perhaps do this?
Code:
       case "Party_begins3":
           LAi_SetPlayerType(pchar)
           pchar.quest.Door_knock.win_condition.l1 = "locator";
           pchar.quest.Door_knock.win_condition.l1.location = "Wedding_Ballroom";
           pchar.quest.Door_knock.win_condition.l1.locator_group = "reload";
           pchar.quest.Door_knock.win_condition.l1.locator = "reload1";
           pchar.quest.Door_knock.win_condition = "Door_knock";
       break;

       case "Door_knock":
           PlaySound("INTERFACE\knock2.wav");
           LAi_QuestDelay("Dont_leave", 0.5);
       break;
The effect is that when you go to the door, you automatically get the sound of knocking on the door, then case "Dont_leave" triggers half a second later.
 
- Trigger a quest case when I knock on a specific closed door
I have only done it via box locators. So in this case I would:

1) make the standard reload locator very small.
2) have a box locator placed on the same spot. Small from start, large when it's time
for the knocking.
3) add the knocking events to itemlogic.c
4) when all this is through reset both reload and box locators to normal sizes.


- Trigger a quest case when I get near a specific box (I don't have to open it)

The latter currently doesn't even work with simple win conditions.
Sometime it can happen with "win.conditions" that they do not work properly.
It can depend on where in your code (which means when in time). Try to move the conditions
"earlier" if you see what I mean.
 
@Grey Roger 's solution also doesn't require to actively press spacebar.

But what happens is just: The main door is locked and when you check it, a character says you shouldn't leave. Makes things a bit more lively and once should be enough. The main problem is that it's the very same door the player spawns at the start of the scene. So if I just move the player to another reload door in the beginning, Roger's solution should work for my purposes.

@Jack Rackham 's solution would probably be more detailed, but I'd need to learn more about creating / changing locators and item logic and such things. I haven't worked with them before.

Which code do you want? Here is quest_reaction
 

Attachments

  • quests_reaction.zip
    5.3 KB · Views: 104
Yes, that's what I wanted to see. Looking at that, I can't see how case "Party_begins" is triggered but I'm guessing it's by dialog with Toni Haraldo. (It can be helpful to put comments on such lines, e.g. case "Party_begins": // Triggered by dialog with Toni Haraldo so that it's clear to anyone reading the code, including yourself in the future, how the quest progresses.)

So, "Party_begins" teleports you to "Wedding_Ballroom", locator "reload1", places a lot of characters in the room, and triggers "Party_begins2". You talk to yourself, presumably triggering "Party_begins3", which sets a trigger for "Dont_leave" by you being on "reload1", which probably activates at once because you've just teleported onto it. I'd be inclined to have "Party_begins3" instead set a trigger on a locator somewhere else in the room for, say, "Party_begins4", and have the trigger for "Dont_leave" there. That means you have to move away from the door to trigger "Party_begins4", and then move back to the door to trigger "Dont_leave".

"Dont_leave" is Puerta Velador coming to talk to you, presumably triggering "Puerta_returns", and that's where the trigger on locator "box1" is set.

Does Puerta Velador in fact talk to you when you play this? If so, what happens if you move to the box after the dialog finishes?

Try editing "PROGRAM\InternalSettings.h". Go to the bottom and set VISIBLE_LOCATORS to 1. Then play that scene and check that locator "box1" is where it's supposed to be.

And then, after you have either talked to Puerta Velador or given up on the dialog starting, have a look at "compile.log" - or upload it here. You should be able to find lines in there showing which quest cases have activated.
 
Yes, that's what I wanted to see. Looking at that, I can't see how case "Party_begins" is triggered but I'm guessing it's by dialog with Toni Haraldo. (It can be helpful to put comments on such lines, e.g. case "Party_begins": // Triggered by dialog with Toni Haraldo so that it's clear to anyone reading the code, including yourself in the future, how the quest progresses.)

So, "Party_begins" teleports you to "Wedding_Ballroom", locator "reload1", places a lot of characters in the room, and triggers "Party_begins2".
Yes that's all correct.

You talk to yourself, presumably triggering "Party_begins3", which sets a trigger for "Dont_leave" by you being on "reload1", which probably activates at once because you've just teleported onto it. I'd be inclined to have "Party_begins3" instead set a trigger on a locator somewhere else in the room for, say, "Party_begins4", and have the trigger for "Dont_leave" there. That means you have to move away from the door to trigger "Party_begins4", and then move back to the door to trigger "Dont_leave".
Yes, but as I said above, I bypassed that problem now by simply putting the player to a different reload-locator at the start, so it doesn't get triggered immediately. Your idea would be good too, but I leave it like that for the moment.

Does Puerta Velador in fact talk to you when you play this? If so, what happens if you move to the box after the dialog finishes?
He talks but nothing happens at the box.

Yes, box1 is there.

unitentified condition type seems to be the problem...
 

Attachments

  • compile.zip
    3.3 KB · Views: 104
Back
Top