×
Меню
Индекс

MSFD Special dialogue-only functions

 
Among the functions available for defining dialogue conditions in the dialogue editor there are a few that do not have a direct equivalent in scripting functions. By using dialogue (e.g. using ForceGreeting, voice-dialogue or strategically placed quest NPCs) and the dialogue result field, you can still make use of these functions for scripting purposes, e.g. by setting a global variable in the result field. Examples of such functions are:
 
PC Sex (dialog)
This is 0 if the player is male and 1 if the player is female.
Note: This is the only known way to determine the player's sex. You could use this to set a global variable that contains the Player's gender - the most inconspicuous way would be to do this via voice dialogue, e.g. one could put a silent hello greeting for all NPC's on top of the list that sets a global variable "PC_sex" to 1 when the player is female, 2 when the player is male. The topic should be filtered to only be active when PC_sex equals 0.
 
Talked to PC (dialog)
This is 1 if the speaker has talked to the player and 0 otherwise. You can use this to have someone say something the first time you speak with them – or for our scripting purposes to mark this person as "known" by the player.
Note: The Talked to PC flag is subject to the "72-hours bug", i.e. it will by default be reset if the NPC's cell has not been active for 72 game hours or longer. See ForceGreeting for specific workarounds, and the "72-hours bug" section under "Tips and Tricks" for more general information.
 
Rank Requirement (dialog)
Rank Requirement checks to see if you "qualify" for the next rank in the speaker's faction.
•     Returns 0 if you do not have enough Faction Reputation and do not meet the skill requirements.
•     Returns 1 if you meet the skill requirements, but do not have the Faction Reputation.
•     Returns 2 if you have the Faction Reputation, but do not meet the skill requirements.
•     Returns 3 if you qualify.
 
PC Clothing Modifier (dialog)
This is the total value of all the clothing and armor the player is wearing. The value of your equipment changes the disposition of people in the game.
 
Friend Hit (dialogue)
Used in dialogue for when you attack a member of your group (like a follower)
The return values are:
0 = never been hit
1 = hit by pc 1st time
2 = hit by pc 2nd time
3 = hit by pc 3rd time
4 = hit by pc 4th time and the npc/creature is not in combat with the PC
 
Friend hit will reset if the player hits a different actor. It also appears to reset if the actor starts combat, even if there are no hits (I tried "ActorID->StartCombat ActorID" - i.e. "start combat with yourself" - in dialogue results, and this seemed to reset friend hit).