Player12
An open source football management simulator
Loading...
Searching...
No Matches
world_generation.cpp File Reference
#include "model/world_generation.h"
#include <algorithm>
#include <array>
#include <cctype>
#include <cmath>
#include <fstream>
#include <map>
#include <nlohmann/json.hpp>
#include <span>
#include <stdexcept>
#include <string_view>
#include "global/global.h"
#include "global/paths.h"
#include "model/role_utils.h"
#include "model/world_rng.h"

Namespaces

namespace  WorldGeneration
 Creation of clubs and players with realistic structure.
 

Functions

std::pair< std::string, std::string > WorldGeneration::drawName (WorldRng &rng, Language nationality, NameRegistry &registry, SquadSurnames &squad)
 
float WorldGeneration::maxPotential (int age, float overall)
 
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::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)