19#ifndef HEADER_STK_CONFIG_HPP
20#define HEADER_STK_CONFIG_HPP
30#include "utils/interpolation_array.hpp"
31#include "utils/no_copy.hpp"
33#include "utils/constants.hpp"
55 std::map<std::string, KartProperties*> m_kart_properties;
66 POWERUP_MODE_ONLY_IF_SAME
70 int m_bonusbox_item_return_ticks;
213 float m_minimap_ai_icon;
214 float m_minimap_player_icon;
219 float m_cutscene_fov;
221 unsigned m_max_skinning_bones;
223 unsigned m_tc_quality;
227 uint16_t m_client_port;
228 uint16_t m_server_port;
231 std::string m_donate_url;
232 std::string m_password_reset_url;
233 std::string m_assets_download_url;
236 std::string m_stun_ipv4;
237 std::string m_stun_ipv6;
241 std::vector<std::string> m_digit_ttf;
242 std::string m_color_emoji_ttf;
246 m_snb_min_adjust_speed, m_snb_max_adjust_time,
247 m_snb_adjust_length_threshold;
278 std::string m_title_music_file;
279 std::string m_default_music_file;
280 std::string m_race_win_music_file;
281 std::string m_race_neutral_music_file;
282 std::string m_race_lose_music_file;
283 std::string m_gp_win_music_file;
284 std::string m_gp_lose_music_file;
285 std::string m_unlock_music_file;
292 void load(
const std::string &filename);
293 const std::string &getMainMenuPicture(
int n);
294 const std::string &getBackgroundPicture(
int n);
296 void getAllScores(std::vector<int> *all_scores,
int num_karts);
309 return *m_kart_properties.at(type);
This class stores the properties of a kart.
Definition: kart_properties.hpp:60
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
Global STK configuration information.
Definition: stk_config.hpp:51
MusicInformation * m_default_music
Filename of the music that is played when the track's music was not found.
Definition: stk_config.hpp:173
const KartProperties & getKartProperties(const std::string &type)
Returns the kart properties for a certain type of kart.
Definition: stk_config.hpp:307
int m_min_track_version
The minimum and maximum .track file.
Definition: stk_config.hpp:138
float m_bomb_time_increase
Time added to bomb timer when it's passed on.
Definition: stk_config.hpp:77
MusicInformation * m_race_win_music
Filename of the music to play when a player finishes in 1st place.
Definition: stk_config.hpp:176
int m_bubblegum_counter
How many times bubble gums must be driven over before they disappear.
Definition: stk_config.hpp:80
static float UNDEFINED
Time until a bubble gum collected bý a kart returns.
Definition: stk_config.hpp:75
int m_max_karts
Maximum number of karts.
Definition: stk_config.hpp:91
STKConfig()
Constructor, which only initialises the object.
Definition: stk_config.cpp:40
float m_near_ground
Determines when a kart is not near ground anymore and the upright constraint is disabled to allow for...
Definition: stk_config.hpp:132
int m_max_skidmarks
Maximum number of skid marks/kart.
Definition: stk_config.hpp:130
bool m_smooth_normals
If normals for raycasts for wheels should be interpolated.
Definition: stk_config.hpp:92
enum STKConfig::@3 m_same_powerup_mode
What to do if a kart already has a powerup when it hits a bonus box:
float m_bomb_time
Time before a bomb explodes.
Definition: stk_config.hpp:76
std::string m_server_hardware_report
URL for the server used for hardware reporting statistics.
Definition: stk_config.hpp:259
std::set< std::string > m_network_capabilities
List of network capabilities to handle different servers with same version.
Definition: stk_config.hpp:266
MusicInformation * m_gp_win_music
Filename of the grand prix win music to play.
Definition: stk_config.hpp:187
int m_penalty_ticks
Penalty time when starting too early.
Definition: stk_config.hpp:85
float m_default_moveable_friction
Default friction to be used for any moveable, e.g.
Definition: stk_config.hpp:115
std::vector< float > m_leader_intervals
Interval in follow the leader till last kart is reomved.
Definition: stk_config.hpp:159
int m_max_track_version
version supported by this binary.
Definition: stk_config.hpp:139
int time2Ticks(float t)
Converts a time value into ticks (of physics time steps).
Definition: stk_config.hpp:316
float m_replay_delta_steering
A steering difference of more than that will trigger a new event to be generated.
Definition: stk_config.hpp:207
void initMusicFiles()
Init the music files after downloading assets.
Definition: stk_config.cpp:643
MusicInformation * m_gp_lose_music
Filename of the grand prix lose music to play.
Definition: stk_config.hpp:190
void init_defaults()
Init all values with invalid defaults, which are tested later.
Definition: stk_config.cpp:205
int m_max_display_news
How often a news message is displayed before it is ignored.
Definition: stk_config.hpp:142
std::vector< std::string > m_normal_ttf
Lists of TTF files used in STK.
Definition: stk_config.hpp:240
float m_network_steering_reduction
In case of a network race, remote karts will get their steering somewhat reduced each frame.
Definition: stk_config.hpp:104
std::string m_server_addons
URL for the server used for the addons management.
Definition: stk_config.hpp:256
bool m_shield_restrict_weapons
Wether weapon usage is punished.
Definition: stk_config.hpp:82
std::vector< int > m_switch_items
How to switch items.
Definition: stk_config.hpp:163
uint16_t m_server_discovery_port
Client and server port use random ports if enabled in user config.
Definition: stk_config.hpp:226
float m_replay_dt
Maximum time between consecutive saved tranform events.
Definition: stk_config.hpp:199
int m_banana_item_return_ticks
Time until a nitro collected by a kart returns.
Definition: stk_config.hpp:72
float m_smooth_angle_limit
If the angle between a normal on a vertex and the normal of the triangle are more than this value,...
Definition: stk_config.hpp:109
float m_no_explosive_items_timeout
Prevent early explosive items before this world time.
Definition: stk_config.hpp:96
void getAllScores(std::vector< int > *all_scores, int num_karts)
Defines the points for each position for a race with a given number of karts.
Definition: stk_config.cpp:710
int m_solver_set_flags
Bit flags to modify the solver mode.
Definition: stk_config.hpp:128
int m_max_kart_version
version supported by this binary.
Definition: stk_config.hpp:137
float m_ai_acceleration
Between 0 and 1, default being 1, can be used to give a handicap to AIs.
Definition: stk_config.hpp:155
float m_minimap_size
The minimap size.
Definition: stk_config.hpp:210
float m_camera_fov[MAX_PLAYER_COUNT]
The field of view for 1, 2, 3, 4 player split screen.
Definition: stk_config.hpp:217
MusicInformation * m_title_music
Filename of the title music to play.
Definition: stk_config.hpp:170
float m_replay_delta_speed
If the speed difference with the last transform event is larger than this, a new event is generated.
Definition: stk_config.hpp:203
int m_bubblegum_item_return_ticks
Time until a banana collected by a kart return.
Definition: stk_config.hpp:73
bool m_allow_news_redirects
If true we allow all the server urls to be redirected by the news.xml.
Definition: stk_config.hpp:262
int m_min_server_version
The minimum and maximum server.
Definition: stk_config.hpp:140
float m_solver_split_impulse_thresh
Threshold when to use the split impulse approach.
Definition: stk_config.hpp:124
void getAllData(const XMLNode *root)
Extracts the actual information from a xml file.
Definition: stk_config.cpp:279
std::string m_server_api
URL for the server used for the API multiplayer.
Definition: stk_config.hpp:250
int m_replay_max_frames
Maximum number of transform events of a replay.
Definition: stk_config.hpp:196
bool m_camera_follow_skid
If true the camera will stay behind the kart, potentially making it easier to see where the kart is g...
Definition: stk_config.hpp:153
float ticks2Time(int ticks)
Converts a tick value (in physics time step size) into seconds.
Definition: stk_config.hpp:313
MusicInformation * m_race_neutral_music
Filename of the music to play when a player finishes anywhere in the top half of the total karts but ...
Definition: stk_config.hpp:180
uint32_t m_server_api_version
Version of the server API to use.
Definition: stk_config.hpp:253
MusicInformation * m_unlock_music
Filename of the feature unlock music to play.
Definition: stk_config.hpp:193
float m_music_credit_time
Time the music credits are displayed.
Definition: stk_config.hpp:89
std::vector< int > m_score_increase
The number of points a kart on position X has more than the next kart.
Definition: stk_config.hpp:167
int m_item_switch_ticks
Time items will be switched.
Definition: stk_config.hpp:79
float m_snb_min_adjust_length
Configurable values used in SmoothNetworkBody class.
Definition: stk_config.hpp:245
bool m_solver_split_impulse
If position and velocity constraints are solved separately.
Definition: stk_config.hpp:121
int m_max_server_version
version supported by this binary.
Definition: stk_config.hpp:141
MusicInformation * m_race_lose_music
Filename of the music to play when a player finishes in the bottom half of the total karts.
Definition: stk_config.hpp:184
float m_skid_fadeout_time
Time till skidmarks fade away.
Definition: stk_config.hpp:131
const KartProperties & getDefaultKartProperties() const
Returns the default kart properties for each kart.
Definition: stk_config.hpp:300
int m_max_moveable_objects
Maximum number of moveable objects in a track when networking is on.
Definition: stk_config.hpp:99
KartProperties * m_default_kart_properties
Default kart properties.
Definition: stk_config.hpp:54
int m_nitro_item_return_ticks
Time until a bonus box collected by a kart returns.
Definition: stk_config.hpp:71
bool m_disable_steer_while_unskid
Disable steering if skidding is stopped.
Definition: stk_config.hpp:149
int getPhysicsFPS() const
Returns the physics frame per seconds rate.
Definition: stk_config.hpp:319
float m_delay_finish_time
Delay after a race finished before the results are displayed.
Definition: stk_config.hpp:87
int m_physics_fps
Default FPS rate for physics.
Definition: stk_config.hpp:276
float m_leader_time_per_kart
Additional time to each leader interval for each additional kart.
Definition: stk_config.hpp:161
int m_min_kart_version
The minimum and maximum .kart file
Definition: stk_config.hpp:136
bool m_has_been_loaded
True if stk_config has been loaded.
Definition: stk_config.hpp:273
void load(const std::string &filename)
Loads the stk configuration file.
Definition: stk_config.cpp:97
float m_explosion_impulse_objects
Impulse of explosion on moving objects, e.g.
Definition: stk_config.hpp:83
float m_default_track_friction
Default friction for the track and any track/library object.
Definition: stk_config.hpp:112
int m_solver_iterations
Number of solver iterations.
Definition: stk_config.hpp:118
utility class used to parse XML files
Definition: xml_node.hpp:48