Research:Dialogue and Messages

Voice
Voiceovers are special case dialogue entries with fixed topic names that trigger on specific events. Each active voiceover will prevent further triggers on the same topic (and associated result scripts) until the sound file has stopped playing.

Comments
There is a problem with the design of the probability roll. The fVoiceIdleOdds default (10), together with an FPS of 60 will give x = 0.166... but the roll itself is an integer. The only possible trigger is when roll == 0, and this is still true for all values of fVoiceIdleOdds less than the current FPS. This makes idles effectively dependent on frame rate, and changing the GMST a small amount actually produces no change in behaviour.

Instead it should be done in a framerate independent manner, with an adjusted floating point roll calibrated on the quantized behaviour of vanilla at a standard fps (60 fps).

Text defines
Text defines in Morrowind are special strings within dialogue and message boxes, that are replaced at run time. For dialogue, they begin with %, and for message boxes, they start with ^. Any character can follow a sequence, so if "%pcrace" is "Redguard", "%pcraces" is "Redguards". % (or ^ in messageboxes) followed by any global variable will be replaced with the value of that variable. All sequences are case insensitive. Built in defines are evaluated before global variables, so if there is a global variable pcnamea = 50, "^pcnamea" will be the name of the character followed by a, not 50. Global variables with a % or ^ in them do not behave sensibly (as might be expected). Global variables with names that are partially contained in other global names (eg. testglobal and testglobala) work correctly (i.e "^testglobala" does not give the value of testglobal followed by a).

List of defines
The following only work in dialogue (empty in messageboxes):

Dialogue global variables
Crime-related global script variables are set every time the player enters dialogue with an NPC:

Variables CrimeGoldDiscount, CrimeGoldTurnIn, PCHasCrimeGold, PCHasGoldDiscount, PCHasTurnIn: see Research:Security and Crime