Dialog Speech Checks Game: TES V: SkyrimThis tutorial comes from
this Creation Kit page, main difference is I'm going to make this step by step, and add a couple things as well.
There are several ways Speech works in Skyrim. First, we'll discuss Persuasion. An example is from the WERJ02 quest (Thieves Guild Holdup), which has a thief walking up to us as we travel roads, and demanding money. There is a chance to Persuade the thief to leave us alone, as well as chances for Intimidation, walking away, or simply getting into a brawl. I will also include Bribery. We can't bribe the thief, but there are times when bribes can be offered. An example is when we approach the gates of Whiterun for the very first time, and a guard tells us we cannot go into town.
PERSUASION
Object window > Character > Quests1a). Use the Dialogue Views or Player Dialogue systems to start some dialog. ID can be whatever's unique, it's the Topic Text that's going to be important, since there needs to be something which makes it obvious which topic to click on for persuasion. Here is an example.
Do I look like I am rich? (Persuade)
Note that (Persuade) must be physically typed (and with parentheses) into the Topic Text slot, as seen next to the 'Do I look like I am rich?' topic.1b). Two infos are needed under this topic, okay? First info, the NPC is persuaded by our character's loquacious Speechcraft abilities. Second info, they ... aren't.
Speech works: You win. I'll leave you be.. for now.
Speech doesn't work: Prepare for your room... erm... doom!!!
Make sure the Prompt slot is
not used; both infos should share the same Topic Text.
1c). Goodbye is toggled on for both infos. Basically, the NPC will leave our toon alone if he or she is persuaded, or try to fight if not, with no further dialog.
1d). Use whatever conditions are appropriate, but make sure GetActorValue Speechcraft is used for the successful Info. Here is the entire condition.
PL GetActorValue Speechcraft >= XThe Player is used as a reference in the Run On scroll-bar. And where the X is there are two options. A physical number can be used to define how difficult the condition should be, but what's even easier to use are globals.
1e) Toggle Use Global on and find the Speech section in the Value scroll-bar. So if we want a really easy persuasion attempt, go for
PL GetActorValue Speechcraft >= SpeechVeryEasy1f). Type a semicolon script
;Persuasion succeeds into the Begin: Papyrus Script box. Compile that. Click OK 2x and reopen.
Again, this condition is not needed for the "fail" dialog. 2a). Add a property to the script.
Name: pFavorDialogueScript
Type: FavorDialogueScript (don't try looking for it in the scroll-bar, just type it in).
2b). Click Edit Value. There's only one value to pick which is DialogueFavorGeneric. Click OK 3x and reopen the Quest and Topic Info panels.
2c). Type
; pFavorDialogueScript.Persuade(akSpeaker) into the Begin: Papyrus box. Compile that with a semicolon first, then compile it again without the semicolon.
Now let's move on to the negative response... make sure the NPC is in the Render Window, and has been given a Reference ID. Keep in mind that this will only work for a specific NPC. Beth's random road thieves use a much more complicated system of dialogs and aliases, since they needed to write their quest dialog for a radiant-type thief who is not specific.
3a). Response Text: "You can't fool me!"
Flags: Goodbye
Papyrus script:
;Persuasion attempt fails3b). Two properties are needed for this script: one for the Player, and one for the NPC who attacks us. I start with the NPC.
Property Name: aaaNPCName (this can be the NPC's actual base ID name.)
Type: Actor
Edit Value: Find the NPC in the Cell and Reference scroll-bars, or simply double left-click on the NPC in the Render window.
3c). Property Name: Player (or PlayerRef).
Type: Actor
Edit Value: Choose (any) for the Cell scroll-bar and PlayerRef for the reference.
3d). The Papyrus fragment is
aaaNPCName.StartCombat(Game.GetPlayer())Note that StartCombat can also be used if our character wishes to just skip the speech stuff, and choose to fight. "I'd rather die!" is Beth's topic text for this when dealing with road thieves.
INTIMIDATION
4a). Everything is the same so far as setting up dialog: two infos are used (one positive, one negative). But make sure to put (Intimidate) at the end of the Topic Text slot.
4b). For conditions,
GetIntimidateSuccess == 1.00 is used for the positive response, and this can simply be kept on Subject for the Reference.
In Bethesda's words, "[when] successful according to the algorithm used by the game engine to calculate this, which takes into account variables such as the player's level and the speaker's [NPC's] confidence value, as well as the player's speechcraft skill and some other factors", that's when this condition becomes chosen.
4c). For the Papyrus script, make a script and property as per steps 1f through 2c up above, but the script used is
pFavorDialogueScript.Intimidate(akSpeaker), which goes into the Begin box.
4d). Continue through steps 3a through 3d for the failed Intimidation attempt.

BRIBERY
5a). In this situation we attempt to pay those whom we're trying to influence. (<BribeCost> gold) goes at the end of the Topic Text. "Here, take my gold!" (<BribeCost> gold). "X" is a specific amount of coin, which automatically gets filled in by the game engine.
5b). This time,
GetBribeSuccess == 1.00 is the needed condition.
5c). Follow steps 1f through 2c, with
pFavorDialogueScript.Bribe(akSpeaker) going into the Begin script box.
For 5a, a specific amount of gold is not needed, as the favor dialogue script will calculate a levelled amount and handle its removal from the player's inventory. If a specific bribe amount is desired, its best to do this other ways without favor dialogue. GetItemCount works.
This post has been edited by Renee: Apr 19 2024, 06:16 PM