[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
$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_1
icon				 = ui_npc_monster_rat_normal

Scheduled		     = on				; option for ALife Simulator
Human		     	 = off				; option for ALife Simulator
Health			     = 20				; 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
retreat_threshold	 = 0.2
eye_fov				 = 170
eye_range			 = 10
max_hear_dist		 = 50
MaxHealthValue		 = 15				; range [0..200]
transparency_threshold	 = 1.0
DynamicObjectsCount	 = 32
DynamicSoundsCount	 = 32

smart_terrain_choose_interval	= 00:15:00

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

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

idle_sound_delay		= 80000
eat_sound_delay			= 4000
attack_sound_delay		= 8000

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


;---------------------------------------------------------------------
; 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

script_binding  	 = bind_monster.bind

Spawn_Inventory_Item_Section = mutant_spleen_rat
Spawn_Inventory_Item_Probability = 0.6

;---------------------------------------------------------------------
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
;---------------------------------------------------------------------

step_params			= m_rat_step_params

ImpulseMin			 = 20.0
ImpulseMax			 = 35.0 

;----------------------------------------------------------------------------
; Movement::Velocities & Acceleration
;----------------------------------------------------------------------------
; speed factors			linear | angular_real | angular_path | min |  max
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		= 7.5


;--------------------------------------------------------------------------
; Attack parameters
;--------------------------------------------------------------------------
MinAttackDist		= 0.5  ;1.2
MaxAttackDist		= 3.8  ;1.8
as_min_dist				= 0.25
as_step					= 0.25
hit_power			    = 5
hit_type			    = wound

attack_params		= m_rat_attack_params


DayTime_Begin		= 0
DayTime_End			= 21
Min_Satiety			= 0.4
Max_Satiety			= 1.0

distance_to_corpse	= 1.2


min_view_distance   		= 0.8				; коэффициент, который множится на 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.01				; значение, на которое уменьшается вес, если объект попал в фрустум, но отсёкся по каким-то причинам
velocity_factor		     	= 0.5
luminocity_factor			= 0.5 				; фактор освещения (только для Актёра)

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


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

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

;--------------------------------------------------------------------------
; 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_

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	     =   100			; meters
RetreatTime				 = 10000			; milliseconds
RetreatDistance		     =   100			; 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

MoraleDeathDistance	     = 50				; meters
SoundThreshold		     = 0.06             ; range [0..1]

ActionRefreshRate	     = 500			; milliseconds
MaxHealthValue		     = 15			; range [0..200]

EatMemberCorpses	     = 1			; range {0,1}
Cannibalism				 = 1			; range {0,1}
EatCorpseInterval	     = 600000		; milliseconds

corp_mass				 = 500			;



;terrain		         = 3,255,255,255,30,60, 4,255,255,255,30,60, 11,255,255,255,30,60, 12,255,255,255,30,60, 13,255,255,255,30,60, 14,255,255,255,30,60, 15,255,255,255,30,60
;terrain		         = 1,255,255,255,30,60, 2,255,255,255,30,60, 3,255,255,255,30,60, 4,255,255,255,30,60
;terrain				 = 255,255,255,255,30,40
terrain				 = rats_terrain


immunities_sect				= rat_immunities


;-------------------------------------------------------------------------
; 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			;уменьшение здоровья при воздействии радиации
bleeding_v              = 0.05			;0.02			;потеря крови при максимальной ране
wound_incarnation_v     = 0.05	;0.001		    ;скорость заживания раны 
morale_v			    = 0.01					;скорость восстановления морали
health_hit_part         = 1.0		;0.8			;процент хита, уходящий на отнимание здоровья
power_hit_part          = 1.0		;0.9			;процент хита, уходящий на отнимание силы
psy_health_v            = 0.1						;скорость восстановления psy-здоровья


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

eat_freq			=	5.0		; ўрёЄюЄр єъєёют т ёхъ
eat_slice			=	0.01	; єтхышўхэшх ёvЄюёЄш яЁш 1 єъєёх
eat_slice_weight	=	10.0	; єьхэ№°хэшх хфv є ЄЁєяр

satiety_threshold	= 0.5							; below this value monster fill hunger


; 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

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	

DamagedThreshold		= 0.4
critical_wound_threshold		= -1
critical_wound_decrease_quant	= 0.

material				= creatures\medium
DynamicObjectsCount		= 32

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

[rats_terrain]
	255,000,255,255 ;на всех уровнях, по графам без описания
	;255,004,255,255 ;на всех уровнях, по мертвой земле
	;255,005,255,255 ;на всех уровнях, по деревням
	;255,006,255,255 ;на всех уровнях, по городам
	;255,007,255,255 ;на всех уровнях, по промзастройкам
	;255,008,255,255 ;на всех уровнях, по туннелям
	;255,009,255,255 ;на всех уровнях, по подземельям
	;255,014,255,255 ;на всех уровнях, по железнодорожным насыпям
	;255,015,255,255 ;на всех уровнях, по искусственным заграждениям
     ;5,0,0,0


[rat_weak]:m_rat_e	
$spawn = "monsters\rat"	
monster_type		= indoor
rank = 0	
;visual				 = monsters\rat\rat_1
visual				 = monsters\rat\rat_weak
corpse_visual		 = monsters\rat\rat_1
spec_rank = weak
community = rat
panic_threshold		= 0.2
immunities_sect		= rat_immunities
icon				 = ui_npc_monster_rat_weak

smart_terrain_choose_interval	= 00:15:00
damage					        = m_rat_damage


;===========================================================================
; 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

[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_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_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



[rat_normal]:m_rat_e	
$spawn = "monsters\rat\rat_1"	
monster_type		= indoor
rank = 0	
;visual				 = monsters\rat\rat_1
visual				 = monsters\rat\rat_normal.ogf
corpse_visual		 = monsters\rat\rat_1
spec_rank = normal	
community = rat
immunities_sect		= rat_strong_immunities


[rat_strong]:m_rat_e	
$spawn = "monsters\rat\rat_1"	
monster_type		= indoor
rank = 0	
visual				 = monsters\rat\rat_1
corpse_visual		 = monsters\rat\rat_1
spec_rank = strong	
community = rat
icon				 = ui_npc_monster_rat_strong
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
