;===========================================================================
; FLESH
;===========================================================================
[m_flesh_e]:monster_base
GroupControlSection		= spawn_group
SpaceRestrictionSection	= space_restrictor,zone_mosquito_bald,zone_gravi_zone
$spawn					= "monsters\fleshes\flesh_base"		; option for Level Editor
$npc					= on		; option for Level Editor
$prefetch				= 16

class					= SM_FLESH		; AI class

visual					= monsters\flesh\flesh
corpse_visual			= monsters\flesh\flesh_dead
icon					= ui_npc_monster_flesh

species					= flesh

script_binding			= bind_monster.bind

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

bone_torso				= bip01_spine
bone_head				= bip01_head
bone_eye				= bip01_ponytail2
bone_fire				= bip01_head
bone_drag				= bip01_r_hand

max_ignore_distance		= 20
parts_cut_count			= 200

;------------------------------------------------------------------------
; Offline Alife
;------------------------------------------------------------------------
Scheduled					= on			; option for ALife Simulator
Human						= off			; option for ALife Simulator
Health						= 250			; option for ALife Simulator
MinSpeed					= 1.0			; option for ALife Simulator
MaxSpeed					= 1.5			; option for ALife Simulator
going_speed					= 2				; option for ALife Simulator
current_level_going_speed	= 1				; option for ALife Simulator
MaxHealthValue				= 200			; range [0..200]
;------------------------------------------------------------------------
; Influences
;------------------------------------------------------------------------
psy_max_distance			= 0
psy_max_power				= 0

radiation_max_distance		= 3.0
radiation_max_power			= 0.025
;---------------------------------------------------------------------
; Physics
;---------------------------------------------------------------------
ph_box0_center				= 0.0,  0.7,  0.0
ph_box0_size				= 0.52, 0.7,  0.52
ph_box1_center				= 0.0,  0.6,  0.0
ph_box1_size				= 0.40, 0.6,  0.40
ph_crash_speed_min			= 10
ph_crash_speed_max			= 30
ph_collision_damage_factor	= 0.1
ph_mass						= 200		; also it's the food

destroyed_vis_name			= ;		physics\dead_body\skelet_crash_monster

;----------------------------------------------------------------------------
ph_skeleton_collision_enabled	= true

ph_skeleton_skin_friction_start	= 0.7   ;Стартовое значение трения для оболочки
ph_skeleton_skin_friction_end	= 0.7   ;Финальное значение трения для оболочки
ph_skeleton_skin_ddelay			= 1.0   ;Время изменения значения трения с момента создания шелла, сек.

ph_skel_fatal_impulse_factor	= 2.0
ph_after_death_velocity_factor	= 1.0
ph_skel_shot_up_factor			= 0.25

;----------------------------------------------------------------------------
; Movement::Velocities & Acceleration
;----------------------------------------------------------------------------
; speed factors				linear | angular_real | angular_path	| min	| max
Velocity_Stand				= 0,		1.79,			1.79		1,		1
Velocity_WalkFwdNormal		= 1.6,		2.1,			2.0,		0.2,	2.0
Velocity_WalkFwdDamaged		= 1.5,		1.14,			1.14,		0.2,	2.0
Velocity_RunFwdNormal		= 5.2,		2.8,			2.6,		0.2,	1
Velocity_RunFwdDamaged		= 4.5,		2.2,			2.2,		0.3,	1
Velocity_RunAttack			= 7.4,		3.5,			3.0,		0.15,	1
Velocity_Drag				= 0.95,		1.0,			1.0,		1,		1
Velocity_Steal				= 0.6,		1.2,			1.2,		1,		1

; acceleration
Accel_Generic			= 1.5
Accel_Calm				= 2.5
Accel_Aggressive		= 9.5

;--------------------------------------------------------------------------
; Attack parameters
;--------------------------------------------------------------------------
;attack_effector			= m_flesh_attack_effector
attack_params			= m_flesh_attack_params

MinAttackDist			= 1.8
MaxAttackDist			= 2.3	;	max  2*MinAttackDist-as_min_dist
as_min_dist				= 1.3
as_step					= 0.3

Melee_Rotation_Factor	= 2.2

