[rat_group]
;obsolete
GroupControlSection	= spawn_group
$spawn          = "monsters\rat-group"		; option for Level Editor
$npc		= on				; option for Level Editor
Human		= off				; option for ALife Simulator
class           = AI_RAT_G	; AI class
monster_section = m_rat_e

[m_rat_e]:monster_base
GroupControlSection	= spawn_group
SpaceRestrictionSection = space_restrictor,zone_mosquito_bald ; +++
;$spawn			= "monsters\rat"	; option for Level Editor
$npc			= on			; option for Level Editor
$prefetch		= 128
visual			= monsters\rat\rat_1
corpse_visual		= monsters\rat\rat_dead1
icon			= ui_npc_monster_rat_weak

Spawn_Inventory_Item_Section = mutant_spleen_rat
Spawn_Inventory_Item_Probability_onDeath = 0.4

Scheduled	= on	; option for ALife Simulator
Human		= off	; option for ALife Simulator

MaxHealthValue	= 15	; by DC	; range [0..200]
Health		= 15	; by DC	; option for ALife Simulator
MinSpeed	= 1.0	; option for ALife Simulator
MaxSpeed	= 1.5	; option for ALife Simulator
going_speed	= 1.0	; option for ALife Simulator
search_speed	= 1.0	; option for ALife Simulator

current_level_going_speed = 1	; option for ALife Simulator

smart_terrain_choose_interval	= 00:15:00

terrain = rats_terrain

;---------------------------------------------------------------------
; Physics
;-------------------------------------------

ph_box0_center		= 0.0,   0.11, -0,22
ph_box0_size		= 0.085, 0.11,  0.525
ph_box1_center		= 0.0,   0.11, -0.22
ph_box1_size		= 0.085, 0.11,  0.525
ph_crash_speed_min		= 10
ph_crash_speed_max		= 30
ph_collision_damage_factor	= 0.1
ph_mass				= 2

destroyed_vis_name	= physics\Dead_Body\trupik_crash

;---------------------------------------------------------------------
ph_skeleton_airr_lin_factor	= -0.40 ;(изменно из-за того, что убрано домножение коэффициент 0.002 из кода)
ph_skeleton_airr_ang_factor	= -0.20 ;(изменно из-за того, что убрано домножение на коэффициент 0.3 из кода (0.0*0.3=0.0))
ph_skeleton_hinger_factor1	= 1.0 ;1.0 (изменно из-за того, что убрано домножение на коэффициент 5.0 из кода)
ph_skeleton_ddelay		= 15.0 ;Время изменения значения трения в суставе с момента создания шелла, сек

ph_skel_fatal_impulse_factor	= 3.0
ph_after_death_velocity_factor	= 0.75
ph_skel_shot_up_factor		= 0.25
;---------------------------------------------------------------------

; Movement::Velocities & Acceleration

; speed factors		linear| angular_real|angular_path|min|max
Velocity_Stand		= 0,	   1.5,		1.5,	1,	1
Velocity_RunFwdNormal	= 3.0,	   2.5,		2.5,	0.3,	1	
Velocity_RunFwdDamaged	= 2.5, 	   2.0,		2.0,	0.5,	1
Velocity_WalkFwdNormal	= 1.0,	   1.5,		1.5,	0.02,	1.8	
Velocity_WalkFwdDamaged	= 1.0,	   1.5,		1.5,	0.2,	1.8	
Velocity_Drag		= 1.0,	   3.0,		3.0,	1,	1
Velocity_Steal		= 1.5,	   3.0,		3.0,	1,	1
;Velocity_Stand		= 0,	   3.5,		3.5,	1,	1
;Velocity_WalkFwdNormal	= 1.0,	   7.5,		7.5,	0.02,	1.8	
;Velocity_RunFwdNormal	= 5.0,	   3.5,		3.5,	0.3,	1	
;Velocity_WalkFwdDamaged= 1.0,	   4.5,		4.5,	0.2,	1.8	
;Velocity_RunFwdDamaged	= 3.0,	   3.0,		3.0,	0.5,	1
;Velocity_Drag		= 1.0,	   3.0,		3.0,	1,	1
;Velocity_Steal		= 1.5,	   3.0,		3.0,	1,	1
; acceleration
Accel_Generic	= 1.4
Accel_Calm	= 2.4
Accel_Aggressive= 4.5


