Difference between revisions of "User:Thingy Person"

The Beyond Skyrim Wiki — Hosted by UESP
Jump to: navigation, search
(Master Limit)
(Dialogue and scenes)
 
(38 intermediate revisions by the same user not shown)
Line 1: Line 1:
A Technical History of Beyond Skyrim (WIP)
+
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.
  
  
This article outlines some technical aspects of Beyond Skyrim in order to preserve a correct history and debunk some myths.
 
  
 +
The writing document folder for Marlinsvik can be found here:
  
=== Heightmap ===
+
And you can load this esp as your active file and build off of it. It contains level design for the village, although the houses are of course still unpopulated:
Reasons for developing a common heightmap, the two worldspace bugs, BSTamriel.esm
 
  
Beyond Skyrim grew out of a [https://web.archive.org/web/20200213041000/https://forums.bethsoft.com/topic/1288452-other-province-mods/ forum thread] some weeks after Skyrim's release, urging beginning province mods to avoid some of the mistakes seen in the modding scene for Oblivion. One such alleged mistake was that province mod projects did not collaborate, using custom heightmaps that did not fit together, rendering the mods incompatible. When [https://www.nexusmods.com/oblivion/mods/27235 Tamriel Heightmaps], a common heightmap resource for Oblivion, eventually did appear, it was too late and too unattractive for existing mod teams to consider using it.
+
[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. For the most part, you can rely on the instructions below.
  
Although there is visible land beyond Skyrim's borders, it is only LOD, i.e. low-resolution versions of the land that is visible from a distance but cannot be interacted with; furthermore, it cuts out roughly half of the way into the neighboring provinces and is not accurate to the scale of Tamriel implied by Skyrim's landmass. And thus, the [https://web.archive.org/web/20200216210718/http://forums.bethsoft.com/topic/1343021-wip-all-tamriel-heightmap/ All-Tamriel Heightmap] project was started to create lore-friendly and correctly scaled heightmaps for the other provinces that are compatible with Skyrim and with each other. The heightmaps were modeled in [https://www.world-machine.com/ World Machine] and imported into Skyrim with [http://www.oceanlightwave.com/morrowind/TESAnnwyn.html TESAnnwyn]. Eventually these heightmaps would become the collective heightmap for the Beyond Skyrim heightmap, contained in BSTamriel.esm, a master which each project depended on alongside BSAssets.esm.
+
The exercise can be divided into four parts, taking you across all of the essential steps in implementing a settlement:
  
The original plan was that the heightmaps would be placed into the vanilla worldspace, meaning one could travel out of Skyrim with no load screen. Several issues changed this plan.
+
* Basic setup of the NPCs and any data needed to make the settlement function
 +
* Dialogue and scenes
 +
* AI packages
 +
* Quests
  
* A [https://web.archive.org/web/20200217020241/http://forums.bethsoft.com/topic/1343021-wip-all-tamriel-heightmap/page-3#entry20612873 problem with LOD], caused by difficulties with creating a custom lodsettings/Tamriel.lod file and having it be loaded by the game, jeopardized the prospects of being able to display LOD beyond the limits specified for the vanilla worldspace. Since there were no such difficulties involved with a lodsettings file for a custom worldspace, it was eventually decided to put all the custom provinces into one custom worldspace, separate from the vanilla one.
+
== Setup ==
* [https://web.archive.org/web/20200216062509/http://forums.bethsoft.com/topic/1352988-fixing-the-64x64-cell-havok-bug-for-when-you-just-want-a-bigger-world/ The first "worldspace bug"], where collision issues occur for actors that are too far east and west of the world origin. Actors - such as NPCs, enemies, and a horse the player is riding - will appear to sink into and pop out of the ground repeatedly. The problem occurs in cells beyond 64 and -64 along the X axis; it does not affect cells far to the north or the south that are within this east-west limit. Because of this, one [https://web.archive.org/web/20200216133221/http://forums.bethsoft.com/topic/1256368-wip-high-rock/page-3 proposed solution] was to divide Tamriel into three world spaces, one of which would have included Morrowind and Black Marsh.
 
** Then an [https://web.archive.org/web/20200217094317/http://forums.bethsoft.com/topic/1352988-fixing-the-64x64-cell-havok-bug-for-when-you-just-want-a-bigger-world/page-3?&&p=20419923 ini tweak] was found that works around the issue, along with a conjectured technical explanation. With this tweak, the plan for a unified heightmap was back on the table.
 
* The second "worldspace bug". If the player is beyond 64 or -64 cells, on ''either'' axis this time, and is facing away from the world origin, then all gameplay interactions break. Harvestables cannot be picked, doors cannot be opened, attacks will not hit enemies, and so on. This bug was discovered late because it took until someone placed an interactible object outside the safe limit - specifically, a level designer from the Northpoint project placing a flower. There is no known workaround for this one, and as such this bug definitively killed the idea of a large Tamriel worldspace.
 
  
=== Master Limit ===
+
* Creation of the NPC records
DLCs as masters, SSE CK Fixes master limit remover
+
** 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 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.
 +
*** 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.
 +
** For AI Data, make sure they at least help allies (i.e. close family) and possibly friends and allies.
 +
** 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 Locations 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). Make its parent the Haafingar location.
 +
** Create Locations for each of the houses with the format "<prefix>Marlinsvik<Housename>". Since Gaubelin's shack has no interior, it doesn't need a Location. Set the Marlinsvik location from the previous step as the parent.
 +
* 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.
 +
** 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.
 +
** In the exterior, set the ownership of any somewhat valuable item to the <prefix>TownMarlinsvikFaction so that it 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.
  
This section details how the merging process evolved, and its impact on which master files a project could have as its dependencies.
+
== 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.
Before the Creation Kit's release, many small mods were already being made, mostly using a utility called [https://en.uesp.net/wiki/Skyrim_Mod:SkyEdit SkyEdit], which was developed by reverse engineering part of the plugin data format used by the engine, and did not allow for any level design. (Contrary to popular belief, [https://www.nexusmods.com/skyrim/mods/9782 Moonpath to Elsweyr] is not one of these mods, as it was made using the Creation Kit. [https://www.reddit.com/r/skyrimmods/comments/7nbzxw/comment/dwyu2xw/ See here from the author himself]. The first and perhaps only mod that managed to implement new, albeit very crude, level design before the Creation Kit is called [https://www.curseforge.com/skyrim/mods/wounded-knee-gulch Wounded Knee Gulch].)
+
** 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.
For the Beyond Skyrim heightmap's development, not even the Creation Kit's release was enough to satisfy all requirements; a worldspace plugin produced by TESAnnwyn cannot be converted to an .esm with the Creation Kit, so the esm flag would have to be set using unofficial tools. In addition, plugin cleaning and merging, essential functionalities in modding including Beyond Skyrim, are tricky to do with the Creation Kit, if not poorly understood at the time.
+
** 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.
For these functionalities, another utility called [https://ck.uesp.net/w/index.php?title=Category:TESVSnip TESVSnip] was widely used. However, TESVSnip had a huge problem, in that it used an incorrect compression library and irreversibly damaged many plugins it edited (see e.g. [https://web.archive.org/web/20160303184916/http://www.darkcreations.org/forums/topic/1799-skyrim-handling-compressed-records-do-not-use-tesvsnip this forum thread]). When this came to light, an initiative was mounted to obtain the source code for [https://en.uesp.net/wiki/Oblivion_Mod:TES4Edit TES4Edit] and update it for Skyrim, resulting in [https://ck.uesp.net/wiki/Category:TES5Edit TES5Edit], which finally allowed these operations to be done safely. Another utility called [http://web.archive.org/web/20130525141538/http://www.darkcreations.org/forums/files/file/388-tesvgecko/ TESVGecko] had been in development with many of the same goals, but it was put on hold.
+
*** 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.
For a long time, however, TES5Edit still did not support editing or merging one kind of data: the VMAD subrecord, which contains information on scripts attached to objects, and their properties. This meant that plugins implementing quest content could not be merged into the master file using TES5Edit, which is a limitation that the Cyrodiil project ran into. At the time, only the Creation Kit's own [https://ck.uesp.net/wiki/Version_control Version Control] system (which had been sufficiently documented by this point) allowed for merging script content, so the Cyrodiil project switched to using this for merging.
+
** 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.
 
+
*** 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.
However, using Version Control introduced two new issues:
+
** 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.
* Version control has a hard-coded limit of '''two master files'''. This means that the Creation Kit will refuse to merge plugins into master files that have more than two .esm files as dependencies. This was likely implemented to avoid a situation where a Bethesda employee accidentally loads two DLCs at the same time, which would make one dependent on the other; the two allowed masters would thus be Skyrim.esm and Update.esm.
+
*** 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.
** Since this issue more or less coincided with the discovery of the second worldspace bug discussed earlier, it was decided to cut up Tamriel and store the worldspaces into the separate project esm files. This meant that BSTamriel.esm could be left out, and if Update.esm is similarly left out, then the only remaining dependencies are Skyrim.esm and BSAssets.esm, thus staying within the master limit. It is not known what tools were used to do this cutting up, but the process has been redeveloped more recently and is documented [[Arcane University:World space synchronization|here]].
+
* [https://ck.uesp.net/wiki/Category:Scenes Scenes] are done differently. 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]]
** A knock-on effect was that projects occupying the same worldspace henceforth also needed to have the same master file, as a worldspace cannot be introduced from two masters at the same time. Thus, the BSCyrodiil.esm and BSElsweyr.esm master files, which both used the BSHeartland worldspace contained in BSTamriel.esm, merged into BSHeartland.esm. Similarly, the High Rock and Hammerfell projects merged their masters into BSIliacBay.esm.
+
** 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.
** Another knock-on effect relates to using DLC assets in Beyond Skyrim projects. Since a DLC master file could not be used directly, any desired object forms had to be re-implemented into BSAssets.esm. BSAssets would only include the forms and not the models and textures themselves, so the DLCs were still requirements for running the mod, just not by having the DLC master file as a dependency.
+
*** 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.
** In order to avoid a DLC item and its re-implementation showing up as two different kinds of items in the player's inventory, Beyond Skyrim: Bruma ships with a DLC patch .esp that edits instances of re-implemented DLC objects and switches them back to being instances of the originals. Any future Beyond Skyrim release would have needed such a plugin that the end user would then have to add to their load order.
 
** Many years later, [https://www.nexusmods.com/skyrimspecialedition/mods/20061 SSE Creation Kit Fixes] implemented a patch that removes the two master limit, and since April 2022, Beyond Skyrim has had DLCs as masters, removing the need for re-implementing DLC records and greatly simplifying this aspect of the project.
 
* The Creation Kit automatically renames fragments scripts (such as [https://ck.uesp.net/wiki/Topic_Info_Fragments Topic Info Fragments]) on merge. Fragment scripts are a special kind of script which is named automatically by the CK, incorporating the FormID of the object it is attached to. Since the FormID changes on merge, the CK will rename the fragment script accordingly. It will do this for the record data in the .esm file, but doesn't take care of renaming the loose .psc script source file, changing its header, and recompiling it. This means that the scripting is broken on merge, as the game will look for a renamed script file that doesn't exist, as the script file still has its old name.
 
** The functionality for handling the external files can be restored by installing Perforce (now called [https://www.perforce.com/products/helix-core Perforce Helix Core]), a professional version control software, and hooking it up with the Creation Kit. During the game's development, Bethesda used Perforce for version control, including checking out forms so that only one employee could edit any given form at a time, avoiding conflicts. In Beyond Skyrim, perforce is only used for its specific functionality of renaming and recompiling fragment script files. The process of setting this up is complicated and is documented [https://ck.uesp.net/wiki/Version_control here]. [https://web.archive.org/web/20130211112525/http://www.darkcreations.org/forums/topic/3545-the-merging-process-collaboration/ See also this forum thread from when this was discovered].
 
** Later on, TES5Edit came to support the VMAD subrecord, making it a viable merging tool for script content. It does not rename the scripts in either the .esm or in the loose script files, meaning the scripts will function, but be "misnamed" with regards to the FormID. This is only a problem in the very unlikely but theoretically possible case where a Topic Info Fragment script from a newer plugin ends up being created with the same name as an existing one from a previous plugin, causing a nasty conflict.
 
** [https://github.com/matortheeternal/merge-plugins Merge Plugins] also supported automatic rename and recompile of fragment scripts and was used by one of the projects for merging (see [[Arcane University:Masterfile Merging with MergePlugins|Masterfile Merging with MergePlugins]]) but this functionality was removed in a later version.
 
 
 
=== Legendary Edition ===
 
Projects switching to SE, parallel versions of BSAssets, eventual deprecation of LE assets
 
 
 
=== SKSE ===
 
SKSE as end user requirement: dependency of Bruma LE (and used SKSE script functions before removal in order to work on Xbox), former dependency of Atmora (DOBJ manipulation for combat music)
 
 
 
SKSE as developer tool: Fuz Ro D'oh, Beta Comments, Ingame Editor, etc.
 
 
 
=== Animations ===
 
Improvements to ck-cmd and Skyrim Behavior Tool finally allowing for reliably creating custom behavior graphs
 

Latest revision as of 16:04, 19 November 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:

And you can load this esp as your active file and build off of it. It contains level design for the village, although the houses are of course still unpopulated:

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. For the most part, you can rely on the instructions below.

The exercise can be divided into four parts, taking you across all of the essential steps in implementing a settlement:

  • Basic setup of the NPCs and any data needed to make the settlement function
  • Dialogue and scenes
  • AI packages
  • Quests

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 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.
      • 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.
    • For AI Data, make sure they at least help allies (i.e. close family) and possibly friends and allies.
    • 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 Locations 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). Make its parent the Haafingar location.
    • Create Locations for each of the houses with the format "<prefix>Marlinsvik<Housename>". Since Gaubelin's shack has no interior, it doesn't need a Location. Set the Marlinsvik location from the previous step as the parent.
  • 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.
    • 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.
    • In the exterior, set the ownership of any somewhat valuable item to the <prefix>TownMarlinsvikFaction so that it 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.
    • 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.
      • 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.
      • 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.
  • Scenes are done differently. 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.
      • 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.