Difference between revisions of "Creating a Custom Crime Faction"

m
→‎The Crime Faction: Properly Predicate Proper Paragraphs
imported>Thingy Person
imported>Thingy Person
m (→‎The Crime Faction: Properly Predicate Proper Paragraphs)
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
==The Crime Faction==
==The Crime Faction==
Make a new faction. I recommend giving it an EditorID like “<YourPrefix>CrimeFaction<RegionName>”. For example, CYRCrimeFactionBruma if we’re making a Bruma crime faction in a Cyrodiil mod. The “Name” field will be displayed in the “40 Gold added to ...” message, so be sure to fill it. In the “Interfaction Relations” field, add PCVampireFaction and PlayerWerewolfFaction, and mark them both as Enemy.
Make a new faction. I recommend giving it an EditorID like “<YourPrefix>CrimeFaction<RegionName>”. For example, CYRCrimeFactionBruma if we’re making a Bruma crime faction in a Cyrodiil mod. The “Name” field will be displayed in the “40 Gold added to ...” message, so be sure to fill it. In the “Interfaction Relations” field, add PCVampireFaction and PlayerWerewolfFaction, and mark them both as Enemy.
Obviously, the Crime tab is the one you need to be focusing on next. Check “Track Crime”. If you have a jail, you can start pointing the faction to the objects that you placed in the world. For “Exterior Jail Marker”, select the PrisonMarker reference that you placed outside. For “Follower Wait Marker”, select the same PrisonMarker (optionally, you can direct it to a nearby XMarkerHeading instead, if things are a little too cozy for your taste). For “Stolen Goods Container” and “Player Inventory Container”, select the EvidenceChestStolenGoods and EvidenceChestPlayerInventory, respectively.” Jail Outfit” denotes the clothes the player will get in jail; usually, this is set to BeggarOutfit.
Obviously, the Crime tab is the one you need to be focusing on next. Check “Track Crime”. If you have a jail, you can start pointing the faction to the objects that you placed in the world. For “Exterior Jail Marker”, select the PrisonMarker reference that you placed outside. For “Follower Wait Marker”, select the same PrisonMarker (optionally, you can direct it to a nearby XMarkerHeading instead, if things are a little too cozy for your taste). For “Stolen Goods Container” and “Player Inventory Container”, select the EvidenceChestStolenGoods and EvidenceChestPlayerInventory, respectively.” Jail Outfit” denotes the clothes the player will get in jail; usually, this is set to BeggarOutfit.
Most vanilla crime factions have all the checkboxes at the top of the window empty (the ones related to ignoring crimes), so you can leave them empty as well.  Attack on Sight, Arrest and Use Defaults are checked, but creative use of these is possible. If you don’t check Use Defaults, you can set how much bounty is allocated for each crime, allowing you to diversify the laws in each region (perhaps Bruma cracks down harder on stealing and Chorrol on murder?) If you don’t check Arrest, guards will always try to kill the player on sight if there is a bounty. If Attack on Sight is unchecked, guards will always try to arrest first before resorting to violence.
Most vanilla crime factions have all the checkboxes at the top of the window empty (the ones related to ignoring crimes), so you can leave them empty as well.  Attack on Sight, Arrest and Use Defaults are checked, but creative use of these is possible. If you don’t check Use Defaults, you can set how much bounty is allocated for each crime, allowing you to diversify the laws in each region (perhaps Bruma cracks down harder on stealing and Chorrol on murder?) If you don’t check Arrest, guards will always try to kill the player on sight if there is a bounty. If Attack on Sight is unchecked, guards will always try to arrest first before resorting to violence.
==The Populace==
==The Populace==
Now that CYRCrimeFactionBruma is up and running, you can add this faction to all citizens and guards that reside in Bruma and the settlements under its jurisdiction. This is done in the Factions tab of the Actor base record of each of your unique NPCs, and whichever guard template in your setup that holds the faction list for Bruma guards. Once the crime faction is added to the list, you will also need to select it in the “Assigned crime faction” drop-down menu. It pays to double check this after closing the actor, as this setting has a tendency to become unset when you’re messing with the factions.
Now that CYRCrimeFactionBruma is up and running, you can add this faction to all citizens and guards that reside in Bruma and the settlements under its jurisdiction. This is done in the [[Factions Tab]] of the Actor base record of each of your unique NPCs, and whichever guard template in your setup that holds the faction list for Bruma guards. Once the crime faction is added to the list, you will also need to select it in the “Assigned crime faction” drop-down menu. It pays to double check this after closing the actor, as this setting has a tendency to become unset when you’re messing with the factions.
The guards will need two extra factions: IsGuardFaction (which enables the AI routines for arresting or eliminating lawbreakers) and GuardDialogueFaction (which grants the guard access to the dialogue for arrest events).
The guards will need two extra factions: IsGuardFaction (which enables the AI routines for arresting or eliminating lawbreakers) and GuardDialogueFaction (which grants the guard access to the dialogue for arrest events).
Save your plugin and go try it out! Go slap a random passer-by in the face and marvel at the stern conversation with the nearest guard that ensues. And if such a thing does not ensue, please find out why and edit this article accordingly.
Save your plugin and go try it out! Go slap a random passer-by in the face and marvel at the stern conversation with the nearest guard that ensues. And if such a thing does not ensue, please find out why and edit this article accordingly.
==Custom Dialogue==
==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.
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.