//
// AI Prototyping configuration
//
// These are variables to play with to tune the gameplay or try alternative designs.
//
// Notes to users:
//
// AI distance units are measured as:	16 units per FOOT
//					48 units per YARD
//					52 units per METER (approx)

// Ranges for attributes
//
// This dictates the tier that a players attribute will be in
ATTRIBUTE_AVG = 60
ATTRIBUTE_GOOD = 80
ATTRIBUTE_EX = 90

// Dribble Local Scoring
//
// These are used to determine which direction to dribble in
OPTION_VALUE_DRIBBLE_DIRECTION = 125000
OPTION_VALUE_DRIBBLE_SAFE = 162500

// Short Pass Scoring
//
OPTION_VALUE_PASS_FORWARD_MAX = 180
OPTION_VALUE_PASS_FORWARD_DEFAULT = 80
OPTION_VALUE_PASS_FORWARD_MIN = 50
OPTION_VALUE_RECV_SAFE = 275

// Through Ball Scoring
//
OPTION_VALUE_THROUGH_PASS_FORWARD = 70

// Long Pass Scoring
//
// These are used to determine who to long pass to 
OPTION_VALUE_LOB_PASS_FORWARD = 50
OPTION_VALUE_LOB_PASS_SAFE = 75000

// Clearance Scoring
//
GK_CLEARANCE_BIAS = 2.0
   
// Global Scoring
//
// These are used to score each possible behaviour (pass, shoot...)
OPTION_VALUE_MAX = 1000000
OPTION_VALUE_FORWARD_MIN = 2
OPTION_VALUE_FORWARD = 6
OPTION_VALUE_FORWARD_MAX = 12
OPTION_VALUE_SAFE_MIN = 60
OPTION_VALUE_SAFE = 70
OPTION_VALUE_SAFE_MAX = 80
OPTION_VALUE_BASE = 100000
OPTION_VALUE_GOAL_ANGLE_BONUS = 70.0

// Short Pass
//
// Distances in Yards
HEADER_PASS_DIST_MIN= 2.0
HEADER_PASS_DIST_MAX= 25.0
LOW_PASS_DIST_MIN = 4.5
LOW_PASS_DIST_MAX = 42.0

// ???
DRIBBLE_KNOCK_OPPONENT_DISTANCE = 18

// Tackling
// Dictates the chance of a foul being awarded
POOR_TACKLING_FOUL_BEHIND_CHANCE=100
POOR_TACKLING_FOUL_SIDE_CHANCE=90
AVERAGE_TACKLING_FOUL_BEHIND_CHANCE=80
AVERAGE_TACKLING_FOUL_SIDE_CHANCE=60
GOOD_TACKLING_FOUL_BEHIND_CHANCE=60
GOOD_TACKLING_FOUL_SIDE_CHANCE=40
VERY_GOOD_TACKLING_FOUL_BEHIND_CHANCE=50
VERY_GOOD_TACKLING_FOUL_SIDE_CHANCE=30

// Heading Challenges
// These are biases to determine who wins a headed challenge
// the numbers must add up to 1
HEADER_CHALLENGE_WEIGHT_INFRONT = 0.25
HEADER_CHALLENGE_WEIGHT_HEIGHT = 0.28
HEADER_CHALLENGE_WEIGHT_STRENGTH = 0.24
HEADER_CHALLENGE_WEIGHT_JUMP = 0.23

// GK Saving
// Min and max speed of movement for GK saving
GK_REACTION_TIME_MAX = 8.0
GK_REACTION_TIME_MIN = 2.0
GK_REACTION_TIME_MULT_FOR_WALL = 3.5
GK_SAVE_SPEED_SIDEWAYS_MAX = 8.5
GK_SAVE_SPEED_SIDEWAYS_MIN = 3.0
GK_SAVE_SPEED_UP_MAX = 10.25
GK_SAVE_SPEED_UP_MIN = 4.25
GK_SAVE_SPEED_DOWN_MAX = 10.25
GK_SAVE_SPEED_DOWN_MIN = 4.25
GK_SAVE_SPEED_MOVE_MAX = 10.5
GK_SAVE_SPEED_MOVE_MIN = 7.0

// GK kick speed
GOALIE_PUNT_DIST_MIN = 35.0
GOALIE_PUNT_DIST_MAX = 55.0
GOALIE_PUNT_SPEED_MIN = 27.0
GOALIE_PUNT_SPEED = 29
GOALIE_PUNT_SPEED_MAX = 30.0
GOALIE_PUNT_YV_MIN = 20.0
GOALIE_PUNT_YV = 24
GOALIE_PUNT_YV_MAX = 24.0