hit_type				= wound		; type of attack
;--------------------------------------------------------------------------
; Jump parameters
;--------------------------------------------------------------------------
jump_enabled				= 1
jump_probability			= 0.7
jump_delay					= 5000
jump_factor					= 1.5
jump_ground_trace_range		= 0.8
jump_hit_trace_range		= 1.5
jump_build_line_distance	= 2.0
jump_min_distance			= 5.5
jump_max_distance			= 6.5
jump_max_angle				= 0.3
jump_max_height				= 2.0
jump_auto_aim_factor		= 0
jump_predict_factor			= 1.2
jump_predict_prob			= 0.4
;-------------------------------------------------------------------------
; Entity Conditions
;-------------------------------------------------------------------------
satiety_v				= 0.0001			;скорость уменьшения сытости со временем
radiation_v				= 0.00001			;скорость уменьшения радиации
radiation_health_v		= 0.01				;уменьшение здоровья при воздействии радиации
morale_v				= 0.01				;скорость восстановления морали
health_hit_part			= 0.3				;процент хита, уходящий на отнимание здоровья
power_hit_part			= 0.5				;процент хита, уходящий на отнимание силы
psy_health_v			= 0.01				;скорость восстановления psy-здоровья

;Immunities
immunities_sect			= flesh_immunities
protections_sect		= flesh_protections

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

;Eat settings
eat_freq				= 1.0		; частота укусов в сек
eat_slice				= 0.01		; увеличение сытости при 1 укусе
eat_health				= 0.01		; увеличение здоровья при 1 укусе
eat_slice_weight		= 70		; уменьшение еды у трупа
satiety_threshold		= 0.7		; below this value monster fill hunger

;-------------------------------------------------------------------------
; Morale
;-------------------------------------------------------------------------
Morale_Hit_Quant				= 0.05
Morale_Attack_Success_Quant		= 0.1
Morale_Take_Heart_Speed			= 0.1
Morale_Despondent_Speed			= 0.1
Morale_Stable_Speed				= 0.01
Morale_Despondent_Threashold	= 0.5
;---------------------------------------------------------
; Sounds and sound parameters
;---------------------------------------------------------
sound_idle				= monsters\flesh\flesh_idle_
sound_eat				= monsters\flesh\flesh_eat_
sound_aggressive		= monsters\flesh\flesh_aggressive_
sound_attack_hit		= monsters\flesh\flesh_attack_		;hit_
sound_take_damage		= monsters\flesh\flesh_pain_
sound_die				= monsters\flesh\flesh_death_
sound_threaten			= monsters\flesh\flesh_attack_
sound_steal				= monsters\biting\def_
sound_panic				= monsters\flesh\flesh_panic_
;sound_growling			= monsters\biting\def_
sound_die_in_anomaly	= monsters\flesh\flesh_anomaly_death_
sound_distant_idle		= monsters\flesh\flesh_idle_

killer_clsids			= ZS_AMEBA,ZS_HAIRS,ZS_MBALD,ZS_MINEF,ZS_GALAN,ZS_MINCE,ZS_GRAVI,ZS_CAMPF,ZS_TORRD

idle_sound_delay		= 85000
eat_sound_delay			= 3000
attack_sound_delay		= 6000

distant_idle_sound_delay	= 80000
distant_idle_sound_range	= 100.0

SoundThreshold			= 0.07		; range [0..1]
SoundThreshold_Sleep	= 0.15
max_hear_dist			= 40

;-------------------------------------------------------------------------
; Damages
;-------------------------------------------------------------------------
DamagedThreshold		= 0.25
damage					= m_flesh_damage

critical_wound_threshold		= 0.6
critical_wound_decrease_quant	= 0.1

critical_wound_anim_head		= critical_hit_head_
critical_wound_bones_head		= flesh_critical_wound_bones_head

critical_wound_anim_torso		= critical_hit_torso_
critical_wound_bones_torso		= flesh_critical_wound_bones_torso

;critical_wound_anim_legs		= critical_hit_torso_
;critical_wound_bones_legs		= flesh_critical_wound_bones_legs

;---------------------------------------------------------
; Logic
;---------------------------------------------------------
DayTime_Begin			= 6
DayTime_End				= 18
sleep_time				= 6

distance_to_corpse		= 1.1

;-------------------------------------------------------------------------
; Other Stuff (refactoring needed)
;-------------------------------------------------------------------------
material			= creatures\hoof
step_params			= m_flesh_step_params
LegsCount			= 4

terrain				= flesh_terrain

;---------------------------------------------------------
; Vision
;---------------------------------------------------------
eye_fov			= 100
eye_range		= 35
eye_rotation	= 1.2, -0.25

