Difference between revisions of "Tutorial: Dialogue Speech Checks"

imported>Flatmop
(created tutorial)
 
 
(4 intermediate revisions by 3 users not shown)
Line 4: Line 4:
==Speech Checks==
==Speech Checks==


Sometimes in Skyrim, there are NPCs who offer the player some kind of reward or quest shortcut if they a high enough Speechcraft skill (or money, in the case of a bribe). You knew that already. But how do we go about implementing this using the Creation Kit's dialogue system? Let's find out.
Sometimes in Skyrim, there are NPCs who offer the player some kind of reward or quest shortcut if you have a high enough Speechcraft skill (or money, in the case of a bribe). You knew that already. But how do we go about implementing this using the Creation Kit's dialogue system? Let's find out.


==Before you Begin==
==Before you Begin==
Line 17: Line 17:
[[Image:Speechtutorial1.PNG]]
[[Image:Speechtutorial1.PNG]]


Now we need to add a minimum Speechcraft requirement that the player has to pass. To do this, we use [[conditions]]. So along with all the other conditions your 'positive response' info might have, add a new condition item with the function [[GetActorValue]], the paramter here being Speechcraft. Of course, this function needs to run on the player. The comparison should be greater-than-or-equal-to (>=), and the value can be whatever you want, but for completeness it's best if you just choose one of the predetermined constant variables (SpeechVeryEasy, SpeechEasy etc). To select one of these, you need to have checked the Use Global box. You don't need to add an opposite condition to the 'negative response'.
Now we need to add a minimum Speechcraft requirement that the player has to pass. To do this, we use [[conditions]]. So along with all the other conditions your 'positive response' info might have, add a new condition item with the function [[GetActorValue]], the parameter here being Speechcraft. Of course, this function needs to run on the player. The comparison should be greater-than-or-equal-to (>=), and the value can be whatever you want, but for completeness it's best if you just choose one of the predetermined constant variables (SpeechVeryEasy, SpeechEasy etc). To select one of these, you need to have checked the Use Global box. You don't need to add an opposite condition to the 'negative response'.


[[Image:Speechtutorial2.PNG|500px]]
[[Image:Speechtutorial2.PNG|500px]]
Line 39: Line 39:
==Intimidate option==
==Intimidate option==


Intimidations are created in exactly the same way as a persuasion, save for that you need to change the fragment code slightly to the following:
Intimidation options are created using a process that is similar to persuasion options, however, the actor value you need to check for is different. On your successful intimidation response, create a [[GetIntimidateSuccess]] check, and have it check for GetIntimidateSuccess = 1.00. This will cause your successful intimidation response to trigger only if GetIntimidateSuccess returns 1 - i.e. only if it is 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 confidence value, as well as the player's speechcraft skill and some other factors. See the "Mod Player Intimidation" [[Perk Entry Point]] for more information.
 
You should also be sure to add the following to your response's 'begin' script fragment. The script property should be set up the same way as for persuasion; the only difference is the actual Papyrus code used.


<pre>
<pre>
Line 45: Line 47:
</pre>
</pre>


They too use the speechcraft skill. The only real difference lies in the superficial role-playing aspects. Just don't forget to add the suffix '(Intimidate)' to any intimidation topic texts in your plugin.
Finally, don't forget to add the suffix '(Intimidate)' to any intimidation topic texts in your plugin.


==Bribe option==
==Bribe option==