// Tuning parameters for FindBestIntercept (used to determining who should mark the ball carrier)
// FBI_SECOND_MARKER_THRESHOLD: Reducing this number makes it less likely that a second defender will be called
// FBI_SECOND_MARKER_DIFF_THRESHOLD: Reducing this number makes it less likely that a second defender will be called
// FBI_HYSTERESIS_SECONDS: 	A bonus given to the player already marking the ball carrier. Reducing this number will
//				mean that the defender pressing the ball will change often.
FBI_SECOND_MARKER_THRESHOLD = 84.0
FBI_SECOND_MARKER_DIFF_THRESHOLD = 42.5
FBI_HYSTERESIS_SECONDS = 0.1
FBI_LEAD = 32.0

// Loss of speed when sprinting with ball
DRIBBLE_SPEED_PENALTY = 0.2

// TEST
SMARTPASS_LEADING_DIST_LV0 = 4
SMARTPASS_LEADING_DIST_LV1 = 7
SMARTPASS_LEADING_DIST_LV2 = 10


// Height of the camera (meters) - above the field
TCM_CAM_HEIGHT = 30.7

// Horizontal distance of the camera from the focus-target (meters) - this moves the camera on the X axis in the positive direction
TCM_CAM_DEPTH_DIST = 105

// This is the lens angle of the camera view (degrees)
TCM_CAM_LENSE_ANGLE = 14.4

// This defines how less movement should the camera-position do compared to the camera-target (along the Z axis)
// Example: if this is 1.0 - the camera is moving simultaneously with the focus target along the Z axis (field length)
// Example: if this is 0.5 and the focus target is on the goal - the camera moves to 50% of the field
TCM_CAM_HORIZONTAL_FOLLOWING = 1.0

// Boundaries of the camera position along the Z axis (field length) [1.0=field_half_length]
// Example: 1.0 means the camera position doesn't cross the goal-line
// Example: approx 0.7 means the camera position doesn't cross the penalty box line
TCM_CAM_HORIZONTAL_BOUNDS = 0.55

// Boundaries of the camera position along the X axis (across the field) [1.0=field_half_width]
// Example: 1.0 would look like there is an imaginary wall on the side-line that the camera doesn't cross
// Example: 2.0 would work like an imaginary wall that is half_field_width out of the field that stops the camera
TCM_CAM_DEPTH_BOUNDS = 3.5

// Means the distance to the near clipping plane of the camera (meters)
// This can be used to avoid the stadium roof covering the view (it cutts-off anything that is nearer than this plane)
TCM_CAM_NEAR_CLIP = 80

// This limits the camera focus target position on the field (along the Z axis)
// Example: 1.0 means the target can go up to the goalline
// Example: 0.75 means the target can go approx up to the penalty box line
// This parameter can be used to avoid the camera to show too much of the spectators - if the ball is near the goalline
TCM_CAM_TARGET_HORIZONTAL_BOUNDS = 0.87

// This limits the camera focus target position on the field (along the X axis)
// Example: 1.0 means the target can go up the the sideline
// This parameter can be used to avoid the camera to show too much of the spectators - if the ball is near the sideline
TCM_CAM_TARGET_DEPTH_BOUNDS = 0.30


// TCM highlight mode
HIGHLIGHT_MIN_AI_UPDATES = 2	// Lower limit in number of times to do AI updates per render
HIGHLIGHT_MAX_AI_UPDATES = 20	// Upper limit in number of times to do AI updates per render
HIGHLIGHT_RENDER_HZ = 0			// Ideal render time is hertz. (smaller value, less response'ness of GUI, higher value faster simulation (within bounds of MAX ai updates))
								// if 0 then use speed slider to control speed.

// NIS Options.
NIS_INTRO_GAME		= "ALWAYS" // REPLAY CINEMATIC
NIS_ENDHALF			= "ALWAYS"
NIS_ENDGAME			= "ALWAYS"
NIS_SHOOTOUT_INTRO	= "ALWAYS"// CINEMATIC"
NIS_GOAL			= "ALWAYS" // REPLAY"
NIS_CARDS			= "CINEMATIC"
NIS_SUBS            = "ALWAYS"// CINEMATIC"
NIS_DRAMATIC_MOMENT = "REPLAY"
NIS_CORNER_KICK     = "CINEMATIC"
NIS_YELLOW_TO_RED_CARD= "ALWAYS" 
NIS_PENALTYKICK_INTRO= "CINEMATIC"
NIS_FREEKICK_INTRO  = "CINEMATIC"
NIS_INJURY          = "ALWAYS"// CINEMATIC"
NIS_THROWIN_FAR	    = "CINEMATIC" 
NIS_FOUL		= "CINEMATIC"
NIS_CLOSE_MISS		= "REPLAY"
NIS_WIDE_MISS		= "REPLAY"
NIS_THROWIN_NEAR	= "CINEMATIC"
NIS_CORNER_BALL_OUT = "CINEMATIC"
NIS_PENALTY_SHOOTOUT= "ALWAYS"
NIS_PENALTY_SHOOTOUT_SCORE_WIN="ALWAYS"
NIS_PENALTY_SHOOTOUT_MISS_WIN="ALWAYS"
NIS_PENALTY_SHOOTOUT_SETUP="ALWAYS"   
 
