Player12
An open source football management simulator
Loading...
Searching...
No Matches
MatchContext Struct Reference

#include <match_context.h>

Public Attributes

float goalRateScale = 1.0F
 
float refereeStrictnessMean = 1.0F
 
float refereeStrictnessSd = MatchTuning::Discipline::STRICTNESS_SD
 
float homeAdvantageScale = 1.0F
 

Detailed Description

Per-match balance settings, independent of the engine's mutable state. Defaults preserve the calibrated engine. MatchSimulation::leagueContext() derives these from a league; headless callers may supply an explicit MatchSimulationInput::context_override for an experiment or custom ruleset.

MatchEngine::setMatchContext() accepts settings only before the first step, clamps finite values to MatchTuning::Context bounds and replaces non-finite values with defaults. Keep this value in captured match inputs, not in a mutable global: concurrent fixtures and highlight copies must stay isolated. See docs/development/extending-and-modding.md for examples and limitations.

Member Data Documentation

◆ goalRateScale

float MatchContext::goalRateScale = 1.0F

Finishing precision: above 1 sharpens shots, below 1 makes them less accurate. Changes execution, not the score or the xG formula directly.

◆ homeAdvantageScale

float MatchContext::homeAdvantageScale = 1.0F

Scales the home edge on attributes, execution and refereeing; 0 represents a neutral venue.

◆ refereeStrictnessMean

float MatchContext::refereeStrictnessMean = 1.0F

Mean and spread of the referee strictness drawn at kick-off.

◆ refereeStrictnessSd

float MatchContext::refereeStrictnessSd = MatchTuning::Discipline::STRICTNESS_SD

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