Jump to content

[Question] NPC package-related


Recommended Posts

Trying to work through some mechanics and had a question. Let’s say I have a persistent NPC in my settlement. Said NPC will have a package on them that will be conditioned to only execute on a certain day and at a specific time of the day, otherwise they will just mill about the settlement. The package is a simple travel package which sends the NPC to a specified marker. I’d prefer the NPC walk there vice teleport so I will need to sort that out.

 

Once the NPC reaches the marker, I’d like to kick-off a dialogue-related, repeatable quest. The dialogue-related quest with have multiple scenes, and I intend to use a script to randomize which scene gets played. The question is: should I put the script on the AI package or on a trigger box created around the marker. As an alternative I could create a furniture object and load the NPC into the furniture (travel/sit package). The later may be a better option as it would serve to hold the NPC there until they have completed their dialogue lines. In that case, I suppose the script would go onto the furniture and the script would be event driven (e.g., onsit).

 

Thoughts?

Link to comment
Share on other sites

Key question: are you 101% certain that the NPC will be in the 3d loaded area around the player when they reach the start quest trigger area ?

 

BECAUSE some events dont fire when even persistent actors and objects are unloaded e.g. OnTriggerEnter but others (mostly) do e.g. OnDistanceLessThan.

Link to comment
Share on other sites

While suffice it to say that with my current skill level, being 100% certain with anything game related would be a stretch. But your prompt got me thinking about potentialities and negative consequences. In the concept I outlined I could see the NPC kicking of a quest (or trying to) even if the player wasn't there. Can't imagine that would be good. Perhaps I need to rethink my strategy, and have the player summon said NPC vice the NPC trying to do something on a specific day and time when there is no guarantee the player would even there. Maybe setting up an activator which the player would use to summon the NPC would be a better alternative.

Link to comment
Share on other sites

That's nice, Package would be most natural, i'd say, though maybe not as reliable as scripted manipulation. Never had such need yet but, supposedly, Travel procedure/package ending script should fire for a persistent Actor, since they actually do advance on map in background, i.e. keep executing packages.

Probably, it's pointless to run a scene while player is away, just check for HasLoaded3d or proximity and throw a limited time objective if not.

Link to comment
Share on other sites

Originally, I had envisioned using this method on an NPC who serves as the settlement’s pastor. In this concept, the pastor would have travelled to the church on a given date (e.g., Sunday) and time (e.g., 1000) and delivered his sermon. I think building an activator in the form of a “small control panel” that would fit atop the church lectern might be a better solution. The activator could be used to accomplish several things like a) summon the congregation to the church (e.g. ring the church bells); b) request a word from the Lord (e.g., call the pastor to the lectern to give a sermon); c) lighting controls (e.g., animate a wooden cross to glow during the sermon); and door controls (e.g., close the church doors when the sermon begins. Conceptually, quests and scripts could sync it all up. The dialogue quest for the pastor could have multiple scenes to allow for the randomization of multiple succinct sermons. I need to whiteboard this concept and think through the steps required for implementation. I need to gain more experience with the questing system and scripting so this little project would likely further those goals.


As for summoning the settlers, I believe Niston incorporated something similar with his work on the Concord Restoration Project.
Link to comment
Share on other sites

Looking at the story manager and the scripts now trying to decipher how it all works. The AV WorkshopBellDistance has me a bit puzzled, so I am looking those the workshopshop and npc related scripts to see where it might be defined. Didn't see no mention of it on the wiki.

Link to comment
Share on other sites

Toyed around with it last night. Made a quick makeshift control panel to sit atop the lectern. Made a little quest to have some choices, similar to what you did. Set up a new story manager node and quest. Replaced the travel package with travel and sit packages. Used the script fragment from the workshopbell and was able to successfully call the settlers to the church and they all found seats. Haven't done anything fancy like culling out robots should they be in the npc mix, but I thought your implementation made perfect sense.

 

Will need to make a proper sound node (church bells) and play that whist the npcs are traveling and sitting. Also, need to devise a way to know with the last settler has taken a seat. Made version 1.0 of an animated cross (basically a wooden cross that slowly lights up) ; needs a bit more tweaking. Haven't decided whether to request a word from the Lord via the control panel or place a Bible on top of the makeshift control panel, and use it as the activator. Thinking of making the lectern into a furniture object and find a suitable animation for the preacher. Call the pastor, load him into the animation, create a random number via script, and have him speak a sermon via a dialog quest. Kicking around the idea of holographic choir members (4) to close the pastor's sermon with a little hymn. Lots of possibilities. Never used the story manager before but concluded that it is a power tool for the toolbox.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...