[OPTIONS]
HALF_LENGTH = 7
[]


[haveornot]

// Linesmen and Referee (these are enabled in the cfg_pc_*.ini files), in this case referee in medium
// linesmen and referee in high
FEATURE_INGAME_REFEREE_ENABLED =1
FEATURE_INGAME_LINESMEN_ENABLED =1

// Injuries
// INJURY_CHANCE_MIN: 	Chance of injury at 100 physical fitness
// INJURY_CHANCE_MAX:	Chance of injury at 0 physical fitness
// INJURY_CHANCE_FITNESS_TEST_MULT: 	Multiplier applied to injury chance if player has passed a 
//					fitness test and is at risk of a re-occurance
// INJURY_CHANCE_OF_SERIOUS: Chance that the injury is servere enough that the player cannot continue
// INJURY_KNOCK_HOBBLE_SECONDS: Number of real seconds player should hobble for after taking a knock
INJURY_CHANCE_MIN = 0.15
INJURY_CHANCE_MAX = 0.5
INJURY_CHANCE_FITNESS_TEST_MULT= 3.0
INJURY_CHANCE_OF_SERIOUS = 0.4
INJURY_KNOCK_HOBBLE_SECONDS = 10

// Referee
//
[BAD_REF_DECISIONS]
REF_PERFECT_GAME_CHANCE = 0
MAX_CALLS = 8
MISS_BALL_OUT = 15
BALL_OUT = 15
WRONG_FOUL = 10
PENALTY_KICK = 10
MISS_PENALTY_KICK = 10
[]

// Agitation of the referee is growing with every foul (avoiding early cards)
// The more agitated the ref is the more likely he is to award a card
REF_GENERAL_AGITATION_FOUL_SLIDE = 0.15
REF_GENERAL_AGITATION_FOUL_SLIDE_BEHIND = 0.25
REF_GENERAL_AGITATION_FOUL = 0.1
REF_TEAM_AGITATION_FOUL_SLIDE = 0.225
REF_TEAM_AGITATION_FOUL_SLIDE_BEHIND = 0.3
REF_TEAM_AGITATION_FOUL = 0.125
REF_TEAM_AGITATION_MULT_AFTER_CARD = 0.5
REF_PLAYER_AGITATION_FOUL_SLIDE = 0.275
REF_PLAYER_AGITATION_FOUL_SLIDE_BEHIND = 0.4
REF_PLAYER_AGITATION_FOUL = 0.15
REF_PLAYER_AGITATION_MULT_AFTER_CARD = 0.25

REF_CHANCE_RED_CARD_LAST_MAN_NO_BALL_CONTACT = 0.90
REF_CHANCE_RED_CARD_LAST_MAN_GK = 0.15
REF_CHANCE_RED_CARD_LAST_MAN = 0.425

// Global modifiers on the number of cards given by the ref
REF_YELLOW_CARD_MODIFIER = 1.1
REF_DOUBLE_YELLOW_CARD_MODIFIER = 1.0
REF_STRAIGHT_RED_CARD_MODIFIER = 0.85


// Player labels
//
NUM_PROXIMITY_PLAYERS_MAX = 4

// Consistency tuning variables
//
TCM_CONSISTENCY_IMPACT_FACTOR = 90 // Percent - global strength of the skill-decrease produced by the consistency
TCM_CONSISTENCY_ERROR_GLOBAL_LIMIT = 30 // Percent - maximal skill-decrease produced by the consistency

// Global modifer for the effect of home advantage (percentage)
HOME_ADVANTAGE_MODIFIER = 100

// Sprinting speeds
SPRINT_SPEED_POOR = 8.0
SPRINT_SPEED_EX = 9.5

// Energy reduction
ENERGY_DROP_AMBIENT = 0.07
ENERGY_DROP_GLOBAL_MODI
