Player12
An open source football management simulator
Loading...
Searching...
No Matches
MatchTuning::Control Struct Referencefinal

#include <match_tuning.h>

Static Public Attributes

static constexpr int PHYSICS_SUBSTEPS = 5
 
static constexpr float JOG_SPEED_SHARE = 0.62f
 
static constexpr float ACTION_BUFFER_SECONDS = 1.0f
 
static constexpr float PASS_MIN_ALIGNMENT = 0.5f
 
static constexpr float PASS_DISTANCE_WEIGHT = 0.006f
 
static constexpr std::array< float, 3 > ASSIST_MIN_ALIGNMENT
 
static constexpr std::array< float, 3 > ASSIST_COMPLETION_WEIGHT
 
static constexpr float THROUGH_PROGRESS_WEIGHT = 0.012f
 
static constexpr float THROUGH_RUNNER_BONUS = 0.25f
 
static constexpr float THROUGH_LEAD_MIN_METRES = 5.0f
 
static constexpr float THROUGH_LEAD_MAX_METRES = 16.0f
 
static constexpr float SPACE_PASS_MIN_METRES = 10.0f
 
static constexpr float SPACE_PASS_MAX_METRES = 30.0f
 
static constexpr float SPACE_LOFT_MIN_METRES = 18.0f
 
static constexpr float SPACE_LOFT_MAX_METRES = 45.0f
 
static constexpr float DEFAULT_POWER = 0.55f
 
static constexpr float SHOT_SPEED_MIN_SCALE = 0.72f
 
static constexpr float SHOT_SPEED_POWER_GAIN = 0.42f
 
static constexpr float SHOT_OVERPOWER_FROM = 0.75f
 
static constexpr float SHOT_OVERPOWER_SPREAD = 0.55f
 
static constexpr float SHOT_OVERPOWER_LIFT_METRES = 0.9f
 
static constexpr float JOCKEY_SPEED_SHARE = 0.42f
 
static constexpr float JOCKEY_CONTAIN_METRES = 2.5f
 
static constexpr float JOCKEY_TAKE_ON_PENALTY = 0.08f
 
static constexpr float MEET_PASS_LOOKAHEAD_SECONDS = 0.5f
 
static constexpr float RELEASE_MOMENTUM_SECONDS = 0.6f
 
static constexpr float SWITCH_HORIZON_SECONDS = 2.5f
 
static constexpr float SWITCH_SAMPLE_SECONDS = 0.1f
 
static constexpr float SWITCH_BALL_DECELERATION = 2.0f
 
static constexpr float SWITCH_REACTION_SECONDS = 0.25f
 
static constexpr float SWITCH_CURRENT_PREFERENCE_SECONDS = 0.35f
 
static constexpr float SWITCH_GOAL_SIDE_BONUS_SECONDS = 0.2f
 

Detailed Description

External control of one player (play mode). The controlled player's body is integrated at a finer fixed rate than the AI step so a stick feels responsive; everything else keeps the common step.

Member Data Documentation

◆ ACTION_BUFFER_SECONDS

constexpr float MatchTuning::Control::ACTION_BUFFER_SECONDS = 1.0f
staticconstexpr

How long a pressed action waits for a chance to be performed.

◆ ASSIST_COMPLETION_WEIGHT

constexpr std::array<float, 3> MatchTuning::Control::ASSIST_COMPLETION_WEIGHT
staticconstexpr
Initial value:
{0.0f, 0.25f,
0.6f}

Weight of the pass's chance of arriving in picking the receiver.

◆ ASSIST_MIN_ALIGNMENT

constexpr std::array<float, 3> MatchTuning::Control::ASSIST_MIN_ALIGNMENT
staticconstexpr
Initial value:
{0.82f, 0.5f,
0.25f}

Aim cone (cosine) of a pass without, with normal and with strong assistance; index 1 is PASS_MIN_ALIGNMENT.

◆ DEFAULT_POWER

constexpr float MatchTuning::Control::DEFAULT_POWER = 0.55f
staticconstexpr

Power of a tap (no hold), as a share of the bar.

◆ JOCKEY_CONTAIN_METRES

constexpr float MatchTuning::Control::JOCKEY_CONTAIN_METRES = 2.5f
staticconstexpr

Goal-side gap kept to the carrier while jockeying (metres).

◆ JOCKEY_SPEED_SHARE

constexpr float MatchTuning::Control::JOCKEY_SPEED_SHARE = 0.42f
staticconstexpr

Jockeying pace as a share of the fresh top speed.

◆ JOCKEY_TAKE_ON_PENALTY

constexpr float MatchTuning::Control::JOCKEY_TAKE_ON_PENALTY = 0.08f
staticconstexpr

A patient, jockeying defender is harder to beat one against one.

◆ JOG_SPEED_SHARE

constexpr float MatchTuning::Control::JOG_SPEED_SHARE = 0.62f
staticconstexpr

Run speed without the sprint button, as a share of top speed.

◆ MEET_PASS_LOOKAHEAD_SECONDS

constexpr float MatchTuning::Control::MEET_PASS_LOOKAHEAD_SECONDS = 0.5f
staticconstexpr