ef_creature_type	= 1	; option for evaluation functions
ef_weapon_type		= 2
ef_detector_type	= 1

cform	= skeleton	; collision class
class	= SM_TUSHK	; AI class from tushkan

material		= creatures\medium

bone_torso	= bip01_spine1	; bone name
bone_head	= bip01_head	; bone name
bone_fire	= bip01_head	; bone name
weapon_usage	= 0		; boolean
LegsCount	= 2
EyeYShift	= 0.15		; meters
corp_mass	= 5		; by DC

actor_restrictor	= medium_monster ;medium_monster,stalker,none
script_binding		= bind_monster.bind


;species of monster
species		= rat
spec_rank	= weak
community	= rat	

DayTime_Begin	= 4
DayTime_End	= 22

; Morale
Morale_Hit_Quant		= 0.1
Morale_Attack_Success_Quant	= 0.1
Morale_Take_Heart_Speed		= 0.1
Morale_Despondent_Speed		= 0.1
Morale_Stable_Speed		= 0.05
Morale_Despondent_Threashold	= 0.5
MoraleDeathDistance		= 10	; meters

ActionRefreshRate	= 500	; milliseconds
panic_threshold		= 0.1
retreat_threshold	= 0.2

ChangeActiveStateProbability	= 1.0	; range [0..1]
ActiveCountPercent		= 16	; percents
StandingCountPercent		= 16	; percents
PassiveScheduleMin		= 100	; microseconds
PassiveScheduleMax		= 1000	; microseconds

LostMemoryTime		= 20000	; milliseconds
LostRecoilTime		= 2000  ; milliseconds
UnderFireDistance	= 10	; by DC	; meters
RetreatTime		= 10000	; milliseconds
RetreatDistance		= 40	; by DC	; meters
AttackStraightDistance	= 10	; meters
StableDistance		= 5	; meters
WallMinTurnValue	= 90	; degrees
WallMaxTurnValue	= 270	; degrees

AngleSpeed		= 0.2	; degrees per second
GoalChangeDelta		= 10.0	; seconds
GoalVariation		= 10.0, 0.0, 20.0 ; each coordinate in meters
AngularStandSpeed	= 360	; degrees
AngularMinSpeed		= 360	; degrees
AngularMaxSpeed		= 30	; degrees
AngularAttackSpeed	= 10	; degrees

;squad_attack_algorithm	= 1	; add by DC
;attack_effector		= small_monster_attack_effector ; add by DC

; Attack parameters
MinAttackDist	= 0.5  ;1.2
MaxAttackDist	= 1.8  ;1.8
as_min_dist	= 0.25
as_step		= 0.25
hit_power	= 1
hit_type	= wound
ImpulseMin	= 2.0
ImpulseMax	= 3.5 

attack_params	= m_rat_attack_params
step_params	= m_rat_step_params

eye_fov		= 150
eye_range	= 10

min_view_distance	= 0.2		; коэффициент, который множится на eye_range, в зависимости от угла
max_view_distance	= 1.0		; коэффициент, который множится на eye_range, в зависимости от угла
visibility_threshold	= 100.0		; значение, при достижении суммой которого объект считается видимым
always_visible_distance = 0.3
time_quant		= 0.001
decrease_value		= 0.1		; значение, на которое уменьшается вес, если объект попал в фрустум, но отсёкся по каким-то причинам
velocity_factor	     	= 0.35
luminocity_factor	= 0.75 		; фактор освещения (только для Актёра)
transparency_threshold	= 1

SoundThreshold	= 0.1	; by DC	; range [0..1]
max_hear_dist	= 20

DynamicObjectsCount	= 32
DynamicSoundsCount	= 32