vision_free_section		= flesh_vision_free
vision_danger_section	= flesh_vision_danger

; ЗНАЧЕНИЯ visibility_threshold ДОЛЖНЫ БЫТЬ РАВНЫ для денжера и фри,
; иначе возникают артефакты с потерей видимости при переходе от денжера во фри.

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

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

;=================================================================================
; Flesh Terrain
;=================================================================================
[flesh_terrain]
	255,000,255,255

;===========================================================================
; Step Events
;===========================================================================
[m_flesh_step_params]
;-------------------------------------------------------------------------------------------------------------
;	anim			| cycles | time1 | power1	| time2 | power2	| time3 | power3	| time4 | power4 |
;-------------------------------------------------------------------------------------------------------------
stand_walk_fwd_0	=	7,		1.0,	0.6,		0.4,	0.6,		0.17,	0.6,		0.64,	0.6
stand_walk_fwd_dmg_0 =	6,		0.95,	0.9,		0.37,	0.0,		0.17,	0.6,		0.64,	0.6
stand_run_0			=	6,		0.98,	1.0,		0.89,	1.0,		0.74,	1.0,		0.8,	1.0
stand_run_dmg_0		=	6,		0.99,	1.3,		0.0,	0.0,		0.74,	1.0,		0.8,	1.0
stand_run_fst_0		=	1,		0.15,	1.2,		0.2,	1.2,		0.6,	1.4,		0.7,	1.4
stand_run_look_left_0 =	1,		1.0,	1.0,		0.9,	1.0,		0.75,	1.0,		0.79,	1.0
stand_run_look_right_0=	1,		1.0,	1.0,		0.9,	1.0,		0.75,	1.0,		0.79,	1.0
stand_crawl_0		=	1,		0.69,	0.3,		0.13,	0.3,		0.63,	0.3,		0.19,	0.3
stand_drag_0		=	1,		0.5,	0.5,		1.0,	0.5,		0.66,	0.5,		0.18,	0.5

stand_turn_ls_0		=	1,		0.57,	0.4,		0.27,	0.4,		0.6,	0.4,		0.3,	0.4
stand_turn_rs_0		=	1,		0.43,	0.4,		1.0,	0.4,		0.43,	0.4,		1.0,	0.4
stand_jump_left_0	=	1,		0.6,	1.2,		0.7,	1.2,		0.66,	1.2,		0.69,	1.2
stand_jump_right_0	=	1,		0.75,	1.2,		0.66,	1.2,		0.6,	1.2,		0.75,	1.2

stand_run_attack_2	=	1,		0.26,	1.2,		0.43,	1.2,		0.51,	1.2,		0.64,	1.2
;=================================================================================
; Flesh Damage
;=================================================================================
[m_flesh_damage]
;bone_name		= <hit_scale>,-1,<wound_scale>
;<hit_scale>	- коэфф. изменения хита (уменьшения здоровья)
;<wound_scale>	- коэфф. изменения величины открытой раны

default				= 0.25, -1, 0.05

bip01_l_thigh		= 0.5, -1, 0.3
bip01_r_thigh		= 0.5, -1, 0.3
bip01_l_upperarm	= 0.5, -1, 0.3
bip01_r_upperarm	= 0.5, -1, 0.3
bip01_pelvis		= 1.0, -1, 0.2
bip01_spine			= 1.0, -1, 0.2
bip01_head			= 2.1, -1, 0.25
bip01_ponytail1		= 2.5, -1, 0.5, 4.0	; рот
bip01_ponytail2		= 3.0, -1, 0.5, 3.0	; глаз

;===========================================================================
; Immunities
;===========================================================================
[flesh_immunities]
burn_immunity			= 1.0
strike_immunity			= 0.7
shock_immunity			= 1.0
wound_immunity			= 0.2
wound_2_immunity		= 0.4
radiation_immunity		= 0.0
telepatic_immunity		= 1.0
chemical_burn_immunity	= 0.2
explosion_immunity		= 1.5
fire_wound_immunity		= 0.45

[flesh_protections]
skin_armor				= 0.15
hit_fraction_monster	= 0.45
;===========================================================================
; SPECIAL EFFECTORS
;===========================================================================
[m_flesh_attack_effector]
duality_h        = 0.01
duality_v        = 0.01
blur            = 0.01
gray            = 0.5
noise_intensity = 0.0
noise_grain        = 1
noise_fps        = 30
color_base        = 0.65,0.15,0.1
color_gray        = 0.333,0.333,0.333
color_add        = 0,0,0
time            = 0.3
time_attack        = 0.05        ; fade in
time_release            = 0.25        ; fade out

