chajapa Posted April 18, 2018 Posted April 18, 2018 This is for my follower, Elsie LaVache. Elsie's sandbox AI does allow RandomConversations. I'm trying to get her to be greeted by NPCs (like normal NPCs talk to each other ocasionally) I made a dialogue quest, set it to start on Actor Dialogue Event, created the Actor1 and Actor2 aliases, created a scene to handle a brief conversation. Conditions for the Aliases (shortened) subject is (GetIsID) Elsie OR subject is (GetIsSex) male Spoiler Theoretically on an ActorDialogueEvent the 2 aliases should fill The documentation I have says Actor1 is the actor initiating the conversation and Actor2 is the one being spoken to. So regardless of who initiates this should fill both Aliases if EITHER Elsie fires an ActorHelloEvent with a male NPC or a male NPC fires an ActorHelloEvent with Elsie . Scene is set to Start on quest start and End on quest end Scene is set up to use the Actor1 and Actor2 aliases Following a tutorial.... this should fire if an Actor Hello Event occurs between Elsie and any male NPC and starts looking for an ActorDialogueEvent. The tutorial uses 2 specific actors. Is that where I'm going wrong? Does this really only work with 2 specific actors? In trying to make her a bit more interactive, I'd hate to think I have to make separate quests for each specific NPC I'd like her to interact with. I looked at another follower (Ambriel) and I see she has a specific quest to talk to the follower Recorder. Any thoughts on this to get me going in the right direction? OK, I solved this and got it working. Within my Elsie Lavache follower mod, I created another quest called ELV_Dialogue_1 The name doesn't matter. You just need to create a quest. Quest type is NONE, priority 30, NOT start game enabled, NOT run once From the dropdown the start type is Start on Event and the event is an Actor Dialogue Event You need 2 quest aliases: Actor1 and Actor2. Fill type is Find Matching Reference and then choose to fill from Event (the Actor Dialogue Event) DO NOT mark the aliases as optional. You WANT this quest to fail to start if the aliases aren't filled. Conditions for each alias must be run against Event Data (instead of Subject or Target or.....) and then choose the Actor (Actor 1 or Actor 2 depending on which alias you're configuring) Make a SCENE for the interaction. The Actors will be Actor1 and Actor2 (big surprise there, right?) The scene needs to have the tick boxes checked for "Start on Quest Start" and "Stop Quest on Finish" - this makes the scene start as soon as the quest starts and makes the quest stop when the scene finishes Any conditions within the scene's dialogue for the actors should be run against Event Data with the correct Actor selected (Actor 1 or Actor 2) So now you have a scene for the interaction you want in a quest that needs to start on an Actor Dialogue Event So now you go to the Story Manager (under Character in CK it's labeled "SM" Open the Actor Dialogue Events tree Add a stacked BRANCH Node. Right click your new Branch node and Add a QUEST node Right click your new QUEST node and select to Add a quest. Choose the quest you just created with one scene in it. What I've learned: I created this to try to get followers more involved with the random dialogues that you see between NPCs. MY quest aliases have conditions such that the Actor1 alias is GetIsSex = Male (run against the Event Data for Actor 1) ... and the Actor2 alias is GetInFaction = MME_MilkMaidFaction AND GetIsSex = Female So on an Actor Dialogue Event (which follows an Actor Hello Event) IF the NPC INITIATING the greeting (which is always Actor 1) is a Male NPC AND if the NPC being greeted (always Actor 2) is a female Milk Maid, then this quest will start and the scene will run. If an Actor Dialogue Event occurs between actors and EITHER ONE of those aliases fails to fill, then the quest fails to run and therefore the scene doesn't start. (This is why you don't want the aliases marked as optional. You WANT this to fail if the aliases aren't filled with actors meeting the conditions for both. If EITHER alias fails to fill, the quest won't run) On the Story Manager node for the quest you can set a time to control how much time has to pass before the event is allowed to activate again. You can put conditions on the Story Manager nodes but mainly for things like... what cell must we be in, what time or day must it be, stuff like that. I tried putting the Actor1 and Actor2 conditions in the event node and that didn't seem to work. Now that I got it to work, I can see a lot more possibilities.
Tyrant99 Posted April 18, 2018 Posted April 18, 2018 Did you add a SM Event Node for your quest under Actor Dialogue Event? With that, you can also have Quest start on Actor Dialogue Event.
chajapa Posted April 18, 2018 Author Posted April 18, 2018 38 minutes ago, Tyrant99 said: Did you add a SM Event Node for your quest under Actor Dialogue Event? With that, you can also have Quest start on Actor Dialogue Event. That's the piece I was missing I think. Just found it it in another tutorial. Thanks! Going to try it and see if I can figure out the pros and cons of using stacked and random nodes thanks again
chajapa Posted April 18, 2018 Author Posted April 18, 2018 1 hour ago, Tyrant99 said: Have fun Not fun. I added the nodes to the Actor Dialogue Event node. Still doesn't seem to be working. My nodes have an asterisk after them and none of the other ones do and I can't find anything that tells me what that means. I would add an Actor Hello node to the SM Actor Hello tree but I hate to just stab at things without knowing what I'm stabbing.
Tyrant99 Posted April 18, 2018 Posted April 18, 2018 I've gotten the asterisk before too, everything seems to work fine though. An approach that you might try could be something like: Setup Node to call for Event, put the conditions for the alias you want to fill in the node. Add your quest to the node. Have a Quest that is not a Run Once who's start condition is type: Event Add whatever aliases you want to Quest. Have a function that does RegisterForUpdate(5.0); 5 second polling, or change to whatever Have OnUpdate() If Quest.GetStage() == 10; Or other start stage Scene.Start() Then just Alias.Clear(), Quest.Stop(), UnregisterForUpdate() etc. at some point - should be able to setup however you want so it's repeatable.
chajapa Posted April 18, 2018 Author Posted April 18, 2018 Yeah, I have a quest called ELV_Dialogue_1. It has quest aliases... from event.. called Actor1 and Actor2. It's set to start on event, Actor Dialogue Event. Not set to Run Once. I has a startup stage 0 and a end stage of 500 just because I wondered if that's why it was never firing. It has one scene in it using Actor1 and Actor2. That's all it does. Elsie never says Hello to anyone and nobody ever starts the conversation with her. I created a new branch in Dialogue Event tree of SM, added a stacked quest node, added the quest. I get nuthin. I thought this would be easier. It should be If I can't get it to work then I'll move on to Plan B which is to set things up in dialogue and use packages applied to Aliases and see how that goes
Tyrant99 Posted April 18, 2018 Posted April 18, 2018 Is the target of your conditions in the SM Event Node running on Event Actor? (You generally don't want to leave it on the default 'Subject' for this). Example:
chajapa Posted April 19, 2018 Author Posted April 19, 2018 2 hours ago, Tyrant99 said: Is the target of your conditions in the SM Event Node running on Event Actor? (You generally don't want to leave it on the default 'Subject' for this). Example: yep, the conditions run on the event actor. I'll work on this again, but in the meantime I found I can create hellos and start scenes from them. I can have dialogue quests to help keep things organized. Start and stop them as needed. Even have some control over the likelihood of comments by using the Global Variable from MME (MME is a master on Elsie LaVache as I basically wrote her FOR Milk Mod) Appreciate the help and direction. I'm not great at this. I need to work on the SM Event Node thing a bit more.
Tyrant99 Posted April 19, 2018 Posted April 19, 2018 No worries. Did the Quest at least start and the Aliases fill? It sounds like you almost had it. One other thing to keep in mind is that you do need some kind of function that Registers for the Event, then you pass it through to an Update and can do whatever. It wasn't clear whether you were doing that or not, but my above post outlines the gist of it.
chajapa Posted April 19, 2018 Author Posted April 19, 2018 The tutorial made no mention of needing a function anywhere. I never did see the aliases fill. Basically the tutorial lead me to believe all I needed was to have the quest, set to start on event (Actor Dialogue Event), with one scene set to start on quest start and end on quest end . It said that the game would start the quest when that event happened. That tutorial made no mention of SM Event Nodes. Yeah, I think I was close but... it's frustrating to find incomplete information.
chajapa Posted April 19, 2018 Author Posted April 19, 2018 Aaaaand... I think I just figured out what I did wrong and it is an embarassingly rookie oversight. I forgot to set the quest aliases as "optional" I think that's what the quest never started. I'll revisit this and try again in a bit.
chajapa Posted April 20, 2018 Author Posted April 20, 2018 Replying to my own topic in case anyone else is trying to discover how to do this. Making the Aliases optional got the quest to start properly on an Actor Dialogue event. It even played the scene out. However I had the conditions set wrong for filling the Actor1 and Actor2 aliases and it filled them both with milkmaids which wasn't what I was after. When I adjusted the aliases it would fill one and not the other and the quest stayed running, keeping the same Actor in the Actor2 alias. So my question is this: This quest is an attempt at making a dialogue between NPC and the quest starts on an event. That part works This quest has one scene. It's set to start when the quest starts and stop when the quest stops. I can't very well put a stop() in the scene's final stage if the scene never plays due to an alias not filling. I would LOVE to try to keep this self contained so I don't have scripts running so I'd like to make sure the aliases filled and then if one or the other did NOT fill, stop the quest and let it refire on the next ActorDialogueEvent from Story Manager Is it as simple as attaching a script to the Actor1 and Actor2 aliases that checks to see if both are filled? And if either is empty, stop the quest? OR... do I put conditions on the SM event node?
Tyrant99 Posted April 22, 2018 Posted April 22, 2018 Should be pretty easy to do. One approach might be: ReferenceAlias Property Alias1 Auto ReferenceAlias Property Alias2 Auto Quest Property Quest Auto Scene Property Scene Auto ;Call a function that has a While loop: Function SomeFunction() While Quest.IsRunning(); fires when your quest is running If Alias1 != None && Alias1.GetActorRef() != None && Alias2 != None && Alias2.GetActorRef() != None; Checks if both Aliases are filled Scene.Start() Else Quest.Stop() EndIf EndWhile EndFunction
Recommended Posts
Archived
This topic is now archived and is closed to further replies.