Open main menu
Home
Random
Log in
Settings
About the CreationKit Wiki
Disclaimers
the CreationKit Wiki
Search
Editing
Creating a Custom Crime Faction
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Custom Dialogue== This is all well and good, but when that Bruma guard opened his mouth and informed you of your crimes against Skyrim and her people, the resulting experience may have been “immersion breaking” for you. That’s why we will need to hook our guards up with dialogue of our own. First of all, make another custom faction, such as CYRGuardDialogueFaction. Remove the GuardDialogueFaction from your guards and substitute it with the one you just made. Next, browse to the DialogueCrimeGuards quest and duplicate it. Name it CYRDialogueCrimeGuards (if you haven’t guessed, appending our prefix to copies of vanilla forms is what we’ll be doing a lot of in this tutorial). Open the new quest. In the Quest Data tab, you should see a “GetInFaction, Faction: GuardDialogueFaction” condition; change it to point to your new guard dialogue faction. Also remove the GuildCost text display global, as we won’t be needing it. In the scripts tab, remove CrimeGuardsScript; we will access its functions through the instance of the script that is attached to the original quest, using properties. {{Template:InDepth|Adventurous souls will notice a bunch of properties in the script that point to crime factions in the base game. Fear not, as this is only needed for Thieves Guild-related bounty discounts. If you want to have something like this in your mod, then you’ll need to make your own script, but we don’t need it for functions related to jailing, resisting arrest and other basic necessities.}} Now we will add the dialogue. The dialogue view in DialogueCrimeGuards contains some of the worst dialogue spaghetti that I’ve ever seen. Thankfully, we won’t need to recreate all of it, specifically leaving out the Thieves Guild options and dialogue related to specific quests (particularly the Forsworn Conspiracy). ===Starting Topics=== Make your own Dialogue View in the new quest. Create a branch called CYRDGCrimeBlockingHello, along with the starting topic. Edit the branch so it becomes a Blocking branch (it should take on a green color). This branch will account for those cases where the player stupidly talks to a guard while having a bounty above the petty crime gold threshold. Create an info in the topic and add the following conditions (run all on Subject): *IsInDialogueWithPlayer == 1 AND *GetAlarmed == 0 AND *GetCrimeGold > 0 AND *GetDaysInJail == 0 AND *GetActorValue, Variable03 < Global: GameDaysPassed OR *GetCrimeGold > Global: CrimePettyCrimeThreshold OR The last condition ensures that the guard will not bother you if your bounty is low. Remove it if you wish. The original dialogue on this info is “Wait… I know you” but you can have something more province-appropriate if you wish, such as “Stop right there, criminal scum!” The original quest has a second topic that allows the player to respond once before being presented with the complete choice list, but this is hardly necessary. Make a new dialogue branch called CYRDGCrimeForcegreet, along with its starting topic. Edit the Branch so it becomes a blocking branch, and change the starting topic’s type to “Forcegreet”. This branch holds the dialogue for when the guard actively arrests the player. Create an info in the topic with the following conditions: *GetAlarmed == 1 *GetCrimeGold > 0 I think you’ll know what dialogue to put here. ===Persuasion=== In the CYRDGCrimeForcegreet branch, create a CYRDGCrimePersuade topic. This will let the player persuade the guard. Make the topic text something like “Any chance I could talk you into overlooking this? (Persuade)” and add an info with the following conditions: *Player: IsTrespassing == 0 AND *Subject: GetCrimeGold > 0 AND *Subject: GetCrimeGoldViolent == 0 AND *Subject: IsBribedbyPlayer == 0 AND *Target: GetActorValue, Speechcraft >= Global: SpeechHard OR *Player: GetEquipped, FormList: TGAmuletofArticulationList == 1 OR Under these conditions, the persuasion will succeed if the player is not trespassing, is not indicted of any violent crimes and has a speech skill of at least 75, or is wearing the Amulet of Articulation. Adjust these if necessary. In the vanilla quest, there are no infos that occur when the conditions aren’t satisfied, so the dialogue option will simply not appear in those cases (see [[Tutorial: Dialogue Speech Checks|Speech Checks]]); add some if you like. Now for the script. In the “Begin:” papyrus fragment box, type a semicolon and hit Compile. This will generate a script which you can see on the right. Close and reopen the info, and check the script’s properties. Add a property with a type of CrimeGuardsScript (don’t choose from the drop-down list) and name it pCGS. Fill it with DialogueCrimeGuards, which should be the only possible value (unless you neglected to remove the script on your duplicated quest). Then, enter the following in the Begin box: <syntaxhighlight lang="Papyrus"> pCGS.PersuadeGuard(akSpeaker) </syntaxhighlight> {{Template:InDepth|It also pays to rename the script and add your prefix so it can’t conflict with scripts from other mods, and it will be easier to scoop all your mod’s scripts from your folders later. You can do this with the “rename” button in the Advanced tab of any fragment. I also like to add something descriptive between the two underscores (usually the topic ID), so this script would be renamed to CYR_TIF_DGCrimePersuade_02000D6B}} ===Paying the Fine=== Add a CYRDGCrimePayFine topic with a topic text like “You caught me. I’ll pay off my bounty. (<CrimeGold> Gold)”. <CrimeGold> will be text-replaced by the bounty amount. In the vanilla quest, there are two infos that can be selected based on whether the guard caught the player red-handed or was approached by the player; the former sends the player to the castle, the latter lets him go immediately after paying the fine. For the first info, add the following conditions: *Subject: CanPayCrimeGold == 1 AND *Subject: GetAlarmed == 1 AND And the following code in the End fragment box: <syntaxhighlight lang="Papyrus"> akSpeaker.GetCrimeFaction().PlayerPayCrimeGold() </syntaxhighlight> For the second info: *Subject: CanPayCrimeGold == 1 AND *Subject: GetAlarmed == 0 AND And code: <syntaxhighlight lang="papyrus"> akSpeaker.GetCrimeFaction().PlayerPayCrimeGold(True, False) </syntaxhighlight> Of course, you can leave out the second info and remove the GetAlarmed condition on the first if you want your guards to be strict and always take the player to the castle. ===Jail=== Add a CYRDGCrimeGoToJail topic and make the topic text something like “I submit. Take me to jail.” In the info(s), no conditions are needed. Add the following in the End fragment box: <syntaxhighlight lang="papyrus">akSpeaker.GetCrimeFaction().SendPlayerToJail()</syntaxhighlight> In the vanilla quest, there are multiple infos that can be said depending on the guard’s crime faction (e.g. “You’re going to rot in the Dragonsreach dungeon”). If you want to do something like this, every info will need the script. ===Resist Arrest=== Make a “CYRDGCrimeResistArrest” topic; make the topic text something like “I’d rather die than go to prison!” Conditions are not needed on the info. In the Begin fragment box, add: <syntaxhighlight lang="papyrus"> akSpeaker.SetPlayerResistingArrest() </syntaxhighlight> The guard’s line will probably not be spoken as he will be interrupted by his own Start Combat dialogue. ===Linking it up=== Now you will have to link the dialogue topics to eachother. I recommend starting with the Info(s) in your forcegreet topic. Link it to CYRDGCrimePersuade, CYRDGCrimePayFine, CYRDGCrimeGoToJail and CYRDGCrimeResistArrest. You can right-click the “Link to:” window in the info dialog and select “Copy Stack” so you can paste it to all other infos in the forcegreet topic, and the info(s) of the last topic in your Hello branch. If you added failure infos for the persuade check, it’ll need the stack too. That should just about do it. When testing in-game, always save and reload or generate a SEQ file to let the dialogue kick in, as the quest is Start Game Enabled.
Summary:
Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
CreationKit:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)