somnomania Posted February 18, 2017 Share Posted February 18, 2017 So I'm setting up the umpteenth player house in the CK, using a custom worldspace, with a handful of buildings that will house NPCs, sort of a personal staff. I've got the innkeeper/cook set up, that's no problem, and guards were easy as well, but it's the remaining two that are stumping me, I don't have enough consistent experience with making functioning NPCs. One is a merchant, and while a basic merchant who functions in one building is easy, I'd really love it if he could somehow be rigged to only be present some days and not others. It's a coastal setting, so I'm imagining he would follow trade routes via ship and stop by once in a while with new goods, perhaps a day or two at a time every week. I could just come home and the ship would be visible in the bay + the longboat tied up at the dock + the NPC in the trading post building. Is this possible? The second NPC is a steward/caretaker, who I want chopping and carrying firewood, sweeping both indoors and out, that sort of thing. If she could specifically use the chopping block I've placed, and carry firewood, placing some small quantity of it into the woodpile storage I've set up, that would be fantastic, but I don't know if that's doable. I seem to recall looking into this sort of complex behavior a while ago and finding that it was difficult to manage. Additionally, is it possible to have the guards and the innkeeper and the steward follow a schedule, taking time at least once a day to sit down at the inn and eat, and sleep for a few hours? (Also additionally, and only slightly off topic, how does one enable random dragon attacks in a custom worldspace? I'd like for my guards to actually have a purpose besides looking nice.) Link to comment Share on other sites More sharing options...
Levionte Posted February 18, 2017 Share Posted February 18, 2017 Definitely doable. What you're looking is AI Packages that you'd probably assign to the npcs (in the actor entry under the AI packages tab). You can setup conditions in which the packages take place on a schedule in which to do things. I can't say I've ever looked into dragon attacks, I'm afraid. My guess would be that it's just a random quest that starts and spawns a dragon. In which case, you'd have to look at the conditions required to trigger that quest event and make sure your world space qualifies. Link to comment Share on other sites More sharing options...
somnomania Posted February 18, 2017 Author Share Posted February 18, 2017 Ah! I always forget about DarkFox's tutorials, I had the NPC playlist bookmarked to watch already. Thank you! And I suppose if I don't figure out the dragon, I could always just bruteforce it and place one in the world space, and set it to respawn. Link to comment Share on other sites More sharing options...
cumbrianlad Posted February 18, 2017 Share Posted February 18, 2017 Just thought I'd add a comment about dragon attacks. In CK, take a look at quest MQ106, which is the quest where Delphine escorts the player to Kynesgrove. I checked it out recently for something else and I'm pretty sure that random dragon attacks are turned off for the duration of the scene where Delphine travels to Kynesgrove. It may be that you can use the same script to turn them on again. I think that Beth used a global setting here, so it may be that you have to turn the setting on and off for the whole of Tamriel but that wouldn't matter if you did it in a scene or a portion of a quest because you could add conditions to the scene/quest that specifies where the player has to be when the dragons are turned on/off. Link to comment Share on other sites More sharing options...
somnomania Posted February 22, 2017 Author Share Posted February 22, 2017 Thank you for the suggestion! I took a look at that quest, and the second script on it had this in it: ;BEGIN FRAGMENT Fragment_30Function Fragment_30();BEGIN CODE; dragon death sequence finishedUnregisterForUpdate(); start MQ201MQ201.setstage(10); turn on random dragons (WI and WE)MQ106TurnOffRandomDragons.SetValue(0); put Kynesgrove back in warCW.AddGarrisonBackToWar(Alias_KynesgroveLocation.GetLocation()); failsafe:; Blades now enemy of dragonsBladesFaction.SetEnemy(DragonFaction);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_4Function Fragment_4();BEGIN CODE; turn on quest when player finds note; turn off random dragons (WI and WE) so you don't have dragons around on way to KynesgroveMQ106TurnOffRandomDragons.SetValue(1); enable map in secret roomDragonMap.Enable();END CODEEndFunction;END FRAGMENT Now, I have almost no experience with Papyrus; the only scripting I've done has been copied from external sources and tailored so that the names of items match or whatever. I can sort of understand this script fragment, but I don't know what else is needed/how to adapt it for what I'm talking about. Obviously there's a part that directly turns on/off dragons, but I don't know if that's a specific quest reference (it looks like one to me) or not. Link to comment Share on other sites More sharing options...
somnomania Posted February 22, 2017 Author Share Posted February 22, 2017 Ugh. So I watched the DarkFox vids on AI packages, I was all ready to go, I opened up the first NPC I have and started trying to set up a package, and when I try to confirm it and close that window, the CK crashes. I can add existing packages just fine, but when I try to edit them, it crashes. This is even more inconvenient than the weird screen blackout I have when I flip to the Interior Data tab for an interior cell's info, or the fact that I have to force close the CK from the task manager because of some tweak I made in the past that makes the whole thing more stable (except for that fact). Any thoughts, anyone? Obviously this is a real problem. Link to comment Share on other sites More sharing options...
cumbrianlad Posted February 24, 2017 Share Posted February 24, 2017 Somnomalia, in answer to your question about the script, I'm afraid I'll have to hope someone better than me with papyrus answers. You could also try looking at how the vanilla game handles the bandits/giants etc that attack the hearthfire homes at intervals. Once you know the set-up I guess you could make the attackers anything you like such as renegade Falmer or something. that would give your guards something to do. I'm afraid that for all the CK glitches I've had, I've never had a problem with AI packages but I've always used them inside a quest, other than adding default packages to NPCs. I know I've edited them there and not had any issues. If I've time tomorrow, I'll try a few things and see if I get the same (bad) outcome. As for CK refusing to shut down, I get that now but I don't bother about it because it doesn't affect what I've done when it was open. For me, hovering over the CK logo in the task bar and clicking x to 'close window' gets shot of it without having to open up task manager. Link to comment Share on other sites More sharing options...
somnomania Posted February 24, 2017 Author Share Posted February 24, 2017 I found that if I create the package separately and then add it to the NPC, it behaves just fine, so there's that fixed, anyway. I'll have to keep messing around with things to try and get some attacks for my guards, yeah. Link to comment Share on other sites More sharing options...
Recommended Posts