Player12
An open source football management simulator
Loading...
Searching...
No Matches
Interactions Namespace Reference

Functions

const char * optionKey (TalkOption option)
 
const char * optionDescriptionKey (TalkOption option)
 
const char * reactionKey (TalkReaction reaction)
 
const char * hintKey (TalkHint hint)
 
const char * blockKey (TalkBlock block)
 
const char * requestKey (TalkRequest request)
 
const char * promiseTypeKey (PromiseType type)
 
const char * promiseStateKey (PromiseState state)
 
const char * voidReasonKey (PromiseVoidReason reason)
 
const char * toneKey (TeamTalkTone tone)
 
const char * toneDescriptionKey (TeamTalkTone tone)
 
const char * moodKey (DressingMood mood)
 
TalkGroup groupOf (TalkOption option)
 
std::int32_t cooldownDays (TalkGroup group)
 
float expectedRating (SquadRole role)
 
float expectedShare (SquadRole role, int age)
 
float positiveChance (const TalkContext &context, TalkOption option)
 
float negativeChance (const TalkContext &context, TalkOption option)
 
TalkHint hintFor (float positive, float negative)
 
TalkOutcome evaluateTalk (const TalkContext &context, TalkOption option, double roll, double variant_roll)
 
std::vector< TeamTalkPrediction > predictTeamTalk (const TeamTalkContext &context)
 
TeamTalkResult evaluateTeamTalk (const TeamTalkContext &context, TeamTalkTone tone, std::uint64_t seed)
 
float cohesionModifier (float new_share)
 
float newness (std::int32_t joined_day, std::int32_t today)
 
float hierarchyScore (int tenure_days, int age, float standing, const PlayerTraits &traits)
 

Variables

constexpr float TALK_CAP = 0.012f
 
constexpr float TOTAL_CAP = 0.02f
 
constexpr std::int32_t SETTLE_DAYS = 240
 

Function Documentation

◆ blockKey()

const char * Interactions::blockKey ( TalkBlock  block)

◆ cohesionModifier()

float Interactions::cohesionModifier ( float  new_share)

Execution-quality change from squad turnover: 0 up to a 25% share of minutes by newcomers, falling linearly to -2% at 40% and beyond.

◆ cooldownDays()

std::int32_t Interactions::cooldownDays ( TalkGroup  group)

Days an option's group stays closed after use.

◆ evaluateTalk()

TalkOutcome Interactions::evaluateTalk ( const TalkContext &  context,
TalkOption  option,
double  roll,
double  variant_roll 
)

Deterministic reply: roll (uniform in [0, 1)) decides the reaction, variant_roll the reply wording. Morale deltas are scaled by the player's temperament.

◆ evaluateTeamTalk()

TeamTalkResult Interactions::evaluateTeamTalk ( const TeamTalkContext &  context,
TeamTalkTone  tone,
std::uint64_t  seed 
)

Applies nothing: computes each listener's reaction (rolls keyed by seed, day and player) and the bounded modifier.

◆ expectedRating()

float Interactions::expectedRating ( SquadRole  role)

Rating a player of role is expected to average.

◆ expectedShare()

float Interactions::expectedShare ( SquadRole  role,
int  age 
)

Share of minutes a player of role (and age) expects.

◆ groupOf()

TalkGroup Interactions::groupOf ( TalkOption  option)

◆ hierarchyScore()

float Interactions::hierarchyScore ( int  tenure_days,
int  age,
float  standing,
const PlayerTraits &  traits 
)

Hierarchy score 0-100 from tenure, age, standing in the squad (overall rank as a 0-1 fraction, 1 = best) and personality.

◆ hintFor()

TalkHint Interactions::hintFor ( float  positive,
float  negative 
)

◆ hintKey()

const char * Interactions::hintKey ( TalkHint  hint)

◆ moodKey()

const char * Interactions::moodKey ( DressingMood  mood)

◆ negativeChance()

float Interactions::negativeChance ( const TalkContext &  context,
TalkOption  option 
)

Chance in [0, 1] that the player takes option badly.

◆ newness()

float Interactions::newness ( std::int32_t  joined_day,
std::int32_t  today 
)

Newness weight of a player who joined on joined_day: 1 on arrival, 0 after SETTLE_DAYS (and for players whose arrival predates the records).

◆ optionDescriptionKey()

const char * Interactions::optionDescriptionKey ( TalkOption  option)

Language key of an option's one-line description.

◆ optionKey()

const char * Interactions::optionKey ( TalkOption  option)

Language key of an option's label, e.g. "TALK_OPTION_PRAISE_FORM".

◆ positiveChance()

float Interactions::positiveChance ( const TalkContext &  context,
TalkOption  option 
)

Chance in [0, 1] that the player takes option well.

◆ predictTeamTalk()

std::vector< TeamTalkPrediction > Interactions::predictTeamTalk ( const TeamTalkContext &  context)

Predicted reception of every tone in context.

◆ promiseStateKey()

const char * Interactions::promiseStateKey ( PromiseState  state)

◆ promiseTypeKey()

const char * Interactions::promiseTypeKey ( PromiseType  type)

◆ reactionKey()

const char * Interactions::reactionKey ( TalkReaction  reaction)

◆ requestKey()

const char * Interactions::requestKey ( TalkRequest  request)

◆ toneDescriptionKey()

const char * Interactions::toneDescriptionKey ( TeamTalkTone  tone)

◆ toneKey()

const char * Interactions::toneKey ( TeamTalkTone  tone)

◆ voidReasonKey()

const char * Interactions::voidReasonKey ( PromiseVoidReason  reason)

Variable Documentation

◆ SETTLE_DAYS

constexpr std::int32_t Interactions::SETTLE_DAYS = 240
constexpr

◆ TALK_CAP

constexpr float Interactions::TALK_CAP = 0.012f
constexpr

Execution-quality cap of one team talk (+-1.2%).

◆ TOTAL_CAP

constexpr float Interactions::TOTAL_CAP = 0.02f
constexpr

Execution-quality cap of team talks and cohesion combined (+-2%).