; camera effects
ce_time             = 0.45
ce_amplitude        = -10.0
ce_period_number    = 2.0
ce_power            = 1.5


;===========================================================================
; Attack Animation Parameters
;===========================================================================
[m_flesh_attack_params]
;---------------------------------------------------------------------------------------------------------------------------------------------
;    anim          | time[0..1] | hit_power | impulse | impulse_dir (x,y,z)  | Field of hit_test  (left,right, top, bottom) | Test Dist | Hit Type
;---------------------------------------------------------------------------------------------------------------------------------------------
;Left leg strike
stand_attack_0		=	0.25,		0.20,		75,			0.2, 0.3, 1.0,			-1.0, 1.0, -0.8, 1.0,						2.0
stand_attack_1		=	0.55,		0.40,		150,		0.1, 0.3, 1.0,			-1.0, 1.0, -1.4, 1.0,						2.5
;Right leg strike
stand_attack_2		=	0.58,		0.40,		150,		-0.1, 0.3, 1.0,			-1.0, 1.0, -1.0, 1.0,						2.5
;Both leg strike
stand_attack_3		=	0.45,		0.80,		400,		0.0, 0.3, 1.0,			-1.0, 1.0, -1.4, 1.0,						2.8,	wound_2
stand_attack_4		=	0.42,		0.60,		250,		0.0, 0.3, 1.0,			-1.0, 1.0, -1.0, 1.0,						2.3

stand_run_attack_1	=	0,			0.20,		600,		0.0, 0.4, 1.0,			-1.4, 1.4, -1.4, 1.4,						0,		strike

;===========================================================================

[flesh_critical_wound_bones_head]
bip01_head
bip01_ponytail1		; mouth
bip01_ponytail2	; eye, no shape

[flesh_critical_wound_bones_torso]
bip01_pelvis
bip01_spine
bip01_l_thigh
bip01_r_thigh
bip01_l_upperarm
bip01_r_upperarm

;[flesh_critical_wound_bones_legs]
;bip01_l_calf
;bip01_l_horselink
;bip01_l_foot
;bip01_l_toe0

;bip01_r_calf
;bip01_r_horselink
;bip01_r_foot
;bip01_r_toe0

;bip01_l_forearm
;bip01_l_hand
;bip01_l_finger0

;bip01_r_forearm
;bip01_r_hand
;bip01_r_finger0


;*********************************************************************************
; WEAK PROFILE
;*********************************************************************************
[flesh_weak]:m_flesh_e
$spawn				= "monsters\fleshes\flesh_01_weak"
visual				= monsters\flesh\flesh
corpse_visual		= monsters\flesh\flesh_dead
icon				= ui_npc_monster_flesh
rank				= 0
spec_rank			= weak

health_hit_part		= 0.3
hit_power_factor	= 1.0
hit_impulse_factor	= 0.8
panic_threshold		= 0.15

;*********************************************************************************
; NORMAL PROFILE
;*********************************************************************************
[flesh_normal]:m_flesh_e
$spawn				= "monsters\fleshes\flesh_02_normal"
visual				= monsters\flesh\flesh
corpse_visual		= monsters\flesh\flesh_dead
icon				= ui_npc_monster_flesh
rank				= 401
spec_rank			= normal

health_hit_part		= 0.25
hit_power_factor	= 1.2
hit_impulse_factor	= 1.0
panic_threshold		= 0.1


;*********************************************************************************
; STRONG PROFILE
;*********************************************************************************
[flesh_strong]:m_flesh_e
$spawn				= "monsters\fleshes\flesh_03_strong"
visual				= monsters\flesh\flesh_strong
corpse_visual		= monsters\flesh\flesh_strong
icon				= ui_npc_monster_flesh_strong
rank				= 801
spec_rank			= strong

health_hit_part		= 0.2
hit_power_factor	= 1.5
hit_impulse_factor	= 1.1
panic_threshold		= 0.02



;[flesh_group]
;GroupControlSection		= spawn_group
;$spawn					= "monsters\flesh-group"	; option for Level Editor
;$npc					= on				; option for Level Editor
;Human					= off				; option for ALife Simulator
;class					= AI_FLE_G			; AI class
;monster_section			= m_flesh_e

