[This page is outdated! See instead the wiki page: https://wiki.project-tamriel.com/wiki/Scripting#Standardized_speech_skill_checks]
Introduction
The topic of skill checks is something that comes up quite often.
Tamriel Rebuilt contains several skill checks, of which quite a few are Speechcraft checks that unlock additional responses to multiple choice dialogue.
Several kind of checks can be done, depending on situation:
- if you need the NPC to trust the player in order to reveal information or offer options, defer to Disposition,
- if the speechcraft skill is specifically used for unlocking dialogue or an interaction, use a Speechcraft check,
- if the player needs to actively convince the NPC, keep reading.
General Overview
While normal Disposition and Speechcraft checks can deal with many situations, for persuading NPCs (particularly in multiple-choice dialogue) a mere skill check alone is unintuitive and unimmersive, as this removes other possible factors (NPC disposition in particular).
For this reason, Tamriel_Data contains a scripted framework for unified Speech Skill Checks with v08 and later.
It is invoked by simply calling StartScript T_ScSpeech_SkillCheck in the Dialogue Result box and checking the persuasive power Global(s).
This script framework offers three kinds of speech skill checks: Sway (pure charisma), Haggle (bargaining), and Debate (convincing somebody with your smarts).
These checks are ran as opposed checks for both the PC and the NPC:
Option | = | + | + | Persuasive Power in Global |
---|---|---|---|---|
Sway | Speechcraft | Personality / 2 | Luck / 10 | T_Glob_Speech_Sway |
Haggle | Mercantile | Personality / 2 | Luck / 10 | T_Glob_Speech_Haggle |
Debate | Speechcraft / 2 | Intelligence | Luck / 10 | T_Glob_Speech_Debate |
The intermediate result is further multiplied by NPC disposition (ranging from 1.5 for 0, to 0.5 for 100, linear scaling) and by PC fatigue (ranging from 0.5 for 0, to 1 at max, with a SQRT curve to be more forgiving). The PC result is divided by the NPC result, leading to the value found in the correspondig Global.
This means that, if the NPC's disposition is 50, the PC's fatigue is full, and both PC and NPC have identical skills and attributes, the persuasive power is exactly 1.
If the NPC's disposition is 100, their skills and attributes need to be 1.5x as high as the players to reach a presuasive power of 1.
If the NPC's disposition is 0 and is not already engaging the player in combat, the PC's skills and attributes need to be 1.5x as high as theirs in order to reach a persuasive power of 1.
With a fatigue of 0, the PC's result will be half much as it could be. The closer to full fatigue the PC is, the less severe this penality will be.
In summary: the persuasive power, the final result of these opposed checks, is a value of the PC Speech Skill Check relates to the NPC Speech Skill Check. This means that, for the PC, results of less than 1 are a loss and (equal and) greater than 1 are a success. The result also displays a measure of failure/success, allowing several different replies to be implemented.
Testing and Debugging
The downside of this script is that it can be a little unclear what an NPC's persuasive power will be from the Construction Set.
To alleviate this, a debug global is available in Tamriel Data, and an example ESP has been made available that can help you explore how the NPC and PC power values are constructed in-game.
The debug Global is set to 0 by default. Set it to higher values to gain dynamic feedback on how the script calculates its values. The dummy greetings enabled by setting the global to 3 are included in the example ESP file, while the other debug settings can be used without that additional file.
T_Glob_Speech_Debug | Result |
---|---|
0 | No debug messages |
1 | Lists final power values |
2 | additionally lists all relevant attributes |
3 | additionally enables dummy Greeting 0 entry for all NPCs |