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

#include <match_scheduler.h>

Public Attributes

TeamID home_id = 0
 
TeamID away_id = 0
 
uint32_t seed = 0
 
Lineup home_lineup
 
Lineup away_lineup
 
Strategy home_strategy
 
Strategy away_strategy
 
MatchRules::Knockout knockout
 
LeagueID league_id = 0
 
std::array< float, 2 > home_talk {}
 
std::array< float, 2 > away_talk {}
 
std::vector< std::pair< PlayerID, std::uint8_t > > medical_flags
 
std::optional< MatchContext > context_override
 

Detailed Description

Everything a headless match needs, captured on the thread that owns the game state. Simulating it only reads the Player objects the lineups point to (attributes and persistent condition), which nothing modifies while a batch runs, so inputs with distinct players can run concurrently.

Member Data Documentation

◆ away_id

TeamID MatchSimulationInput::away_id = 0

◆ away_lineup

Lineup MatchSimulationInput::away_lineup

◆ away_strategy

Strategy MatchSimulationInput::away_strategy

◆ away_talk

std::array<float, 2> MatchSimulationInput::away_talk {}

◆ context_override

std::optional<MatchContext> MatchSimulationInput::context_override

Optional complete replacement for the league-derived match context. Unset preserves normal league behavior; MatchContext{} explicitly selects the calibrated defaults, even when league_id is nonzero. Values go through MatchEngine::setMatchContext() validation before simulation begins. This is a C++ experiment/modding seam, not a saved career or JSON setting.

◆ home_id

TeamID MatchSimulationInput::home_id = 0

◆ home_lineup

Lineup MatchSimulationInput::home_lineup

◆ home_strategy

Strategy MatchSimulationInput::home_strategy

◆ home_talk

std::array<float, 2> MatchSimulationInput::home_talk {}

Team-talk modifiers by half (see MatchEngine::setTeamTalkModifier).

◆ knockout

MatchRules::Knockout MatchSimulationInput::knockout

Knockout rules: a tie level after 90 minutes (on aggregate, for the second leg of a two-legged tie) is played on through extra time and a penalty shootout. League matches keep the default and may end drawn.

◆ league_id

LeagueID MatchSimulationInput::league_id = 0

League whose match style (goals, referees, home advantage) the match is played in; 0 keeps the calibrated engine default.

◆ medical_flags

std::vector<std::pair<PlayerID, std::uint8_t> > MatchSimulationInput::medical_flags

Medical staff instructions of the managed club's squad (MatchEngine::setMedicalFlags).

◆ seed

uint32_t MatchSimulationInput::seed = 0

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