xJustAdam Posted April 5, 2019 Share Posted April 5, 2019 (edited) Title. I'm currently working on my very first custom companion, and I've done pretty well off written and Youtube tutorials thus far. I've worked out the scripting, dialogue and even made a small quest for them, which I consider an achievement considering I've never made a proper mod before in my life. However, I'm now stumped at how to implement location-specific ambient lines for my companion. Cass in the vanilla game has many lines specific to several locations, I've examined the quest for this and the script and I still can't work my head around it. I've also tried looking at other modded companions on the Nexus that have achieved this - but still no luck figuring it out. Any pointers would be massively appreciated. I'm so close to having this mod exactly the way I want it. One last hurdle. TL;DR, how to implement ambient dialogue for companions at specific locations/worldspaces. Edited April 5, 2019 by TheL0neW0nder Link to comment Share on other sites More sharing options...
Radioactivelad Posted April 5, 2019 Share Posted April 5, 2019 (edited) There's a couple ways to do it: You could use a Primitive Activator with a Ontriggerenter script that tells your companion to Say a dialogue topic once you or they pass through it. Since it requires passing through the trigger these are best reserved for set-piece moments or when you otherwise can guarantee the player will hit it.You can also call a Say on the companion with any result script, such as when a Quest stage is Set. You can use HELLO Topic dialogues in the conversation tab. (HELLO dialogues are the things NPCs will say as you walk by them)Using conditions you can create both general and specific HELLOs. Edited April 5, 2019 by Radioactivelad Link to comment Share on other sites More sharing options...
dubiousintent Posted April 5, 2019 Share Posted April 5, 2019 Also, see 'Tip Random NPC Comments' under the "Dialogue and Lipsynch" section of the wiki "Getting started creating mods using GECK" article. -Dubious- Link to comment Share on other sites More sharing options...
Mktavish Posted April 6, 2019 Share Posted April 6, 2019 If you have specific locations , and you want to say specific dialogue.Then go to those locations in geck , and place an X marker , name it "MySpecificMarker"Then where you have this specific dialogue (some quest)Put a condition on it of "GetDistance : to >> MySpecificMarker <= 5000 ; (ingame units for example)And you run it on the subject or reference ... that actors ref-ID . Hope that helps Link to comment Share on other sites More sharing options...
Budong Posted August 21, 2019 Share Posted August 21, 2019 (edited) I added Mass Effect style banter a different way... ;) My NPC is running this script... which basically waits and does nothing until a random amount of time has passed and then forces the NPC to say something to the player... float m_banterTimerfloat m_banterThreshold BEGIN GameMode if m_banterTimer < m_banterThreshold set m_banterTimer to m_banterTimer + GetSecondsPassed else set m_banterTimer to 0 set m_banterThreshold to GetRandomPercent*4 SayTo player LocationBanter; endif; banterTimerEND ... and then I put all my banter dialog into the topic called LocationBanter... The location-specific responses all have a condition using the GetInCell function to tie them to specific places and are at the top of the topic's stack so they evaluate first but only trigger when you're at a specific location; they're also flagged with "once per day" so you don't get spammed by them. The bonus to this method is that I can have generic non-location-specific dialog at the BOTTOM of the topic's stack, so if I'm NOT at a landmark, my NPC still makes amusing observations every now and again. :) (Plus I'm not dropping new objects in cells all over the game, it's just the script and the dialog... Nice and tidy, easy to manage.) Edited August 21, 2019 by Budong Link to comment Share on other sites More sharing options...
dubiousintent Posted August 21, 2019 Share Posted August 21, 2019 Nice. Added to the same Tip. -Dubious- Link to comment Share on other sites More sharing options...
FiftyTifty Posted August 23, 2019 Share Posted August 23, 2019 Having a timer run in the background like that is a horrible idea, the scripting system is not designed for that as it has woeful performance. It's much better to go with Mktavish's suggestion. Link to comment Share on other sites More sharing options...
Budong Posted August 24, 2019 Share Posted August 24, 2019 :) I've been testing an NPC follower with this script/dialog setup for almost a year now and it's had absolutely zero impact on game performance. Hasn't affected stability either. Not surprising really... it's a decade-old game running on 2019 hardware and my script does almost nothing. You should look at something like NVDLC01GhostSCRIPT that Obsidian created for Dead Money... it assigns many more values and does shed-loads more function-calls while in GameMode... and it didn't impact performance, not even on gaming rigs from 2010. :p Take forum wisdom with a grain of salt... a lot of stuff that people "know" just gets read and repeated until it becomes "the truth"... and then nobody really tries anything new anymore because they just do whatever the previous guy did. Mod, test, verify... then you'll know first-hand if something works or not. Link to comment Share on other sites More sharing options...
FiftyTifty Posted August 24, 2019 Share Posted August 24, 2019 It's a terrible scripting system with terrible performance that runs every GameMode script every frame. You absolutely should not have a constant loop running every frame. Link to comment Share on other sites More sharing options...
madmongo Posted August 24, 2019 Share Posted August 24, 2019 While you have a point about running things in GameMode every frame, we're also not running FNV on 2009 era computers. Budong's method has an advantage with mod compatibility since it does not modify existing locations in-game. The disadvantage is a script running inefficiently in the background. Sure, it wastes a few clock cycles, but a modern PC can waste a lot of clock cycles on inefficient scripts and you'll never notice any lag or other issues with the game. Running in GameMode is something that you generally want to avoid, but if you have a valid reason for setting up your script that way, it's not that terrible. Link to comment Share on other sites More sharing options...
Recommended Posts