nerdofprey Posted September 12, 2017 Share Posted September 12, 2017 I'm working on a fairly ambitious update to my old mod Blood and Silver - Cidhna Mine Expanded. This time, now that I've learned a fair amount about scripting, I'm basically trying to take the quest apart and put it together differently, and I want to remove some of the "on rails" feeling and give the player a lot more options. To make this work right I can't actually use the game's built-in jail sentence mechanic, which is very restrictive, so I'm having to fake it. It's easy enough to move the player to the jail, take away their stuff, etc. but some things have been harder to figure out. In the base game it's not possible to pick the lock and walk out, but I'm making it possible. Right now the main thing I'm struggling with is having the guards inside the mine actually try to stop you if you do that, in a way that makes sense. The city guards will try to re-arrest you once you leave the mine, which they should, but the guards inside don't care if you leave the designated area because as far as they're concerned, you're still "in jail." Things I have tried so far with limited success: #1, A script on the gates that flags the player as "resisting arrest" if they open it. This works OK but the reaction is a bit overwhelming and violent. Basically this approach doesn't take sneaking into account at all; even if nobody sees you open the gate, they all come running like you rang the dinner bell, and they stay on high alert pretty much indefinitely, and they try to kill you on sight from then on... even if you evade them, close the gate, run back inside and hide, then sneak out later. Plus if you make a mad dash for the front door, the "resisting arrest" thing carries over to the city guards, and instead of trying to arrest you they just murder the F outta you. This might ultimately be the "feature, not bug" approach, because it seems kind of realistic that anybody trying to walk out of Cidhna Mine would face a pretty brutal response. #2, a ForceGreet package on the guards with a fairly large radius and a condition for the player to be detected. This works a lot better for a stealthy character, because it's possible to sneak past the guards if you're really good at it. I slapped this together with some stock "found you" lines and a couple of basic "I submit" and "you'll never take me alive" responses, the latter flagging you as "resisting arrest" so they bring down the fury on you. This has been a bit wonky in testing, as force greets can be, and the guards come across as too mellow; you try to escape from the brutal, inescapable prison and they go "hey, don't do that." Other things I've considered are strategically-placed trigger boxes (maybe to flag the player as resisting arrest IF they're detected?) and a custom crime faction for the guards inside the mine. I'm wondering if I can simply script the doors, or areas you enter, to give you a huge bounty with a separate crime faction... maybe then the guards would have the right reaction to you sneaking out. But this relies too much on the default crime system... As I said before, it's preferable if I can make this behavior work properly without the player ever technically being arrested - just physically moved back into the jail instead - if they're caught. The reason for this is, the Cidhna Mine quest will straight-up break if it's possible for the player to serve their sentence or pay their bounty. I want the player to have the option to escape, but to remain public enemy #1 in the Reach forever until that situation is actually resolved. And I want the authorities to throw you back in there on sight, and NOT just kill you, so a lot of the typical "enemy" mechanics won't work. I really need something that works LIKE the game's crime system but is NOT the game's crime system. I'm really posting this in the hopes of hearing any and all outside-the-box ideas for building a new, flexible system of crime and punishment for Skyrim, that basically pretends the hardcoded crime system does not exist. Sorry if this is all a bit confusing... That has been my experience working on it as well. Link to comment Share on other sites More sharing options...
nerdofprey Posted September 12, 2017 Author Share Posted September 12, 2017 In hopes of clarifying a little: Elements of the existing crime system work great and I don't mind piggy-backing on it if there's a way to do it. For example, the send player to jail mechanic seems to be the ONLY way to remove quest items from the player's inventory along with their other stuff. It would be cool if I could use that. (My working build just lets them keep their quest items in jail.) For the purposes of the Cidhna Mine quest, though, the player is supposedly given a life sentence. I cannot allow the player to serve their time or pay their bounty and walk around Markarth like nothing happened. That "life sentence" in the Reach needs to stick until the player clears their name by completing the quest. ANY suggestion for working around that is welcome. Link to comment Share on other sites More sharing options...
foamyesque Posted September 12, 2017 Share Posted September 12, 2017 The dialogue system for Skyrim never ceases to bewilder me, personally, but I think it should be possible to set up a parallel guard quest to cover dialogue and thereby remove the 'can pay bounty' thing. You can use the Faction function SendPlayerToJail to toss them in the slammer. Link to comment Share on other sites More sharing options...
nerdofprey Posted September 12, 2017 Author Share Posted September 12, 2017 I was thinking about a parallel quest, a simple version of that is sort of what I set up for testing out the forcegreet approach, sort of a dummy version of regular arrest dialogue, where it uses a simple moveto function if you surrender instead of sendplayertojail. Sendplayertojail is kind of the whole problem; I've had a lot of user requests to allow sleeping in Cidhna Mine, whether for needs mods or for roleplay purposes, but if the player is technically "in jail" and sleeps, it triggers the "serve your time" mechanic, spits them out onto the street and clears their bounties, and it breaks the quest. I was thinking I may be able to work around that by setting up a dummy crime faction where the sendplayertojail function throws them in Cidhna Mine, then if you "serve your time" the "exit" point is also inside the prison, and maybe if it tries to clear your bounty it just clears the dummy faction bounty and leaves you wanted in the Reach. It might even be possible to script an endless bounty loop where serving your time makes you a wanted criminal again... Part of the trouble in testing has been, if I let you escape the mine, any time you get caught again after that it throws you right back into the vanilla crime system with an option to serve your time and be released. I would need to be very thorough in blocking vanilla guard dialogue. Link to comment Share on other sites More sharing options...
nerdofprey Posted September 19, 2017 Author Share Posted September 19, 2017 I'm still looking for feedback on this if anybody has any ideas, no matter how outlandish. I've done more experimenting, and I found some solutions that are working pretty well. There's a type of default trigger box that was made for breaking out of The Chill... but a quick test showed that after some fiddling with properties, it could be used for breaking out of just about anything. Basically I strategically placed a couple of trigger boxes in spots where it's possible (with my mod) to break out of Cidhna Mine, and what it does is sets the Silver-Blood guard faction as an enemy of playerfaction when the player steps into it. This is a better solution than "resisting arrest" because it doesn't instantly put them all on high alert; you can still sneak past, but they'll try to kill you if they do catch you. I feel like this is realistic. I also added the default jail door script to the pickable locks, which is a basic detection event of configurable "loudness." Adds a little bit of challenge if you do try to sneak out; they'll hear you open the door. All of this works without the player having to be technically "arrested," which is good. But this still leaves the problem of the guards outside, in and around Markarth. I'm having trouble getting my cobbled-together forcegreet to override their standard arrest dialogue. At this point in testing, they will arrest you... but then all of a sudden you're right back on the standard crime system, and you could just sleep it off... and the quest breaks. I think the next thing I'm going to try is adding a bit to the quest script where it clears all your related bounties at the start, when you get thrown in Cidhna Mine for the quest. In theory you then would not ever be able to "serve your time" or "pay your fine" during the quest when you're supposed to have a life sentence. The game wouldn't technically think you're "in jail" at that point. And if you break out, there's no bounty on you. But I still need the guards outside the mine to try to "arrest" you on sight if you break out... without involving the default crime system. Maybe I can get my forcegreet package to work if you're not technically wanted for a crime. I'd need to make sure that package is tacked onto every guard in the reach. This might involve somehow getting all the reach guards into quest aliases. I'd like for the player to be able to break out of the prison and get thrown back into the prison an infinite number of times, as long as the quest is running. Not that they will... but I want to be prepared for the player making interesting choices. Link to comment Share on other sites More sharing options...
sp0ckrates Posted October 17, 2017 Share Posted October 17, 2017 (edited) I'm still looking for feedback on this if anybody has any ideas, no matter how outlandish. I've done more experimenting, and I found some solutions that are working pretty well. There's a type of default trigger box that was made for breaking out of The Chill... but a quick test showed that after some fiddling with properties, it could be used for breaking out of just about anything. Basically I strategically placed a couple of trigger boxes in spots where it's possible (with my mod) to break out of Cidhna Mine, and what it does is sets the Silver-Blood guard faction as an enemy of playerfaction when the player steps into it. This is a better solution than "resisting arrest" because it doesn't instantly put them all on high alert; you can still sneak past, but they'll try to kill you if they do catch you. I feel like this is realistic. I also added the default jail door script to the pickable locks, which is a basic detection event of configurable "loudness." Adds a little bit of challenge if you do try to sneak out; they'll hear you open the door. All of this works without the player having to be technically "arrested," which is good. But this still leaves the problem of the guards outside, in and around Markarth. I'm having trouble getting my cobbled-together forcegreet to override their standard arrest dialogue. At this point in testing, they will arrest you... but then all of a sudden you're right back on the standard crime system, and you could just sleep it off... and the quest breaks. I think the next thing I'm going to try is adding a bit to the quest script where it clears all your related bounties at the start, when you get thrown in Cidhna Mine for the quest. In theory you then would not ever be able to "serve your time" or "pay your fine" during the quest when you're supposed to have a life sentence. The game wouldn't technically think you're "in jail" at that point. And if you break out, there's no bounty on you. But I still need the guards outside the mine to try to "arrest" you on sight if you break out... without involving the default crime system. Maybe I can get my forcegreet package to work if you're not technically wanted for a crime. I'd need to make sure that package is tacked onto every guard in the reach. This might involve somehow getting all the reach guards into quest aliases. I'd like for the player to be able to break out of the prison and get thrown back into the prison an infinite number of times, as long as the quest is running. Not that they will... but I want to be prepared for the player making interesting choices. You can dynamically add scripts to any guards that enter the same cell as the player, then add a condition to have the script fire only if your quest is still active. Detailed documentation how to do this is here: https://www.creationkit.com/index.php?title=Dynamically_Attaching_Scripts I've used it for mods I've made, such as Amazing Race Tweaks! Nord and HUNT NPC Skulls. Works flawlessly! Edited October 17, 2017 by sp0ckrates Link to comment Share on other sites More sharing options...
nerdofprey Posted October 17, 2017 Author Share Posted October 17, 2017 (edited) Thanks! Might be worth a try. I actually got this to work via the forcegreet package method. It did involve editing the base actors of every type of guard in the Reach, which was tedious, and which could potentially cause mod conflicts. I made sure to carry over USLEEP changes to those NPC's. It may be a better idea to do as you've suggested and have a dynamic script attach the forcegreet package to guards as the player encounters them. This might also potentially eliminate a weird bug I've run into where guards' AI packages are too slow to update, so they actually follow you into the mine and try to forcegreet you there, after you've already been captured. I'm already making significant edits to the original Cidhna Mine quest scripts, so it wouldn't be too much of a problem to throw a line in there that puts a cloak effect on the player when they're first thrown into the mine, and one that removes it again on quest completion. Edit: On that note, I was thinking the mod might run more smoothly if, instead of simply editing the content of the vanilla quest scripts, I rename them as well, effectively removing the vanilla script from the quest. But I'm worried about both scripts trying to fire at once if something goes wrong, which would probably totally break it... Edited October 17, 2017 by nerdofprey Link to comment Share on other sites More sharing options...
sp0ckrates Posted October 18, 2017 Share Posted October 18, 2017 (edited) Thanks! Might be worth a try. I actually got this to work via the forcegreet package method. It did involve editing the base actors of every type of guard in the Reach, which was tedious, and which could potentially cause mod conflicts. I made sure to carry over USLEEP changes to those NPC's. It may be a better idea to do as you've suggested and have a dynamic script attach the forcegreet package to guards as the player encounters them. This might also potentially eliminate a weird bug I've run into where guards' AI packages are too slow to update, so they actually follow you into the mine and try to forcegreet you there, after you've already been captured. I'm already making significant edits to the original Cidhna Mine quest scripts, so it wouldn't be too much of a problem to throw a line in there that puts a cloak effect on the player when they're first thrown into the mine, and one that removes it again on quest completion. Edit: On that note, I was thinking the mod might run more smoothly if, instead of simply editing the content of the vanilla quest scripts, I rename them as well, effectively removing the vanilla script from the quest. But I'm worried about both scripts trying to fire at once if something goes wrong, which would probably totally break it... So you probably want to add a disclaimer that your mod won't be compatible with other mods that change the guards. You probably want to add something to your script to have them evaluate their AI package every time they load. Editing vanilla quest scripts isn't a good idea, better to make a copy of the scripts and make your own quest using them, if possible. Edited October 18, 2017 by sp0ckrates Link to comment Share on other sites More sharing options...
nerdofprey Posted October 19, 2017 Author Share Posted October 19, 2017 In this case I'm pretty sure there's no alternative. This quest is part of a chain, and I can't think of a way to replace a link in that chain without editing a vanilla script somewhere. I've had absolutely no issues with the edited script working flawlessly in testing, but I'm just worried about the potential for the user to break it on their end somehow, most likely by having the original script loose in their files somewhere, or by somehow having another mod lower in their load order that edits the same quest. (I don't know of any mods that edit the Cidhna Mine quest.) This is why I'm thinking of pointing the quest to a totally different script in the plugin, which renaming it should accomplish? That way the vanilla script, if present, should do nothing because it never fires. Can you tell me a specific reason why editing vanilla scripts "isn't a good idea?" It's something I avoid unless strictly necessary, to be sure, but I'm more worried about mod compatibility than anything else. If it's a script that does a bunch of different things in the game in different circumstances I could see an issue, but I'm only touching stuff that affects one quest in one location. I'm reasonably comfortable with quests and scripts at this point, and I'm not seeing the potential for catastrophe in this case, but feel free to explain... Link to comment Share on other sites More sharing options...
Recommended Posts