Difference between revisions of "Adding a Trainer NPC to Skyrim"

From Nexus Mods Wiki
Jump to: navigation, search
Line 31: Line 31:
 
[[File:TrainerTut7_ClickResponse.jpg|right|thumb|Response window]]
 
[[File:TrainerTut7_ClickResponse.jpg|right|thumb|Response window]]
 
[[File:TrainerTut8_CheckAvailableVoice.jpg|right|thumb|Available voices]]
 
[[File:TrainerTut8_CheckAvailableVoice.jpg|right|thumb|Available voices]]
 +
[[File:TrainerTut9_NPCVoiceType.jpg|right|thumb|Setting NPC Voice Type]]
 
# In the ''Object window'' expand the menu ''Actor'' and choose the existing NPC you want to edit.
 
# In the ''Object window'' expand the menu ''Actor'' and choose the existing NPC you want to edit.
 
# Double click on the selected NPC and a window will pop-up like the one shown in picture ''Setting the NPC class''.
 
# Double click on the selected NPC and a window will pop-up like the one shown in picture ''Setting the NPC class''.
Line 86: Line 87:
 
# Click on the ''...'' button at the right side of the response box: this will open a window like the one shown in picture ''Response window''.
 
# Click on the ''...'' button at the right side of the response box: this will open a window like the one shown in picture ''Response window''.
 
# Double click on the ''Response text'' (the line highlighted in picture ''Response window''): this will open a window like the one shown in picture ''Available voices''.
 
# Double click on the ''Response text'' (the line highlighted in picture ''Response window''): this will open a window like the one shown in picture ''Available voices''.
   
+
# Look at the box at the bottom of this window, you'll see there all the voices that can say this line in Skyrim:
 
+
## The voice records are stored following this convention: Data\Sound\Voice\Skyrim.esm\"Voice type"\... where voice type is the type of voice you can assign to your NPC.
 
+
## I've assigned my trainer the FemaleYoungEager voice type, so I've checked if that voice is available in the response I've chosen. I can see there is a Data\Sound\Voice\Skyrim.esm\FemaleYoungEager\... folder listed there, so that means that my trainer will be able to say that line.
 
+
##: Note: If you don't see the voice type for your NPC in the list of available voice types, you can either select another response text that is available for your NPC voice or change your NPC's voice by selecting another voice in the ''Traits'' tab of the NPC window, as shown in picture ''Setting NPC Voice Type''.
 
+
# Once you've checked the available voice types, press the ''Cancel'' button to close the window, then press the ''Cancel'' button again to close the Response window and return to your trainer Dialogue window.
 
+
# Press the ''Ok'' button to close the Dialogue window saving the changes, and press the ''OK'' button again to close the Dialogue quest window saving the changes you've made.
 +
Now your trainer should have say the response line you've chosen when asked for training services.
  
 
Save your plugin and test it in game :)
 
Save your plugin and test it in game :)

Revision as of 17:43, 30 December 2012

Overview

This tutorial shows all the main steps you need to follow to add a trainer NPC to Skyrim. In this tutorial I am using an existing merchant (created following the tutorial Adding a Merchant NPC to Skyrim) and expanding the services he offers by adding training lessons.

Required tools

  • Creation Kit: available on Steam (Menu option View -> Tools and then select Creation Kit)

Add a Trainer NPC

The main steps for adding a trainer to Skyrim are:

  1. Edit an exising NPC
  2. Assign the right class to your NPC
  3. Assign the right factions to your NPC
  4. Add the training dialogue to your NPC
  5. Add voice to the training dialogue

Edit an existing NPC

First we are going to load the esp file that contains the merchant NPC we want to edit. To do this:

  1. Launch the Creation Kit
  2. Select the menu option File -> Data ...
  3. Check the flag at the left side of the esp file that contains the NPC to edit (for example MyMerchant.esm)
    Note: If you want to edit the existing esp file, just press the button Set as Active File while having your esp file selected. If you want to create a new esp file, then don't set the esp file as the active file
  4. Press the OK button and wait until the CK has finished uploading everything (the CK will load your esp file and all the required masters like Skyrim.esm and Update.esm)
    Note: the CK has a bad habit of showing lots of warning messages. When the first one appears click on the Cancel button and you won't see more of these warnings.

Assign the right class to your NPC

Setting the NPC class
Setting the NPC factions
Dialogue Trainers quest
Duplicate dialogue
Edit dialogue
Select shared answer
Response window
Available voices
Setting NPC Voice Type
  1. In the Object window expand the menu Actor and choose the existing NPC you want to edit.
  2. Double click on the selected NPC and a window will pop-up like the one shown in picture Setting the NPC class.
  3. In the Stats tab look for the class field and click on it: select one of the trainer classes from the drop-down list. All trainer classes names follow this convention: Trainer + "Skill" + "Trainer level", where:
    1. "Skill" indicates the name of the Skill the NPC trains, like Alchemy, Sneak, etc.
    2. "Trainer level" indicates if the trainer can train you depending on the level your character has in that particular skill. There are 3 trainer levels:
      1. Journeyman: can increase your skill from 1 to 50
      2. Expert: can increase your skill from 1 to 75
      3. Master: can increase your skill from 1 to 90
    In picture Setting the NPC class the class is set to TrainerMarksmanMaster, that means the NPC can train you in Archery and has a master level.

