Jappa123 Posted June 16, 2020 Posted June 16, 2020 Hi, so I was think about making simple "walk to whiterun"(or any other city)script for npc, it'll trigger through dialogue, I've some basic knowledge about ck and scripts, I know how to attach them and compile all I need is how such a script should look like. Also would be cool to make npc "busy" during walk so player wont be able to talk to him - I guess talking to npc will stop the walk right? Thanks!
Guest Posted June 16, 2020 Posted June 16, 2020 What exactly is it you want to do? Specifically, what would they do once they arrive there? Just making them go to a specific place is simple enough, by creating a new package with the Travel template, set to a reference in the city you want them to go to (I think most cities also have a Location you can point them too, but I'd have to check to know for sure). A package can then be run either by adding it to the package stack of the NPC (generally a quest alias), or by creating a new Scene that has a single action in it, namely the package. When using it in a scene, you can also disable player activation, but talking to an NPC will not necessarily stop them from walking to the location (even if they pause temporarily to talk to the player). Problem is that when the NPC arrives, and the scene stops or the package is disabled, the NPC will immediately start their regular package stack again, which will for many NPCs point them back to the place they came from. What you can do to fix this, is create another package with the Sandbox template, simply set to "current location" that runs after the Travel package until e.g. the player dismisses them. I can go into more step-by-step detail too, if you want. Edit: just noticed this was posted in under the SSE forum, so I don't know to what extent the CK is different, but fundamentally all of the above should be the same.
Jappa123 Posted June 16, 2020 Author Posted June 16, 2020 14 minutes ago, Targultoon said: What exactly is it you want to do? Specifically, what would they do once they arrive there? Just making them go to a specific place is simple enough, by creating a new package with the Travel template, set to a reference in the city you want them to go to (I think most cities also have a Location you can point them too, but I'd have to check to know for sure). A package can then be run either by adding it to the package stack of the NPC (generally a quest alias), or by creating a new Scene that has a single action in it, namely the package. When using it in a scene, you can also disable player activation, but talking to an NPC will not necessarily stop them from walking to the location (even if they pause temporarily to talk to the player). Problem is that when the NPC arrives, and the scene stops or the package is disabled, the NPC will immediately start their regular package stack again, which will for many NPCs point them back to the place they came from. What you can do to fix this, is create another package with the Sandbox template, simply set to "current location" that runs after the Travel package until e.g. the player dismisses them. I can go into more step-by-step detail too, if you want. Ok, so the whole point is to tweak some of the mods like SD to make them a little bit alive what I want to do is when player ask sd master "How can i serve you" one of the outcome could be something like: "I need to delivier this letter to Solitude, let's go". "the NPC will immediately start their regular package stack again, which will for many NPCs point them back to the place they came from." That's completely fine. So after NPC reach solitude there could be another point like: "Ok, we're in Solitude, I need to delivier this letter to Blue palace"(or to one of the NPC in blue palace depends which option is easier to do) And after that npc can back to their origin place. In case of SD it's seems like NPC always has some kind of sandbox template no matter where he is. I want to start with something simple because my CK knowledge is really limited and all I can do is create dialogues, set some conditions and add some simple vanilla scripts or DD scripts and that's basically it, well also manage to add forcegreet package to npc and it worked... well kinda worked. Would love to know how to set up simple scenes but I could't find and good guide Thanks!
Guest Posted June 16, 2020 Posted June 16, 2020 3 hours ago, Jappa123 said: Ok, so the whole point is to tweak some of the mods like SD to make them a little bit alive what I want to do is when player ask sd master "How can i serve you" one of the outcome could be something like: "I need to delivier this letter to Solitude, let's go". So, this part makes some things a bit more difficult. As you need to make sure the extra bits integrate properly into SD itself. A fairly straightforward version will probably still work though. Start off by making a quest. You don't really need to give it a name, as long as the type is set to None, so it won't show up in the quest journal. Check Start Game Enabled. First go to the Quest Aliases tab (you may need to press OK first and then open the quest again), and create an alias for the NPC. The problem here is that we're trying to fill an alias based on an NPC we're talking to, and Skyrim doesn't provide a native way of doing this within the same quest. What we can do instead, is make the alias optional, and set the initial reference to None (Or PlayerRef temporarily, I'm honestly not sure if you can use Specific Reference to set it to None). Give it a name like TravellingNPC (Alias Name, leave Display Name blank), and enable Stores Text. Then go to the Scenes tab and create a new scene. Give it a name, with the city you want them to go to in it (You can add scenes for all other cities later). Add a new phase, actor and action. The actor should be set to the alias we just created, and the action should be for packages. Double click on the action, then you can right click the list to create a new package. Give it an ID, then set the Package Template to "Travel". Pick a location to go to (I believe all cities have a location you can set where you normally go when you fast travel). Do this for all cities you want them to go to. Then go to the Player Dialogue tab to add your dialogue. Create a dialogue for all cities (either for player prompt or randomly picked, I assume you already know how to do this), and attach a script to it that contains something like this: Alias_TravellingNPC.ForceRefTo(akSpeaker) TravellingScene.Start() and create the properties Alias_TravellingNPC (type: ReferenceAlias, fill it with the Alias TravellingNPC) and TravellingScene (type: Scene, fill it with the scene matching the dialogue). After creating both properties, it should compile and then you can fill them. This is a fairly basic layout for adding a dialogue option to make an NPC travel to a specific location. Keep in mind it will probably not break SD, but it won't really work very well either, since SD scenes probably won't work while travelling. Doing it so that SD can interrupt it, while still completing the travelling, is a lot more involved and likely requires edits to SD itself. Also, when using scenes like this, you can only do one NPC at a time, so you should probably add a condition to the top-level dialogue to prevent it from showing up while an NPC is already travelling (Like IsScenePlaying), and also add a condition that checks for the SD faction for example, so it only shows up on SD npcs.
Jappa123 Posted June 17, 2020 Author Posted June 17, 2020 Thank you! I've tried and it didn't work not sure if I set up location correctly: Also tried with different npc and also didn't work. Not sure what i'm missing.
Guest Posted June 17, 2020 Posted June 17, 2020 Just checked it out in the CK, you'll have to add location aliases to the quest. Go to the Quest Aliases tab, then add a new location alias and name it something like RoriksteadAlias (Or w/e city). Use a Specific Location, and set it to "RoriksteadLocation". Then use the Loc Alias for the Travel package (Also, you should give your packages IDs too) and the location alias should show up, as long as it has the proper Owner Quest set.
Jappa123 Posted June 17, 2020 Author Posted June 17, 2020 5 hours ago, Targultoon said: Just checked it out in the CK, you'll have to add location aliases to the quest. Go to the Quest Aliases tab, then add a new location alias and name it something like RoriksteadAlias (Or w/e city). Use a Specific Location, and set it to "RoriksteadLocation". Then use the Loc Alias for the Travel package (Also, you should give your packages IDs too) and the location alias should show up, as long as it has the proper Owner Quest set. Dammit still can't get it to working here how it looks: Spoiler Spoiler Spoiler Spoiler Spoiler Spoiler Spoiler I've check some other mods and vanilla quest and everything seems to be set correctly, only thing i'm not sure about is script
Guest Posted June 17, 2020 Posted June 17, 2020 Does the Papyrus log indicate errors of some kind? Alias TravellingNPC might need to be marked as optional, as normally unfilled aliases prevent quests from starting (although if the dialogue shows up, this isn't the problem). Otherwise, one thing you can try is use a new save (Or just do `coc whiterun` from the main menu, then save and reload, which is how I usually test stuff).
Scrab Posted June 19, 2020 Posted June 19, 2020 Try AliasTraveling_NPC.ForceRefTo(akSpeaker) akSpeaker.AllowPCDialogue(false) Make sure your travel package is part of your aliases package list and that your quest has a high priority If there is another quest (e.g. the SD+ quest) with a higher priority than your own and this quest has a package, yours will be ignored by the game
Recommended Posts
Archived
This topic is now archived and is closed to further replies.