Difference between revisions of "User:Thingy Person"

The Beyond Skyrim Wiki — Hosted by UESP
Jump to: navigation, search
(Blocking Branches and Forcegreets)
(AI Packages)
 
(180 intermediate revisions by the same user not shown)
Line 1: Line 1:
WIP Article: Dialogue Systems for Writers
+
Welcome to the Arcane Mystic assignment for quest and dialogue implementation, where you will implement the small settlement of Marlinsvik, situated on Skyrim's northwestern coast. Although the scope of the settlement has been kept small, it is still a beefy exercise, and by the time you're done, you will have familiarized yourself with a sizeable amount of Creation Kit elements that will be useful for a project and for your own mods.
  
 +
The writing document folder for Marlinsvik can be found here:
  
= Dialogue Branches =
+
We also provide an esp file containing level design for the village, although the houses are of course still unpopulated. In-game, run <code>tmm 1</code> in the console to instantly discover all map markers, including Marlinsvik, so you can fast travel there. Look northwest of Solitude, near [https://en.uesp.net/wiki/Skyrim:Broken_Oar_Grotto Broken Oar Grotto].
  
A large portion of dialogue that NPCs have in Skyrim occurs during conversation with the Player and is largely accessed through the dialogue menu. This is known as ''Player Dialogue'', and dialogue of this kind is structured in '''Branches'''.
+
[https://docs.google.com/document/d/1JAt7PKfdoaE8i6MA5hMMVEO23IrJA6mWbWb5a5LONgY/ This document], originating from the Beyond Skyrim: Cyrodiil project, lists many of the required steps, although some of its contents go beyond the scope of this exercise. [https://www.youtube.com/watch?v=czslmcUZBcY This AU lecture] gives a general overview of the work all of this entails. For the most part, though, you can just rely on the instructions below.
  
By default, when the Player initiates dialogue with an NPC, the subsequent dialogue menu will be a collection of separate Dialogue Branches that were written for this NPC, each option being its own Branch. In order for a Branch to appear in this way, it must be of a specific type, namely a '''Top-Level Branch'''.
+
As before, use a prefix of three or four letters (such as "AUM", for Arcane University Mystic) that you will use in all EditorIDs of objects that you create. Make sure to also set this prefix in the "Papyrus" tab of the Creation Kit Preferences window. This will automatically add "<prefix>_" to the name of any fragment script that it creates. For manually created scripts, make sure to include your prefix manually when you choose the name.
  
A characteristic of Top-Level Branches is that they begin with a dialogue option by the Player, and not a line from the NPC. This allows many Branches from many different sources to be available side-by-side, without the NPC pushing the conversation in a specific direction with their opening line.
+
The exercise can be divided into four parts, taking you across all of the essential steps in implementing a settlement. Feel free to ask for feedback partway through if you are running into issues or are unsure that you're doing things correctly.
  
Here is a hypothetical NPC document. Player dialogue options are in '''bold'''. Each top-level entry is the beginning of a Top-Level Branch. In this example, the Branches represent typical subjects that a player might inquire into in non-quest related dialogue.
+
== Initial setup ==
  
: 1. '''How long have you been working here?'''
+
* Creation of the NPC records
:: 1.1. I've been working these mines ever since the Forebears set foot in this place!
+
** It is best to start with creating the Actor base records of the five NPCs (including the dog). Set them as "Unique", write their full name in "Name" and, if they have a surname, write only their first name in "Short name". EditorID should be of the format "<prefix>FirstnameLastname".
:: 1.2. Back then, this place was a frontier. Well, in some ways, it still is.
+
** Thankfully, you do not need to waste time recreating their faces, because the writer has supplied .npc files (created using the [https://ck.uesp.net/wiki/SavePCFace spf] console command) for them in the "Facedata" folder that you can import. Set the actor to any of the playable races so that the "Character Gen Parts" tab becomes visible. Under this tab, click the "Import" button and select the .npc file. This will take care of setting the correct race, sex, weight and face data.
: 2. '''Do you have any family?'''
+
*** If the .npc file was created using modded hairs, noses etc., then these almost always won't import correctly due to differences between the in-game load order and the load order in the CK. You can open the .npc file in a plain text editor like Notepad and check to see if there are any FormIDs not beginning in 00, and then put those on the NPC manually after import. In this case, Marlinsvik only depends on vanilla, so this isn't an issue.
:: 2.1. Yeah, a daughter, back home in Stoudholm. Better keep her far away from a place like this.
+
*** Wiske, being a child and thus not a playable race, does not have an .npc file, so you will have to improvise based on the written description.
::: 2.1.1. '''Does your daughter live alone?'''
+
*** Gaubelin is described as an Elder, which is technically a separate race designed to look older than the playable races. The .npc file is for a Breton instead; after importing, you can try setting his race to an Elder, which preserves most elements, but arguably looks worse. You can decide how to go about this. Note that the Elder race does not distinguish between Nords and Bretons and doesn't confer racial bonuses.
:::: 2.1.1.1. My mom and pop look after her. She's too young to be by herself.
+
** You will, however, need to configure the NPC's stats and inventory. Unique settlement NPCs tend to have static level, so don't use the "PC Level Mult" flag. A level between 5 and 10 seems appropriate for ordinary people; compare with NPCs from a similarly sized settlement like Shor's Stone for example. Combat-focused NPCs can be a bit more. You can use the "Auto calc stats" flag which will compute individual skills based on the level and their class. Set this class to something suitable rather than the default "EncDremoraMelee".
 +
** For their inventory, pick an Outfit that seems suitable and ideally fits the written description. Sometimes, you may have to create a new Outfit, but this shouldn't be necessary here. It is generally good to add a "LootCitizenPockets..." leveled list to the inventory so that they have some randomized objects on them.
 +
** In the AI Data tab, make sure they at least help allies (i.e. close family) and possibly friends and allies. Give them a plausible [https://ck.uesp.net/wiki/AI_Data_Tab#Confidence Confidence]; NPCs that aren't combat-ready should try to run away more often. Confidence also determines how difficult it is to pass an Intimidate speech check on the NPC, but there are none in this assignment. Also set their combat style to something appropriate.
 +
** For Gaubelin, don't forget to give him spells. You have some leeway to be creative here.
 +
** Once all NPCs have been created, set [https://ck.uesp.net/wiki/Relationship Relationships] between them. Each pairing of NPCs that know each other should get a relationship if they are at least friends, or rivals.
 +
*** Pick an association type that best fits their relationship. For example, Jerome is not Wiske's father, but stands in for one, so arguably you could choose ParentChild. Family and lovers should get the "Ally" rank, others "Friend".
 +
*** The EditorID format is <prefix><Parentname><Childname>, where Parent is the "senior" NPC and Child the "junior" NPC. For association types that are essentially equal, the ordering is not important.
 +
* Creation of Location records
 +
** A [https://ck.uesp.net/wiki/Location Location] is an abstract piece of data that holds information which could potentially be used in radiant quests. Create a "<prefix>MarlinsvikLocation" location and give it suitable keywords describing what kind of location it is (you can look at the Shor's Stone location for reference). Set the Haafingar location as its parent.
 +
** Create Locations for each of the houses with the format "<prefix>Marlinsvik<Housename>". Set the Marlinsvik location from the previous step as the parent. Since Gaubelin's shack has no interior, it doesn't need a Location.
 +
* Creation of Faction records
 +
** Create a "<prefix>TownMarlinsvikFaction" faction and also a faction for each house with the format "<prefix>Marlinsvik<Housename>Faction". Again, Gaubelin doesn't need one.
 +
** Apply the "Town" faction to each NPC and also apply the faction of the house that they reside in.
 +
** Apply the relevant crime faction (i.e. CrimeFactionHaafingar) to every NPC and select it in the "Assigned crime faction" dropdown.
 +
** Certain NPCs will need even more factions to enable all of their required functions, but we will do those in the next step.
 +
* Creation of keys and lock lists
 +
** Jerome and Caechabhu's houses will need to be locked at night or when they are out and about. Create a [https://ck.uesp.net/wiki/Key Key] for each house with the format "<prefix>Marlinsvik<Housename>Key". You can duplicate a vanilla object so you don't have to manually specify a model and pickup sounds. Add an instance of the key to the inventory of the NPCs that live there... except for the dog.
 +
** Next, create a [https://ck.uesp.net/wiki/FormList FormList] for each house with the format "<prefix>Marlinsvik<Housename>LockList". Fill this list with the Actor base records of the relevant NPCs.
 +
* Apply it all to the cells
 +
** Let's start with the exterior. Every cell that contains even a small part of the settlement should be marked as such. In the cell window, right click and "Edit" the cell. Set the Location to the <prefix>MarlinsvikLocation that you created. Also change the editorID to a convention like "<prefix>Marlinsvik01" if it isn't named that already. You can rename a cell by single clicking the name in the cell window.
 +
** Load up a house interior. Set the Location to that house's location. Then in the Interior Data tab, set "Owner Faction" to the house faction you created, and "Lock List" to the respective lock list.
 +
** Edit the door. Give it a Lock that is tied to the key you created; the lock level can be Novice for commoners such as these. Also set the owner faction to the house faction. It is crucial for the inside reference of the door to be owned in this way for trespassing to work properly. The outside ref should not have a lock or owner set.
 +
** Place the NPCs near the beds where they sleep. Set the faction of the bed to that NPC so that nobody else will sleep there. Edit the NPC's ref and name it "<prefix><NPCname>REF" (this makes it show up in-game with the "help" console command, making it easy to teleport to the NPC if needed). Then, under the "Persistence location" tab, set the dropdown to the <prefix>MarlinsvikLocation. This controls when the NPC is persistent, i.e. having its pathing calculated by the game even if not in the currently loaded area. Choosing this as the persist location means the NPC is processed if any part of Marlinsvik's exterior or interior is currently loaded. In your .esp, all references are persistent at all times anyway, but when an .esp gets merged into an .esm file like in a project, that is no longer a case. If NPCs for some reason aren't coming out of their houses even though they should, this is often why. Also, the "Unique actor" fill method in quest aliases has been found to fail sometimes if the NPC ref doesn't have a persist location.
 +
** Assign [https://ck.uesp.net/wiki/Location_Ref_Type#Use Location Ref Types]. Place an Xmarker in the middle of the settlement as well as inside each of the houses and give it the LocationCenterMarker ref type. Double check that the map marker has MapMarkerRefType. NPCs who are written as homeowners should have the Boss ref type; when all NPCs marked as Boss are dead, the location is (invisibly) marked as cleared and items are no longer owned by the cell owners. Moreover, give HouseBedRefType to beds, HouseMainDoorRefType to the front door (on the inside), and HouseBackDoorRefType to any other doors if present.
 +
** In the exterior, set the ownership of any containers as well as somewhat valuable loose items to the <prefix>TownMarlinsvikFaction so that they can't be taken without it being considered stealing. You can use the [https://ck.uesp.net/wiki/Batch_Assignment Batch Assignment] tool to save some time.
 +
*** For the interiors, the cell's owning faction takes care of this automatically. Since Gaubelin's shack has no interior, you will have to assign his posessions to him manually.
  
Note that 2.1.1. mentions the daughter, and therefore has to follow 2.2. Here, it is simply dialogue continuing within the same Branch, which has expanded into a small dialogue tree. Once the Player has entered into such a tree, they will no longer see the Top-Level dialogue options until they exit dialogue or reach the end of the Branch, at which point the Top-Level menu will be shown again.
+
== Dialogue and scenes ==
 +
* You will have a single start game enabled quest called <prefix>DialogueMarlinsvik that holds all the regular, non-quest related dialogue for this settlement.
 +
** Greetings and Farewells go under the Misc tab. Create a topic of subtype "Hello"; this will contain all the greetings for 'all' the NPCs in a single stack of Infos. Same with the Farewells, which go in the subtybe "Goodbye".
 +
*** In Skyrim, unique NPC greetings usually just get a reset timer, typically of 0.5 hours. This means they are heard in sequence until they have all had a turn and the NPC drops down to generic lines ("Yes?", "Need something?" and so on) until half an in-game hour has passed and the lines reset. That said, writers often do not write greetings and farewells with a specific order in mind, so giving them the Random flag is an option. If you do this, be sure to set Random End on the NPC's last line in the stack, or generic lines will be interspersed with the unqiue ones.
 +
*** Some greetings depend on the completion of quests that you haven't implemented yet. It's up to you how to go about this; for example, you could just make a note of which lines you need to go back to later on to add conditions. In a project, sometimes such a quest will not be available for implementation until much later, and there will have to be some organization in place to keep track of these dependencies.
 +
*** The reason these quest-dependent greetings aren't contained in the quests themselves is that we want to be able to Stop() those quests after they are completed, but that will make all the dialogue inside of them unavailable, whereas these greetings are supposed to be heard after the quest.
 +
** Implement standard dialogue in the Player Dialogue tab (or Dialogue Views if you prefer). There is no standard EditorID naming scheme used consistently in the base game, but try to stick something sensible like "<prefix><Questname><NPCname><branchname><Topicindex>".
 +
*** Refer to the list of [https://ck.uesp.net/wiki/Condition_Functions Condition Functions] for any non-standard implementation notes that the writer has asked for.
 +
*** Sadly, there is no button or condition in the CK for "unlocking" dialogue branches, so this will have to be scripted. If a dialogue line locks (or unlocks) another dialogue branch, make a quest stage for it, and add a note saying e.g. "Locks PARENTS in Wiske's dialogue" as either a fragment script or a journal entry (since this quest won't show up in the journal anyway). Then have the line set that stage, and for the dialogue that gets locked (or unlocked), use the [https://ck.uesp.net/wiki/GetStageDone GetStageDone] condition. This means it'll work even if the stages are not set in a numerically ascending order.
 +
*** Occasionally, a writer may specify that dialogue should be locked or unlocked when it is not actually needed to script quest stages to do so. You always have the capacity to decide what the most elegant way to implement a given piece of dialogue is.
 +
** Gaubelin has an "Initial dialogue" section that is a little bit different. The conversation begins with him, not with a player dialogue option. This needs to be implemented as a [https://ck.uesp.net/wiki/Dialogue_Branch#Blocking_Branches Blocking Branch]. A vanilla example of this is [https://en.uesp.net/wiki/Skyrim:Idolaf_Battle-Born Idolaf Battle-Born]'s dialogue.
 +
*** The "Alias=Player" text will work even without making a quest alias for the player; see [https://ck.uesp.net/wiki/Text_Replacement Text Replacement].
 +
*** One of Gaubelin's greetings is specified to be valid only while the initial dialogue tree has not been gone through. However, by default, the first line from the blocking branch will be used as the greeting, even if the player is just walking past without initiating dialogue, leaving the custom greeting with no opportunity to be heard. This is why you have to put the [https://ck.uesp.net/wiki/IsInDialogueWithPlayer IsInDialogueWithPlayer] condition on the blocking branch dialogue.
 +
** Caechabhu is a merchant, so refer to the [https://ck.uesp.net/wiki/Creating_a_Merchant Creating a Merchant] tutorial. Her dialogue doc specifies a "What have you got for sale?" topic, but you do not need to add this, since the "JobMerchantFaction" takes care of it. Since Caechabhu is a fletcher, you additionally need to give her the "JobFletcherFaction" so she has the fletcher-specific dialogue lines. Also use the fletcher buy/sell list on her services faction, and put the MerchantContainerRefType on the merchant chest.
 +
*** Similarly, Gaubelin's "I'd like training in Alchemy" topic is also handled entirely by factions, but don't give him the factions just yet, since his services are a quest reward.
 +
*** Projects will have their own generic dialogue lines and will thus have custom "Job" factions that you will need to use.
 +
** Caechabhu's dialogue contains a speech check; see the [https://ck.uesp.net/wiki/Tutorial:_Dialogue_Speech_Checks Dialogue Speech Checks] tutorial.
 +
*** It is definitely important to use the "SpeechAverage" global variable in the condition rather than a numeric value. This is because the global variables are manipulated by certain Speech perks that the player can learn, whereas using a numeric value means these perks have no effect.
 +
*** For completeness, the success option should also have an OR condition "GetEquipped: TGAmuletofArticulationList", run on the player, in case they have the [https://en.uesp.net/wiki/Skyrim:Amulet_of_Articulation Amulet of Articulation] equipped. Yes, manually adding this condition to every single persuade check is how Bethesda coded the effect of this amulet.
 +
** For top-level branches, set the [https://ck.uesp.net/wiki/Topic Topic priorities] so that they appear in the same order as they are in the writing doc.
 +
** Remember that Start Game Enabled quests need a [[Arcane University:Seq Guide|SEQ file]] to actually start, or you can just quicksave and quickload as a stopgap solution.
 +
* [https://ck.uesp.net/wiki/Category:Scenes Scenes] are done differently (see also [https://ck.uesp.net/wiki/Bethesda_Tutorial_Scenes Bethesda Tutorial Scenes]). Here, there are only three, although usually there are more. [[File:Implementation mystic establisher example.png|400px|thumb|right|Markers for Brina Merilis and Skald the Elder's establishing scene in Dawnstar]]
 +
** The first scene is a '''major establisher'''. This is a scene that starts the game enabled and is manually choreographed. The NPCs will take up positions (determined by packages pointing to XMarkerHeadings that you need to place) and wait day and night for the player to come by and hear their dialogue, giving the first impression of the themes of the settlement. There will usually be an initial scene phase before dialogue that only finishes when the player enters a trigger volume around the markers, so that dialogue doesn't start until the player is reasonably within earshot.
 +
*** In dialogue actions, set a headtrack target pointing to whoever the NPC is talking to. It is also often a good idea to put empty dialogue actions for the other NPCs to make them headtrack whoever is talking.
 +
*** For Nabuco's bark, you can use a vanilla Shared Info (using the "Share response data from info" dropdown) that will give you a standard dog bark with no visible subtitle. Such infos can be found in the quest CreatureDialogueDog.
 +
*** You should put this scene in its own quest, and stop the quest when the scene is done (the "Stop quest on end" flag on the scene can be used for this). The reason for this is that the quest aliases needed for the scene make the NPCs persistent as long as the quest is running. Although, again, all references in an esp file will be persistent at all times.
 +
*** You MUST have [https://www.nexusmods.com/skyrimspecialedition/mods/15109 Fuz Ro D'oh] installed and running, or unvoiced scenes will stall, and you will see the NPCs standing around in a deadlock forever.
 +
** The other two scenes are '''random conversations'''. We will let the game engine trigger these for us whenever two NPCs get within talking range of each other. The trigger mechanism is the [https://ck.uesp.net/wiki/Category:Story_Manager Story Manager] (see also the [https://ck.uesp.net/wiki/Bethesda_Tutorial_Story_Manager Bethesda Tutorial Story Manager]). Each of these scenes will be in its own quest. The steps for setting it up are in [https://ck.uesp.net/wiki/Bethesda_Tutorial_Conversations this tutorial] which you may have seen before.
 +
*** One of the EditorID naming conventions in use is something like "<prefix>DialogueMarlinsvik<NPC1><NPC2>Scene01" for the quest and "<prefix>DialogueMarlinsvik<NPC1><NPC2>01Scene" for the scene. This slight variation is needed because no two objects can have the same EditorID.
 +
*** In the [https://ck.uesp.net/wiki/Actor_Dialogue_Event Actor Dialogue] story manager event node, there is a whole network of branch nodes that group scene quests by hold and then by settlement. If you were to follow this scheme, you would make a new node for Marlinsvik under HaafingarHoldScenes. However, we recommend that you keep your modded content separate from the base game, so make a top-level node for your assignment (and mark it as "Shares event" to play nice). A project will typically have a top-level node like this, and maintain their own structure down from that node.
 +
*** The second random conversation is a '''3x3 scene'''. This is an in-house invention where each dialogue phase will feature one random line out of three possibilities. Implementing this is easy: in a given dialogue action, have the dialogue topic contain three TopicInfos that are flagged "Random".
  
Although this example is small, Branches can become so elaborate that the Player will have a bad time treading through all of the dialogue buried in them. If needed, the dialogue can be broken up by splitting part of it into its own Branch. But here, it wouldn't make sense to ask about the NPC's daughter if we haven't heard about her yet! One tool that a writer can use here is to have one piece of dialogue ''unlock'' a Top-Level Branch:
+
If you have done everything correctly up to this point, the major establishing scene will play out and then the NPCs will lock themselves inside their homes. You can use the "unlock" console command on the door to get inside quicker, but the NPCs will be yelling at you for trespassing, making it difficult to test the dialogue. Using the console command "toggledetection" (or "tdetect") will make them more cooperative. You won't be able to test all of the scenes until their daily schedules have been made, which is the next step.
  
: 1. '''How long have you been working here?'''
+
== AI Packages ==
:: 1.1. I've been working these mines ever since the Forebears set foot in this place!
 
:: 1.2. Back then, this place was a frontier. Well, in some ways, it still is.
 
: 2. '''Do you have any family?'''
 
:: 2.1. Yeah, a daughter, back home in Stoudholm. Better keep her far away from a place like this. '''(unlocks 3)'''
 
: 3. '''You mentioned a daughter. Does she live alone?'''
 
:: 3.1. My mom and pop look after her. She's too young to be by herself.
 
  
Note how I rewrote 3. to be more natural as a conversation starter, since it no longer has to follow directly after 2.1.
+
Now that you have first-hand experience with the NPCs and their dialogue (although it would be good to take a cursory look at the quests too), it's time to think about their daily schedules. These are implemented in the form of [https://ck.uesp.net/wiki/Category:Packages AI Packages] (see also [https://ck.uesp.net/wiki/Package_(Form) this page] for an explanation of all the settings in a package). Since NPCs' standard schedules aren't quest-related, these packages belong in the [https://ck.uesp.net/wiki/AI_Packages_Tab AI Packages Tab] of the relevant NPC.
  
:::: '''Implementer's note''': "Unlocked" branches in non-quest related dialogue are usually implemented by having the unlocking dialogue set a stage in the settlement's general dialogue quest. The unlocked branch will be conditioned on that stage using GetStageDone. The quest will usually have a bunch of these stages; document them by describing what they do in the journal entry text.
+
The aim is to create a feeling of hustle and bustle in the settlement and make it come alive, while properly conveying each NPC's background through what the player sees them do, and making sure that NPCs will meet each other if they have a possible scene together. You will have noticed a schedule specified in each NPC's document. These are more like guidelines or suggestions than something to be implemented literally; as the person working directly in the game engine, you will have a better intuition of what works well in-game. One in-game hour is a lot shorter than how it may seem on paper; this is especially true if an NPC needs to travel a long distance between activities. But you will also have a direct view of the environment and everything in it that you can work with, as well as quick access to all the settlements in vanilla Skyrim that you can compare with. So this section entails some genuine creative freedom.
  
As mentioned before, the dialogue menu is a collection of Top-Level Branches from various sources. If this NPC is currently involved in a quest, then they may have some active dialogue related to it, and the in-game dialogue menu will look like this:
+
* Try to use pre-existing, reusable packages when it is convenient to do so. These all have EditorIDs beginning with "default". They often point to the NPC's editor location as their destination; the editor location is wherever you placed the NPC's reference in the world, namely inside their house, which is what makes these packages useful.
 +
** It's generally a good idea to set "DefaultHomeOwnerPackageList" in the default package list drop-down. This will take care of any "sandboxes at home" sequences in between other activities.
 +
** Other than that, it's typical to organize the package stack so that earlier packages in the day are at the bottom, with later packages up top. You should be able to find "defaultSleep" and "defaultEat" packages that roughly fit the timespans you want. If a package has "16x4" at the end of its EditorID, that means it begins at 16 hours (in military time) and lasts for 4 in-game hours, so from 4 p.m. to 8 p.m.
 +
** Some default packages will have the "unlock doors" flag set, others not. If a package unlocks doors, that means the player is able to come inside and visit without trespassing. Eat and home sandbox packages tend to unlock doors whereas sleep packages don't; if a default package bucks this trend, it is often indicated as such in the EditorID. You generally want the player to be able to enter a house legally so that the level designers' work can be enjoyed by all.
 +
* For most other types of packages, you will need to point to a custom location and therefore you will have to make custom packages. A convention for this is something like "<prefix><Settlement><NPC><Activity>10x2" where the 10x2 has the meaning explained previously. Make sure the times in the EditorID match up with how you configure the package itself, or you may be quite confused later on.
 +
** For the target of the package, you often want the NPC to be working in a general area rather than targeting a specific object. In such cases, you'll want to place an Xmarker and give the reference an EditorID like "<prefix><Settlement><NPC><Activity>Marker" and use that in the package, rather than take some nearby object.
 +
** The radius around the target is measured in [https://ck.uesp.net/wiki/Unit units]. If you're having a hard time visualizing a certain radius, look in the 3D Data tab of the marker reference and fiddle with the "Test radius" parameter. It'll show this radius in the render window.
 +
** A package with the template SandboxMultiLocation can be very useful as a broad solution. This way, you can have an NPC automatically rotate between several locations for a good chunk of their day, such as inside and outside of their home.
 +
** Be sure to disable "Allow eating" if applicable, otherwise the NPC will, in fact, be seen eating or drinking every chance they get.
 +
* You will have to place additional AI markers to aid NPCs in their schedules. Level designers typically only concern themselves with things that are visible, leaving you to place [https://ck.uesp.net/wiki/Idle_Markers idle markers], Xmarkers, and occasionally furniture objects without a visible model. Make sure to set the ownership of idle markers and furniture to a specific NPC or faction if you don't want them to be used by everyone.
 +
** For a demonstration of available idle animations, see [https://www.youtube.com/watch?v=ws6EaXQMBgs this video]. Most of these idles have corresponding idle markers that you can use. Of course, many animations are not suited for ordinary NPC activities.
 +
** Jerome's patch of crops will need a good handful of FarmingIdleMarkers for him to randomly switch between. As implied earlier, his farming package should point to an Xmarker located in the middle of the patch.
 +
** Making an NPC carry wood takes a bit of setting up, but adds a very nice touch. The package will need the CarryItem template and point to two WoodPiles, usually one near the chopping block and the other one near the main wood stockpile. Then you should also put the CarryItemScript on the NPC and configure its properties to spawn firewood if the NPC gets interrupted mid-carry, and add fragment scripts to the package in the "Begin/End/Change" tab to activate this behavior. See [https://en.uesp.net/wiki/Skyrim:Faendal Faendal] from Riverwood as an example NPC who carries wood as part of his daily schedule.
 +
** For Caechabhu, you probably don't want her tanning leather all the time, so you can improvise by, for example, giving her a WallLeanMarker (an invisible furniture) to make her lean against her house. Or you can have her spend part of her day in a [https://ck.uesp.net/wiki/Patrol_(Procedure) Patrol] around the village and the nearby wilderness (chain a bunch of PatrolIdleMarkers together via "linked reference", make a package with the Patrol template, and point it to a marker in the chain), evoking the impression that she's hunting.
 +
** For children like Wiske, it can be difficult coming up with things for them to do, since they can't perform working activities such as farming. If multiple children are around, you can make them run around along a patrol path to simulate them playing tag. Otherwise, having a child stand around doing nothing can often do the job. Maybe place an InvisibleChairMarker to use if there is a suitably-sized rock or crate in the village.
 +
** Gaubelin will get some mileage out of his alchemy set, but also experiment with putting markers like the StudyIdleMarker around his shack.
 +
** Inside a house, placing a SweepIdleMarker or two can work well. If there is a cooking set, the NPC will use that too.
 +
* For testing,
 +
** If an NPC isn't doing what they're supposed to, the cause is often navmesh-related. The navmesh door links might be broken, in which case you need to finalize the navmesh. Or there isn't any navmesh extending to the destinations of some packages. Of course, in this assignment, only flawless navmesh is provided to you.
 +
** Otherwise, check if there isn't some package higher up on an NPC's package stack that you forgot to set time restrictions on.
 +
** Consider using [https://www.nexusmods.com/skyrimspecialedition/mods/19250 More Informative Console], which displays an NPC's current AI package.
 +
** If you have an EditorID to the NPC's reference, it'll show up with the <code>help</code> console command. You can then do <code>prid <FormID></code> and <code>moveto player</code> to warp the NPC to you; this can be useful for certain tests, such as when the NPC needs to go to a different city and there is no navmesh. Or do <code>player.moveto <FormID></code> to warp to the NPC if you somehow can't find them.
 +
** While you're at it, you can check to see if the random conversations are working. The game is very proactive about these; if two NPCs get anywhere near each other and there is a random conversation for them, then the scene is practically guaranteed to fire. If it doesn't, then something is wrong. Again, you must have [https://www.nexusmods.com/skyrimspecialedition/mods/15109 Fuz Ro D'oh] running.
  
* I found the pickaxe you were looking for.
+
== Quests ==
* How long have you been working here?
 
* Do you have any family?
 
* You mentioned a daughter. Does she live alone?
 
  
The display order of Branches is determined by a number called Priority which is configured by the implementer, and standard practice is to give quests (in the narrow sense of the word) a higher Priority than non-quest dialogue, hence it appears at the top of the list.
+
Lastly, the assignment includes two small quests. These aren't any longer than the Bendu Olo and Arcane Scribe quests you've already seen, but they include some twists that are useful to familiarize yourself with.  
  
= Greetings =
+
In Skyrim, EditorIDs for misc tasks have a hodgepodge of contrasting conventions, usually containing the words "Freeform" or "Favor". Here, we recommend you use "<prefix>MarlinsvikFF01" and "<prefix>MarlinsvikFF02" for the two quests.
  
Although Top-Level Branches always begin with a dialogue option selected by the Player, the conversation itself will still be opened with a line from the NPC. That is because a '''Greeting''' (sometimes also referred to as a Hello) will run first.
+
* Find Wiske's Doll is a so-called '''radiant quest''', since the dungeon is randomly selected. Refer to the [https://ck.uesp.net/wiki/Bethesda_Tutorial_Radiant_Quests Bethesda Tutorial Radiant Quests] for a refresher.
 +
** Dungeons usually have a "LocSet" keyword for the tileset it uses and a "LocType" keyword for who or what resides there. You can use the [https://ck.uesp.net/wiki/GetInCurrentLoc GetInCurrentLoc] condition function to restrict the search to Haafingar. Ironically, there will only be one eligible location, namely [https://en.uesp.net/wiki/Skyrim:Steepfall_Burrow Steepfall Burrow].
 +
** You could script this quest to start during Wiske's dialogue, or you could have it start game enabled, like these kinds of quests usually are in vanilla. That means the player can come across Skanulike in a chest before ever visiting Marlinsvik, hence the dialogue option taking this possibility into account. Vanilla is less ceremonious about this.
 +
*** Another possibility of starting the quest in use in some Beyond Skyrim projects is with the [https://ck.uesp.net/wiki/Change_Location_Event Change Location] story manager event node, distributing the load so that the quests in a location get started when the player travels there rather than all at game start.
 +
** In the Scribe quest, you presumably created a new base object for the ring so that it has a unique name. Let's try and avoid that overhead this time. You can have the alias create a regular child's doll (see [https://en.uesp.net/wiki/Skyrim:Miscellaneous_Items#Children.27s_ItemsHF UESP] for a list of Skyrim objects if you need it), make a new [https://ck.uesp.net/wiki/Message Message] where the title is the desired display name of the item, and then select that message in the "Display name" dropdown on the alias.
 +
** If a line is formatted in light blue, that means it is repeated from earlier and mustn't be implemented as a separate line, or the voice actor will be prompted to record the same line twice. Sometimes you can manage it with invisible continues, but in other cases, you will have to make a Shared Info.
 +
** Don't know how to award a skill level in Speech? Take a peek at a vanilla example if you can remember one, or search the [https://ck.uesp.net/wiki/List_of_Papyrus_Functions List of Papyrus Functions].
 +
* Gather Flowers for Gaubelin is trickier, since you need to implement a live updating counter based on the player acquiring items, and several kinds of items need to be treated as though they are interchangeable.
 +
** It's always handy if there is a vanilla example so you can copy their homework. In this case, that would be [https://en.m.uesp.net/wiki/Skyrim:Grin_and_Bear_It Grin and Bear It]. The UESP is often a very helpful encyclopedia for vanilla content; its list of [https://en.m.uesp.net/wiki/Skyrim:Ingredients ingredients] will also be of use here.
 +
** You can pretty much base your implementation off of the vanilla quest. The main trick to making this quest work in an elegant way is that you need to provide some central bit of code - a function to count all flowers in the player's inventory and update objectives if needed - and have it be accessible from multiple places, like the stage fragment script (for when the quest is accepted) and a script attached to a player alias (for when flowers are gained or lost). The best place to put this function is in a new, manually created script that is attached to the quest, sitting next to the fragment script. Let's say this script is named AUMMarlinsvikFF02QuestScript.
 +
*** To run this function from somewhere else, you'll need to have the quest as an object, not of type Quest, but of type AUMMarlinsvikFF02QuestScript. In a stage fragment, you can have the CK create such an object for you using the "kMyQuest" dropdown. You can then do: <code>kMyQuest.CountItems()</code> for example.
 +
*** In an alias script (as well as a dialogue fragment script for example), you can do it like this: <code>(GetOwningQuest() as AUMMarlinsvikFF02QuestScript).CountItems()</code>
 +
** Don't forget to add an [https://ck.uesp.net/wiki/AddInventoryEventFilter_-_ObjectReference event filter] to the player alias script for the four kinds of mountain flowers, or to add the global variable for your counter to the "text replacement globals" list in the Quest Data tab!
 +
** In both quests, run Stop() to clean up after you no longer need anything in the quest. You should also provide a fail stage if the NPC dies (there are default alias scripts for this), which fails all objectives and also stops the quest. This fail stage is less relevant in Wiske's quest, unless you want to account for the player using a child killing mod.
  
Greetings are actually a separate system from Branches. By default, a Greeting can run when the Player initiates dialogue as well as when the Player just walks past, although it can be restricted to one or the other if needed (in practice, this distinction is rarely made). Greetings are located in a stack that is separate from the Branches. Like Branches, Greetings can be pooled from different sources and conditioned on a variety of factors.
+
And that's it! You have now gained essential experience in implementing a village. What's more, implementing a city is essentially the same task, just on a much larger scale. As before, zip up your esp and scripts and share it with us.
 
 
:: <u>Greetings</u>
 
# Welcome, traveler. What brings you to these mines?
 
# If you mine anything of value, it's yours to keep.
 
# My back's acting up...
 
 
 
:: <u>Dialogue</u>
 
: 1. '''How long have you been working here?'''
 
:: 1.1. ''(etc)''
 
 
 
Greetings can be in a fixed or in a random order. In non-quest dialogue, they are typically in a fixed order, and are written with this in mind. Note how the more important, introductory Greeting comes first, followed by ones that are just flavor text. Greetings of this kind will be implemented with a reset timer so that each one will only run once until some amount of in-game time has passed, at which point it can run again. Although the NPC may seem like an amnesiac for bidding the Player welcome a second time, this is common practice and helps keep custom dialogue active in the game. When all Greetings are on a timer, the NPC will fall back to generic dialogue (see below).
 
 
 
:::: '''Implementer's note''': A value for the reset timer which is consistent with vanilla seems to be 8 hours.
 
 
 
Instead of a reset timer, a line can be set to run only once in the entire playthrough. This is sometimes used for an initial Greeting if the NPC formally introduces themselves, but it is likely to go over the Player's head, as it passes quickly and will never be heard again.
 
 
 
:: <u>Greetings</u>
 
# Abak Lendrian. Miner, father, widower. '''(say once)'''
 
# Welcome, traveler. What brings you to these mines?
 
# If you mine anything of value, it's yours to keep.
 
# My back's acting up...
 
 
 
Although a Greeting can technically consist of multiple lines, this is not desired, because the Player can select an option in the dialogue menu before the second line has had a chance to come up. Consider this example, where the second Greeting is instead a followup line of the first:
 
 
 
:: <u>Greetings</u>
 
: 1. Welcome, traveler. What brings you to these mines?
 
:: 1.1. If you mine anything of value, it's yours to keep.
 
: 2. My back's acting up...
 
 
 
At the start of 1., the dialogue menu is available. If the Player does nothing for a while, 1. will finish and 1.1. will be spoken. If the Player is quick enough to select a dialogue option while 1. is still running, however, 1.1. will not run and is put on the same reset timer as 1., causing the Player to miss out on this line. Compounding this is that multi-line Greetings do not appear in Vanilla and the Player is therefore not trained to wait for them. For these reasons, Greetings with multiple lines are not idiomatic to Skyrim and shouldn't be used.
 
 
 
One common pitfall is to write the dialogue options as though they are replies to a Greeting which the NPC is assumed to speak first. Consider this broken example:
 
 
 
: 1. A traveler! What are you looking for in these mines?
 
:: 1.1. '''Nothing, but I was wondering how long you've been working here.'''
 
::: 1.1.1. I've been working these mines ever since the Forebears set foot in this place!
 
::: 1.1.2. Back then, this place was a frontier. Well, in some ways, it still is.
 
:: 1.2. '''Just taking a look. Do you have any family here?'''
 
::: 1.2.1. ''(etc)''
 
 
 
As mentioned before, 1. will typically be a Greeting with a reset timer. After it has been spoken once, the next conversation will open with a different Greeting, and 1.1. and 2.2. will be non sequiturs. Imagine the flow of conversation if a generic Greeting is active:
 
 
 
: "Hello." "Nothing, but I was wondering how long you've been working here."
 
 
 
Moreover, when the end of a Branch is reached, the top-level dialogue menu returns, leading to more non sequiturs:
 
 
 
: "Back then, this place was a frontier. Well, in some ways, it still is." "Just taking a look. Do you have any family here?"
 
 
 
Although it ''is'' possible to force 1. to always open the conversation, this will feel extremely repetitive, as it will seem as though the exact same conversation is repeating itself over and over. The proper solution here is to split 1. into one or more greetings, and rewrite 1.1. and 1.2. to be more general, so that they no longer require a specific line to precede them. The result of this would be the correct examples further above.
 
 
 
As a final note, there are NPCs whose entire unique dialogue consists of a short stack of Greetings. This means they will simply say a line when spoken to, without a dialogue menu opening up (although a dialogue menu can still appear if there is quest-related dialogue). It is good to have a healthy number of such NPCs in a settlement, as they can add a lot of flavor without bogging the player down in endless dialogue trees. For proof of the impact that such minimalist dialogue can have, look no further than Nazeem, who became one of the most infamous NPCs in Skyrim with just this:
 
 
 
:: <u>Greetings</u>
 
: 1. Do you get to the Cloud District very often? Oh, what am I saying - of course you don't.
 
: 2. I actually advise the Jarl on political matters. My input is invaluable, of course. But this is all probably a bit over your head.
 
: 3. Oh, it took years, but I earned my way to the top. I own Chillfurrow Farm, you see. Very successful business. Obviously.
 
 
 
= Farewells =
 
 
 
Similarly to Greetings, NPCs have a stack of '''Farewells''' (also known as Goodbyes) that can run when the player exits dialogue. Just like Greetings, these are pooled from various sources and can have various conditions on them, and Farewells in unique NPC dialogue tend to have a fixed order and reset timers.
 
 
 
:: <u>Farewells</u>
 
: 1. Thanks again for finding my pickaxe! '''(if "Find the Pickaxe" is completed)'''
 
: 2. Watch yourself in these mines, now. '''(if inside the mine)'''
 
: 3. Don't be a stranger, stranger.
 
 
 
Like with Greetings, a Farewell can technically have multiple lines, but this is again not idiomatic to Skyrim and is bad practice. As soon as the first line begins, the dialogue menu closes, and the Player is free to run away or re-enter dialogue with the NPC before the second line has had a change to begin.
 
 
 
NPCs like Nazeem who have only Greetings and no Dialogue Branches also will not say any Farewells (except in the rare and temporary case where there happens to be quest-related dialogue), so it doesn't make much sense to write custom Farewells for them.
 
 
 
It is actually possible to end dialogue on a regular dialogue line from a Branch rather than with a Farewell. This is done whenever it doesn't make much sense for the conversation to continue, like when the Player accepts a quest and is sent off to go do it, or if they have just said something rude:
 
 
 
: 1. '''How long have you been working here?'''
 
:: 1.1. I've been working these mines ever since the Forebears set foot in this place!
 
:: 1.2. Back then, this place was a frontier. Well, in some ways, it still is.
 
::: 1.2.1. '''That's impressive. You must be very resilient.'''
 
:::: 1.2.1.1. Thanks, stranger! It's always nice to get proper recognition for my diligence.
 
:::: 1.2.1.2. It's taken its toll on me, but I've never once regretted coming here.
 
::: 1.2.2. '''It's been a while. I bet you're just about ready to hit the retirement home.
 
:::: 1.2.2.1. Hmph! If you've got nothing nice to say, then don't say anything at all. '''(exit dialogue)'''
 
 
 
1.2.1.2. will return the Player to the top-level dialogue menu, whereas 1.2.2.1. will close the dialogue menu altogether. Note that the player can still re-initiate dialogue right after, so these kinds of lines shouldn't be so hostile that it is no longer believable to have a normal conversation afterwards. It is possible to have the NPC refuse to speak to the Player and say some rude one-liners instead, but this is an extreme measure that is typically reserved for bad endings of quests.
 
 
 
Dialogue lines that exit dialogue have the same caveats as with Farewells regarding multiple lines, so 1.2.2.1. was deliberately written to be just one line. Situations like this should be avoided:
 
 
 
::: 1.2.2. '''It's been a while. I bet you're just about ready to hit the retirement home.
 
:::: 1.2.2.1. What did you just say about me, you little s'wit?
 
:::: 1.2.2.2. I'll have you know I graduated top of my class in the Aubere Academy, and I've been involved in numerous secret raids on Totambu.
 
:::: 1.2.2.3. ''(etc)'' '''(exit dialogue)'''
 
 
 
= Notes on generic dialogue =
 
 
 
Generic dialogue has been mentioned a few times up to this point. It consists of default dialogue with the lowest Priority that is shared by all NPCs, for when no unique lines are present or currently valid. The order of these lines is random, and they have no reset timer. This includes Greetings and Farewells, but a plethora of other kinds of dialogue as well. For an overview, see the [https://en.uesp.net/wiki/Skyrim:Generic_Dialogue UESP page on Generic Dialogue].
 
 
 
The creation of generic dialogue is a major undertaking for any project and is not within the scope of this article. It can only be done once Voice Types have been decided on, which in turn requires clarity on the number and demographics of the NPCs comprising a planned release, and the expected number of voice actors to be cast.
 
 
 
One thing that should be addressed in this article is that unique NPC dialogue must not itself be so generic that it is made redundant by the actual Generic Dialogue. Consider these generic greetings in Vanilla:
 
 
 
:: <u>Greetings</u>
 
: 1. Hmm?
 
: 2. Need something?
 
: 3. Yes?
 
 
 
Now, instead of the unique Greetings given to our NPC in the previous sections, imagine if their Greetings had been these:
 
 
 
:: <u>Greetings</u>
 
: 1. Hello.
 
: 2. What is it?
 
: 3. Hmm?
 
 
 
There is no point to writing and recording these for any particular NPC, as this kind of filler dialogue is already provided by the Generic Dialogue. Unique Greetings should have some flavor to them that is specific to the NPC in question, as in the previous examples. If this is, for whatever reason, difficult, then it is also perfectly acceptable not to write any unique Greetings for the NPC at all, in which case they will say only Generic greetings.
 
 
 
Although we have only discussed custom Greetings and Farewells, it is possible to write custom lines for any category of Generic Dialogue, but this is rare in practice. One kind of dialogue for which it might make sense to do this is combat taunts (lines barked at an opponent in the middle of combat).
 
 
 
= Blocking Branches and Forcegreets =
 
 
 
Examples from Idolaf Battle-Born and Maul. Sometimes used in combination with greetings: example from Jaree-Ra
 
 
 
Earlier, we noted that Top-Level Branches always begin with a dialogue option chosen by the Player. However, there are different kinds of Branches where the dialogue tree ''is'' initiated by the NPC. These are '''Blocking Branches''', and Branches activated via '''Forcegreet'''.
 
 
 
A Branch of either of these types will override and disable all other Player Dialogue from this NPC as long as its conditions are valid. Thus, they are used sparingly, typically within a specific quest stage.
 
 
 
If a Forcegreet is specified, the NPC will approach the Player when they come near and forcibly initiate dialogue:
 
 
 
: 1. You there! What took you so long? Corsairs have started attacking the mine while you were looking for my pickaxe! '''(Forcegreet)'''
 
:: 1.1. '''How was I supposed to know this would happen?'''
 
::: 1.1.1. Well, no matter. You can help me fight them off now. I'll take back my pickaxe as a weapon. '''(pickaxe removed) (exit dialogue and initiate combat)'''
 
 
 
Forcegreets run counter to the freeform nature of Skyrim, which tries to avoid forcing the Player into any specific action whenever possible. Here, the Forcegreet was necessary, because the Player would miss out on exposition and gameplay (a pickaxe-toting companion) if they were able to just run past the NPC and clear out the Corsairs by themselves.
 
 
 
If you want a dialogue tree to be initiated by the NPC for whatever reason (such as flavor), but can't justify a Forcegreet, then a Blocking Branch may suffice. This works similarly to a Forcegreet, except it will activate when the Player initiates dialogue with the NPC rather than being forced into it. Imagine if, instead of Corsairs attacking, the quest simply has the Player return the pickaxe to an overexcited miner:
 
 
 
: 1. You're back! And the rustle is unmistakable - you're carrying my pickaxe! '''(blocking dialogue)'''
 
:: 1.1. '''That's right. Here you go.'''
 
::: 1.1.1. By Zenithar, you've found it! Thank you so much, friend. Here is your reward. '''(remove pickaxe, give small leveled gold)'''
 
 
 
It would have been just as functional to write this differently as a Top-Level Branch, which is initiated by a dialogue option in the Top-Level menu. But moderate use of these Blocking Branches can add flavor.
 
 
 
The examples above are quest-related. However, there are instances of Forcegreets and Blocking Branches in Vanilla that are part of non-quest dialogue. For lack of other conditions, these are only triggered on the first encounter, after which they will not run again, and regular dialogue takes over.
 
 
 
Examples of Forcegreets include the gate guards outside Whiterun and Riften, which require persuasion or bribery before the Player is given entry. Again, Forcegreets were justifiably used here because the Player shouldn't simply cruise past and into the city.
 
 
 
Blocking Branches are more plentiful, and are typically done for flavor on the first meeting. Consider this encounter with Idolaf Battle-Born which, incidentally, is his only unique dialogue, after which he will revert to generic greetings:
 
 
 
: 1. Gray-Mane or Battle-Born? '''(blocking dialogue)'''
 
:: 1.1. '''What?'''
 
::: 1.2.1. Got stones in your ears? I asked what side you're on, Gray-Mane or Battle-Born! '''(back to top. unlocks 1.4.)'''
 
:: 1.2. '''Battle-Born.'''
 
::: 1.2.1. Then I say well met, friend. I could tell you were a sharp one the moment I laid eyes on you. '''(exit dialogue, increase disposition)'''
 
:: 1.3. '''Grey-Mane.'''
 
::: 1.3.1. Then you're either a Stormcloak sympathizer or a fool. Either way, you're no friend of mine. '''(exit dialogue, decrease disposition)'''
 
:: 1.4. '''I don't know what you're asking.'''
 
::: 1.4.1. New in town, huh? Whiterun's got two clans, both old and both respected.
 
::: 1.4.2. Difference is, the Gray-Manes turned their backs on the Empire and we Battle-Borns stayed loyal.
 
::: 1.4.3. So I'll ask again, Gray-Mane or Battle-Born? '''(back to top. unlocks 1.5.)'''
 
:: 1.5. '''I'm not picking sides.'''
 
::: 1.5.1. Sooner or later, we all have to choose a side. '''(exit dialogue)'''
 
 
 
:::: '''Implementer's note''': Here, the unlocks aren't done by scripting quest stages, but by configuring the dialogue links appropriately, since these are linked topics rather than Top-Level Branches. Although 1.2.1., 1.3.1. and 1.5.1. do not have the Goodbye flag set, they still close the dialogue menu since they link to no other topic and Idolaf has no Top-Level Branches.
 
 
 
One crucial point of note is that these Blocking Branches should be kept short, not be excessively branching, and not include dialogue that is essential world building for the Player. Consider this broken example where the NPC is the mayor of a town:
 
 
 
: 1. You there! Haven't seen you before in my town. What is your purpose here? '''(Blocking dialogue on first meeting)'''
 
:: 1.1. '''Nothing, just passing through.'''
 
::: 1.1.1. That's what they all say. I've got my eye on you. '''(exit dialogue)'''
 
:: 1.2. '''Nothing but trouble, I assure you.'''
 
::: 1.2.1. Don't play sassy with me. That's a surefire way to end up in the brig. '''(exit dialogue)'''
 
:: 1.3. '''I just saw this town and wondered what it was like.'''
 
::: 1.3.1. This town, stranger, is the hallowed abode of Stoudholm, haven for Kings and fishermen alike.
 
::: 1.3.2. It has sometimes been described as being situated in the armpit of High Rock, a moniker which I personally take pride in.
 
::: 1.3.3. Rest assured that we are a proud and prosperous community, and will do anything to keep it that way.
 
:: 1.4. '''I came here looking for work.'''
 
::: 1.4.1. ''(etc)''
 
 
 
The biggest problem is that selecting either 1.1. or 1.2. will disable this entire dialogue tree for good, including 1.3. and 1.4. which are important pieces of dialogue to establish lore and direct the Player toward quests, respectively. Furthermore, it is not clear what happens after 1.3.3.; does it end dialogue and disable the tree, even though the dialogue doesn't suggest a sudden end to the conversation? Or does it bring up all the dialogue options again (as though it were a Top-Level menu, which it is not), leading to non sequiturs?
 
 
 
In the section on Greetings, we addressed such a situation by rewriting all the dialogue options so that they don't expect to follow a specific line anymore. This is appropriate for 1.3. and 1.4., but not for 1.1. and 1.2., which only make sense within the context of the Mayor calling the Player out on the first meeting. The true solution here is to split 1.1. and 1.2. into their own Blocking Branch and have the rest rewritten as Top-Level Branches, with a regular stack of greetings added for completeness. The guidelines for formatting and labeling this depend on the project in question.
 
 
 
:: <u>Blocking dialogue on first meeting</u>
 
: 1. You there! Haven't seen you before in my town. What is your purpose here?
 
:: 1.1. '''Nothing, just passing through.'''
 
::: 1.1.1. That's what they all say. I've got my eye on you. '''(exit dialogue)'''
 
:: 1.2. '''Nothing but trouble, I assure you.'''
 
::: 1.2.1. Don't play sassy with me. That's a surefire way to end up in the brig. '''(exit dialogue)'''
 
 
 
:: <u>Greetings</u>
 
: 1. I hope you find yourself well in Stoudholm, traveler.
 
: 2. If there is any sign of trouble, tell the Guard right away.
 
: 3. How can I be of service?
 
 
 
:: <u>Standard dialogue</u>
 
:: 1. '''What can you tell me about this town?'''
 
::: 1.1. This town, stranger, is the hallowed abode of Stoudholm, haven for Kings and fishermen alike.
 
::: 1.2. It has sometimes been described as being situated in the armpit of High Rock, a moniker which I personally take pride in.
 
::: 1.3. Rest assured that we are a proud and prosperous community, and will do anything to keep it that way.
 
:: 2. '''Is there any work available?'''
 
::: 2.1. ''(etc)''
 
 
 
= Walkaways =
 
 
 
Example from Maul
 
 
 
 
 
= Gameplay dialogue =
 
 
 
Barter, rent room, trainers, rumors and why not to be too creative with them
 
 
 
 
 
= Scenes =
 
 
 
Random conversations vs major establishers
 

Latest revision as of 09:13, 5 December 2024

Welcome to the Arcane Mystic assignment for quest and dialogue implementation, where you will implement the small settlement of Marlinsvik, situated on Skyrim's northwestern coast. Although the scope of the settlement has been kept small, it is still a beefy exercise, and by the time you're done, you will have familiarized yourself with a sizeable amount of Creation Kit elements that will be useful for a project and for your own mods.

The writing document folder for Marlinsvik can be found here:

We also provide an esp file containing level design for the village, although the houses are of course still unpopulated. In-game, run tmm 1 in the console to instantly discover all map markers, including Marlinsvik, so you can fast travel there. Look northwest of Solitude, near Broken Oar Grotto.

This document, originating from the Beyond Skyrim: Cyrodiil project, lists many of the required steps, although some of its contents go beyond the scope of this exercise. This AU lecture gives a general overview of the work all of this entails. For the most part, though, you can just rely on the instructions below.

As before, use a prefix of three or four letters (such as "AUM", for Arcane University Mystic) that you will use in all EditorIDs of objects that you create. Make sure to also set this prefix in the "Papyrus" tab of the Creation Kit Preferences window. This will automatically add "<prefix>_" to the name of any fragment script that it creates. For manually created scripts, make sure to include your prefix manually when you choose the name.

The exercise can be divided into four parts, taking you across all of the essential steps in implementing a settlement. Feel free to ask for feedback partway through if you are running into issues or are unsure that you're doing things correctly.

Initial setup[edit]

  • Creation of the NPC records
    • It is best to start with creating the Actor base records of the five NPCs (including the dog). Set them as "Unique", write their full name in "Name" and, if they have a surname, write only their first name in "Short name". EditorID should be of the format "<prefix>FirstnameLastname".
    • Thankfully, you do not need to waste time recreating their faces, because the writer has supplied .npc files (created using the spf console command) for them in the "Facedata" folder that you can import. Set the actor to any of the playable races so that the "Character Gen Parts" tab becomes visible. Under this tab, click the "Import" button and select the .npc file. This will take care of setting the correct race, sex, weight and face data.
      • If the .npc file was created using modded hairs, noses etc., then these almost always won't import correctly due to differences between the in-game load order and the load order in the CK. You can open the .npc file in a plain text editor like Notepad and check to see if there are any FormIDs not beginning in 00, and then put those on the NPC manually after import. In this case, Marlinsvik only depends on vanilla, so this isn't an issue.
      • Wiske, being a child and thus not a playable race, does not have an .npc file, so you will have to improvise based on the written description.
      • Gaubelin is described as an Elder, which is technically a separate race designed to look older than the playable races. The .npc file is for a Breton instead; after importing, you can try setting his race to an Elder, which preserves most elements, but arguably looks worse. You can decide how to go about this. Note that the Elder race does not distinguish between Nords and Bretons and doesn't confer racial bonuses.
    • You will, however, need to configure the NPC's stats and inventory. Unique settlement NPCs tend to have static level, so don't use the "PC Level Mult" flag. A level between 5 and 10 seems appropriate for ordinary people; compare with NPCs from a similarly sized settlement like Shor's Stone for example. Combat-focused NPCs can be a bit more. You can use the "Auto calc stats" flag which will compute individual skills based on the level and their class. Set this class to something suitable rather than the default "EncDremoraMelee".
    • For their inventory, pick an Outfit that seems suitable and ideally fits the written description. Sometimes, you may have to create a new Outfit, but this shouldn't be necessary here. It is generally good to add a "LootCitizenPockets..." leveled list to the inventory so that they have some randomized objects on them.
    • In the AI Data tab, make sure they at least help allies (i.e. close family) and possibly friends and allies. Give them a plausible Confidence; NPCs that aren't combat-ready should try to run away more often. Confidence also determines how difficult it is to pass an Intimidate speech check on the NPC, but there are none in this assignment. Also set their combat style to something appropriate.
    • For Gaubelin, don't forget to give him spells. You have some leeway to be creative here.
    • Once all NPCs have been created, set Relationships between them. Each pairing of NPCs that know each other should get a relationship if they are at least friends, or rivals.
      • Pick an association type that best fits their relationship. For example, Jerome is not Wiske's father, but stands in for one, so arguably you could choose ParentChild. Family and lovers should get the "Ally" rank, others "Friend".
      • The EditorID format is <prefix><Parentname><Childname>, where Parent is the "senior" NPC and Child the "junior" NPC. For association types that are essentially equal, the ordering is not important.
  • Creation of Location records
    • A Location is an abstract piece of data that holds information which could potentially be used in radiant quests. Create a "<prefix>MarlinsvikLocation" location and give it suitable keywords describing what kind of location it is (you can look at the Shor's Stone location for reference). Set the Haafingar location as its parent.
    • Create Locations for each of the houses with the format "<prefix>Marlinsvik<Housename>". Set the Marlinsvik location from the previous step as the parent. Since Gaubelin's shack has no interior, it doesn't need a Location.
  • Creation of Faction records
    • Create a "<prefix>TownMarlinsvikFaction" faction and also a faction for each house with the format "<prefix>Marlinsvik<Housename>Faction". Again, Gaubelin doesn't need one.
    • Apply the "Town" faction to each NPC and also apply the faction of the house that they reside in.
    • Apply the relevant crime faction (i.e. CrimeFactionHaafingar) to every NPC and select it in the "Assigned crime faction" dropdown.
    • Certain NPCs will need even more factions to enable all of their required functions, but we will do those in the next step.
  • Creation of keys and lock lists
    • Jerome and Caechabhu's houses will need to be locked at night or when they are out and about. Create a Key for each house with the format "<prefix>Marlinsvik<Housename>Key". You can duplicate a vanilla object so you don't have to manually specify a model and pickup sounds. Add an instance of the key to the inventory of the NPCs that live there... except for the dog.
    • Next, create a FormList for each house with the format "<prefix>Marlinsvik<Housename>LockList". Fill this list with the Actor base records of the relevant NPCs.
  • Apply it all to the cells
    • Let's start with the exterior. Every cell that contains even a small part of the settlement should be marked as such. In the cell window, right click and "Edit" the cell. Set the Location to the <prefix>MarlinsvikLocation that you created. Also change the editorID to a convention like "<prefix>Marlinsvik01" if it isn't named that already. You can rename a cell by single clicking the name in the cell window.
    • Load up a house interior. Set the Location to that house's location. Then in the Interior Data tab, set "Owner Faction" to the house faction you created, and "Lock List" to the respective lock list.
    • Edit the door. Give it a Lock that is tied to the key you created; the lock level can be Novice for commoners such as these. Also set the owner faction to the house faction. It is crucial for the inside reference of the door to be owned in this way for trespassing to work properly. The outside ref should not have a lock or owner set.
    • Place the NPCs near the beds where they sleep. Set the faction of the bed to that NPC so that nobody else will sleep there. Edit the NPC's ref and name it "<prefix><NPCname>REF" (this makes it show up in-game with the "help" console command, making it easy to teleport to the NPC if needed). Then, under the "Persistence location" tab, set the dropdown to the <prefix>MarlinsvikLocation. This controls when the NPC is persistent, i.e. having its pathing calculated by the game even if not in the currently loaded area. Choosing this as the persist location means the NPC is processed if any part of Marlinsvik's exterior or interior is currently loaded. In your .esp, all references are persistent at all times anyway, but when an .esp gets merged into an .esm file like in a project, that is no longer a case. If NPCs for some reason aren't coming out of their houses even though they should, this is often why. Also, the "Unique actor" fill method in quest aliases has been found to fail sometimes if the NPC ref doesn't have a persist location.
    • Assign Location Ref Types. Place an Xmarker in the middle of the settlement as well as inside each of the houses and give it the LocationCenterMarker ref type. Double check that the map marker has MapMarkerRefType. NPCs who are written as homeowners should have the Boss ref type; when all NPCs marked as Boss are dead, the location is (invisibly) marked as cleared and items are no longer owned by the cell owners. Moreover, give HouseBedRefType to beds, HouseMainDoorRefType to the front door (on the inside), and HouseBackDoorRefType to any other doors if present.
    • In the exterior, set the ownership of any containers as well as somewhat valuable loose items to the <prefix>TownMarlinsvikFaction so that they can't be taken without it being considered stealing. You can use the Batch Assignment tool to save some time.
      • For the interiors, the cell's owning faction takes care of this automatically. Since Gaubelin's shack has no interior, you will have to assign his posessions to him manually.

Dialogue and scenes[edit]

  • You will have a single start game enabled quest called <prefix>DialogueMarlinsvik that holds all the regular, non-quest related dialogue for this settlement.
    • Greetings and Farewells go under the Misc tab. Create a topic of subtype "Hello"; this will contain all the greetings for 'all' the NPCs in a single stack of Infos. Same with the Farewells, which go in the subtybe "Goodbye".
      • In Skyrim, unique NPC greetings usually just get a reset timer, typically of 0.5 hours. This means they are heard in sequence until they have all had a turn and the NPC drops down to generic lines ("Yes?", "Need something?" and so on) until half an in-game hour has passed and the lines reset. That said, writers often do not write greetings and farewells with a specific order in mind, so giving them the Random flag is an option. If you do this, be sure to set Random End on the NPC's last line in the stack, or generic lines will be interspersed with the unqiue ones.
      • Some greetings depend on the completion of quests that you haven't implemented yet. It's up to you how to go about this; for example, you could just make a note of which lines you need to go back to later on to add conditions. In a project, sometimes such a quest will not be available for implementation until much later, and there will have to be some organization in place to keep track of these dependencies.
      • The reason these quest-dependent greetings aren't contained in the quests themselves is that we want to be able to Stop() those quests after they are completed, but that will make all the dialogue inside of them unavailable, whereas these greetings are supposed to be heard after the quest.
    • Implement standard dialogue in the Player Dialogue tab (or Dialogue Views if you prefer). There is no standard EditorID naming scheme used consistently in the base game, but try to stick something sensible like "<prefix><Questname><NPCname><branchname><Topicindex>".
      • Refer to the list of Condition Functions for any non-standard implementation notes that the writer has asked for.
      • Sadly, there is no button or condition in the CK for "unlocking" dialogue branches, so this will have to be scripted. If a dialogue line locks (or unlocks) another dialogue branch, make a quest stage for it, and add a note saying e.g. "Locks PARENTS in Wiske's dialogue" as either a fragment script or a journal entry (since this quest won't show up in the journal anyway). Then have the line set that stage, and for the dialogue that gets locked (or unlocked), use the GetStageDone condition. This means it'll work even if the stages are not set in a numerically ascending order.
      • Occasionally, a writer may specify that dialogue should be locked or unlocked when it is not actually needed to script quest stages to do so. You always have the capacity to decide what the most elegant way to implement a given piece of dialogue is.
    • Gaubelin has an "Initial dialogue" section that is a little bit different. The conversation begins with him, not with a player dialogue option. This needs to be implemented as a Blocking Branch. A vanilla example of this is Idolaf Battle-Born's dialogue.
      • The "Alias=Player" text will work even without making a quest alias for the player; see Text Replacement.
      • One of Gaubelin's greetings is specified to be valid only while the initial dialogue tree has not been gone through. However, by default, the first line from the blocking branch will be used as the greeting, even if the player is just walking past without initiating dialogue, leaving the custom greeting with no opportunity to be heard. This is why you have to put the IsInDialogueWithPlayer condition on the blocking branch dialogue.
    • Caechabhu is a merchant, so refer to the Creating a Merchant tutorial. Her dialogue doc specifies a "What have you got for sale?" topic, but you do not need to add this, since the "JobMerchantFaction" takes care of it. Since Caechabhu is a fletcher, you additionally need to give her the "JobFletcherFaction" so she has the fletcher-specific dialogue lines. Also use the fletcher buy/sell list on her services faction, and put the MerchantContainerRefType on the merchant chest.
      • Similarly, Gaubelin's "I'd like training in Alchemy" topic is also handled entirely by factions, but don't give him the factions just yet, since his services are a quest reward.
      • Projects will have their own generic dialogue lines and will thus have custom "Job" factions that you will need to use.
    • Caechabhu's dialogue contains a speech check; see the Dialogue Speech Checks tutorial.
      • It is definitely important to use the "SpeechAverage" global variable in the condition rather than a numeric value. This is because the global variables are manipulated by certain Speech perks that the player can learn, whereas using a numeric value means these perks have no effect.
      • For completeness, the success option should also have an OR condition "GetEquipped: TGAmuletofArticulationList", run on the player, in case they have the Amulet of Articulation equipped. Yes, manually adding this condition to every single persuade check is how Bethesda coded the effect of this amulet.
    • For top-level branches, set the Topic priorities so that they appear in the same order as they are in the writing doc.
    • Remember that Start Game Enabled quests need a SEQ file to actually start, or you can just quicksave and quickload as a stopgap solution.
  • Scenes are done differently (see also Bethesda Tutorial Scenes). Here, there are only three, although usually there are more.
    Markers for Brina Merilis and Skald the Elder's establishing scene in Dawnstar
    • The first scene is a major establisher. This is a scene that starts the game enabled and is manually choreographed. The NPCs will take up positions (determined by packages pointing to XMarkerHeadings that you need to place) and wait day and night for the player to come by and hear their dialogue, giving the first impression of the themes of the settlement. There will usually be an initial scene phase before dialogue that only finishes when the player enters a trigger volume around the markers, so that dialogue doesn't start until the player is reasonably within earshot.
      • In dialogue actions, set a headtrack target pointing to whoever the NPC is talking to. It is also often a good idea to put empty dialogue actions for the other NPCs to make them headtrack whoever is talking.
      • For Nabuco's bark, you can use a vanilla Shared Info (using the "Share response data from info" dropdown) that will give you a standard dog bark with no visible subtitle. Such infos can be found in the quest CreatureDialogueDog.
      • You should put this scene in its own quest, and stop the quest when the scene is done (the "Stop quest on end" flag on the scene can be used for this). The reason for this is that the quest aliases needed for the scene make the NPCs persistent as long as the quest is running. Although, again, all references in an esp file will be persistent at all times.
      • You MUST have Fuz Ro D'oh installed and running, or unvoiced scenes will stall, and you will see the NPCs standing around in a deadlock forever.
    • The other two scenes are random conversations. We will let the game engine trigger these for us whenever two NPCs get within talking range of each other. The trigger mechanism is the Story Manager (see also the Bethesda Tutorial Story Manager). Each of these scenes will be in its own quest. The steps for setting it up are in this tutorial which you may have seen before.
      • One of the EditorID naming conventions in use is something like "<prefix>DialogueMarlinsvik<NPC1><NPC2>Scene01" for the quest and "<prefix>DialogueMarlinsvik<NPC1><NPC2>01Scene" for the scene. This slight variation is needed because no two objects can have the same EditorID.
      • In the Actor Dialogue story manager event node, there is a whole network of branch nodes that group scene quests by hold and then by settlement. If you were to follow this scheme, you would make a new node for Marlinsvik under HaafingarHoldScenes. However, we recommend that you keep your modded content separate from the base game, so make a top-level node for your assignment (and mark it as "Shares event" to play nice). A project will typically have a top-level node like this, and maintain their own structure down from that node.
      • The second random conversation is a 3x3 scene. This is an in-house invention where each dialogue phase will feature one random line out of three possibilities. Implementing this is easy: in a given dialogue action, have the dialogue topic contain three TopicInfos that are flagged "Random".

If you have done everything correctly up to this point, the major establishing scene will play out and then the NPCs will lock themselves inside their homes. You can use the "unlock" console command on the door to get inside quicker, but the NPCs will be yelling at you for trespassing, making it difficult to test the dialogue. Using the console command "toggledetection" (or "tdetect") will make them more cooperative. You won't be able to test all of the scenes until their daily schedules have been made, which is the next step.

AI Packages[edit]

Now that you have first-hand experience with the NPCs and their dialogue (although it would be good to take a cursory look at the quests too), it's time to think about their daily schedules. These are implemented in the form of AI Packages (see also this page for an explanation of all the settings in a package). Since NPCs' standard schedules aren't quest-related, these packages belong in the AI Packages Tab of the relevant NPC.

The aim is to create a feeling of hustle and bustle in the settlement and make it come alive, while properly conveying each NPC's background through what the player sees them do, and making sure that NPCs will meet each other if they have a possible scene together. You will have noticed a schedule specified in each NPC's document. These are more like guidelines or suggestions than something to be implemented literally; as the person working directly in the game engine, you will have a better intuition of what works well in-game. One in-game hour is a lot shorter than how it may seem on paper; this is especially true if an NPC needs to travel a long distance between activities. But you will also have a direct view of the environment and everything in it that you can work with, as well as quick access to all the settlements in vanilla Skyrim that you can compare with. So this section entails some genuine creative freedom.

  • Try to use pre-existing, reusable packages when it is convenient to do so. These all have EditorIDs beginning with "default". They often point to the NPC's editor location as their destination; the editor location is wherever you placed the NPC's reference in the world, namely inside their house, which is what makes these packages useful.
    • It's generally a good idea to set "DefaultHomeOwnerPackageList" in the default package list drop-down. This will take care of any "sandboxes at home" sequences in between other activities.
    • Other than that, it's typical to organize the package stack so that earlier packages in the day are at the bottom, with later packages up top. You should be able to find "defaultSleep" and "defaultEat" packages that roughly fit the timespans you want. If a package has "16x4" at the end of its EditorID, that means it begins at 16 hours (in military time) and lasts for 4 in-game hours, so from 4 p.m. to 8 p.m.
    • Some default packages will have the "unlock doors" flag set, others not. If a package unlocks doors, that means the player is able to come inside and visit without trespassing. Eat and home sandbox packages tend to unlock doors whereas sleep packages don't; if a default package bucks this trend, it is often indicated as such in the EditorID. You generally want the player to be able to enter a house legally so that the level designers' work can be enjoyed by all.
  • For most other types of packages, you will need to point to a custom location and therefore you will have to make custom packages. A convention for this is something like "<prefix><Settlement><NPC><Activity>10x2" where the 10x2 has the meaning explained previously. Make sure the times in the EditorID match up with how you configure the package itself, or you may be quite confused later on.
    • For the target of the package, you often want the NPC to be working in a general area rather than targeting a specific object. In such cases, you'll want to place an Xmarker and give the reference an EditorID like "<prefix><Settlement><NPC><Activity>Marker" and use that in the package, rather than take some nearby object.
    • The radius around the target is measured in units. If you're having a hard time visualizing a certain radius, look in the 3D Data tab of the marker reference and fiddle with the "Test radius" parameter. It'll show this radius in the render window.
    • A package with the template SandboxMultiLocation can be very useful as a broad solution. This way, you can have an NPC automatically rotate between several locations for a good chunk of their day, such as inside and outside of their home.
    • Be sure to disable "Allow eating" if applicable, otherwise the NPC will, in fact, be seen eating or drinking every chance they get.
  • You will have to place additional AI markers to aid NPCs in their schedules. Level designers typically only concern themselves with things that are visible, leaving you to place idle markers, Xmarkers, and occasionally furniture objects without a visible model. Make sure to set the ownership of idle markers and furniture to a specific NPC or faction if you don't want them to be used by everyone.
    • For a demonstration of available idle animations, see this video. Most of these idles have corresponding idle markers that you can use. Of course, many animations are not suited for ordinary NPC activities.
    • Jerome's patch of crops will need a good handful of FarmingIdleMarkers for him to randomly switch between. As implied earlier, his farming package should point to an Xmarker located in the middle of the patch.
    • Making an NPC carry wood takes a bit of setting up, but adds a very nice touch. The package will need the CarryItem template and point to two WoodPiles, usually one near the chopping block and the other one near the main wood stockpile. Then you should also put the CarryItemScript on the NPC and configure its properties to spawn firewood if the NPC gets interrupted mid-carry, and add fragment scripts to the package in the "Begin/End/Change" tab to activate this behavior. See Faendal from Riverwood as an example NPC who carries wood as part of his daily schedule.
    • For Caechabhu, you probably don't want her tanning leather all the time, so you can improvise by, for example, giving her a WallLeanMarker (an invisible furniture) to make her lean against her house. Or you can have her spend part of her day in a Patrol around the village and the nearby wilderness (chain a bunch of PatrolIdleMarkers together via "linked reference", make a package with the Patrol template, and point it to a marker in the chain), evoking the impression that she's hunting.
    • For children like Wiske, it can be difficult coming up with things for them to do, since they can't perform working activities such as farming. If multiple children are around, you can make them run around along a patrol path to simulate them playing tag. Otherwise, having a child stand around doing nothing can often do the job. Maybe place an InvisibleChairMarker to use if there is a suitably-sized rock or crate in the village.
    • Gaubelin will get some mileage out of his alchemy set, but also experiment with putting markers like the StudyIdleMarker around his shack.
    • Inside a house, placing a SweepIdleMarker or two can work well. If there is a cooking set, the NPC will use that too.
  • For testing,
    • If an NPC isn't doing what they're supposed to, the cause is often navmesh-related. The navmesh door links might be broken, in which case you need to finalize the navmesh. Or there isn't any navmesh extending to the destinations of some packages. Of course, in this assignment, only flawless navmesh is provided to you.
    • Otherwise, check if there isn't some package higher up on an NPC's package stack that you forgot to set time restrictions on.
    • Consider using More Informative Console, which displays an NPC's current AI package.
    • If you have an EditorID to the NPC's reference, it'll show up with the help console command. You can then do prid <FormID> and moveto player to warp the NPC to you; this can be useful for certain tests, such as when the NPC needs to go to a different city and there is no navmesh. Or do player.moveto <FormID> to warp to the NPC if you somehow can't find them.
    • While you're at it, you can check to see if the random conversations are working. The game is very proactive about these; if two NPCs get anywhere near each other and there is a random conversation for them, then the scene is practically guaranteed to fire. If it doesn't, then something is wrong. Again, you must have Fuz Ro D'oh running.

Quests[edit]

Lastly, the assignment includes two small quests. These aren't any longer than the Bendu Olo and Arcane Scribe quests you've already seen, but they include some twists that are useful to familiarize yourself with.

In Skyrim, EditorIDs for misc tasks have a hodgepodge of contrasting conventions, usually containing the words "Freeform" or "Favor". Here, we recommend you use "<prefix>MarlinsvikFF01" and "<prefix>MarlinsvikFF02" for the two quests.

  • Find Wiske's Doll is a so-called radiant quest, since the dungeon is randomly selected. Refer to the Bethesda Tutorial Radiant Quests for a refresher.
    • Dungeons usually have a "LocSet" keyword for the tileset it uses and a "LocType" keyword for who or what resides there. You can use the GetInCurrentLoc condition function to restrict the search to Haafingar. Ironically, there will only be one eligible location, namely Steepfall Burrow.
    • You could script this quest to start during Wiske's dialogue, or you could have it start game enabled, like these kinds of quests usually are in vanilla. That means the player can come across Skanulike in a chest before ever visiting Marlinsvik, hence the dialogue option taking this possibility into account. Vanilla is less ceremonious about this.
      • Another possibility of starting the quest in use in some Beyond Skyrim projects is with the Change Location story manager event node, distributing the load so that the quests in a location get started when the player travels there rather than all at game start.
    • In the Scribe quest, you presumably created a new base object for the ring so that it has a unique name. Let's try and avoid that overhead this time. You can have the alias create a regular child's doll (see UESP for a list of Skyrim objects if you need it), make a new Message where the title is the desired display name of the item, and then select that message in the "Display name" dropdown on the alias.
    • If a line is formatted in light blue, that means it is repeated from earlier and mustn't be implemented as a separate line, or the voice actor will be prompted to record the same line twice. Sometimes you can manage it with invisible continues, but in other cases, you will have to make a Shared Info.
    • Don't know how to award a skill level in Speech? Take a peek at a vanilla example if you can remember one, or search the List of Papyrus Functions.
  • Gather Flowers for Gaubelin is trickier, since you need to implement a live updating counter based on the player acquiring items, and several kinds of items need to be treated as though they are interchangeable.
    • It's always handy if there is a vanilla example so you can copy their homework. In this case, that would be Grin and Bear It. The UESP is often a very helpful encyclopedia for vanilla content; its list of ingredients will also be of use here.
    • You can pretty much base your implementation off of the vanilla quest. The main trick to making this quest work in an elegant way is that you need to provide some central bit of code - a function to count all flowers in the player's inventory and update objectives if needed - and have it be accessible from multiple places, like the stage fragment script (for when the quest is accepted) and a script attached to a player alias (for when flowers are gained or lost). The best place to put this function is in a new, manually created script that is attached to the quest, sitting next to the fragment script. Let's say this script is named AUMMarlinsvikFF02QuestScript.
      • To run this function from somewhere else, you'll need to have the quest as an object, not of type Quest, but of type AUMMarlinsvikFF02QuestScript. In a stage fragment, you can have the CK create such an object for you using the "kMyQuest" dropdown. You can then do: kMyQuest.CountItems() for example.
      • In an alias script (as well as a dialogue fragment script for example), you can do it like this: (GetOwningQuest() as AUMMarlinsvikFF02QuestScript).CountItems()
    • Don't forget to add an event filter to the player alias script for the four kinds of mountain flowers, or to add the global variable for your counter to the "text replacement globals" list in the Quest Data tab!
    • In both quests, run Stop() to clean up after you no longer need anything in the quest. You should also provide a fail stage if the NPC dies (there are default alias scripts for this), which fails all objectives and also stops the quest. This fail stage is less relevant in Wiske's quest, unless you want to account for the player using a child killing mod.

And that's it! You have now gained essential experience in implementing a village. What's more, implementing a city is essentially the same task, just on a much larger scale. As before, zip up your esp and scripts and share it with us.