|
Player12
An open source football management simulator
|
#include <cstddef>#include <cstdint>#include <functional>#include <memory>#include <optional>#include <string>#include <string_view>#include <unordered_map>#include <utility>#include <vector>#include "global/types.h"#include "model/finances.h"#include "model/gamedate.h"Go to the source code of this file.
Classes | |
| struct | CareerTotals |
| struct | StoryChoice |
| struct | StoryRecord |
| struct | DilemmaEffects |
| Bounded effects of one answer to a decision moment. More... | |
| struct | Dilemma |
| A decision moment of the managed club (table StoryDilemmas). More... | |
| struct | FollowedPlayer |
| A followed player and what was last reported about him. More... | |
| struct | StoryDayContext |
| What the day loop knows beyond the squad. More... | |
| struct | StoryState |
| Persisted state of the story engine. More... | |
| class | StoryEngine |
| Detects story triggers for the managed club and posts them. More... | |
Namespaces | |
| namespace | Stories |
Enumerations | |
| enum class | StoryKind : std::uint8_t { Debut = 0 , Breakout , CaptainDispute , PoorRun , TransferSaga , Comeback , Milestone , Rivalry , CompassionateLeave , HomesickYouth , FineDispute , RivalComments , SponsorAppearance , TrainingClash , CoachingCourse , TicketProtest } |
| Story chains that grow out of what actually happens in the save. More... | |
Functions | |
| std::optional< std::uint32_t > | Stories::appearanceMilestone (std::uint32_t before, std::uint32_t after) |
| std::optional< std::uint32_t > | Stories::goalMilestone (std::uint32_t before, std::uint32_t after) |
| bool | Stories::isPoorRun (std::string_view recent_form) |
| const char * | Stories::kindKey (StoryKind kind) |
| bool | Stories::isDilemma (StoryKind kind) |
| const char * | Stories::dilemmaTitleKey (StoryKind kind) |
| const char * | Stories::dilemmaBodyKey (StoryKind kind) |
| const char * | Stories::dilemmaOptionKey (StoryKind kind, int option) |
| const char * | Stories::dilemmaDoneKey (StoryKind kind, int option) |
| std::optional< StoryKind > | Stories::dilemmaForTitle (std::string_view title_key) |
| DilemmaEffects | Stories::dilemmaEffects (StoryKind kind, int option, const ClubProfile &profile) |
|
strong |
Story chains that grow out of what actually happens in the save.
Each story is triggered by a real event of the managed club (a debut, a string of high ratings, a long injury ending, repeated bids for a key player...) and produces at most one inbox message per instance. Stories that call for a decision carry a StoryChoice: the inbox offers to talk to the player with the conversation options that answer it. A weekly cap keeps busy periods from flooding the inbox.
The kinds after Rivalry are decision moments: short two-option dilemmas (see Dilemma) answered from the inbox. Values are persisted: append only.
| Enumerator | |
|---|---|
| Debut | |
| Breakout | |
| CaptainDispute | |
| PoorRun | |
| TransferSaga | |
| Comeback | |
| Milestone | |
| Rivalry | |
| CompassionateLeave | A player asks to be with his family. |
| HomesickYouth | A young player misses home. |
| FineDispute | The captain disputes a club fine. |
| RivalComments | The press asks about the rival's remarks. |
| SponsorAppearance | A sponsor wants the squad before a match. |
| TrainingClash | Two players clash in training. |
| CoachingCourse | A veteran wants to start his coaching badges. |
| TicketProtest | Supporters protest about ticket prices. |