Jenova23 Posted October 27, 2023 Posted October 27, 2023 (edited) I need assistance on how to implement a condition so that when I speak to an NPC (not the follower) the next stage of dialogue appears only if my follower is accompanying me and if that follower belongs to a faction. I have attempted various methods, such as using an alias that references the actor and their faction, or directly referencing the actor in the dialogue conditions itself. Unfortunately, neither of these have worked so far so far. Any help or guidance regarding this matter would be greatly appreciated. Edited October 28, 2023 by Jenova23
Gristle Posted October 27, 2023 Posted October 27, 2023 3 hours ago, Jenova23 said: I need assistance on how to implement a condition so that when I speak to an NPC (not the follower) the next stage of dialogue appears only if my follower is accompanying me and if that follower belongs to a faction. I have attempted various methods, such as using an alias that references the actor and their faction, or directly referencing the actor in the dialogue conditions itself. Unfortunately, neither of these have worked so far so far. Any help or guidance regarding this matter would be greatly appreciated. You can use "GetDistance" to measure the distance between the Player and either a specific actor or a specific alias that the actor is in. For example, I typically check if the GetDistance is <= 800 to determine if a particular NPC is present/following. Not foolproof, because the NPC could theoretically be nearby and yet not following, but it works for me. And of course you can use "GetInFaction" to determine if a specific actor is in a particular action.
Swe-DivX Posted October 27, 2023 Posted October 27, 2023 (edited) Don't know how far you've come... Script actor Property ActRef1 Auto Hidden ; The Actor to use in the scene bool ActRef1Faction Auto Conditional Hidden faction BanditFaction function SceneStart() ; Is Actor in Faction ActRef1Faction = ActRef1.IsInFaction(BanditFaction) endfunction Connect the Faction Quest > Scene > Scripts. Add the script and then Edit the Faction value In CK Open Quest > Scene > EditData Begin: (GetOwningQuest() as QUESTNAME).SceneStart() Open Quest > Scene and Phase > top > Start Add conditions Condition > GetVMQuestVariabel and the set faction in "invalide" to ::ActRef1Faction Run on Subject Hard to explain if you haven't seen your mod Edited October 27, 2023 by Swe-DivX
Jenova23 Posted October 28, 2023 Author Posted October 28, 2023 (edited) 4 hours ago, Swe-DivX said: Don't know how far you've come... Script actor Property ActRef1 Auto Hidden ; The Actor to use in the scene bool ActRef1Faction Auto Conditional Hidden faction BanditFaction function SceneStart() ; Is Actor in Faction ActRef1Faction = ActRef1.IsInFaction(BanditFaction) endfunction Connect the Faction Quest > Scene > Scripts. Add the script and then Edit the Faction value In CK Open Quest > Scene > EditData Begin: (GetOwningQuest() as QUESTNAME).SceneStart() Open Quest > Scene and Phase > top > Start Add conditions Condition > GetVMQuestVariabel and the set faction in "invalide" to ::ActRef1Faction Run on Subject Hard to explain if you haven't seen your mod 4 hours ago, Gristle said: You can use "GetDistance" to measure the distance between the Player and either a specific actor or a specific alias that the actor is in. For example, I typically check if the GetDistance is <= 800 to determine if a particular NPC is present/following. Not foolproof, because the NPC could theoretically be nearby and yet not following, but it works for me. And of course you can use "GetInFaction" to determine if a specific actor is in a particular action. I've attempted to add the condition for the distance multiple times now, but unfortunately, I have not been successful. Could you kindly provide me with a detailed explanation of how you accomplished it? Additionally, there is an option for dialogue when the prerequisites are not met. In my case, I simply disabled the faction for Aela the huntress as an example. I have included some screenshots and also uploaded the file. If it is possible for you to either complete the code on my behalf or guide me on how to set up the condition, it would be greatly appreciated. This assistance would go a long way in helping me get started again with creation kit since I haven't worked with it in years and have mostly forgotten many aspects of its functionality. Thank you very much for your support. Being a Cow v2.0.7_SE.rar Edited October 28, 2023 by Jenova23
Jenova23 Posted October 28, 2023 Author Posted October 28, 2023 17 hours ago, Gristle said: You can use "GetDistance" to measure the distance between the Player and either a specific actor or a specific alias that the actor is in. For example, I typically check if the GetDistance is <= 800 to determine if a particular NPC is present/following. Not foolproof, because the NPC could theoretically be nearby and yet not following, but it works for me. And of course you can use "GetInFaction" to determine if a specific actor is in a particular action. 17 hours ago, Swe-DivX said: Don't know how far you've come... Script actor Property ActRef1 Auto Hidden ; The Actor to use in the scene bool ActRef1Faction Auto Conditional Hidden faction BanditFaction function SceneStart() ; Is Actor in Faction ActRef1Faction = ActRef1.IsInFaction(BanditFaction) endfunction Connect the Faction Quest > Scene > Scripts. Add the script and then Edit the Faction value In CK Open Quest > Scene > EditData Begin: (GetOwningQuest() as QUESTNAME).SceneStart() Open Quest > Scene and Phase > top > Start Add conditions Condition > GetVMQuestVariabel and the set faction in "invalide" to ::ActRef1Faction Run on Subject Hard to explain if you haven't seen your mod I was able to successfully resolve the issue. It seems that I overlooked the fact that I needed to reset the quest in order for the changes to take effect. I'm not currently on the part where the player has to get there nose pierced.
Gristle Posted October 28, 2023 Posted October 28, 2023 1 hour ago, Jenova23 said: I was able to successfully resolve the issue. It seems that I overlooked the fact that I needed to reset the quest in order for the changes to take effect. I'm not currently on the part where the player has to get there nose pierced. Glad to hear. This is a constant struggle for me when making quests. When playtesting, I keep making changes to actors and objects placed in world and then have to go back to a save before the quest start or else these changes never appear. Same for things like aliases and quest targets. And scripts! (However, I never have to restart for changes to dialogue conditions to take effect.) In any case, I've now learned to break up a longer quests into multiple sub-quests, like the vanilla game does, so that I don't have to go back as far when playtesting and tweaking a longer quest.
Jenova23 Posted October 28, 2023 Author Posted October 28, 2023 (edited) 19 minutes ago, Gristle said: Glad to hear. This is a constant struggle for me when making quests. When playtesting, I keep making changes to actors and objects placed in world and then have to go back to a save before the quest start or else these changes never appear. Same for things like aliases and quest targets. And scripts! (However, I never have to restart for changes to dialogue conditions to take effect.) In any case, I've now learned to break up a longer quests into multiple sub-quests, like the vanilla game does, so that I don't have to go back as far when playtesting and tweaking a longer quest. I appreciate your assistance, and I intend to leave this post accessible for any future issues I may encounter. At present, I am encountering difficulties with a specific aspect of the mod. It involves the quest where the player is required to get there nose pierced, and I am trying to figure out how to make it work through the follower. The link to the file can be found in my post, along with all of the alterations I have made so far. II am currently a beginner in the process of familiarizing myself with the Creation Kit once again, so any assistance or video tutorials related to the issue that you could possibly provice would be greatly appreciated. Edited October 28, 2023 by Jenova23
Gristle Posted October 28, 2023 Posted October 28, 2023 2 hours ago, Jenova23 said: I appreciate your assistance, and I intend to leave this post accessible for any future issues I may encounter. At present, I am encountering difficulties with a specific aspect of the mod. It involves the quest where the player is required to get there nose pierced, and I am trying to figure out how to make it work through the follower. The link to the file can be found in my post, along with all of the alterations I have made so far. II am currently a beginner in the process of familiarizing myself with the Creation Kit once again, so any assistance or video tutorials related to the issue that you could possibly provice would be greatly appreciated. I'm a relative beginner as well. For testing purposes, I would skip the alias and just run your faction and distance conditions on Aela directly. That way you'll know if the condition logic works and whether the problem is with the alias reference or not. If that works, then the alias is the issue. If so, find out where the alias is being filled and check the ForceRefTo() statement to make sure it's being filled. Next, I always mark the following on my aliases: allow reuse in quest, optional, allow disabled, and allow reserved. You might try that.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now