It is good to save your progress from time to time just in case the CK crashes. To save your work seelct File -> Save and type the name of your plugin if you are creating a new esp (for example MyTrainer.esp).

Assign the right factions to your NPC

Next thing you have to do is to assign the right factions to your NPC or he won't be able to train you. You assign the factions to an NPC by dragging and dropping factions to the Factions and Ranks list of the Factions tab.

There are two factions that any trainer needs to have as shown in picture Setting the NPC factions:

  • JobTrainerFaction: this adds the trainer dialogue to your NPC. Set the Rank to 0 as shown in picture.
  • The specific training faction for the skill your trainer teaches: these trainer factions are named following the convention JobTrainer + "Skill" + Faction, where "Skill" indicates the name of the Skill the NPC trains, like Alchemy, Sneak, etc. In the picture, the faction I've selected is JobTrainerMarksmanFaction as this NOC will train you in Archery. Set the Rank to 0, too, as shown in picture.

You can add other factions to your Trainer . For example, if you are going to place him in Winterhold it is good to add some of the Winterhold related factions to avoid him having problems with the locals ;)

Add the training dialogue to your NPC

To add the training dialogue to your NPC you have to edit the DialogueTrainers quest. This quest contains the dialogues of all trainers in game.

  1. In the Object window expand the menu Character and select the menu item Quest.
  2. Write "trainers" in the filter box at the top as shown in picture Dialogue Trainers quest: this will left only two quests at the right side of the screen.
  3. Select the DialogueTrainers quest and double click on it. This will open a window like the one shown in picture Duplicate dialogue.
  4. Select the Training Branch item on the left part of the screen and you will see the list of all trainers' dialogues listed on the right.
  5. Now we are going to duplicate an existing dialogue (it really doesn't matter wich one you duplicate):
    1. Select one of the dialogue lines on the right list
    2. Right click on it and select Copy from the pop-up menu. Wait until the CK has finished copying the dialogue line.
  6. Next step is to edit the duplicated dialogue line:
    1. Select the new dialogue line (you will distinguish it from the vanilla ones, because it will have an * in front of its name as shown in picture Duplicate dialogue)
    2. Double click on the new dialogue line and you'll see a window like the one shown in picture Edit dialogue. Here you shoukd edit the following things:
      1. Prompt: this is the text line that will appear when you talk to the trainer NPC in game. Put something meaningful here that shows what is the skill he trains.
      2. Conditions: this is the most important part to change. Change each one of the existing values by double clicking on each of the lines. That will open a pop-up window where you can change the value of the condition.
        1. GetBaseActorValue: select here the skill your trainer is going to teach (Marksman in the picture, as the trainer is going to teach Archery) and set the value to the maximum level your character can have to be trained by this NPC (in the example I've set it to be lower than 100 as my trainer can teach characters with Archery until level 99).
        2. GetIsID: select here the ID of your NPC trainer.
        3. GetInFaction: leave the first Faction check as it is (JobTrainerFaction).
        4. GetInFaction: change the second Faction to the training skill faction you've given to your NPC (JobTrainerMarksmanFaction in the example in the picture).

Once you've edited the dialogue, press OK to close this window and save changes. Then Press OK again to close the DialogueTrainers quest window.


Add voice to the training dialogue

If you've followed the tutorial to this point, your character will be able of providing training services but he won't say a word when you ask about them. We are going to fix this now.

I am going to use one of the vanilla existing answers. If you want to add new custom dialogue to your training follow this tutorial: [[Voice_Acting:_A_Complete_Guide|Voice Acting: A Complete Guide].

Open again the dialogue window for your trainer (the window shown in picture Edit dialogue) and this time look for the Share response data box at the right top section, as shown in picture Select shared answer. Click on the arrow to see the drop-down list of available answers and choose one: you can see the text of the answer displayed in the Response Text box, so you'll know what your trainer is saying. In the example, I've chosen a shared response that will make my trainer say "Of course" when you ask him for training services.

Next thing is to check if the response you've selected is available for your trainer voice: if you have assigned a voice to your trainer that doesn't have the sound record corresponding to the reponse you've chosen, he won't say a word. To check this:

  1. Click on the ... button at the right side of the response box: this will open a window like the one shown in picture Response window.
  2. Double click on the Response text (the line highlighted in picture Response window): this will open a window like the one shown in picture Available voices.
  3. Look at the box at the bottom of this window, you'll see there all the voices that can say this line in Skyrim:
    1. The voice records are stored following this convention: Data\Sound\Voice\Skyrim.esm\"Voice type"\... where voice type is the type of voice you can assign to your NPC.
    2. I've assigned my trainer the FemaleYoungEager voice type, so I've checked if that voice is available in the response I've chosen. I can see there is a Data\Sound\Voice\Skyrim.esm\FemaleYoungEager\... folder listed there, so that means that my trainer will be able to say that line.
      Note: If you don't see the voice type for your NPC in the list of available voice types, you can either select another response text that is available for your NPC voice or change your NPC's voice by selecting another voice in the Traits tab of the NPC window, as shown in picture Setting NPC Voice Type.
  4. Once you've checked the available voice types, press the Cancel button to close the window, then press the Cancel button again to close the Response window and return to your trainer Dialogue window.
  5. Press the Ok button to close the Dialogue window saving the changes, and press the OK button again to close the Dialogue quest window saving the changes you've made.

Now your trainer should have say the response line you've chosen when asked for training services.

Save your plugin and test it in game :)

Related pages