Reginald001 Posted March 7, 2018 Share Posted March 7, 2018 (edited) (SOLVED > See page 2) So I have been experimenting with my own custom companion interjections and I'd like to know if I'm on the right route...What I want to do is to have my custom companion (for the Fallout 4 lore project) make remarks to the player after certain quest stages (of other quests) are finished. So I started with making a custom quest called 'DARRYL - Interjections'.I set it to 'start on run' and I created a setstage script (which compiles and seems to function) in the 'companion recruited' phase of my companion. So I think the 'interjections' quest is firing. My idea was to have dialog in there, which will be fired when a certain stage of ANY quest is finished.The main reason for this is that I don't want to start hacking into quest dialog of vanilla quests, which can cause all kinds of compatibility issues and bugs. My idea is that if my interjections quest is separate, it won't interfere with other quests, or the main vanilla game. For instance:When the MIN00 quest, stage 25 = 'Player entered the museum of history' stage is completed, and the custom companion is within the interjection distance, I want them to say their thing. (In this case speak about the history of the museum). In my custom quest, I added a scene, with 1 phase, with my NPC. I'm adding conditions to the dialog, but it's not firing. Conditions:Isinterior: NONE = 1GetStageDone: Quest:'Min00', 25 - etc..(S) GetIsID = Actor:DARRYL I think that my quest is starting up, none of the conditions are met and the dialog stops, so that's why the dialog is never fired. What can I do to make it fire the dialog in phase one? I'm thinking I need to reset the quest after any stage of any quest is completed, is there a global way of doing this?I think I need a peace of script, which (re) fires the dialog phase whenever any quest stage is increased. Or.. am I completely on the wrong track? (Also a possibility)... the end idea is to simply have my custom companion tell stuff to the player, whenever any stage of any quest is met, without hacking into existing quest lines. (edit) I got a little further, I think I need to set the quest type to 'scripted event', then make a custom script which will initiate my dialogue quest whenever the player advances in quest stages. But I have no clue which events to hook into, or if that is even the right approach. Edited March 11, 2018 by Reginald001 Link to comment Share on other sites More sharing options...
kitcat81 Posted March 7, 2018 Share Posted March 7, 2018 You can type COM in the CK and you will see a number of quest like this : COMNick, CONickTalk, ComStrong etc . These quests handle most unique companion dialoguesYou can check how it handles dialogues and try to make something similar. These quests work together with different scripts and fragments including the follower quest and companion script. So it's all a bit complicated to figure out and can take some time. Scenes do not automatically play on quest start unless you check the box to play on quest start..But in this case it won't fire unless all conditiones are met when your quest starts. Another way is to register your script for some events (can be events from another quest) and start your scenes by the script - MySceneX.Start() Link to comment Share on other sites More sharing options...
Reginald001 Posted March 7, 2018 Author Share Posted March 7, 2018 You can type COM in the CK and you will see a number of quest like this : COMNick, CONickTalk, ComStrong etc . These quests handle most unique companion dialoguesYou can check how it handles dialogues and try to make something similar. These quests work together with different scripts and fragments including the follower quest and companion script. So it's all a bit complicated to figure out and can take some time. Scenes do not automatically play on quest start unless you check the box to play on quest start..But in this case it won't fire unless all conditiones are met when your quest starts. Another way is to register your script for some events (can be events from another quest) and start your scenes by the script - MySceneX.Start() Yes, thanks! I think I should have clarified. DARRYL is already into the regular companion framework, using the idles, remarks and even the interjections that companions use in dialogue. The effect I'm trying to reach is to have a 'listener' quest running, which fires dialogue from my custom NPC, depending on a stage set in any other quest. Link to comment Share on other sites More sharing options...
kitcat81 Posted March 7, 2018 Share Posted March 7, 2018 I undrstand now..Then if the quest you want to listen is a vanilla quest, you can register for remote stage events from the quest and depending on the events set your own stages and start your scenes. Link to comment Share on other sites More sharing options...
SKKmods Posted March 7, 2018 Share Posted March 7, 2018 (edited) For super granular control [edit: of individual lines] and remote triggers beyond the standard dialogue conditions, you can script .Say() for Topics on your companion quest; If Alias_Companion.GetReference() == pCompanionKelloggREF (pCompanionKelloggREF as Actor).Say(pMQ204Stage10EvilIronyTopic) ;equiv. FollowersScript.FlagCompanionChatEvent(COMQC_MQ204Virgil) EndIf Edited March 7, 2018 by SKK50 Link to comment Share on other sites More sharing options...
Reginald001 Posted March 7, 2018 Author Share Posted March 7, 2018 (edited) Hey guys... sorry for being such a noob, and thanks for the help so far!... but that looks like exactly what I'm asking. :smile: Where do I hook into (which) event(s)... Do I do that on quest level, quest object level, topic level, stage level.. etc..?And which event can I hook into? Is there a generic event that fires each time any stage is increased, or do I need to hook into each and every single quest I want my follower to comment on? Right now I have 1 dialogue action, it has 4 topics, each one has 1 condition depending on the stage of the MIN00 quest.Is there a script event I can use to 'start' this dialogue? (I know how to start the quest at the specific stage, I just don't know if there's an event I can hook into, and where and which event that might be). Edited March 7, 2018 by Reginald001 Link to comment Share on other sites More sharing options...
kitcat81 Posted March 7, 2018 Share Posted March 7, 2018 (edited) You can register for stage set from different quests. Something like this : Event OnQuestInit() StartTimer(5) EndEvent Event OnTimer(int aiTamerID) RegisterForRemoteEvent(QuestNameA, "OnStageSet") RegisterForRemoteEvent(QuestNameB, "OnStageSet") EndEvent Event Quest.OnStageSet(Quest akSender, Int auiStageID, Int auiItemID) If(akSender == QuestNameA && auiStageID == X) ; replace X with stage id ;do my thing (start scene, say topic etc) ElseIf (akSender == QuestNameB && auiStageID == Y) ; replace Y with stage id ;do another thing EndIf EndEvent Edited March 7, 2018 by kitcat81 Link to comment Share on other sites More sharing options...
Reginald001 Posted March 7, 2018 Author Share Posted March 7, 2018 You can register for stage set from different quests. Something like this : Event OnQuestInit() StartTimer(5) EndEvent Event OnTimer(int aiTamerID) RegisterForRemoteEvent(QuestNameA, "OnStageSet") RegisterForRemoteEvent(QuestNameB, "OnStageSet") EndEvent Event Quest.OnStageSet(Quest akSender, Int auiStageID, Int auiItemID) If(akSender == QuestNameA && auiStageID == X) ; replace X with stage id ;do my thing (start scene, say topic etc) ElseIf (akSender == QuestNameB && auiStageID == Y) ; replace Y with stage id ;do another thing EndIf EndEvent Yes I get it now, the penny drops. I put parts of this script in the Quest script (under script tab) and my first custom event now fired.Thanks a lot! Link to comment Share on other sites More sharing options...
kitcat81 Posted March 7, 2018 Share Posted March 7, 2018 Good to know it helped! :) Link to comment Share on other sites More sharing options...
llamaRCA Posted March 8, 2018 Share Posted March 8, 2018 I've done this for Heather and for the most part it worked out very well. Be aware that you may need to do some tinkering with your script as you test the dialogue. It won't always play when you want it to, etc and you may need to add timers to delay a line or move it to another quest stage. I'd suggest you add some debug stuff to the script so you get either a notification during gameplay or a note in the log that tells you the parrticular dialogue line has played like it should. There are times when things won't happen as you expect them to even if the script is doing what it should (line should have played but someone else talked over it, etc). It can take a lot of time to get this type of commenting running smoothly. Link to comment Share on other sites More sharing options...
Recommended Posts