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

Various tech support stuff

1677777605451.png

Ladies and gentlemen, we got him!

Of course, he doesn't say anything, and I'd really much like to have him given the same dialog as any of the other soldiers, I'll get right to work on that though, as one of you DID suggest I copy it from someone else

Also, he's facing the wrong way, though I guess he's probably eyeing down that door in hopes of getting some sleep

Rex, check! Sounds, check! Dialog, works! Now to look into writing the ENTIRE dialog and conversation, and the file itself

Fixed
 
Last edited:

Ladies and gentlemen, we got him!

Of course, he doesn't say anything, and I'd really much like to have him given the same dialog as any of the other soldiers, I'll get right to work on that though, as one of you DID suggest I copy it from someone else

Also, he's facing the wrong way, though I guess he's probably eyeing down that door in hopes of getting some sleep

Rex, check! Sounds, check! Dialog, works! Now to look into writing the ENTIRE dialog and conversation, and the file itself

Fixed
Progress!!! *BENDY SCENE!*

Temporarily moved to Oxbay tavern because I'm sick of the cutscene at the beginning with no way to skip it

More progress!
 
Last edited:
In light of this most recent progress update, how do I script the teleporting of the two characters outside to a place and immediately engage in dialog?
Teleporting a non-player character:
Code:
ChangeCharacterAddressGroup(characterFromID("Valentin Massoni"), "Oxbay_tavern", "Sit", "Sit5");
Part of the main storyline code, this line puts Valentin Massoni into the tavern so you can meet him and get him to go into the jungle. Replace "Valentin Massoni" with your character's ID, replace "Oxbay_tavern" with "Oxbay_town", replace "Sit" and "Sit5" with the names of the locator group and individual locator where you want him to appear.

Teleporting the player:
Code:
DoQuestReloadToLocation("Greenford_tavern", "Goto", "goto17", "Story_ReturnedToGreenfordTavern");
You've taken Ewan Glover and his soldiers to Gray Rock Bay, fought a battle, and are about to tell Ewan that you have something else to do. Replace "Greenford_tavern" with "Oxbay_town", replace "Goto" and "goto17" with the names of the locator group and individual locator where you want the player to appear, replace "Story_ReturnedToGreenfordTavern" with the name of a new quest case to be run when you're both in place.

Immediate dialog:
Code:
            LAi_SetActorType(CharacterFromID("Insert_Character_ID_Here"));
            Characters[GetCharacterIndex("Insert_Character_ID_Here")].dialog.CurrentNode = "Some_Dialog";
            LAi_ActorDialog(characterFromID("Insert_Character_ID_Here"), PChar, "", 5.0, 5.0);]/code]Replace "Insert_Character_ID_Here" with your character's ID, replace "Some_Dialog" with the dialog case for what he's about to say.  This lot will go into that new quest case which is triggered by the "DoQuestReloadToLocation" line.
 
Teleporting a non-player character:
Code:
ChangeCharacterAddressGroup(characterFromID("Valentin Massoni"), "Oxbay_tavern", "Sit", "Sit5");
Part of the main storyline code, this line puts Valentin Massoni into the tavern so you can meet him and get him to go into the jungle. Replace "Valentin Massoni" with your character's ID, replace "Oxbay_tavern" with "Oxbay_town", replace "Sit" and "Sit5" with the names of the locator group and individual locator where you want him to appear.

Teleporting the player:
Code:
DoQuestReloadToLocation("Greenford_tavern", "Goto", "goto17", "Story_ReturnedToGreenfordTavern");
You've taken Ewan Glover and his soldiers to Gray Rock Bay, fought a battle, and are about to tell Ewan that you have something else to do. Replace "Greenford_tavern" with "Oxbay_town", replace "Goto" and "goto17" with the names of the locator group and individual locator where you want the player to appear, replace "Story_ReturnedToGreenfordTavern" with the name of a new quest case to be run when you're both in place.

Immediate dialog:
Code:
            LAi_SetActorType(CharacterFromID("Insert_Character_ID_Here"));
            Characters[GetCharacterIndex("Insert_Character_ID_Here")].dialog.CurrentNode = "Some_Dialog";
            LAi_ActorDialog(characterFromID("Insert_Character_ID_Here"), PChar, "", 5.0, 5.0);]/code]Replace "Insert_Character_ID_Here" with your character's ID, replace "Some_Dialog" with the dialog case for what he's about to say.  This lot will go into that new quest case which is triggered by the "DoQuestReloadToLocation" line.
Okay? So where would I put these? Do these also go into the dialog.c file? I'm taking a break for the time being, I wanted to share my progress and see what you guys thought, but my motivation plummeted pretty hard... I'll hopefully pick this back up tomorrow

(Unless the links to the videos don't work...)
 
Okay? So where would I put these? Do these also go into the dialog.c file?
No, quest code such as that would go into either "PROGRAM\QUESTS\quests_reaction.c" or "both_reaction.c".

Another thing you could try is to put this into "dialog.c":
Code:
AddDialogExitQuest("rex_prepare_to_leave");
That would probably go somewhere in the same dialog case as 'link.l1.go = "exit";' because that line will trigger quest case "prepare_to_leave" when the dialog ends.

Then, in whichever of "quests_reaction.c" or "both_reaction.c" you are using for quest code:
Code:
case "rex_prepare_to_leave":
    PChar.quest.rex_in_town.win_condition.l1 = "location";
    PChar.quest.rex_in_town.win_condition.l1.character = PChar.id;
    PChar.quest.rex_in_town.win_condition.l1.location = "Oxbay_town";
    PChar.quest.rex_in_town.win_condition = "rex_in_town";
break;

case "rex_in_town":
    ChangeCharacterAddressGroup(CharacterFromID("Rex Hathaway"), "Oxbay_town", "goto", "goto1");
    Characters[GetCharacterIndex("Rex Hathaway")].dialog.CurrentNode = "Some_Dialog";
    LAi_SetStayType(CharacterFromID("Rex Hathaway"));
break;
Replace "Some_Dialog" with the name of a new dialog case in his "dialog.c" file.

So, talking to Rex in the tavern will end by triggering "rex_prepare_to_leave". This sets up a further trigger; when you leave the tavern and return to Oxbay town centre, you trigger "rex_in_town" which puts Rex on locator "goto1", waiting for you to talk to him again. You can choose a different locator if you want him standing somewhere else, such as near the tavern door or behind the tavern.

I'm taking a break for the time being, I wanted to share my progress and see what you guys thought, but my motivation plummeted pretty hard..
The video shows that you're making progress with dialog. :onya Some of it seems to be just place-holders at the moment but at least it's working.
 
No, quest code such as that would go into either "PROGRAM\QUESTS\quests_reaction.c" or "both_reaction.c".

Another thing you could try is to put this into "dialog.c":
Code:
AddDialogExitQuest("rex_prepare_to_leave");
That would probably go somewhere in the same dialog case as 'link.l1.go = "exit";' because that line will trigger quest case "prepare_to_leave" when the dialog ends.

Then, in whichever of "quests_reaction.c" or "both_reaction.c" you are using for quest code:
Code:
case "rex_prepare_to_leave":
    PChar.quest.rex_in_town.win_condition.l1 = "location";
    PChar.quest.rex_in_town.win_condition.l1.character = PChar.id;
    PChar.quest.rex_in_town.win_condition.l1.location = "Oxbay_town";
    PChar.quest.rex_in_town.win_condition = "rex_in_town";
break;

case "rex_in_town":
    ChangeCharacterAddressGroup(CharacterFromID("Rex Hathaway"), "Oxbay_town", "goto", "goto1");
    Characters[GetCharacterIndex("Rex Hathaway")].dialog.CurrentNode = "Some_Dialog";
    LAi_SetStayType(CharacterFromID("Rex Hathaway"));
break;
Replace "Some_Dialog" with the name of a new dialog case in his "dialog.c" file.

So, talking to Rex in the tavern will end by triggering "rex_prepare_to_leave". This sets up a further trigger; when you leave the tavern and return to Oxbay town centre, you trigger "rex_in_town" which puts Rex on locator "goto1", waiting for you to talk to him again. You can choose a different locator if you want him standing somewhere else, such as near the tavern door or behind the tavern.


The video shows that you're making progress with dialog. :onya Some of it seems to be just place-holders at the moment but at least it's working.
He's just in Oxbay for the time being because I got sick of the cutscene when you leave Oxbay, you can't even skip it, so I figured it was gonna take too long, But yeah, thanks for the tips, I'll be back at it probably later today, the sergal can't code without a full tank of fuel, and his coding drink! (Expect a PFP to be available for me)
 
You could put Rex in Redmond. If he's set to be in Redmond tavern in his definition then that's where he'll be waiting for you. Start the game, leave Oxbay, sail to Redmond, then save game. You can then load that saved game whenever you want to test something new with Rex. You will, of course, then need to change all the Oxbay locations in the quest code to Redmond locations!
 
You could put Rex in Redmond. If he's set to be in Redmond tavern in his definition then that's where he'll be waiting for you. Start the game, leave Oxbay, sail to Redmond, then save game. You can then load that saved game whenever you want to test something new with Rex. You will, of course, then need to change all the Oxbay locations in the quest code to Redmond locations!
Every change made to even his dialog requires me to start a new game, doesn't it?
 
No, changes to dialogs should not require a new game. Changes to the character definition will need a new game because character definitions are read at the start of the game, but dialog files are read when you talk to the character. Changing Rex to start in Redmond will need a new game; changing what he says in his dialog will not.

Changes to "quests_reaction.c" or "both_reaction.c" should also not need a new game. You should save game frequently, though, so that you can go back a bit without having to start a new game. In particular, save game just before you are about to talk to Rex. Or, if you have written quest code that will happen in a particular place, save game just before you go to that place.
 
The easiest way to see which items are in the game might be to look in RESOURCE\INI\TEXTS\ENGLISH\ItemsDescribe.txt. There you'll see all the items and their IDs, such as the "Saber" having the ID "blade1". Then in PROGRAM\ITEMS\initItems.c you can search by ID and find the stats for the items.
I don't know what the color and time does, since I haven't seen a difference from changing them.
I'm now thinking to ask... where would I go to modify the starting items container?

Oh yes, I also need to ask, how do I change the sword that's placed down on the tutorial deck...?
 
Last edited:
Can you upload your version of "PROGRAM\QUESTS\both_reaction.c"? I may be able to find the line in there which places one or other of those items.
 
Did you find where the sword is placed on the deck? I don't see that, but items appear to be placed in the chest in case "Tut_start":
Code:
            locations[FindLocation(Pchar.location)].box1.items.pistol1 = 1;
            locations[FindLocation(Pchar.location)].box1.items.spyglass1 = 1;
            locations[FindLocation(Pchar.location)].box1.items.potion1 = 2;
            locations[FindLocation(Pchar.location)].box1.money = 1000;
Look in "PROGRAM\ITEMS\initItems.c" for the ID's of other items you could put in there.
 
Did you find where the sword is placed on the deck? I don't see that, but items appear to be placed in the chest in case "Tut_start":
Code:
            locations[FindLocation(Pchar.location)].box1.items.pistol1 = 1;
            locations[FindLocation(Pchar.location)].box1.items.spyglass1 = 1;
            locations[FindLocation(Pchar.location)].box1.items.potion1 = 2;
            locations[FindLocation(Pchar.location)].box1.money = 1000;
Look in "PROGRAM\ITEMS\initItems.c" for the ID's of other items you could put in there.
It's in the same file, I even searched "blade1" in Sublime, I think I found it! Only one way to be sure...

I haven't found it in the same file, but I'm going to search and search and search... though I could do with some help though
 
Last edited:
SITREP: After a very long hiatus, nothing has changed so far, except for most likely ONE thing on my computer; and that's my graphics card. I now have an AMD Radeon RX 580, and I have no idea how to limit the framerate on the game so it can run halfway decent, and I've not yet changed Rex's placement, and I may have messed up on using Sublime Text to where the files are not readily accessible, I'll be looking through the posts here to see what to do as far as getting my goal of having him in my group is concerned... Providing I can maintain motivation to do so

Hope everyone's doing okay so far
 
Back
Top