Player12
An open source football management simulator
Loading...
Searching...
No Matches
manager_career.h File Reference
#include <array>
#include <cstdint>
#include <functional>
#include <map>
#include <memory>
#include <optional>
#include <span>
#include <string>
#include <utility>
#include <vector>
#include "global/languages.h"
#include "global/types.h"
#include "model/gamedate.h"

Go to the source code of this file.

Classes

struct  ManagerContract
 Terms of a manager's employment. More...
 
struct  ManagerProfile
 The human manager. More...
 
struct  ManagerSetup
 What the new-game manager step collects. More...
 
struct  ManagerStint
 One spell in charge of a club. More...
 
struct  ManagerSeasonLine
 The manager's club at the end of a season. More...
 
struct  ManagerAward
 
struct  AiManager
 A computer-controlled manager, employed or looking for work. More...
 
struct  Vacancy
 A club without a permanent manager. More...
 
struct  JobApplication
 
struct  JobOffer
 A club's contract offer to the human manager. More...
 
struct  ClubVision
 What a club's board looks for in a manager. More...
 
struct  InterviewResult
 Outcome of a completed interview. More...
 
struct  CareerDayEvents
 What changed during one simulated day. More...
 
struct  ManagerMatchEvent
 
class  ManagerCareer
 The human manager's career and the market for managers. More...
 

Namespaces

namespace  ManagerMarketModel
 

Enumerations

enum class  ManagerBackground : std::uint8_t {
  SundayLeague = 0 , SemiProfessional , ProfessionalPlayer , TopFlightPlayer ,
  FormerInternational , COUNT
}
 Where a new manager comes from (sets reputation and licence). More...
 
enum class  CoachingLicence : std::uint8_t {
  None = 0 , C , B , A ,
  Pro , COUNT
}
 Coaching qualification, lowest first (values are persisted). More...
 
enum class  ManagerStyle : std::uint8_t {
  Balanced = 0 , Possession , Pressing , Counter ,
  Direct , COUNT
}
 Preferred way of playing (values are persisted). More...
 
enum class  ReputationTier : std::uint8_t { Local = 0 , National , Continental , World }
 How far a manager's name carries. More...
 
enum class  DepartureReason : std::uint8_t {
  Current = 0 , Sacked , Resigned , Moved ,
  ContractExpired
}
 Why a spell in charge ended (values are persisted). More...
 
enum class  OwnerType : std::uint8_t { Patient = 0 , Ambitious , ImpatientBenefactor , MemberOwned }
 Owner behaviour: scales the patience of the board. More...
 
enum class  ManagerAwardKind : std::uint8_t {
  LeagueTitle = 0 , CupWin , Promotion , ManagerOfTheSeason ,
  ManagerOfTheMonth
}
 Honours of the manager (values are persisted). More...
 
enum class  ApplicationStage : std::uint8_t { Pending = 0 , Interview , Rejected , Offered }
 
enum class  InterviewTopic : std::uint8_t {
  Style = 0 , Ambition , Youth , Budget ,
  COUNT
}
 Interview topics, asked in this order. More...
 
enum class  ApplyResult : std::uint8_t {
  Ok = 0 , NoVacancy , AlreadyApplied , OwnClub ,
  RecentlyLeft , NoProfile
}
 
enum class  OfferReply : std::uint8_t { Accepted = 0 , Improved , Withdrawn }
 

Functions

ReputationTier ManagerMarketModel::reputationTier (float reputation)
 
const char * ManagerMarketModel::reputationTierKey (ReputationTier tier)
 
const char * ManagerMarketModel::licenceKey (CoachingLicence licence)
 
const char * ManagerMarketModel::styleKey (ManagerStyle style)
 
const char * ManagerMarketModel::backgroundKey (ManagerBackground background)
 
const char * ManagerMarketModel::ownerKey (OwnerType owner)
 
const char * ManagerMarketModel::departureKey (DepartureReason reason)
 
const char * ManagerMarketModel::awardKey (ManagerAwardKind kind)
 
float ManagerMarketModel::startingReputation (ManagerBackground background)
 
CoachingLicence ManagerMarketModel::startingLicence (ManagerBackground background)
 
CoachingLicence ManagerMarketModel::requiredLicence (std::uint8_t club_reputation, std::uint8_t tier)
 