; Entity Conditions
satiety_v               = 0.0001	;0.01	;скорость уменьшения сытости со временем
radiation_v             = 0.00001	;0.004	;скорость уменьшения радиации
satiety_power_v         = 0.001		;0.01	;увеличение силы при уменьшении сытости 
satiety_health_v        = 0.001		;0.03	;увеличение здоровья при уменьшении сытости 
satiety_critical        = -1.0		;0.25	;критическое значения сытости (в процентах от 0..1) когда здоровье начианает уменьшаться
radiation_health_v      = 0.01		;0.006	;уменьшение здоровья при воздействии радиации
morale_v		= 0.01			;скорость восстановления морали
health_hit_part         = 1.0		;0.8	;процент хита, уходящий на отнимание здоровья
power_hit_part          = 1.0		;0.9	;процент хита, уходящий на отнимание силы
psy_health_v            = 0.1			;скорость восстановления psy-здоровья

immunities_sect	= rat_immunities
damage		= m_rat_damage

;открытые раны
bleeding_v		= 0.06		;потеря крови при номинальной ране в секунду
wound_incarnation_v	= 0.03		;крутизна кривой заживления (какой процент раны останется после заживления в игровую секунду)
min_wound_size		= 0.01

DamagedThreshold		= 0.4
critical_wound_threshold	= -1
critical_wound_decrease_quant	= 0.

sleep_health		= 1.0		;1.5	;коэффициенты скоростей изменения параметров во время сна
sleep_power		= 1.0		;1.5
sleep_satiety		= 1.0		;0.8
sleep_radiation		= 1.0		;1.1
sleep_psy_health	= 1.0

satiety_threshold	= 0.5							; below this value monster fill hunger
Min_Satiety	= 0.4
Max_Satiety	= 1.0

distance_to_corpse	= 1.2
eat_freq		= 5.0		; ўрёЄюЄр єъєёют т ёхъ
eat_slice		= 0.01		; єтхышўхэшх ёvЄюёЄш яЁш 1 єъєёх
eat_slice_weight	= 10.0		; єьхэ№°хэшх хфv є ЄЁєяр
EatMemberCorpses	= 1		; range {0,1}
Cannibalism		= 1		; range {0,1}
EatCorpseInterval	= 600000	; milliseconds


killer_clsids = Z_MINCER,Z_GALANT,ZS_BFUZZ,ZS_MBALD,ZS_GALAN,ZS_MINCE

;--------------------------------------------------------------------------
; Sound
;--------------------------------------------------------------------------
sound_die		= monsters\rat\death_
sound_hit		= monsters\rat\hit_
sound_attack		= monsters\rat\attack_
sound_idle		= monsters\rat\idle_
sound_eat		= monsters\rat\eat_
sound_aggressive	= monsters\rat\rat_aggressive_
sound_attack_hit	= monsters\rat\attack_
sound_take_damage	= monsters\rat\rat_pain_
sound_threaten		= monsters\rat\rat_threaten_
sound_landing		= monsters\rat\hit_
sound_steal		= monsters\rat\idle_
sound_panic		= monsters\rat\voice_
sound_growling		= monsters\rat\idle_
sound_die_in_anomaly	= monsters\rat\death_

idle_sound_delay	= 80000
eat_sound_delay		= 4000
attack_sound_delay	= 8000

MinVoiceInterval	=  30000	; milliseconds
MaxVoiceInterval	= 120000	; milliseconds
VoiceRefreshRate	=   2500	; milliseconds

idle_sound_delay	= 80000
eat_sound_delay		= 4000
attack_sound_delay	= 8000

sound_distant_idle	= monsters\rat\idle_
distant_idle_sound_delay= 80000
distant_idle_sound_range= 100.0	

[m_rat_step_params]
;---------------------------------------------------------------------------
;	anim			| Cycles | time1 | power1 | time2 | power2 |
;---------------------------------------------------------------------------
stand_walk_fwd_0 	=	1,	   0.2,     0.5,     0.7,    1
stand_run_0	 	=	1,	   0.25,     1,	    0.25,    1

[m_rat_attack_params]

;-----------------------------------------------------------------------------------------------------------------------------------
;	anim	| time[0..1] | hit_power | impulse | impulse_dir (x,y,z)  |Field of hit_test  (left,right, bottom, top ) | Test Dist
;-----------------------------------------------------------------------------------------------------------------------------------
stand_attack_0 = 0.25,		0.10,	    20,        0.0, 1.0, 0.0,	 -1.2, 1.2, -1.6, 1.6,					1.0
stand_attack_1 = 0.25,		0.10,	    30,        0.0, 1.0, 0.0,	 -1.2, 1.2, -1.6, 1.6,					1.0
stand_attack_2 = 0.25,		0.10,	    35,        0.0, 1.0, 0.0,	 -1.2, 1.2, -1.6, 1.6,					1.0

