|
Player12
An open source football management simulator
|
Manages the core game logic, interacting with teams, leagues, and players. More...
#include <game_controller.h>
Classes | |
| struct | AcademyOverview |
| struct | BoardTargets |
| The board's targets this season and how they are going. More... | |
| struct | CallUpCandidate |
| struct | CallUpView |
| struct | ContinueProgress |
| struct | ContractTalkResult |
| struct | ContractTerms |
| struct | DataHubView |
| struct | EditorSession |
| struct | IncomingOfferView |
| struct | NationalVacancyView |
| struct | NextFixture |
| struct | PlayerWorkload |
| struct | PotentialEstimate |
| struct | ReserveOverview |
| struct | SaveSlotMetadata |
| struct | SaveStatusInfo |
| struct | SquadNeeds |
| struct | TrainingDayPreview |
| struct | VacancyView |
| struct | YouthPlayerView |
Public Types | |
| enum class | PlayerActionBlock : std::uint8_t { None , NotYours , WindowClosed , OnLoan , Leaving , SquadFloor , LastGoalkeeper , MaxLength , NotLonger , TooLong , TalksEnded , SquadFull } |
| enum class | OfferOutcome : std::uint8_t { Sold , AwaitingReply , Countered , WalkedAway , Rejected , TermsRefused , SquadTooSmall , Failed } |
| enum class | StaffActionResult : uint8_t { Ok , NoClub , UnknownStaff , NotAvailable , RoleFull , CannotAfford , InvalidTerms } |
Public Member Functions | |
| GameController () | |
| Constructs a new GameController. | |
| void | newGame (int slot, std::optional< std::uint64_t > world_seed=std::nullopt) |
| Starts a new game on the given save slot. | |
| bool | loadGame (int slot) |
| Loads an existing game from the given save slot. | |
| const std::optional< SaveError > & | getLastLoadError () const |
| std::optional< int > | getCurrentSlot () const |
| std::vector< SaveBackup > | getSaveBackups (int slot) const |
| bool | restoreBackup (int slot, const std::filesystem::path &backup) |
| bool | deleteSave (int slot) const |
| void | setAutosavePolicy (const AutosavePolicy &policy) |
| AutosavePolicy | getAutosavePolicy () const |
| float | getLastInitializationMilliseconds () const |
| bool | isGameLoaded () const |
| Checks if a game is currently loaded. | |
| int | getCurrentSeason () const |
| Gets the current season year. | |
| GameDateValue | getCurrentDate () const |
| Gets the current date in the game. | |
| bool | hasSelectedTeam () const |
| Checks if a team has been selected to be managed. | |
| std::optional< std::reference_wrapper< Team > > | getManagedTeam () |
| Gets the team currently managed by the player (mutable). | |
| std::optional< std::reference_wrapper< const Team > > | getManagedTeam () const |
| Gets the team currently managed by the player (read-only). | |
| void | selectManagedTeam (uint16_t team_id) |
| Selects the team for the player to manage. | |
| const std::vector< std::reference_wrapper< const League > > & | getLeagues () const |
| Gets all leagues available in the game. | |
| const std::vector< std::reference_wrapper< const Team > > & | getTeams () const |
| Gets all teams available in the game. | |
| const std::vector< std::reference_wrapper< const Player > > & | getPlayersForTeam (uint16_t team_id) const |
| Gets the players belonging to a specific team. | |
| SquadNumbers::Change | setSquadNumber (PlayerID player_id, int number) |
| std::vector< std::reference_wrapper< const Team > > | getTeamsInLeague (uint8_t league_id) const |
| Gets the teams belonging to a specific league. | |
| std::optional< std::reference_wrapper< const League > > | getLeagueById (uint8_t league_id) const |
| Gets a league by its ID. | |
| std::optional< std::reference_wrapper< const Team > > | getTeamById (uint16_t team_id) const |
| Gets a team by its ID. | |
| const ClubIdentity * | getClubIdentity (TeamID team_id) const |
| Descriptive identity of a club from the data pack (short code, kit colours, stadium, founding year, nickname). Loaded once on first use and cached; UI thread only. | |
| const StatsConfig & | getStatsConfig () const |
| Gets the configuration settings for player stats. | |
| void | advanceDay () |
| Advances the game date by one day. | |
| int | advanceToNextManagedFixture (int max_days=60) |
| int | advanceToNextEvent (int max_days=OFF_SEASON_MAX_DAYS) |
| void | requestContinueStop () |
| bool | isContinueStopRequested () const |
| ContinueStop | getLastContinueStop () const |
| ContinueProgress | getContinueProgress () const |
| void | setSimulationThreads (unsigned threads) |
| bool | setMatchResult (GameDateValue date, uint16_t home_id, uint16_t away_id, uint8_t home_score, uint8_t away_score) |
| bool | setMatchResult (GameDateValue date, uint16_t home_id, uint16_t away_id, const MatchEngine &engine) |
| std::optional< MatchRules::Knockout > | getKnockoutRules (GameDateValue date, TeamID home_id, TeamID away_id) const |
| std::vector< PlayerID > | getIneligibleSelections (TeamID team_id, MatchType type) const |
| size_t | autoFixLineup (TeamID team_id, MatchType type) |
| std::vector< std::pair< PlayerID, PlayerID > > | previewLineupFix (TeamID team_id, MatchType type) const |
| bool | canKickOff (TeamID team_id, MatchType type) const |
| void | setAssistantFixesLineup (bool enabled) |
| bool | getAssistantFixesLineup () const |
| std::vector< StandingRow > | getStandings (LeagueID league_id) const |
| std::vector< LeagueID > | getCupIds () const |
| std::optional< Competitions::CupStatus > | getCupStatus (LeagueID cup_id) const |
| std::string | getCupName (LeagueID cup_id) const |
| uint8_t | getLeagueTier (LeagueID league_id) const |
| std::vector< Match > | getTeamFixtures (TeamID team_id) const |
| std::optional< MatchReport > | getMatchReport (GameDateValue date, TeamID home_id, TeamID away_id) const |
| const std::vector< SeasonHistoryEntry > & | getSeasonHistory () const |
| std::vector< uint16_t > | getArchivedSeasons (LeagueID league_id) const |
| const std::vector< StandingRow > * | getArchivedTable (uint16_t season, LeagueID league_id) const |
| uint16_t | getSeasonStartYear (uint16_t season) const |
| std::optional< std::pair< LeagueID, uint16_t > > | getArchivedPlacing (uint16_t season, TeamID team_id) const |
| const SeasonReview * | getUnseenSeasonReview () const |
| void | markSeasonReviewSeen (uint16_t season) |
| std::vector< PlayerSeasonStats > | getTopScorers (MatchType competition_type, LeagueID competition_id, size_t limit=10) const |
| std::vector< PlayerSeasonStats > | getPlayerSeasonStats (PlayerID player_id) const |
| std::vector< PlayerSeasonStats > | getPlayerCareer (PlayerID player_id) const |
| const ContinentalCompetitions * | getContinental () const |
| ContinentalCompetitions::TieScore | getContinentalTieScore (LeagueID competition_id, const ContinentalCompetitions::Tie &tie) const |
| const NationalTeams * | getNationalTeams () const |
| const International::Record * | getInternationalRecord (PlayerID player_id) const |
| std::optional< Language > | getInternationalDuty (PlayerID player_id) const |
| uint8_t | getSuspensionMatches (PlayerID player_id, MatchType scope) const |
| std::vector< DisciplinaryRecord > | getSuspendedPlayers (TeamID team_id) const |
| bool | saveGame () |
| Saves the current state of the game to its slot. | |
| SaveStatusInfo | getSaveStatus () const |
| SaveSlotMetadata | getSaveSlotMetadata (int slot) const |
| Gets metadata for a save slot. | |
| void | listPlayerForTransfer (PlayerID player_id, uint32_t asking_price) |
| void | removePlayerFromTransfer (PlayerID player_id) |
| bool | isPlayerListed (PlayerID player_id) const |
| const std::unordered_map< PlayerID, TransferListing > & | getAllListings () const |
| std::vector< const TransferListing * > | getListingsExcludingTeam (TeamID team_id) const |
| std::vector< const TransferListing * > | getListingsByRole (PlayerRole role) const |
| bool | canAffordPlayer (TeamID buyer_id, PlayerID player_id, uint32_t target_price) const |
| bool | canAffordPlayer (TeamID buyer_id, PlayerID player_id, uint32_t target_price, uint32_t offered_weekly_wage) const |
| bool | buyPlayer (PlayerID player_id, TeamID buyer_id, uint32_t price) |
| bool | buyPlayerWithContract (PlayerID player_id, TeamID buyer_id, uint32_t price, ContractTerms terms) |
| bool | signFreeAgent (PlayerID player_id, TeamID buyer_id) |
| bool | signFreeAgentWithContract (PlayerID player_id, TeamID buyer_id, ContractTerms terms) |
| ContractTerms | getContractDemand (PlayerID player_id, bool free_agent) const |
| bool | isContractOfferAcceptable (PlayerID player_id, bool free_agent, ContractTerms terms) const |
| uint32_t | getPlayerMarketValue (PlayerID player_id) const |
| bool | submitBid (PlayerID player_id, TeamID bidder_id, uint32_t bid_amount) |
| bool | acceptBid (PlayerID player_id) |
| bool | rejectBid (PlayerID player_id) |
| bool | counterOffer (PlayerID player_id, uint32_t new_price) |
| bool | isTransferWindowOpen () const |
| bool | isTransferWindowOpenFor (TeamID club) const |
| bool | isTransferWindowOpenAnywhere () const |
| bool | canSignFreeAgentFor (TeamID club) const |
| TransferNegotiation::WindowInfo | getTransferWindow () const |
| TransferNegotiation::WindowInfo | getTransferWindowFor (TeamID club) const |
| TransferNegotiation::ClubResponse | makeTransferOffer (PlayerID player_id, const TransferNegotiation::OfferTerms &terms) |
| std::optional< TransferNegotiation::ContractKind > | getContractTalkKind (PlayerID player_id) const |
| TransferNegotiation::ContractDemand | getPlayerDemand (PlayerID player_id, TransferNegotiation::ContractKind kind) const |
| PlayerActionBlock | getReleaseBlock (PlayerID player_id) const |
| PlayerActionBlock | getSaleBlock (PlayerID player_id) const |
| PlayerActionBlock | getListingBlock (PlayerID player_id) const |
| PlayerActionBlock | getRenewalBlock (PlayerID player_id) const |
| ContractTalkResult | proposeContract (PlayerID player_id, const TransferNegotiation::ContractOffer &offer) |
| std::uint8_t | getContractRoundsLeft (PlayerID player_id) const |
| PlayerAgent::Demands | getAgentDemands (PlayerID player_id, TransferNegotiation::ContractKind kind, std::uint8_t years) const |
| const char * | getAgentOpeningLine (PlayerID player_id, TransferNegotiation::ContractKind kind) const |
| const char * | getAgentPurchaseLine (PlayerID player_id, const TransferNegotiation::ClubResponse &response) const |
| uint32_t | getReleaseClause (PlayerID player_id) const |
| TransferNegotiation::ClubResponse | payReleaseClause (PlayerID player_id) |
| TransferNegotiation::ClubResponse | makeLoanOffer (PlayerID player_id, const TransferNegotiation::LoanTerms &terms) |
| bool | setLoanListed (PlayerID player_id, bool listed) |
| bool | recallLoan (PlayerID player_id) |
| bool | canRecallLoan (PlayerID player_id) const |
| bool | hasSquadRoom () const |
| bool | exerciseLoanOption (PlayerID player_id) |
| const std::vector< IncomingOffer > & | getIncomingOffers () const |
| std::optional< IncomingOfferView > | getIncomingOfferView (std::uint32_t offer_id) const |
| OfferOutcome | settleIncomingOffer (std::uint32_t offer_id) |
| bool | acceptIncomingOffer (std::uint32_t offer_id) |
| bool | rejectIncomingOffer (std::uint32_t offer_id) |
| OfferOutcome | counterIncomingOffer (std::uint32_t offer_id, const TransferNegotiation::OfferTerms &terms) |
| OfferOutcome | counterLoanOffer (std::uint32_t offer_id, const TransferNegotiation::LoanTerms &terms) |
| OfferOutcome | nameAskingPrice (std::uint32_t offer_id, uint32_t price) |
| bool | declareNotForSale (std::uint32_t offer_id) |
| int64_t | getReleaseCost (PlayerID player_id) const |
| bool | releasePlayer (PlayerID player_id) |
| SquadNeeds | evaluateSquadNeeds (TeamID team_id) const |
| float | calculateAttentionScore (PlayerID player_id) const |
| float | getLeagueAttentionMultiplier (LeagueID league_id) const |
| uint32_t | calculateMaxPrice (PlayerID player_id, TeamID buyer_id, const SquadNeeds &needs) const |
| void | evaluateAndActForTeam (TeamID team_id) |
| std::vector< PlayerID > | findTargetsForRole (PlayerRole role, TeamID buyer_id, const SquadNeeds &needs) const |
| PlayerRole | getRoleCategory (PlayerRole role) const |
| uint32_t | transferBudgetForTeam (TeamID team_id) const |
| float | randomFloat (float min, float max) |
| const std::vector< InboxMessage > & | getInbox () const |
| bool | markInboxMessageRead (uint32_t message_id) |
| void | markAllInboxMessagesRead () |
| size_t | getUnreadInboxCount () const |
| InboxView | getInboxView () const |
| void | setInboxView (const InboxView &view) |
| bool | followPlayer (PlayerID player_id) |
| bool | unfollowPlayer (PlayerID player_id) |
| bool | isFollowingPlayer (PlayerID player_id) const |
| std::vector< PlayerID > | getFollowedPlayers () const |
| std::optional< Dilemma > | getOpenDilemma () const |
| std::optional< DilemmaEffects > | getDilemmaEffects (int option) const |
| bool | resolveDilemma (int option) |
| const BoardState & | getBoardState () const |
| std::optional< BoardTargets > | getBoardTargets () const |
| bool | isTransferEmbargoed () const |
| const std::vector< FinanceTransaction > & | getFinanceLedger (TeamID team_id) const |
| FinanceSummary | getFinanceSummary (TeamID team_id, GameDateValue from, GameDateValue to) const |
| int64_t | getWeeklyWageBill (TeamID team_id) const |
| bool | moveTransferToWageBudget (int64_t transfer_amount) |
| bool | setTicketPrice (uint32_t price) |
| uint32_t | getFairTicketPrice (TeamID team_id) const |
| uint32_t | getLastHomeAttendance (TeamID team_id) const |
| bool | isPlayerAvailable (PlayerID player_id) const |
| std::vector< PlayerID > | getInjuredPlayers (TeamID team_id) const |
| std::vector< PlayerID > | getUnavailableLineupPlayers (TeamID team_id) const |
| SquadRole | getSquadRole (PlayerID player_id) const |
| PotentialEstimate | getPotentialEstimate (PlayerID player_id) const |
| bool | applyMatchConsequences (PlayerID player_id, uint8_t minutes_played, float end_condition, bool injured) |
| bool | renewContract (PlayerID player_id, ContractTerms terms) |
| float | getManagerStanding () const |
| std::vector< TalkOptionView > | getTalkOptions (PlayerID player_id) const |
| std::optional< TalkOutcome > | talkToPlayer (PlayerID player_id, TalkOption option) |
| const PlayerRelation * | getPlayerRelation (PlayerID player_id) const |
| std::vector< Promise > | getPlayerPromises (PlayerID player_id) const |
| std::vector< Promise > | getActivePromises () const |
| std::optional< StoryChoice > | getStoryChoice (PlayerID player_id) const |
| bool | hasPendingTalk (PlayerID player_id) const |
| TeamTalkContext | getTeamTalkContext (TeamTalkMoment moment, int own_goals=0, int other_goals=0) const |
| bool | canGiveTeamTalk (TeamTalkMoment moment) const |
| std::optional< TeamTalkResult > | giveTeamTalk (TeamTalkMoment moment, TeamTalkTone tone, int own_goals=0, int other_goals=0) |
| float | getTeamTalkModifier (TeamID team_id, int half) const |
| float | getHumanFactorModifier (TeamID team_id, int half) const |
| DressingRoom | getDressingRoom () const |
| PlayerID | getSetPieceDesignation (SetPieceDuty duty) const |
| bool | setSetPieceDesignation (SetPieceDuty duty, PlayerID player_id) |
| PlayerID | getEffectiveSetPieceTaker (SetPieceDuty duty) const |
| void | autoPickSetPieces () |
| std::optional< SquadStatus > | getSquadStatus (PlayerID player_id) const |
| SquadStatus | getDeservedSquadStatus (PlayerID player_id) const |
| bool | setSquadStatus (PlayerID player_id, std::optional< SquadStatus > status) |
| SquadPlan | getSquadPlan (int season_offset) const |
| MedicalReport | getMedicalReport () const |
| std::vector< AgendaEvent > | getSeasonAgenda () const |
| std::optional< ScoutedPlayerView > | getScoutedView (PlayerID player_id) const |
| std::optional< ScoutedPlayerRow > | getScoutedRow (PlayerID player_id) const |
| std::vector< ScoutedPlayerRow > | searchScoutedPlayers (const ScoutSearchFilter &filter) const |
| float | getScoutingKnowledge (PlayerID player_id) const |
| std::vector< ScoutProfile > | getScouts () const |
| const std::vector< ScoutAssignment > & | getScoutAssignments () const |
| int64_t | getScoutAssignmentCost (ScoutTargetKind kind, uint32_t target_id, uint16_t days) const |
| ScoutAssignError | startScoutAssignment (uint32_t scout_id, ScoutTargetKind kind, uint32_t target_id, uint16_t days) |
| bool | cancelScoutAssignment (uint32_t assignment_id) |
| const std::vector< ScoutReport > & | getScoutReports () const |
| std::vector< ScoutSummary > | getScoutSummaries () const |
| ScoutExpertise | getScoutExpertise (uint32_t scout_id) const |
| ScoutEffectiveness | getScoutEffectiveness (uint32_t scout_id, ScoutTargetKind kind, uint32_t target_id) const |
| size_t | getUnreadScoutReportCount () const |
| bool | markScoutReportsSeen (uint32_t scout_id) |
| const std::vector< RecruitmentFocus > & | getRecruitmentFocuses () const |
| uint32_t | saveRecruitmentFocus (const RecruitmentFocus &focus) |
| bool | removeRecruitmentFocus (uint32_t focus_id) |
| const std::vector< ShortlistEntry > & | getShortlist () const |
| bool | isShortlisted (PlayerID player_id) const |
| bool | addToShortlist (PlayerID player_id) |
| bool | removeFromShortlist (PlayerID player_id) |
| std::vector< SquadComparisonRow > | compareShortlistWithSquad () const |
| const TeamTrainingPlan * | getTrainingPlan () const |
| bool | setTrainingPreset (TrainingPreset preset) |
| bool | setTrainingSlot (MicrocycleDay day, TrainingSlot slot) |
| bool | setTrainingIntensity (TrainingIntensity intensity) |
| bool | setCongestionAutoAdjust (bool enabled) |
| bool | setPlayerTrainingFocus (PlayerID player_id, TrainingFocus focus) |
| PlayerWorkload | getPlayerWorkload (PlayerID player_id) const |
| std::vector< TrainingDayPreview > | getTrainingWeekPreview () const |
| float | getTacticalFamiliarity (TeamID team_id) const |
| std::vector< TrainingAdvice > | getTrainingAdvice () const |
| std::vector< const StaffMember * > | getStaff (TeamID team_id) const |
| std::vector< const StaffMember * > | getStaffMarket () const |
| StaffEffects | getStaffEffects (TeamID team_id) const |
| float | getScoutingAccuracy (TeamID team_id) const |
| uint32_t | getStaffWageDemand (StaffID staff_id) const |
| StaffActionResult | hireStaff (StaffID staff_id, uint8_t years) |
| StaffActionResult | releaseStaff (StaffID staff_id) |
| StaffActionResult | extendStaffContract (StaffID staff_id, uint8_t years) |
| std::vector< YouthPlayerView > | getYouthPlayers (YouthStatus status) const |
| std::vector< YouthPlayerView > | getYouthEligibleFirstTeam () const |
| bool | isAcademyPlayer (PlayerID player_id) const |
| AcademyOverview | getAcademyOverview () const |
| std::vector< YouthTableRow > | getYouthTable () const |
| const std::vector< YouthResult > & | getYouthResults () const |
| UpgradeQuote | getAcademyUpgradeQuote (AcademyUpgrade kind) const |
| UpgradeRequestResult | requestAcademyUpgrade (AcademyUpgrade kind) |
| YouthActionResult | signYouthCandidate (PlayerID player_id) |
| YouthActionResult | releaseYouthCandidate (PlayerID player_id) |
| YouthActionResult | offerYouthProfessionalContract (PlayerID player_id) |
| YouthActionResult | promoteYouthPlayer (PlayerID player_id) |
| YouthActionResult | moveToYouthSquad (PlayerID player_id) |
| std::vector< YouthPlayerView > | getReserveCandidates () const |
| ReserveOverview | getReserveOverview () const |
| std::vector< YouthTableRow > | getReserveTable () const |
| const std::vector< YouthResult > & | getReserveResults () const |
| YouthActionResult | moveToReserves (PlayerID player_id) |
| YouthActionResult | promoteReservePlayer (PlayerID player_id) |
| YouthActionResult | moveReserveToU18 (PlayerID player_id) |
| bool | hasCareer () const |
| bool | isUnemployed () const |
| const ManagerProfile * | getManagerProfile () const |
| void | createManager (const ManagerSetup &setup) |
| const std::vector< ManagerStint > & | getManagerStints () const |
| const std::vector< ManagerSeasonLine > & | getManagerSeasons () const |
| const std::vector< ManagerAward > & | getManagerAwards () const |
| const AiManager * | getClubManager (TeamID team_id) const |
| std::vector< VacancyView > | getVacancies () const |
| const std::vector< JobApplication > & | getJobApplications () const |
| ApplyResult | applyForJob (TeamID team_id) |
| std::optional< InterviewResult > | attendInterview (TeamID team_id, std::span< const std::uint8_t > answers) |
| const std::vector< JobOffer > & | getJobOffers () const |
| OfferReply | negotiateJobOffer (std::uint32_t offer_id, int64_t weekly_wage, std::uint8_t years) |
| bool | acceptJobOffer (std::uint32_t offer_id) |
| bool | declineJobOffer (std::uint32_t offer_id) |
| bool | resignFromClub () |
| int | advanceWhileUnemployed (int max_days=7) |
| const NationalJob * | getNationalJob () const |
| bool | hasNationalJob () const |
| const std::vector< NationalStint > & | getNationalJobHistory () const |
| std::vector< NationalVacancyView > | getNationalVacancies () const |
| NationalApplyResult | applyForNationalJob (Language nation) |
| const std::vector< NationalJobOffer > & | getNationalJobOffers () const |
| NationalApplyResult | acceptNationalJobOffer (std::uint32_t offer_id) |
| bool | declineNationalJobOffer (std::uint32_t offer_id) |
| bool | resignNationalJob () |
| bool | canCombineClubAndNation () const |
| CallUpView | getCallUpView () const |
| International::CallUpResult | setNationalSquad (const std::vector< PlayerID > &players) |
| const OnboardingState & | getOnboarding () const |
| bool | completeOnboardingTask (OnboardingTask task) |
| void | dismissOnboarding () |
| void | showOnboarding () |
| std::vector< NextAction > | getNextActions (size_t limit=5) const |
| const DelegationPolicy & | getDelegation () const |
| bool | isDelegated (Duty duty) const |
| bool | setDutyOwner (Duty duty, DutyOwner owner) |
| void | applyDelegationPreset (DelegationPreset preset) |
| const StaffMember * | getDelegate () const |
| std::optional< Duty > | getReclaimedDuty () const |
| void | undoReclaimedDuty () |
| void | dismissReclaimedDuty () |
| std::optional< NextFixture > | getNextManagedFixture () const |
| OppositionReport | getOppositionReport (TeamID opponent) const |
| void | markOppositionReportViewed (TeamID opponent) |
| bool | wasOppositionReportViewed (TeamID opponent) const |
| bool | setOppositionInstruction (TeamID opponent, PlayerID player, OppositionInstruction instruction) |
| OppositionInstruction | getOppositionInstruction (TeamID opponent, PlayerID player) const |
| std::vector< OppositionOrder > | getOppositionInstructions (TeamID opponent) const |
| bool | applyCounterTactic (const CounterTactic &counter) |
| DataHubView | getDataHub () const |
| std::optional< ManagedMatchSnapshot > | getMatchSnapshot (GameDateValue date, TeamID home_id, TeamID away_id) const |
| bool | isInboxDecisionPending (const InboxMessage &message) const |
| const std::vector< AwardRecord > & | getAwardHistory () const |
| std::vector< AwardRecord > | getLeagueAwards (LeagueID league_id, uint16_t season_year) const |
| std::vector< AwardRecord > | getPlayerHonours (PlayerID player_id) const |
| std::vector< AwardPlayerTally > | getAwardRace (LeagueID league_id, bool young, size_t limit=5) const |
| std::vector< RecordEntry > | getClubRecords (TeamID team_id) const |
| std::vector< RecordEntry > | getLeagueRecords (LeagueID league_id) const |
| std::vector< ClubPlayerTotal > | getClubTopScorers (TeamID team_id, size_t limit=10) const |
| std::vector< ClubPlayerTotal > | getClubMostAppearances (TeamID team_id, size_t limit=10) const |
| std::vector< AllTimeRow > | getAllTimeTable (LeagueID league_id) const |
| std::vector< LegendEntry > | getHallOfFame (TeamID team_id) const |
| ProjectQuote | getProjectQuote (FacilityProjectType type, uint32_t seats=0) const |
| ProjectVerdict | requestFacilityProject (FacilityProjectType type, uint32_t seats=0) |
| std::vector< FacilityProject > | getFacilityProjects () const |
| uint8_t | getMedicalLevel (TeamID team_id) const |
| std::optional< GameDateValue > | getProjectCooldown (FacilityProjectType type) const |
| std::vector< FriendlySlot > | getPreseasonFriendlies () const |
| std::vector< OpponentOption > | getFriendlyOpponents (GameDateValue date, OpponentLevel level, bool abroad) const |
| bool | setPreseasonFriendly (GameDateValue date, TeamID opponent_id, bool home, bool tour) |
| std::vector< FriendlySuggestion > | getPreseasonSuggestion () const |
| size_t | applyPreseasonSuggestion () |
| CampQuote | getCampQuote (TrainingCamp camp) const |
| TrainingCamp | getSuggestedCamp () const |
| bool | bookTrainingCamp (TrainingCamp camp) |
| const PreseasonState & | getPreseasonState () const |
| int64_t | getTourFee (TeamID opponent_id) const |
| std::vector< MentoringGroup > | getMentoringGroups () const |
| MentoringError | createMentoringGroup (PlayerID mentor_id, uint32_t *group_id=nullptr) |
| MentoringError | addMentee (uint32_t group_id, PlayerID mentee_id) |
| MentoringError | removeMentee (uint32_t group_id, PlayerID mentee_id) |
| MentoringError | dissolveMentoringGroup (uint32_t group_id) |
| float | getMentoringMultiplier (PlayerID player_id) const |
| HolidayPreferences | getHolidayPreferences () const |
| void | setHolidayPreferences (const HolidayPreferences &preferences) |
| std::optional< GameDateValue > | getHolidayTarget (const HolidayPlan &plan) const |
| int | goOnHoliday (const HolidayPlan &plan) |
| const HolidaySummary & | getHolidaySummary () const |
| uint64_t | getWorldSeed () const |
| const Game * | getGame () const |
| Game * | getGame () |
| std::shared_ptr< DatabaseConnection > | getDbConn () const |
| Gets the database connection (for repos that need it). | |
| std::shared_ptr< GameData > | getGameData () const |
| Gets the game data cache. | |
| std::shared_ptr< EditorSession > | beginEditor () |
| void | cancelEditor () |
| bool | applyEditor (const std::shared_ptr< EditorSession > &session, const std::vector< RuntimeEditor::Change > &changes, std::string &error) |
| bool | undoEditor (std::string &error) |
| bool | canUndoEditor () const |
| void | registerEditorValidator (RuntimeEditor::Validator validator) |
| std::uint64_t | getEditorRevision () const |
Static Public Member Functions | |
| static const char * | continueStopKey (ContinueStop stop) |
| static const char * | playerActionBlockKey (PlayerActionBlock block) |
Static Public Attributes | |
| static constexpr int | OFF_SEASON_MAX_DAYS = 45 |
Private Member Functions | |
| void | replaceEditorDatabase (std::shared_ptr< DatabaseConnection > connection) |
| bool | persistLocked (bool autosave) |
| void | maybeAutosave () |
| void | startSession (int slot, std::int64_t playtime_seconds) |
| void | simulateDay () |
| bool | executeTransfer (PlayerID pid, TeamID buyer_id, TeamID seller_id, uint32_t price, std::optional< ContractTerms > contract=std::nullopt) |
| void | processAITransferActivity () |
| void | evaluateIncomingAIBids () |
| void | processOfferReplies () |
| OfferOutcome | answerCounter (std::uint32_t offer_id) |
| OfferOutcome | answerLoanCounter (std::uint32_t offer_id) |
| OfferOutcome | sendCounter (std::uint32_t offer_id, const TransferNegotiation::OfferTerms &terms, bool firm) |
| bool | routeListingBid (PlayerID pid, TeamID bidder_id, uint32_t bid, bool announce=true) |
| void | absorbListingBids () |
| BuyerNegotiation::PlayerStance | playerStance (PlayerID pid, TeamID buyer) const |
| void | purgeStaleListings () |
| void | clearBidsBy (TeamID team_id) |
| bool | completeAiSale (PlayerID pid) |
| uint32_t | listingPrice (PlayerID pid) const |
| bool | canPayDeal (const TransferMarket::Deal &deal) const |
| bool | canPayPreContract (const TransferMarket::Deal &deal) const |
| void | runDelegatedDuties () |
| void | reclaimDuty (Duty duty) |
| void | recordManagedMatch (GameDateValue date, TeamID home_id, TeamID away_id, const MatchEngine &engine) |
| std::optional< std::reference_wrapper< Team > > | managedClub () |
| std::optional< std::reference_wrapper< const Team > > | managedClub () const |
| void | syncOppositionOrders () |
Manages the core game logic, interacting with teams, leagues, and players.
This controller holds the central game state and provides methods to retrieve and manipulate game data such as leagues, teams, and the managed team.
|
strong |
What became of an action on an incoming offer.
|
strong |
Why an action on a managed player is not possible now.
|
strong |
| Enumerator | |
|---|---|
| Ok | |
| NoClub | |
| UnknownStaff | |
| NotAvailable | Not on the market / not at the managed club. |
| RoleFull | StaffModel::ROLE_LIMITS reached. |
| CannotAfford | Cash below 12 weeks of the wage or the severance. |
| InvalidTerms | |
|
default |
Constructs a new GameController.
|
private |
Listing bids for managed players (older saves) become offers.
| bool GameController::acceptBid | ( | PlayerID | player_id | ) |
| bool GameController::acceptIncomingOffer | ( | std::uint32_t | offer_id | ) |
settleIncomingOffer() that only reports whether the player moved.
| bool GameController::acceptJobOffer | ( | std::uint32_t | offer_id | ) |
Takes the job: a manager under contract leaves his club (the new club pays it the release compensation) and every managed-club binding moves.
| NationalApplyResult GameController::acceptNationalJobOffer | ( | std::uint32_t | offer_id | ) |
Takes the job; refused while a club job cannot be combined with it.
| MentoringError GameController::addMentee | ( | uint32_t | group_id, |
| PlayerID | mentee_id | ||
| ) |
| bool GameController::addToShortlist | ( | PlayerID | player_id | ) |
| void GameController::advanceDay | ( | ) |
Advances the game date by one day.
| int GameController::advanceToNextEvent | ( | int | max_days = OFF_SEASON_MAX_DAYS | ) |
Continue with no managed fixture on the calendar (the off-season): days pass until something needs the manager, the first of: news that arrives unread, a bid or job offer, a transfer window opening, the new season, a managed fixture on the calendar, the loss of the job, a stop request or max_days. The reason is in getLastContinueStop().
| int GameController::advanceToNextManagedFixture | ( | int | max_days = 60 | ) |
Advances quiet days and stops on the next managed fixture (early when the job is lost or a stop is requested).
| int GameController::advanceWhileUnemployed | ( | int | max_days = 7 | ) |
Continue while out of work: up to max_days, stopping early when an offer or an interview invitation arrives. Returns the days simulated.
|
private |
Applies the buyer's answer to the counter of offer offer_id.
|
private |
Applies the borrower's answer to the loan counter of offer_id.
| bool GameController::applyCounterTactic | ( | const CounterTactic & | counter | ) |
Adds a counter-tactic's slider changes to the managed tactic.
| void GameController::applyDelegationPreset | ( | DelegationPreset | preset | ) |
| bool GameController::applyEditor | ( | const std::shared_ptr< EditorSession > & | session, |
| const std::vector< RuntimeEditor::Change > & | changes, | ||
| std::string & | error | ||
| ) |
Contains loader, codec and feature-validator exceptions at the runtime replacement boundary; failures preserve the live career and draft.
| ApplyResult GameController::applyForJob | ( | TeamID | team_id | ) |
| NationalApplyResult GameController::applyForNationalJob | ( | Language | nation | ) |
| bool GameController::applyMatchConsequences | ( | PlayerID | player_id, |
| uint8_t | minutes_played, | ||
| float | end_condition, | ||
| bool | injured | ||
| ) |
Physical consequences of the live match for one player (call before setMatchResult, once per player and match day). end_condition < 0 lets the simulation estimate drain and roll injuries; otherwise injured reports an engine injury event whose diagnosis is drawn here.
| size_t GameController::applyPreseasonSuggestion | ( | ) |
Applies the assistant's friendlies; returns how many were set.
| std::optional< InterviewResult > GameController::attendInterview | ( | TeamID | team_id, |
| std::span< const std::uint8_t > | answers | ||
| ) |
Answers the interview (one option per InterviewTopic).
Replaces those players with eligible squad members (same role first); returns how many were replaced.
| void GameController::autoPickSetPieces | ( | ) |
Designates every duty from the current XI (the automatic choices).
| std::shared_ptr< GameController::EditorSession > GameController::beginEditor | ( | ) |
| bool GameController::bookTrainingCamp | ( | TrainingCamp | camp | ) |
| bool GameController::buyPlayerWithContract | ( | PlayerID | player_id, |
| TeamID | buyer_id, | ||
| uint32_t | price, | ||
| ContractTerms | terms | ||
| ) |
| float GameController::calculateAttentionScore | ( | PlayerID | player_id | ) | const |
| uint32_t GameController::calculateMaxPrice | ( | PlayerID | player_id, |
| TeamID | buyer_id, | ||
| const SquadNeeds & | needs | ||
| ) | const |
| bool GameController::canAffordPlayer | ( | TeamID | buyer_id, |
| PlayerID | player_id, | ||
| uint32_t | target_price | ||
| ) | const |
| bool GameController::canAffordPlayer | ( | TeamID | buyer_id, |
| PlayerID | player_id, | ||
| uint32_t | target_price, | ||
| uint32_t | offered_weekly_wage | ||
| ) | const |
| void GameController::cancelEditor | ( | ) |
| bool GameController::cancelScoutAssignment | ( | uint32_t | assignment_id | ) |
| bool GameController::canCombineClubAndNation | ( | ) | const |
A club job and a national team together (reputation rule).
| bool GameController::canGiveTeamTalk | ( | TeamTalkMoment | moment | ) | const |
False once this moment's talk was given for today's match.
The selection may kick off as it is: autoFixLineup() would change nothing, so any ineligible selections left are injured players nobody fit can replace (they play through it).
|
private |
Signing-day cash of a deal fits the buyer's transfer budget and the new wage its wage budget.
|
private |
A pre-contract's wage fits next season's wage room and its bonus and agent fee the transfer money not yet committed.
| bool GameController::canRecallLoan | ( | PlayerID | player_id | ) | const |
True when recallLoan() would succeed today.
| bool GameController::canSignFreeAgentFor | ( | TeamID | club | ) | const |
True when club may sign a player without a club today: any day in most countries, only in and shortly after the windows in some.
|
inline |
|
private |
Withdraws the bids a club placed while it had no manager.
| std::vector< SquadComparisonRow > GameController::compareShortlistWithSquad | ( | ) | const |
Own depth per position against the best shortlisted estimate.
|
private |
AI seller accepts the highest bid as a structured deal.
| bool GameController::completeOnboardingTask | ( | OnboardingTask | task | ) |
Ticks a checklist step; false when it was already done.
|
static |
Language key explaining stop (e.g. "CONTINUE_STOP_MESSAGE").
| GameController::OfferOutcome GameController::counterIncomingOffer | ( | std::uint32_t | offer_id, |
| const TransferNegotiation::OfferTerms & | terms | ||
| ) |
Proposes a full structure to the bidder. It answers in a day or two (the same day near the deadline): accepts, counters or walks away.
| GameController::OfferOutcome GameController::counterLoanOffer | ( | std::uint32_t | offer_id, |
| const TransferNegotiation::LoanTerms & | terms | ||
| ) |
Proposes loan terms (wage share, length, option or obligation to buy, recall clause, guaranteed appearances) to the club that wants to borrow the player. It answers like a buyer: later, the same day near the deadline, with its own terms, or by walking away.
| bool GameController::counterOffer | ( | PlayerID | player_id, |
| uint32_t | new_price | ||
| ) |
| void GameController::createManager | ( | const ManagerSetup & | setup | ) |
Creates the manager; the career starts without a club until selectManagedTeam() or an accepted job offer.
| MentoringError GameController::createMentoringGroup | ( | PlayerID | mentor_id, |
| uint32_t * | group_id = nullptr |
||
| ) |
| bool GameController::declareNotForSale | ( | std::uint32_t | offer_id | ) |
Rejects every bid for the offer's player and tells the clubs he is not for sale until the window closes.
| bool GameController::declineJobOffer | ( | std::uint32_t | offer_id | ) |
| bool GameController::declineNationalJobOffer | ( | std::uint32_t | offer_id | ) |
| bool GameController::deleteSave | ( | int | slot | ) | const |
Deletes a slot with its backups (not the loaded one).
| void GameController::dismissOnboarding | ( | ) |
Hides the checklist (Help and Settings can bring it back).
|
inline |
| MentoringError GameController::dissolveMentoringGroup | ( | uint32_t | group_id | ) |
| void GameController::evaluateAndActForTeam | ( | TeamID | team_id | ) |
|
private |
| GameController::SquadNeeds GameController::evaluateSquadNeeds | ( | TeamID | team_id | ) | const |
|
private |
| bool GameController::exerciseLoanOption | ( | PlayerID | player_id | ) |
Buys a player on loan at the managed club for the option fee.
| GameController::StaffActionResult GameController::extendStaffContract | ( | StaffID | staff_id, |
| uint8_t | years | ||
| ) |
Extends a contract to years remaining seasons (2-5) at the renewal wage.
| std::vector< PlayerID > GameController::findTargetsForRole | ( | PlayerRole | role, |
| TeamID | buyer_id, | ||
| const SquadNeeds & | needs | ||
| ) | const |
| bool GameController::followPlayer | ( | PlayerID | player_id | ) |
Followed players: inbox news about their moves, injuries, big matches, honours and new contracts. Following fails for unknown or already followed players and beyond Stories::MAX_FOLLOWS.
| GameController::AcademyOverview GameController::getAcademyOverview | ( | ) | const |
| UpgradeQuote GameController::getAcademyUpgradeQuote | ( | AcademyUpgrade | kind | ) | const |
Next step of an academy investment and the board's answer today.
| std::vector< Promise > GameController::getActivePromises | ( | ) | const |
Active promises to managed players, soonest deadline first.
| PlayerAgent::Demands GameController::getAgentDemands | ( | PlayerID | player_id, |
| TransferNegotiation::ContractKind | kind, | ||
| std::uint8_t | years | ||
| ) | const |
What the player's agent asks for in the open contract talks, the package priced for years.
| const char * GameController::getAgentOpeningLine | ( | PlayerID | player_id, |
| TransferNegotiation::ContractKind | kind | ||
| ) | const |
The agent's line as contract talks of kind open.
| const char * GameController::getAgentPurchaseLine | ( | PlayerID | player_id, |
| const TransferNegotiation::ClubResponse & | response | ||
| ) | const |
The agent's line after the selling club answered the club's offer.
| const std::unordered_map< PlayerID, TransferListing > & GameController::getAllListings | ( | ) | const |
| std::vector< AllTimeRow > GameController::getAllTimeTable | ( | LeagueID | league_id | ) | const |
| std::optional< std::pair< LeagueID, uint16_t > > GameController::getArchivedPlacing | ( | uint16_t | season, |
| TeamID | team_id | ||
| ) | const |
League and final position of a club in a past season.
| std::vector< uint16_t > GameController::getArchivedSeasons | ( | LeagueID | league_id | ) | const |
Seasons with an archived final table of league_id, newest first.
| const std::vector< StandingRow > * GameController::getArchivedTable | ( | uint16_t | season, |
| LeagueID | league_id | ||
| ) | const |
Final table of a past season (nullptr if it was not archived).
| bool GameController::getAssistantFixesLineup | ( | ) | const |
| AutosavePolicy GameController::getAutosavePolicy | ( | ) | const |
| const std::vector< AwardRecord > & GameController::getAwardHistory | ( | ) | const |
Every league honour given so far, oldest first.
| std::vector< AwardPlayerTally > GameController::getAwardRace | ( | LeagueID | league_id, |
| bool | young, | ||
| size_t | limit = 5 |
||
| ) | const |
Current season award race of a league (qualified players first, then by the award score); young keeps players up to 21.
| const BoardState & GameController::getBoardState | ( | ) | const |
Objective, expected/target position, confidence (0-100), dismissal.
| std::optional< GameController::BoardTargets > GameController::getBoardTargets | ( | ) | const |
Targets of the managed club's board (nullopt without a club).
| GameController::CallUpView GameController::getCallUpView | ( | ) | const |
| CampQuote GameController::getCampQuote | ( | TrainingCamp | camp | ) | const |
| const ClubIdentity * GameController::getClubIdentity | ( | TeamID | team_id | ) | const |
Descriptive identity of a club from the data pack (short code, kit colours, stadium, founding year, nickname). Loaded once on first use and cached; UI thread only.
AI manager of a club (nullptr for the managed club and vacancies).
| std::vector< ClubPlayerTotal > GameController::getClubMostAppearances | ( | TeamID | team_id, |
| size_t | limit = 10 |
||
| ) | const |
| std::vector< RecordEntry > GameController::getClubRecords | ( | TeamID | team_id | ) | const |
| std::vector< ClubPlayerTotal > GameController::getClubTopScorers | ( | TeamID | team_id, |
| size_t | limit = 10 |
||
| ) | const |
| const ContinentalCompetitions * GameController::getContinental | ( | ) | const |
Continental club competitions (nullptr without a game).
| ContinentalCompetitions::TieScore GameController::getContinentalTieScore | ( | LeagueID | competition_id, |
| const ContinentalCompetitions::Tie & | tie | ||
| ) | const |
Aggregate score of a continental knockout tie.
| GameController::ContinueProgress GameController::getContinueProgress | ( | ) | const |
Thread-safe snapshot for a progress bar: poll it from the UI thread while Continue runs on a worker thread.
| GameController::ContractTerms GameController::getContractDemand | ( | PlayerID | player_id, |
| bool | free_agent | ||
| ) | const |
| std::uint8_t GameController::getContractRoundsLeft | ( | PlayerID | player_id | ) | const |
Proposals the player will still consider.
| std::optional< TransferNegotiation::ContractKind > GameController::getContractTalkKind | ( | PlayerID | player_id | ) | const |
Kind of contract talks the managed club can hold with a player now: agreed transfer, free agent or pre-contract (final six months).
| std::vector< LeagueID > GameController::getCupIds | ( | ) | const |
Domestic cup IDs: the top league ID of each country.
| std::string GameController::getCupName | ( | LeagueID | cup_id | ) | const |
| std::optional< Competitions::CupStatus > GameController::getCupStatus | ( | LeagueID | cup_id | ) | const |
| GameDateValue GameController::getCurrentDate | ( | ) | const |
Gets the current date in the game.
| int GameController::getCurrentSeason | ( | ) | const |
Gets the current season year.
| std::optional< int > GameController::getCurrentSlot | ( | ) | const |
Slot of the loaded career.
| GameController::DataHubView GameController::getDataHub | ( | ) | const |
|
inline |
Gets the database connection (for repos that need it).
| const StaffMember * GameController::getDelegate | ( | ) | const |
Staff member acting for the manager (assistant, else best coach).
| const DelegationPolicy & GameController::getDelegation | ( | ) | const |
Who handles each duty of the managed club.
| SquadStatus GameController::getDeservedSquadStatus | ( | PlayerID | player_id | ) | const |
Status the player's ability rank in his squad earns in his own eyes.
| std::optional< DilemmaEffects > GameController::getDilemmaEffects | ( | int | option | ) | const |
What answer option (0 or 1) of the open moment would do.
| DressingRoom GameController::getDressingRoom | ( | ) | const |
Leaders, cliques, cohesion, mood, requests and promises.
|
inline |
Number of successful runtime replacements; used to invalidate UI caches.
| PlayerID GameController::getEffectiveSetPieceTaker | ( | SetPieceDuty | duty | ) | const |
Who performs a duty at the next kick-off: the designated player when he starts, else the automatic choice among the XI (captain: the highest dressing-room standing, vice-captain: the next one). 0 without an XI.
| std::vector< FacilityProject > GameController::getFacilityProjects | ( | ) | const |
Managed club's projects, running first.
| uint32_t GameController::getFairTicketPrice | ( | TeamID | team_id | ) | const |
Reference price at which the club meets its league's gate target.
| const std::vector< FinanceTransaction > & GameController::getFinanceLedger | ( | TeamID | team_id | ) | const |
Dated transactions of a club, oldest first (empty if unknown).
| FinanceSummary GameController::getFinanceSummary | ( | TeamID | team_id, |
| GameDateValue | from, | ||
| GameDateValue | to | ||
| ) | const |
Per-category income/expense totals for transactions in [from, to].
| std::vector< PlayerID > GameController::getFollowedPlayers | ( | ) | const |
| std::vector< OpponentOption > GameController::getFriendlyOpponents | ( | GameDateValue | date, |
| OpponentLevel | level, | ||
| bool | abroad | ||
| ) | const |
|
inline |
|
inline |
|
inline |
Gets the game data cache.
| std::vector< LegendEntry > GameController::getHallOfFame | ( | TeamID | team_id | ) | const |
| HolidayPreferences GameController::getHolidayPreferences | ( | ) | const |
|
inline |
| std::optional< GameDateValue > GameController::getHolidayTarget | ( | const HolidayPlan & | plan | ) | const |
Day a plan would end on (nullopt: open-ended or nothing to wait for); "next match" means the next fixture after today.
| float GameController::getHumanFactorModifier | ( | TeamID | team_id, |
| int | half | ||
| ) | const |
Team talks plus squad cohesion, capped at +-2% (FR-119, FR-123).
| const std::vector< InboxMessage > & GameController::getInbox | ( | ) | const |
Managed club's messages, oldest first. Display text via InboxMessage::formatTitle() / formatBody().
| InboxView GameController::getInboxView | ( | ) | const |
Saved filters of the inbox screen (kept with the career).
| const std::vector< IncomingOffer > & GameController::getIncomingOffers | ( | ) | const |
AI offers for the managed club's players (loans included). Bids of AI clubs on the club's listed players arrive here too.
| std::optional< GameController::IncomingOfferView > GameController::getIncomingOfferView | ( | std::uint32_t | offer_id | ) | const |
| std::vector< PlayerID > GameController::getIneligibleSelections | ( | TeamID | team_id, |
| MatchType | type | ||
| ) | const |
Selected players (XI and reserves) injured or suspended for type.
Injured players of a club.
Nation a player is called up by (announced or away) today.
| const International::Record * GameController::getInternationalRecord | ( | PlayerID | player_id | ) | const |
Caps, goals and finals matches of a player; nullptr when uncapped.
| const std::vector< JobApplication > & GameController::getJobApplications | ( | ) | const |
| const std::vector< JobOffer > & GameController::getJobOffers | ( | ) | const |
| std::optional< MatchRules::Knockout > GameController::getKnockoutRules | ( | GameDateValue | date, |
| TeamID | home_id, | ||
| TeamID | away_id | ||
| ) | const |
Knockout rules of a fixture for the engine that plays it (extra time and penalties, aggregate of the first leg); nullopt for matches that may end drawn or unknown fixtures.
|
inline |
Why the latest run stopped (read once it has finished).
| uint32_t GameController::getLastHomeAttendance | ( | TeamID | team_id | ) | const |
Crowd of the club's latest home match this session (0 if none).
|
inline |
Duration of the most recent load/new-game initialization.
|
inline |
Why the last loadGame() failed (FutureVersion, Corrupt, Incomplete, Missing); empty after a successful load.
| float GameController::getLeagueAttentionMultiplier | ( | LeagueID | league_id | ) | const |
| std::vector< AwardRecord > GameController::getLeagueAwards | ( | LeagueID | league_id, |
| uint16_t | season_year | ||
| ) | const |
Honours of a league in a season, in award order.
| std::optional< std::reference_wrapper< const League > > GameController::getLeagueById | ( | uint8_t | league_id | ) | const |
Gets a league by its ID.
| league_id | The ID of the league. |
| std::vector< RecordEntry > GameController::getLeagueRecords | ( | LeagueID | league_id | ) | const |
| const std::vector< std::reference_wrapper< const League > > & GameController::getLeagues | ( | ) | const |
Gets all leagues available in the game.
| uint8_t GameController::getLeagueTier | ( | LeagueID | league_id | ) | const |
1 = top division, 2 = second division, ...
| GameController::PlayerActionBlock GameController::getListingBlock | ( | PlayerID | player_id | ) | const |
Why the player cannot be transfer-listed now.
| std::vector< const TransferListing * > GameController::getListingsByRole | ( | PlayerRole | role | ) | const |
| std::vector< const TransferListing * > GameController::getListingsExcludingTeam | ( | TeamID | team_id | ) | const |
| std::optional< std::reference_wrapper< Team > > GameController::getManagedTeam | ( | ) |
Gets the team currently managed by the player (mutable).
| std::optional< std::reference_wrapper< const Team > > GameController::getManagedTeam | ( | ) | const |
Gets the team currently managed by the player (read-only).
| const std::vector< ManagerAward > & GameController::getManagerAwards | ( | ) | const |
| const ManagerProfile * GameController::getManagerProfile | ( | ) | const |
nullptr before the manager step.
| const std::vector< ManagerSeasonLine > & GameController::getManagerSeasons | ( | ) | const |
| float GameController::getManagerStanding | ( | ) | const |
The manager's standing with the players, 0-100: board confidence blended with the club's reputation (there is no manager reputation).
| const std::vector< ManagerStint > & GameController::getManagerStints | ( | ) | const |
| std::optional< MatchReport > GameController::getMatchReport | ( | GameDateValue | date, |
| TeamID | home_id, | ||
| TeamID | away_id | ||
| ) | const |
| std::optional< ManagedMatchSnapshot > GameController::getMatchSnapshot | ( | GameDateValue | date, |
| TeamID | home_id, | ||
| TeamID | away_id | ||
| ) | const |
Tracked data (shots, touch maps, pass network) of a managed club's match, if it was recorded.
| uint8_t GameController::getMedicalLevel | ( | TeamID | team_id | ) | const |
Medical centre level of a club (50 = standard).
| MedicalReport GameController::getMedicalReport | ( | ) | const |
Injuries, fitness, injury risk and the medical staff of the club.
| std::vector< MentoringGroup > GameController::getMentoringGroups | ( | ) | const |
| float GameController::getMentoringMultiplier | ( | PlayerID | player_id | ) | const |
Development multiplier a player gets from his mentor (1.0 = none).
| const NationalJob * GameController::getNationalJob | ( | ) | const |
The manager's national-team job (nullptr when he has none).
| const std::vector< NationalStint > & GameController::getNationalJobHistory | ( | ) | const |
| const std::vector< NationalJobOffer > & GameController::getNationalJobOffers | ( | ) | const |
| const NationalTeams * GameController::getNationalTeams | ( | ) | const |
National teams: calendar, squads, finals, ratings (nullptr without a game).
| std::vector< GameController::NationalVacancyView > GameController::getNationalVacancies | ( | ) | const |
Open national jobs, best chance first.
| std::vector< NextAction > GameController::getNextActions | ( | size_t | limit = 5 | ) | const |
Pending work of the managed club, most important first.
| std::optional< GameController::NextFixture > GameController::getNextManagedFixture | ( | ) | const |
| const OnboardingState & GameController::getOnboarding | ( | ) | const |
First-week checklist of the career.
| std::optional< Dilemma > GameController::getOpenDilemma | ( | ) | const |
The open decision moment of the managed club, if any.
| OppositionInstruction GameController::getOppositionInstruction | ( | TeamID | opponent, |
| PlayerID | player | ||
| ) | const |
| std::vector< OppositionOrder > GameController::getOppositionInstructions | ( | TeamID | opponent | ) | const |
Instructions against opponent (for the match engine).
| OppositionReport GameController::getOppositionReport | ( | TeamID | opponent | ) | const |
Opponent's form, likely XI (scouted estimates only), strengths, weaknesses and counter-tactics.
| std::vector< PlayerSeasonStats > GameController::getPlayerCareer | ( | PlayerID | player_id | ) | const |
| TransferNegotiation::ContractDemand GameController::getPlayerDemand | ( | PlayerID | player_id, |
| TransferNegotiation::ContractKind | kind | ||
| ) | const |
The player's demands for talks of kind with the managed club; asking_wage is the agent's current ask in these talks.
| std::vector< AwardRecord > GameController::getPlayerHonours | ( | PlayerID | player_id | ) | const |
Honours of a player, newest first (profile honours section).
| uint32_t GameController::getPlayerMarketValue | ( | PlayerID | player_id | ) | const |
Promises made to a player, newest first (resolved ones for a year).
| const PlayerRelation * GameController::getPlayerRelation | ( | PlayerID | player_id | ) | const |
nullptr when the manager and player have no history.
| std::vector< PlayerSeasonStats > GameController::getPlayerSeasonStats | ( | PlayerID | player_id | ) | const |
| const std::vector< std::reference_wrapper< const Player > > & GameController::getPlayersForTeam | ( | uint16_t | team_id | ) | const |
Gets the players belonging to a specific team.
| team_id | The ID of the team. |
| GameController::PlayerWorkload GameController::getPlayerWorkload | ( | PlayerID | player_id | ) | const |
Focus, workload and development trend of a player.
| GameController::PotentialEstimate GameController::getPotentialEstimate | ( | PlayerID | player_id | ) | const |
Scouted potential range (the scouting view's range; see below).
| std::vector< FriendlySlot > GameController::getPreseasonFriendlies | ( | ) | const |
| const PreseasonState & GameController::getPreseasonState | ( | ) | const |
| std::vector< FriendlySuggestion > GameController::getPreseasonSuggestion | ( | ) | const |
The assistant's friendlies for the editable dates.
| std::optional< GameDateValue > GameController::getProjectCooldown | ( | FacilityProjectType | type | ) | const |
Day a refused project type may be asked for again.
| ProjectQuote GameController::getProjectQuote | ( | FacilityProjectType | type, |
| uint32_t | seats = 0 |
||
| ) | const |
Quote for the managed club (seats only matter for stadiums).
|
inline |
A duty the manager took back by changing it by hand (training plan, cancelled scouting trip, friendly); shown with an undo until dismissed.
| const std::vector< RecruitmentFocus > & GameController::getRecruitmentFocuses | ( | ) | const |
| GameController::PlayerActionBlock GameController::getReleaseBlock | ( | PlayerID | player_id | ) | const |
Why the player cannot be released now (None if he can).
| uint32_t GameController::getReleaseClause | ( | PlayerID | player_id | ) | const |
Release clause in a player's contract (0 = none).
| int64_t GameController::getReleaseCost | ( | PlayerID | player_id | ) | const |
Remaining wages owed if a managed player is released today.
| GameController::PlayerActionBlock GameController::getRenewalBlock | ( | PlayerID | player_id | ) | const |
Why the player's contract cannot be renewed now.
| std::vector< GameController::YouthPlayerView > GameController::getReserveCandidates | ( | ) | const |
U21 candidates of the managed club: first-team players up to 21 and the over-age ones up to 24 (status Graduated), U18 players from 17 (status Squad).
| GameController::ReserveOverview GameController::getReserveOverview | ( | ) | const |
| const std::vector< YouthResult > & GameController::getReserveResults | ( | ) | const |
Managed club's U21 results this season, oldest first.
| std::vector< YouthTableRow > GameController::getReserveTable | ( | ) | const |
The country's U21 league, leader first.
| PlayerRole GameController::getRoleCategory | ( | PlayerRole | role | ) | const |
| GameController::PlayerActionBlock GameController::getSaleBlock | ( | PlayerID | player_id | ) | const |
Why the player cannot be sold or loaned out now.
| std::vector< SaveBackup > GameController::getSaveBackups | ( | int | slot | ) | const |
Previous saves and pre-upgrade copies of a slot, newest first.
| GameController::SaveSlotMetadata GameController::getSaveSlotMetadata | ( | int | slot | ) | const |
Gets metadata for a save slot.
| GameController::SaveStatusInfo GameController::getSaveStatus | ( | ) | const |
Latest save result; safe to poll from the UI thread during Continue.
| int64_t GameController::getScoutAssignmentCost | ( | ScoutTargetKind | kind, |
| uint32_t | target_id, | ||
| uint16_t | days | ||
| ) | const |
Price of an assignment; 0 if the target is invalid.
| const std::vector< ScoutAssignment > & GameController::getScoutAssignments | ( | ) | const |
| std::optional< ScoutedPlayerRow > GameController::getScoutedRow | ( | PlayerID | player_id | ) | const |
Compact estimate (overall, potential range, value, knowledge).
| std::optional< ScoutedPlayerView > GameController::getScoutedView | ( | PlayerID | player_id | ) | const |
Estimated attributes, overall, potential range and knowledge (0-100); exact values only for the managed club's own players.
| ScoutEffectiveness GameController::getScoutEffectiveness | ( | uint32_t | scout_id, |
| ScoutTargetKind | kind, | ||
| uint32_t | target_id | ||
| ) | const |
Expected effectiveness (0.6x-1.5x) with its breakdown.
| ScoutExpertise GameController::getScoutExpertise | ( | uint32_t | scout_id | ) | const |
Nationality, languages and league experience of a scout.
| float GameController::getScoutingAccuracy | ( | TeamID | team_id | ) | const |
Scouting accuracy of a club in [0, 1], from its scouts' judging attributes and network size. Discrimination d' = 0.8 + 1.3 * accuracy; StaffModel::potentialErrorSd() converts it to the standard deviation of a potential estimate in overall points.
| float GameController::getScoutingKnowledge | ( | PlayerID | player_id | ) | const |
Managed club's knowledge of a player, 0-100.
| const std::vector< ScoutReport > & GameController::getScoutReports | ( | ) | const |
Scout reports, oldest first.
| std::vector< ScoutProfile > GameController::getScouts | ( | ) | const |
| std::vector< ScoutSummary > GameController::getScoutSummaries | ( | ) | const |
Scouts with status (on assignment / idle with history / new) and report counters, in roster order.
| std::vector< AgendaEvent > GameController::getSeasonAgenda | ( | ) | const |
Dated events of the managed club's current season.
| const std::vector< SeasonHistoryEntry > & GameController::getSeasonHistory | ( | ) | const |
| uint16_t GameController::getSeasonStartYear | ( | uint16_t | season | ) | const |
Calendar year season started in (0 if not archived).
| PlayerID GameController::getSetPieceDesignation | ( | SetPieceDuty | duty | ) | const |
Player designated for a duty in the managed lineup (0 = automatic).
| const std::vector< ShortlistEntry > & GameController::getShortlist | ( | ) | const |
| SquadPlan GameController::getSquadPlan | ( | int | season_offset | ) | const |
Depth chart, needs, age profile and contracts of the managed squad for this season (0) or a projected later one (1 = next season).
Playing-time expectation from the player's ability rank.
| std::optional< SquadStatus > GameController::getSquadStatus | ( | PlayerID | player_id | ) | const |
Status the manager gave a managed player (nullopt: none given).
| std::vector< const StaffMember * > GameController::getStaff | ( | TeamID | team_id | ) | const |
Staff of a club by role, best first.
| StaffEffects GameController::getStaffEffects | ( | TeamID | team_id | ) | const |
What a club's staff does for the squad.
| std::vector< const StaffMember * > GameController::getStaffMarket | ( | ) | const |
Unattached staff, best first.
| uint32_t GameController::getStaffWageDemand | ( | StaffID | staff_id | ) | const |
Weekly wage a candidate asks for (market) or to extend (own staff).
| std::vector< StandingRow > GameController::getStandings | ( | LeagueID | league_id | ) | const |
Fixture-derived table: points, GD, goals, head-to-head, name, ID.
| const StatsConfig & GameController::getStatsConfig | ( | ) | const |
Gets the configuration settings for player stats.
| std::optional< StoryChoice > GameController::getStoryChoice | ( | PlayerID | player_id | ) | const |
Open story decision for a player (transfer saga, captain dispute).
| TrainingCamp GameController::getSuggestedCamp | ( | ) | const |
| std::vector< DisciplinaryRecord > GameController::getSuspendedPlayers | ( | TeamID | team_id | ) | const |
Players of a team with an outstanding suspension.
Matches still to serve in league or cup (0 = eligible).
| float GameController::getTacticalFamiliarity | ( | TeamID | team_id | ) | const |
Tactical familiarity in [0, 1]; see TrainingSystem::tacticalFamiliarity.
| std::vector< TalkOptionView > GameController::getTalkOptions | ( | PlayerID | player_id | ) | const |
Conversation options for a managed player: availability, cooldowns and the predicted reaction.
| std::optional< std::reference_wrapper< const Team > > GameController::getTeamById | ( | uint16_t | team_id | ) | const |
Gets a team by its ID.
| team_id | The ID of the team. |
All fixtures (league, cup, friendly) of a team this season by date.
| const std::vector< std::reference_wrapper< const Team > > & GameController::getTeams | ( | ) | const |
Gets all teams available in the game.
| std::vector< std::reference_wrapper< const Team > > GameController::getTeamsInLeague | ( | uint8_t | league_id | ) | const |
Gets the teams belonging to a specific league.
| league_id | The ID of the league. |
| TeamTalkContext GameController::getTeamTalkContext | ( | TeamTalkMoment | moment, |
| int | own_goals = 0, |
||
| int | other_goals = 0 |
||
| ) | const |
Situation of the managed club's team talk for today's fixture.
| float GameController::getTeamTalkModifier | ( | TeamID | team_id, |
| int | half | ||
| ) | const |
Execution-quality hint of today's team talks for half (1 or 2), within +-1.2%. For the match engine; nothing reads it yet.
| std::vector< PlayerSeasonStats > GameController::getTopScorers | ( | MatchType | competition_type, |
| LeagueID | competition_id, | ||
| size_t | limit = 10 |
||
| ) | const |
| int64_t GameController::getTourFee | ( | TeamID | opponent_id | ) | const |
Net fee of a tour match against opponent_id.
| std::vector< TrainingAdvice > GameController::getTrainingAdvice | ( | ) | const |
Assistant manager's recommendations, most important first.
| const TeamTrainingPlan * GameController::getTrainingPlan | ( | ) | const |
Managed club's training plan (nullptr without a managed club).
| std::vector< GameController::TrainingDayPreview > GameController::getTrainingWeekPreview | ( | ) | const |
The managed club's next seven days (today first) as scheduled.
| TransferNegotiation::WindowInfo GameController::getTransferWindow | ( | ) | const |
The managed club's transfer window today (deadline countdown).
| TransferNegotiation::WindowInfo GameController::getTransferWindowFor | ( | TeamID | club | ) | const |
Transfer window of club's country today.
Selected players (XI and reserves) who are currently unavailable.
| size_t GameController::getUnreadInboxCount | ( | ) | const |
| size_t GameController::getUnreadScoutReportCount | ( | ) | const |
Scout reports not yet opened on their scout's page.
| const SeasonReview * GameController::getUnseenSeasonReview | ( | ) | const |
The latest season summary not shown yet (nullptr when none).
| std::vector< GameController::VacancyView > GameController::getVacancies | ( | ) | const |
Open jobs, best chance first.
| int64_t GameController::getWeeklyWageBill | ( | TeamID | team_id | ) | const |
Current weekly payroll of a club.
| uint64_t GameController::getWorldSeed | ( | ) | const |
Seed of the current world.
| std::vector< GameController::YouthPlayerView > GameController::getYouthEligibleFirstTeam | ( | ) | const |
First-team players of the managed club young enough for the U18s.
| std::vector< GameController::YouthPlayerView > GameController::getYouthPlayers | ( | YouthStatus | status | ) | const |
Managed club's academy players with status, best prospect first.
| const std::vector< YouthResult > & GameController::getYouthResults | ( | ) | const |
Managed club's U18 results this season, oldest first.
| std::vector< YouthTableRow > GameController::getYouthTable | ( | ) | const |
U18 league of the managed club, leader first.
| std::optional< TeamTalkResult > GameController::giveTeamTalk | ( | TeamTalkMoment | moment, |
| TeamTalkTone | tone, | ||
| int | own_goals = 0, |
||
| int | other_goals = 0 |
||
| ) |
Gives the talk to the selected XI (once per moment and match).
| int GameController::goOnHoliday | ( | const HolidayPlan & | plan | ) |
Simulates days on the Continue machinery (progress in getContinueProgress()) with the assistant in charge, until the plan's target or an early stop; the report is in getHolidaySummary().
| bool GameController::hasCareer | ( | ) | const |
A manager exists (created in the new-game step, or for older saves).
| bool GameController::hasNationalJob | ( | ) | const |
| bool GameController::hasPendingTalk | ( | PlayerID | player_id | ) | const |
True when the player waits for an answer (request or story).
| bool GameController::hasSelectedTeam | ( | ) | const |
Checks if a team has been selected to be managed.
| bool GameController::hasSquadRoom | ( | ) | const |
True when the managed squad has room for one more senior player.
| GameController::StaffActionResult GameController::hireStaff | ( | StaffID | staff_id, |
| uint8_t | years | ||
| ) |
Hires a market candidate for years seasons (1-4).
| bool GameController::isAcademyPlayer | ( | PlayerID | player_id | ) | const |
True for U18 players and intake trialists (they are not first-team players of their club).
|
inline |
| bool GameController::isContractOfferAcceptable | ( | PlayerID | player_id, |
| bool | free_agent, | ||
| ContractTerms | terms | ||
| ) | const |
| bool GameController::isDelegated | ( | Duty | duty | ) | const |
True when the assistant handles duty (systems check this).
| bool GameController::isFollowingPlayer | ( | PlayerID | player_id | ) | const |
| bool GameController::isGameLoaded | ( | ) | const |
Checks if a game is currently loaded.
| bool GameController::isInboxDecisionPending | ( | const InboxMessage & | message | ) | const |
A decision message still waits for the manager (offer, player request, youth trialists, decision moment).
| bool GameController::isPlayerAvailable | ( | PlayerID | player_id | ) | const |
False while injured.
| bool GameController::isPlayerListed | ( | PlayerID | player_id | ) | const |
| bool GameController::isShortlisted | ( | PlayerID | player_id | ) | const |
| bool GameController::isTransferEmbargoed | ( | ) | const |
True while the board freezes the managed club's transfers because its cash stayed negative (after a warning): no signings, loans or free agents until the balance is positive again; transferBudgetForTeam() is then 0.
| bool GameController::isTransferWindowOpen | ( | ) | const |
True while the managed club's country has its transfer window open (the managed club can sign players from other clubs).
| bool GameController::isTransferWindowOpenAnywhere | ( | ) | const |
True while some country's window is open, so the managed club may still sell to a club whose window is open.
| bool GameController::isTransferWindowOpenFor | ( | TeamID | club | ) | const |
True while club can sign players from other clubs: the buying club's window decides (TransferWindows).
| bool GameController::isUnemployed | ( | ) | const |
The career runs without a club: Continue advances time, the inbox and the Job Centre work, club screens and commands are closed.
|
private |
Asking price of a live listing by the player's club (0 if none).
| void GameController::listPlayerForTransfer | ( | PlayerID | player_id, |
| uint32_t | asking_price | ||
| ) |
| bool GameController::loadGame | ( | int | slot | ) |
Loads an existing game from the given save slot.
| TransferNegotiation::ClubResponse GameController::makeLoanOffer | ( | PlayerID | player_id, |
| const TransferNegotiation::LoanTerms & | terms | ||
| ) |
Loan offer for another club's player; starts the loan on agreement.
| TransferNegotiation::ClubResponse GameController::makeTransferOffer | ( | PlayerID | player_id, |
| const TransferNegotiation::OfferTerms & | terms | ||
| ) |
Offer of the managed club for another club's player. An accepted fee opens contract talks with the player for a week.
|
private |
The managed club, only once one has been selected.
|
private |
| void GameController::markAllInboxMessagesRead | ( | ) |
| bool GameController::markInboxMessageRead | ( | uint32_t | message_id | ) |
Marks one message read; false if the id is unknown.
| void GameController::markOppositionReportViewed | ( | TeamID | opponent | ) |
Remembers (for this session) that the report was read.
| bool GameController::markScoutReportsSeen | ( | uint32_t | scout_id | ) |
Marks a scout's reports as opened.
| void GameController::markSeasonReviewSeen | ( | uint16_t | season | ) |
|
private |
| YouthActionResult GameController::moveReserveToU18 | ( | PlayerID | player_id | ) |
A U21 player aged 18 or younger goes back to the U18s.
| YouthActionResult GameController::moveToReserves | ( | PlayerID | player_id | ) |
A first-team or U18 player joins the U21 squad.
| YouthActionResult GameController::moveToYouthSquad | ( | PlayerID | player_id | ) |
Moves a first-team player aged 18 or younger to the U18 squad.
| bool GameController::moveTransferToWageBudget | ( | int64_t | transfer_amount | ) |
Moves money between the managed club's budgets (52 weeks per season): positive moves transfer budget into weekly wages, negative moves unused wage room back. False if a budget would become insufficient.
| GameController::OfferOutcome GameController::nameAskingPrice | ( | std::uint32_t | offer_id, |
| uint32_t | price | ||
| ) |
Lists the player at price and gives the bidder that figure as a take-it-or-leave-it price (it meets it, makes its final offer or leaves).
| OfferReply GameController::negotiateJobOffer | ( | std::uint32_t | offer_id, |
| int64_t | weekly_wage, | ||
| std::uint8_t | years | ||
| ) |
| void GameController::newGame | ( | int | slot, |
| std::optional< std::uint64_t > | world_seed = std::nullopt |
||
| ) |
Starts a new game on the given save slot.
| world_seed | Seed of the generated world and of every random stream of the world simulation. Without it FM_WORLD_SEED or the clock is used. |
| YouthActionResult GameController::offerYouthProfessionalContract | ( | PlayerID | player_id | ) |
Turns a scholarship into a first professional contract.
| TransferNegotiation::ClubResponse GameController::payReleaseClause | ( | PlayerID | player_id | ) |
Pays another club's player's release clause in cash: the selling club cannot refuse, and contract talks with the player open. Fails over budget, out of the window or without a clause.
|
private |
Flushes the game and atomically replaces the slot file. Caller must hold runtime_mutex, including autosaves during advancement.
|
static |
Language key explaining block (empty for None).
|
private |
How a managed player feels about joining buyer.
| std::vector< std::pair< PlayerID, PlayerID > > GameController::previewLineupFix | ( | TeamID | team_id, |
| MatchType | type | ||
| ) | const |
What autoFixLineup() would change: (replaced, replacement or 0 when the player just leaves the matchday squad).
|
private |
|
private |
Buyers' answers to the club's counters that are due today.
| YouthActionResult GameController::promoteReservePlayer | ( | PlayerID | player_id | ) |
A U21 player joins the first-team squad.
| YouthActionResult GameController::promoteYouthPlayer | ( | PlayerID | player_id | ) |
Moves a U18 player up to the first-team squad.
| GameController::ContractTalkResult GameController::proposeContract | ( | PlayerID | player_id, |
| const TransferNegotiation::ContractOffer & | offer | ||
| ) |
Proposes personal terms; completes the move (or the renewal of a managed player's contract) when the player and his agent agree. A renewal's years count the current season: it must extend the contract.
|
private |
Drops listings of players who moved, left or may not be traded.
|
inline |
| bool GameController::recallLoan | ( | PlayerID | player_id | ) |
Recalls a loaned-out player (recall clause, open window, at least Loan::RECALL_MIN_DAYS into the loan).
|
private |
A manual change of something the assistant owns hands it back.
|
private |
Match snapshot and checklist after a managed live match.
| void GameController::registerEditorValidator | ( | RuntimeEditor::Validator | validator | ) |
| bool GameController::rejectBid | ( | PlayerID | player_id | ) |
| bool GameController::rejectIncomingOffer | ( | std::uint32_t | offer_id | ) |
Turns the offer down; a player keen on the move takes it badly.
| bool GameController::releasePlayer | ( | PlayerID | player_id | ) |
Terminates a managed player's contract, paying the remaining wages.
| GameController::StaffActionResult GameController::releaseStaff | ( | StaffID | staff_id | ) |
Releases a managed staff member, paying StaffModel::severance().
| YouthActionResult GameController::releaseYouthCandidate | ( | PlayerID | player_id | ) |
Lets a trialist go.
| bool GameController::removeFromShortlist | ( | PlayerID | player_id | ) |
| MentoringError GameController::removeMentee | ( | uint32_t | group_id, |
| PlayerID | mentee_id | ||
| ) |
| void GameController::removePlayerFromTransfer | ( | PlayerID | player_id | ) |
| bool GameController::removeRecruitmentFocus | ( | uint32_t | focus_id | ) |
| bool GameController::renewContract | ( | PlayerID | player_id, |
| ContractTerms | terms | ||
| ) |
Extends a managed player's contract to terms.years seasons (the current one included) if he and his agent accept the terms, as one round of the renewal talks.
|
private |
| UpgradeRequestResult GameController::requestAcademyUpgrade | ( | AcademyUpgrade | kind | ) |
Asks the board to fund the next step (cost booked when approved).
|
inline |
Asks the running Continue, holiday or off-season jump to stop at the end of the day being simulated. Thread-safe; each run clears the request when it starts.
| ProjectVerdict GameController::requestFacilityProject | ( | FacilityProjectType | type, |
| uint32_t | seats = 0 |
||
| ) |
Asks the board to fund a project for the managed club.
| bool GameController::resignFromClub | ( | ) |
Leaves the managed club without compensation.
| bool GameController::resignNationalJob | ( | ) |
| bool GameController::resolveDilemma | ( | int | option | ) |
Answers the open decision moment; false if none is open.
| bool GameController::restoreBackup | ( | int | slot, |
| const std::filesystem::path & | backup | ||
| ) |
Replaces the slot with one of its backups (the replaced file is kept aside, never deleted) and loads it; unsaved progress of a loaded career in that slot is discarded.
|
private |
An AI club's bid on a listed managed player becomes an offer the manager can negotiate.
|
private |
The assistant's delegated daily jobs (after each simulated day).
| bool GameController::saveGame | ( | ) |
Saves the current state of the game to its slot.
The slot file is replaced atomically by a verified snapshot and the previous one kept as a backup; on failure (disk full, read-only folder) the previous save is untouched. Never throws.
| uint32_t GameController::saveRecruitmentFocus | ( | const RecruitmentFocus & | focus | ) |
Adds (id 0) or updates a focus; returns its id, 0 on failure.
| std::vector< ScoutedPlayerRow > GameController::searchScoutedPlayers | ( | const ScoutSearchFilter & | filter | ) | const |
Player search on estimated values, best estimate first.
| void GameController::selectManagedTeam | ( | uint16_t | team_id | ) |
Selects the team for the player to manage.
| team_id | The ID of the team to select. |
|
private |
| void GameController::setAssistantFixesLineup | ( | bool | enabled | ) |
Assistant keeps the managed lineup eligible (each day and at kick-off; on by default, kept for the session).
| void GameController::setAutosavePolicy | ( | const AutosavePolicy & | policy | ) |
When the game saves on its own and how many backups a slot keeps.
| bool GameController::setCongestionAutoAdjust | ( | bool | enabled | ) |
Collapses weeks with two matches to recovery and activation only.
Changes one duty (fixed duties refuse).
| void GameController::setHolidayPreferences | ( | const HolidayPreferences & | preferences | ) |
| void GameController::setInboxView | ( | const InboxView & | view | ) |
| bool GameController::setLoanListed | ( | PlayerID | player_id, |
| bool | listed | ||
| ) |
Offers (or withdraws) a managed player for loan.
| bool GameController::setMatchResult | ( | GameDateValue | date, |
| uint16_t | home_id, | ||
| uint16_t | away_id, | ||
| const MatchEngine & | engine | ||
| ) |
Records a managed match with the structured summary of the live engine (team stats, per-player lines and the measured condition and injuries, applied like for simulated matches). A knockout engine brings its extra time and shootout; a tie still level is settled statistically.
| bool GameController::setMatchResult | ( | GameDateValue | date, |
| uint16_t | home_id, | ||
| uint16_t | away_id, | ||
| uint8_t | home_score, | ||
| uint8_t | away_score | ||
| ) |
| International::CallUpResult GameController::setNationalSquad | ( | const std::vector< PlayerID > & | players | ) |
Replaces the announced squad of the managed nation.
| bool GameController::setOppositionInstruction | ( | TeamID | opponent, |
| PlayerID | player, | ||
| OppositionInstruction | instruction | ||
| ) |
Instruction against an opposing player for the next meeting.
| bool GameController::setPlayerTrainingFocus | ( | PlayerID | player_id, |
| TrainingFocus | focus | ||
| ) |
Individual training focus of a managed player.
| bool GameController::setPreseasonFriendly | ( | GameDateValue | date, |
| TeamID | opponent_id, | ||
| bool | home, | ||
| bool | tour | ||
| ) |
| bool GameController::setSetPieceDesignation | ( | SetPieceDuty | duty, |
| PlayerID | player_id | ||
| ) |
Designates a managed player for a duty (0 = automatic). Goalkeepers cannot take kicks or throws; false when the player is not allowed.
| void GameController::setSimulationThreads | ( | unsigned | threads | ) |
Threads simulating a matchday in the current game (1 = sequential).
| SquadNumbers::Change GameController::setSquadNumber | ( | PlayerID | player_id, |
| int | number | ||
| ) |
Gives a senior player of the managed club squad number number (1-99); a teammate wearing it takes the player's old number. Other clubs' players and academy players are refused (Invalid).
| bool GameController::setSquadStatus | ( | PlayerID | player_id, |
| std::optional< SquadStatus > | status | ||
| ) |
Gives a managed player a status (nullopt clears it). It sets his playing-time expectation (getSquadRole(), never more than one level below his standing; see SquadStatusModel::expectation()) for morale, requests and contract talks. Prospect is only for players up to SquadStatusModel::PROSPECT_MAX_AGE.
| bool GameController::setTicketPrice | ( | uint32_t | price | ) |
Sets the managed club's average ticket price (1-1000).
| GameController::OfferOutcome GameController::settleIncomingOffer | ( | std::uint32_t | offer_id | ) |
Accepts the bid on the table: the player agrees personal terms with the buyer (or, rarely, refuses) and the sale completes.
| bool GameController::setTrainingIntensity | ( | TrainingIntensity | intensity | ) |
Squad-wide intensity applied on top of the session intensities.
| bool GameController::setTrainingPreset | ( | TrainingPreset | preset | ) |
Applies a preset's template (Custom keeps the current days).
| bool GameController::setTrainingSlot | ( | MicrocycleDay | day, |
| TrainingSlot | slot | ||
| ) |
Changes one day of the managed club's template (preset -> Custom).
| void GameController::showOnboarding | ( | ) |
Shows a hidden checklist again.
| bool GameController::signFreeAgentWithContract | ( | PlayerID | player_id, |
| TeamID | buyer_id, | ||
| ContractTerms | terms | ||
| ) |
| YouthActionResult GameController::signYouthCandidate | ( | PlayerID | player_id | ) |
Offers a trialist a scholarship or, from the first professional contract age, a professional contract.
|
private |
One day of simulation plus the AI transfer activity that follows.
| ScoutAssignError GameController::startScoutAssignment | ( | uint32_t | scout_id, |
| ScoutTargetKind | kind, | ||
| uint32_t | target_id, | ||
| uint16_t | days | ||
| ) |
Sends a scout (cost booked to the ledger today).
|
private |
|
private |
Copies the opposition plan into the managed club's tactics, which carry it into every match engine (live or simulated).
| std::optional< TalkOutcome > GameController::talkToPlayer | ( | PlayerID | player_id, |
| TalkOption | option | ||
| ) |
Holds one conversation line (morale, trust, promises, requests). Accepting a transfer request also lists the player at his market value. Answers the player's open story, if any. nullopt when the option is not available.
| uint32_t GameController::transferBudgetForTeam | ( | TeamID | team_id | ) | const |
Transfer money the club can commit today (the "available budget" to show): min(board allowance, cash - 12 weeks of payroll - instalments owed this season), never negative, 0 while embargoed.
| bool GameController::undoEditor | ( | std::string & | error | ) |
| void GameController::undoReclaimedDuty | ( | ) |
Hands the reclaimed duty back to the assistant.
| bool GameController::unfollowPlayer | ( | PlayerID | player_id | ) |
| bool GameController::wasOppositionReportViewed | ( | TeamID | opponent | ) | const |
|
private |
Set while the assistant changes things on the manager's behalf.
|
private |
|
mutableprivate |
Data-pack club identities, read on the first getClubIdentity().
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
The manager's own delegation while a holiday hands extra duties to the assistant: saves made on holiday store this one.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexpr |
Longest off-season stretch one Continue simulates.
|
private |
|
private |
|
mutableprivate |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
Opponents whose report was opened this session.