float ManagerMarketModel::applicationChance (float manager_reputation, CoachingLicence licence, std::uint8_t club_reputation, std::uint8_t tier, float fit)
 
std::int64_t ManagerMarketModel::offerWage (std::uint8_t club_reputation, float manager_reputation, std::uint8_t tier)
 
float ManagerMarketModel::updateConfidence (float confidence, float &form, float points, float expected_points)
 
float ManagerMarketModel::weeklyDismissalHazard (float confidence, std::uint16_t matches, OwnerType owner)
 
float ManagerMarketModel::seasonEndDismissalChance (int position, int expected_position, int league_size, float confidence, OwnerType owner)
 
float ManagerMarketModel::monthFactor (std::uint8_t month)
 
ClubVision ManagerMarketModel::clubVision (std::uint64_t world_seed, TeamID team_id, std::uint8_t reputation, std::uint8_t youth_facilities, std::int64_t balance, std::int64_t yearly_income)
 
const char * ManagerMarketModel::interviewQuestionKey (InterviewTopic topic)
 
const char * ManagerMarketModel::interviewOptionKey (InterviewTopic topic, std::size_t option)
 
int ManagerMarketModel::interviewAnswerFit (const ClubVision &vision, InterviewTopic topic, std::size_t option)
 

Variables

constexpr std::size_t INTERVIEW_TOPICS
 
constexpr std::size_t INTERVIEW_OPTIONS = 3
 
constexpr std::size_t ManagerMarketModel::MAX_CONTRACT_YEARS = 4
 

Enumeration Type Documentation

◆ ApplicationStage

enum class ApplicationStage : std::uint8_t
strong
Enumerator
Pending 

Waiting for the board's answer.

Interview 

Invited to an interview.

Rejected 
Offered 

◆ ApplyResult

enum class ApplyResult : std::uint8_t
strong
Enumerator
Ok 
NoVacancy 
AlreadyApplied 
OwnClub 
RecentlyLeft 

Sacked or resigned there within the last year.

NoProfile 

◆ CoachingLicence

enum class CoachingLicence : std::uint8_t
strong

Coaching qualification, lowest first (values are persisted).

Enumerator
None 
C 
B 
A 
Pro 
COUNT 

◆ DepartureReason

enum class DepartureReason : std::uint8_t
strong

Why a spell in charge ended (values are persisted).

Enumerator
Current 

Still in charge.

Sacked 
Resigned 
Moved 

Left for another club.

ContractExpired 

◆ InterviewTopic

enum class InterviewTopic : std::uint8_t
strong

Interview topics, asked in this order.

Enumerator
Style 
Ambition 
Youth 
Budget 
COUNT 

◆ ManagerAwardKind

enum class ManagerAwardKind : std::uint8_t
strong

Honours of the manager (values are persisted).

Enumerator
LeagueTitle 
CupWin 
Promotion 
ManagerOfTheSeason 
ManagerOfTheMonth 

◆ ManagerBackground

enum class ManagerBackground : std::uint8_t
strong

Where a new manager comes from (sets reputation and licence).

Enumerator
SundayLeague 
SemiProfessional 
ProfessionalPlayer 
TopFlightPlayer 
FormerInternational 
COUNT 

◆ ManagerStyle

enum class ManagerStyle : std::uint8_t
strong

Preferred way of playing (values are persisted).

Enumerator
Balanced 
Possession 
Pressing 
Counter 
Direct 
COUNT 

◆ OfferReply

enum class OfferReply : std::uint8_t
strong
Enumerator
Accepted 

Terms agreed, the offer now carries them.

Improved 

The board moved towards the demand.

Withdrawn 

The board walked away.

◆ OwnerType

enum class OwnerType : std::uint8_t
strong

Owner behaviour: scales the patience of the board.

Enumerator
Patient 
Ambitious 
ImpatientBenefactor 
MemberOwned 

◆ ReputationTier

enum class ReputationTier : std::uint8_t
strong

How far a manager's name carries.

Enumerator
Local 
National 
Continental 
World 

Variable Documentation

◆ INTERVIEW_OPTIONS

constexpr std::size_t INTERVIEW_OPTIONS = 3
inlineconstexpr

◆ INTERVIEW_TOPICS

constexpr std::size_t INTERVIEW_TOPICS
inlineconstexpr
Initial value:
=
static_cast<std::size_t>(std::to_underlying(InterviewTopic::COUNT))