GameManager/GameSettings.cs
/// <summary>
/// Server-configurable settings for FP4. Properties marked with ConVarFlags.GameSetting
/// appear automatically in the s&box lobby/server settings panel.
/// </summary>
public static class GameSettings
{
/// <summary>How many bots to spawn at game start.</summary>
[ConVar( "fp4.bots.count", ConVarFlags.Replicated | ConVarFlags.GameSetting | ConVarFlags.Saved )]
[Range( 0, 16 ), Step( 1 ), Group( "Bots" ), Title( "Bot Count" )]
public static int BotCount { get; set; } = 4;
/// <summary>Preset difficulty for bot behavior tuning.</summary>
[ConVar( "fp4.bots.skill", ConVarFlags.Replicated | ConVarFlags.GameSetting | ConVarFlags.Saved )]
[Group( "Bots" ), Title( "Bot Skill" ), DefaultValue( FPBotSkill.Normal )]
public static FPBotSkill BotSkill { get; set; } = FPBotSkill.Normal;
[ConVar( "fp4.gamemode", ConVarFlags.Replicated | ConVarFlags.GameSetting | ConVarFlags.Saved )]
[Group( "Gameplay" ), Title( "Gamemode" ), DefaultValue( FPGameMode.Deathmatch )]
public static FPGameMode Gamemode { get; set; } = FPGameMode.Deathmatch;
/// <summary>Points required to win the match. Set to 0 to disable score limit.</summary>
[ConVar( "fp4.match.score_limit", ConVarFlags.Replicated | ConVarFlags.GameSetting | ConVarFlags.Saved )]
[Group( "Gameplay" ), Title( "Score Limit" ), Range( 0, 500 ), Step( 5 )]
public static int MatchScoreLimit { get; set; } = 100;
/// <summary>Match time limit in minutes. Set to 0 to disable time limit.</summary>
[ConVar( "fp4.match.time_limit", ConVarFlags.Replicated | ConVarFlags.GameSetting | ConVarFlags.Saved )]
[Group( "Gameplay" ), Title( "Time Limit (min)" ), Range( 0, 60 ), Step( 1 )]
public static int MatchTimeLimitMinutes { get; set; } = 10;
/// <summary>Seconds to show winner before auto-restarting the match.</summary>
[ConVar( "fp4.match.restart_delay", ConVarFlags.Replicated | ConVarFlags.GameSetting | ConVarFlags.Saved )]
[Group( "Gameplay" ), Title( "Restart Delay (s)" ), Range( 3, 30 ), Step( 1 )]
public static int MatchRestartDelaySeconds { get; set; } = 8;
}
public enum FPGameMode
{
[Title( "Deathmatch" )]
Deathmatch,
[Title( "Instagib" )]
Instagib
}
public enum FPBotSkill
{
[Title( "Easy" )]
Easy,
[Title( "Normal" )]
Normal,
[Title( "Hard" )]
Hard
}