MSFD Combat related Get/Mod/Set AI functions: Fight, Flee, Alarm
Get/Mod/SetFight
Some info from the helpfile:
An Actor's fight setting determines how prone the Actor is to attacking the PC. Mod/Set Fight appear to also affect all new references of the actor you may add after calling this function (i.e. it affects the object, not just a reference). When an Actor’s fight setting hits 100, they will attack the PC.
Player actions will increase (or decrease) an Actor’s fight setting. These are:
|
Действие игрока
|
Значение по-умолчанию
|
Формула Игровых установок
|
|
Расстояние до игрока
|
20 - (Char Distance * 0.005)
|
iFightDistanceBase - (Char Distance * fFightDistMult)
|
|
Атака актера
|
100
|
iFightAttack
|
|
Отношение
|
( 50 - Disposition )*1
|
(50 - Disposition) * fFightDispMult
|
|
Кража
|
5 * Item Value
|
fAlarmStealing * Item Value
|
|
Карманная кража
|
25
|
iAlarmPickPocket
|
|
Взлом
|
25
|
iAlarmTresspass
|
|
Оскорбление
|
Из формулы убеждения
|
|
|
Угроза
|
Из формулы убеждения
|
|
|
Вежливость
|
Из формулы убеждения
|
|
Следующая таблица показывает результирующую реакцию:
|
100
|
Всегда атакует
|
|
95
|
Атакует, если игрок ближе 3000 единиц
|
|
90
|
Атакует, если игрок ближе 2000 единиц
|
|
80
|
Атакует, если игрок близко или вы ему не нравитесь (1000 единиц, 40 Disp)
|
|
70
|
Атакует, если игрок близко, и вы ему сильно не нравитесь (1000 единиц, 35 disp)
|
|
60
|
Атакует, если вы ему не нравитесь и находитесь близко (Disp меньше 30)
|
|
50
|
Атакует, если он ненавидит вас (Disp 0)
|
|
40
|
Атакует, если игрок близко или вы ему не нравитесь. (500 единиц, Disp 10)
|
|
30
|
Будет атаковать, если он ненавидит вас, и вы совершили преступление.
|
|
20
|
Будет атаковать, если он ненавидит вас, и вы совершили много преступлений.
|
|
10
|
Атакует, если он ненавидит вас, и вы совершили много преступлений по отношению к нему.
|
|
0
|
Атакует ТОЛЬКО, если атакован первым
|
Get/Mod/SetFlee
Changing this changes it for ALL references of the Actor (see note).
Setting this to a higher value will make the Actor more likely to flee, but this may not always be the result, as the Actor will also use other factors like how much damage they can give out, or other strategies they may use such as magic and ranged combat. The behavior is strongly influenced by a number of GameSettings that are listed below, and a number of mods (e.g. by wakim and maxpublic) have tweaked these values to allow for more realistic fleeing behavior.
Get/Mod/SetAlarm
Changing this changes it for ALL references of the Actor (see note).
Some info from the helpfile: When a crime is committed, and it is detected by an NPC, they will shout something at the player, this also notifies other NPCs in the area.
When the NPCs hear this, they adjust their settings based on their alarm setting. The higher the alarm setting, the angrier they will get.
If an NPC has an alarm of 100, he will put gold on the PC’s head if they hear of a crime.
If the NPC with alarm 100 is also of class “Guard”, they will have extra behavior:
Intercept the PC, by running up and arresting the PC.
If the PC’s CrimeLevel is over 10000, they will attack on sight, instead of initiating dialogue.
Guards will also attack any creatures they can see that are attacking people (including the PC). If the player has followers (companions or other NPCs in AIFollow mode), the presence of a guard-class NPC in the party may also cause the non-guard followers to attack hostile creatures before blows have been exchanged (normally a non-guard follower would do nothing until a hit has occurred). -(Forum info/Neko)
Note: When you use these functions to alter the settings for an actor, it alters the current reference of the actor AND the definition of the actor. What this means is if you encounter a new actor of that id that you haven't yet met, he will have the new alarm/Fight setting. Also, if you leave the cell where an actor still has the old value, rest for 3 days (to disconnect them from memory) then re-enter the cell, he will take his value from the definition of the actor i.e. the new alarm setting (Forum info / Cortex).