Skip to content

Plugin Core

Silorak edited this page Aug 24, 2025 · 1 revision

The TF2Dodgeball.sp file is the heart of the entire gamemode. It manages all core logic, including rocket spawning, physics, targeting, and player interactions. All other modules hook into this core plugin to add or modify its functionality.

Core Features

  • Rocket Management: Handles the creation, destruction, and tracking of up to 100 simultaneous rockets.
  • Physics & Targeting: Manages two types of rocket homing behaviors (homing and legacy homing), speed, turning rates, and target acquisition.
  • Player Interaction: Detects rocket deflections, steals, and kills.
  • Event System: Provides forwards that other plugins can hook into (e.g., TFDB_OnRocketCreated, TFDB_OnRocketDeflect).
  • Configuration Loading: Parses general.cfg and map-specific .cfg files to define the gamemode's behavior.

Cvars

These are the console variables that control the core mechanics of the plugin.

  • tf_dodgeball_enabled (Default: 1): Globally enables or disables the Dodgeball gamemode on maps with the tfdb_ prefix.
  • tf_dodgeball_enablecfg (Default: sourcemod/dodgeball_enable.cfg): Path to a config file executed when Dodgeball mode is enabled.
  • tf_dodgeball_disablecfg (Default: sourcemod/dodgeball_disable.cfg): Path to a config file executed when Dodgeball mode is disabled.
  • tf_dodgeball_sp_number (Default: 3): The number of times a player can "steal" a rocket from another player before being slain.
  • tf_dodgeball_sp_damage (Default: 0): If 1, reduces all damage from stolen rockets.
  • tf_dodgeball_sp_distance (Default: 48.0): The maximum distance between players for a rocket steal to register.
  • tf_dodgeball_delay_prevention (Default: 1): If 1, enables a system to prevent players from indefinitely delaying a rocket.
  • tf_dodgeball_dp_time (Default: 5): Time in seconds before the delay prevention system activates on a rocket.
  • tf_dodgeball_dp_speedup (Default: 100): How much speed (in Hammer Units) the rocket gains per second when being delayed.
  • tf_dodgeball_redirect_damage (Default: 1): If 1, reduces all damage from a rocket that has lost its target and is redirecting.
  • tf_dodgeball_sp_message (Default: 1): If 1, displays chat messages related to rocket stealing.
  • tf_dodgeball_dp_message (Default: 1): If 1, displays chat messages when delay prevention is activated.
  • tf_dodgeball_bounce_force_angle (Default: 45.0): The minimum downward angle a player must look to trigger a forced bounce on deflect.
  • tf_dodgeball_bounce_force_scale (Default: 1.5): A multiplier for how much stronger a player-forced bounce is.
Clone this wiki locally