With the stick idle the receiver of a pass moves to meet it, aiming this many seconds of ball travel ahead.

◆ PASS_DISTANCE_WEIGHT

constexpr float MatchTuning::Control::PASS_DISTANCE_WEIGHT = 0.006f
staticconstexpr

... preferring nearer team-mates by this much per metre.

◆ PASS_MIN_ALIGNMENT

constexpr float MatchTuning::Control::PASS_MIN_ALIGNMENT = 0.5f
staticconstexpr

A pass goes to the team-mate best aligned with the aim within this cosine (60 degrees) ...

◆ PHYSICS_SUBSTEPS

constexpr int MatchTuning::Control::PHYSICS_SUBSTEPS = 5
staticconstexpr

Kinematic sub-steps per fixed step for the controlled player (50 Hz).

◆ RELEASE_MOMENTUM_SECONDS

constexpr float MatchTuning::Control::RELEASE_MOMENTUM_SECONDS = 0.6f
staticconstexpr

On hand-back the AI picks up the run where the momentum carries him (seconds of travel).

◆ SHOT_OVERPOWER_FROM

constexpr float MatchTuning::Control::SHOT_OVERPOWER_FROM = 0.75f
staticconstexpr

Above this share of the bar the shot gets harder to keep down ...

◆ SHOT_OVERPOWER_LIFT_METRES

constexpr float MatchTuning::Control::SHOT_OVERPOWER_LIFT_METRES = 0.9f
staticconstexpr

◆ SHOT_OVERPOWER_SPREAD

constexpr float MatchTuning::Control::SHOT_OVERPOWER_SPREAD = 0.55f
staticconstexpr

... by up to this much extra spread and lift at a full bar.

◆ SHOT_SPEED_MIN_SCALE

constexpr float MatchTuning::Control::SHOT_SPEED_MIN_SCALE = 0.72f
staticconstexpr

Shot pace scale: SHOT_SPEED_MIN_SCALE + SHOT_SPEED_POWER_GAIN * power.

◆ SHOT_SPEED_POWER_GAIN

constexpr float MatchTuning::Control::SHOT_SPEED_POWER_GAIN = 0.42f
staticconstexpr

◆ SPACE_LOFT_MAX_METRES

constexpr float MatchTuning::Control::SPACE_LOFT_MAX_METRES = 45.0f
staticconstexpr

◆ SPACE_LOFT_MIN_METRES

constexpr float MatchTuning::Control::SPACE_LOFT_MIN_METRES = 18.0f
staticconstexpr

◆ SPACE_PASS_MAX_METRES

constexpr float MatchTuning::Control::SPACE_PASS_MAX_METRES = 30.0f
staticconstexpr

◆ SPACE_PASS_MIN_METRES

constexpr float MatchTuning::Control::SPACE_PASS_MIN_METRES = 10.0f
staticconstexpr

Length of a pass into space along the stick (ground and lofted).

◆ SWITCH_BALL_DECELERATION

constexpr float MatchTuning::Control::SWITCH_BALL_DECELERATION = 2.0f
staticconstexpr

Rough deceleration of a ball on the ground for the path (m/s^2).

◆ SWITCH_CURRENT_PREFERENCE_SECONDS

constexpr float MatchTuning::Control::SWITCH_CURRENT_PREFERENCE_SECONDS = 0.35f
staticconstexpr

Head start of the current active footballer (hysteresis) and of a defender already goal-side of the ball.

◆ SWITCH_GOAL_SIDE_BONUS_SECONDS

constexpr float MatchTuning::Control::SWITCH_GOAL_SIDE_BONUS_SECONDS = 0.2f
staticconstexpr

◆ SWITCH_HORIZON_SECONDS

constexpr float MatchTuning::Control::SWITCH_HORIZON_SECONDS = 2.5f
staticconstexpr

Ball path looked at, and its sampling (seconds).

◆ SWITCH_REACTION_SECONDS

constexpr float MatchTuning::Control::SWITCH_REACTION_SECONDS = 0.25f
staticconstexpr

Reaction before a team-mate sets off (seconds).

◆ SWITCH_SAMPLE_SECONDS

constexpr float MatchTuning::Control::SWITCH_SAMPLE_SECONDS = 0.1f
staticconstexpr

◆ THROUGH_LEAD_MAX_METRES

constexpr float MatchTuning::Control::THROUGH_LEAD_MAX_METRES = 16.0f
staticconstexpr

◆ THROUGH_LEAD_MIN_METRES

constexpr float MatchTuning::Control::THROUGH_LEAD_MIN_METRES = 5.0f
staticconstexpr

Space ahead of the receiver a through ball is played into, from a tap to a full bar (metres).

◆ THROUGH_PROGRESS_WEIGHT

constexpr float MatchTuning::Control::THROUGH_PROGRESS_WEIGHT = 0.012f
staticconstexpr

A through ball prefers team-mates going forward (per metre gained) and those already running in behind.

◆ THROUGH_RUNNER_BONUS

constexpr float MatchTuning::Control::THROUGH_RUNNER_BONUS = 0.25f
staticconstexpr

The documentation for this struct was generated from the following file: