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!
Quick links for Beyond New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
- Bug Tracker on Github
Quick links for Maelstrom
- Download the latest version of Maelstrom
- Download the latest version of ERAS II
- Download the latest version of New Horizons on Maelstrom
Quick links for PotC: New Horizons
- Download latest version
- Wiki
- FAQ
- Report bugs here
Thanks to YOUR votes, GOG.com now sells:
- Sea Dogs
- Sea Dogs: Caribbean Tales
- Sea Dogs: City of Abandoned Ships
Vote now to add Pirates of the Caribbean to the list!
Quick links for AoP2: Gentlemen of Fortune 2
- Downloads and info
- ModDB Profile
- Forums Archive
A Pirate Podcast with Interviews
Music, Comedy and all things Pirate!
- Episode Guide - About - Subscribe -
- Twitter - Facebook - iTunes - Android -
- Youtube - Fill the Coffers -
This is how all great mods start.Btw, this is right now the attempt to make a quest, but in the very early stage of playing around and testing what I can do. It may lead somewhere interesting, but right now it's just me playing around a bit.
It works if you have these 2 things at the start of the dialog.c file:Is d.text something that doesn't work at all? Because I must have copied that from somewhere...
ref NPChar, d;
makeref(d, Dialog);
ref d;
makeref(d, Dialog);
Actually, I may be wrong about this, too.The variable's name could be anything you like (e.g. "dg").
string Bob;
Bob = "Bob Snider";
int MyNum;
MyNum = 1;
True for the original game.Okay, I see what's wrong:
This needs to be:
Code:#include "DIALOGS\Ramon Cabrera_dialog.h"
That function reads the PChar.quests.(yourname) attribute.Now, if I want to add a question for the tavern keeper at this point myself, I don't understand exactly how to work with that CheckQuestAttribute.
pchar.quest.ANIMISTS = "to_muelle_for_rumors";
if (CheckQuestAttribute("ANIMISTS", "to_muelle_for_rumors"))
pchar.quest.ANIMISTS = "to_greenford";
pchar.quest.ANIMISTS = "to_greenford_2";
That function reads the PChar.quests.(yourname) attribute.
It's independent from the quest case names in the reaction file.
Okay, thanks, I got it!So you change the status of ANIMISTS (in this case) along the way.
In actual C programming, you would need to pre-define/declare the variables that hold your data inside the "quest" object, but the Storm Engine's interpreter is more lenient. You can declare/create any new variable for the object simply by setting it:Seems like the "quest title" like ANIMISTS is more a placeholder and can be set however I want. It works anyway...
PChar.Quest.mysetting = "myvalue";
case "told_about_alonso":
RemovePassenger(Pchar, characterFromID("Ramon Cabrera"));
RemoveOfficersIndex(pchar, GetCharacterIndex("Ramon Cabrera"));
ChangeCharacterAddressGroup(characterFromID("Ramon Cabrera"), "Muelle04_HouseInsideR6", "goto", "goto3");
LAi_SetStayType(characterFromID("Ramon Cabrera"));
Characters[GetCharacterIndex("Baltasar Alonso")].Dialog.CurrentNode = "houseb_1";
Pchar.quest.To_Baltasar_Housetalk.win_condition.l1 = "location";
Pchar.quest.To_Baltasar_Housetalk.win_condition.l1.location = "Muelle04_HouseInsideR6";
Pchar.quest.To_Baltasar_Housetalk.win_condition = "Baltasar_Housetalk";
break;
case "Baltasar_Housetalk":
LAi_SetActorType(Pchar);
LAi_SetActorType(characterFromID("Baltasar Alonso"));
LAi_ActorFollow(pchar, characterFromID("Baltasar Alonso"), "Baltasar_Housetalk_2", 1.0);
//LAi_ActorFollow(characterFromID("Baltasar Alonso"), pchar, "Baltasar_Housetalk_2", 1.0);
break;
case "Baltasar_Housetalk_2":
LAi_ActorWaitDialog(Pchar, characterFromID("Baltasar Alonso"));
LAi_ActorDialog(characterFromID("Baltasar Alonso"), Pchar, "", 5.0, 0);
break;
case "Baltasar_Housetalk":
Logit("Baltasar_Housetalk");
LAi_SetActorType(Pchar);
LAi_SetActorType(characterFromID("Baltasar Alonso"));
LAi_ActorFollow(pchar, characterFromID("Baltasar Alonso"), "Baltasar_Housetalk_2", 1.0);
//LAi_ActorFollow(characterFromID("Baltasar Alonso"), pchar, "Baltasar_Housetalk_2", 1.0);
break;
Pchar.quest.To_Baltasar_Housetalk.win_condition.l1 = "location";
Pchar.quest.To_Baltasar_Housetalk.win_condition.l1.location = "Muelle04_HouseInsideR6";
Pchar.quest.To_Baltasar_Housetalk.win_condition = "Baltasar_Housetalk";
LAi_ActorFollow(pchar, characterFromID("Baltasar Alonso"), "Baltasar_Housetalk_2", 1.0);
LAi_ActorFollow(characterFromID("Baltasar Alonso"), pchar, "Baltasar_Housetalk_2", 1.0);
PlaySound("OBJECTS\VOICES\DEAD\male\dead1.wav");
I'll try that tomorrow! I was already noticing that timeout is different, in some cases it's 2.0, then it's 1.0...I wonder about the 1.0 sec in LAi_ActorFollow. Found the function and it's a timeout. Maybe it's just too short?
Make it 5.0 and see...
Any valid reason why you're forcing the player to automatically walk to this NPC, and not just letting them walk to the NPC on their own?
If that's the case, why not also look into how this was handled in the stock game before? The scripts are there and accessible. If you remember which NPC or event these cutscenes took place in, you can find the relevant scripts for them, and see how moving the player character was handled (among many other useful things you will likely pick up).In stock PotC that tactic was used many times. Not quite sure about the newly modded storyline (JRH didn't use it in his two like he said), but in the standard it was used often and I'm rather sure it does use SetActor on the player and not the NPC copy thing...
That worked… I also played around with the numbers but the result hasn't changed significantly.It should give a "oh oh" sound.
Of course, but I can't blame the game that it still doesn't work. Those cases may have different distances and often let both characters walk towards each other etc. For this case I'd just like the have the short autowalk to initiate the dialogue. Anyway I let it be for the moment and continue without it. But I still hope there's solution (actually there must be).If that's the case, why not also look into how this was handled in the stock game before?
One thing that comes to mind that may not be so obvious at first is that the game's maps/levels have waypoints for where NPCs can walk. If there is no waypoint between the player and the NPC you're directing them to walk to (or beyond) in the currently situated area, they may not walk at all.Of course, but I can't blame the game that it still doesn't work. Those cases may have different distances and often let both characters walk towards each other etc. For this case I'd just like the have the short autowalk to initiate the dialogue. Anyway I let it be for the moment and continue without it. But I still hope there's solution (actually there must be).