Player12
An open source football management simulator
Loading...
Searching...
No Matches
world_generation.h File Reference
#include <cstdint>
#include <map>
#include <string>
#include <string_view>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include "global/languages.h"
#include "global/stats_config.h"
#include "global/types.h"
#include "model/club_economy.h"
#include "model/player.h"
#include "model/team.h"

Go to the source code of this file.

Classes

struct  NamePool
 First and last names from assets/user_made_data/names_files. More...
 
class  NameRegistry
 Full names in use in a world, so that no two players share one. More...
 
class  SquadSurnames
 Surnames of one squad: at most one surname may appear twice. More...
 

Namespaces

namespace  WorldGeneration
 Creation of clubs and players with realistic structure.
 

Functions

float WorldGeneration::teamLevel (std::uint8_t reputation)
 
std::vector< float > WorldGeneration::levelOffsets (const LeagueShape &shape, std::size_t clubs)
 
float WorldGeneration::reputationCentre (const LeagueProfile &league, std::size_t clubs)
 
float WorldGeneration::clubLevel (const LeagueEconomy &economy, std::uint8_t reputation)
 
double WorldGeneration::overallFor (PlayerRole role, const std::map< std::string, float > &stats, const StatsConfig &stats_config)
 
void WorldGeneration::generateClubProfiles (std::unordered_map< TeamID, Team > &teams, std::uint64_t world_seed, bool assign_opening_balance)
 
std::pair< std::string, std::string > WorldGeneration::drawName (WorldRng &rng, Language nationality, NameRegistry &registry, SquadSurnames &squad)
 
float WorldGeneration::maxPotential (int age, float overall)
 
std::vector< Player > WorldGeneration::generateSquad (const Team &team, const LeagueEconomy &economy, std::size_t existing_players, std::int64_t existing_weekly_wages, PlayerID &next_player_id, std::uint64_t world_seed, const StatsConfig &stats_config)
 
void WorldGeneration::initializeHiddenAttributes (Player &player, WorldRng &rng, const StatsConfig &stats_config)
 
void WorldGeneration::applyOpeningBudgets (Team &team, const LeagueEconomy &economy, std::int64_t weekly_payroll)