[m_rat_damage]
;bone_name	= <hit_scale>,-1,<wound_scale>
;<hit_scale>	- коэфф. изменения хита (уменьшения здоровья) 
;<wound_scale>	- коэфф. изменения величины открытой раны

default		= 1,   -1, 0.10	;0.15, -1, 0.10
bip01_pelvis	= 1.0, -1, 0.5
bip01_spine	= 1.0, -1, 0.5
bip01_spine1	= 1.0, -1, 0.5
bip01_neck	= 1.0, -1, 1.5
bip01_head	= 2.0, -1, 0.5, 10

;===========================================================================
; IMMUNITIES
;===========================================================================
[rat_immunities]
burn_immunity		= 0.5	;коэффициенты иммунитета 
strike_immunity		= 1
shock_immunity		= 1
wound_immunity		= 0.5
radiation_immunity	= 0.0
telepatic_immunity	= 1.0
chemical_burn_immunity	= 1
explosion_immunity	= 1
fire_wound_immunity	= 1

[rats_terrain]
255,000,255,255
001,002,000,000 ;Кордон
008,001,000,000 ;Бар
010,001,000,000 ;Янтарь
012,001,000,000 ;Миллитари

[rat_weak]:m_rat_e
$spawn = "monsters\rats\rat_weak"	
monster_type	= indoor
rank		= 0
spec_rank	= weak
community	= rat
panic_threshold	= 0.2
immunities_sect	= rat_strong_immunities


[rat_normal]:m_rat_e
$spawn = "monsters\rats\rat_normal"	
monster_type	= indoor
rank		= 301	
visual		= monsters\rat\rat_2
corpse_visual	= monsters\rat\rat_dead2
icon		= ui_npc_monster_rat_normal
spec_rank	= normal	
community	= rat
immunities_sect	= rat_strong_immunities

[rat_strong]:m_rat_e
$spawn		= "monsters\rats\rat_strong"	
monster_type	= indoor
rank		= 601
visual		= monsters\rat\rat_3
corpse_visual	= monsters\rat\rat_dead3
icon		= ui_npc_monster_rat_strong
spec_rank	= strong	
community	= rat
immunities_sect	= rat_strong_immunities

;===========================================================================
; IMMUNITIES rat_strong
;===========================================================================
[rat_strong_immunities]
burn_immunity		= 0.5	;коэффициенты иммунитета 
strike_immunity		= 0.4
shock_immunity		= 0.5
wound_immunity		= 0.4
radiation_immunity	= 0.0
telepatic_immunity	= 0.5
chemical_burn_immunity	= 1
explosion_immunity	= 0.6
fire_wound_immunity	= 0.7

;--- horror ---------------------------------------------------------------
[horror_rat_weak]:rat_weak	
$spawn		="monsters\horror_rat_weak"	
panic_threshold	= 0.01
rank		= 400
DayTime_Begin	= 0
DayTime_End	= 24

[horror_rat_normal]:rat_normal	
$spawn		="monsters\horror_rat_normal"	
panic_threshold	= 0.01
rank		= 400
DayTime_Begin	= 0
DayTime_End	= 24

[horror_rat_strong]:rat_strong	
$spawn		="monsters\horror_rat_strong"	
panic_threshold	= 0.01
rank		= 400
DayTime_Begin	= 0
DayTime_End	= 24
;--- horror ------------------------------------------------------- end ---

;--крыса-камикадзе--
;--работа: СанСаныч & BFG
;--скриптовая привязка: Sapsan
;---------------------
[rat_tnt]:m_rat_e
$spawn		= "monsters\rats\rat_tnt"	
monster_type	= indoor
rank		= 901
visual		= monsters\rat\rat_tnt
corpse_visual	= monsters\rat\rat_dead3
icon		= ui_npc_monster_rat_strong
spec_rank	= personal	
community	= rat
immunities_sect	= rat_strong_immunities
Spawn_Inventory_Item_Section = mutant_spleen_rat
Spawn_Inventory_Item_Probability_onDeath = 0.0