Skip to main content
The G-Force Limiter plugin adds realistic flight physics by damaging aircraft that exceed specified G-force limits, preventing unrealistic high-G maneuvers.

Overview

In real aviation, excessive G-forces can damage aircraft structures and incapacitate pilots. This plugin simulates that reality by monitoring G-forces and applying damage when limits are exceeded.

Configuration

Basic Settings

Configure the G-force limit in config.py:
# G Limit (abs(g) >= limit) and the player gets killed
# If you wish to turn off G Limiter, consider using some
# arbitrary value like 100
G_LIM = 4

Plugin Settings

Additional settings in plugins/over_g_damage.py:
# CONFIG
ENABLED = True  # Enable or disable the plugin
INTERVAL = 0.3  # Interval of seconds before G Limit check is enforced
The INTERVAL setting prevents spam by limiting damage application frequency to once every 0.3 seconds.

How It Works

Detection Logic

The plugin monitors every flight data packet for G-force values:
def on_receive(self, data, player, messages_to_client, *args):
    if ENABLED:
        if abs(player.aircraft.last_packet.g_value) > G_LIM:
            if time.time() - player.aircraft.last_over_g_message > INTERVAL:
                player.aircraft.last_over_g_message = time.time()
                damage_packet = FSNETCMD_GETDAMAGE.encode(player.aircraft.id,
                                                        1, 1,
                                                        player.aircraft.id,
                                                        1, 11, 0, True)
                warning_message = FSNETCMD_TEXTMESSAGE.encode(
                    f"You are exceeding the G Limit for the aircraft!, gValue = {player.aircraft.last_packet.g_value}!",
                    True
                )
                messages_to_client.append(damage_packet)
                messages_to_client.append(warning_message)
    return True

When Damage Occurs

Trigger condition:
abs(player.aircraft.last_packet.g_value) > G_LIM
Actions taken:
  1. Damage packet sent to player’s aircraft
  2. Warning message displayed to player
  3. Timestamp updated to enforce interval cooldown
G-force values are measured as absolute values, meaning both positive and negative G-forces count toward the limit. A limit of 4G means both +4G and -4G will trigger damage.

Example Configurations

Realistic Fighter Jet (Strict)

G_LIM = 4
INTERVAL = 0.3
Suitable for realistic combat servers where aircraft structural limits matter.

Arcade Mode (Relaxed)

G_LIM = 8
INTERVAL = 0.5
Allows more aggressive maneuvers while still preventing extreme abuse.

Disabled

G_LIM = 100
ENABLED = False
To disable the G-limiter, either set a very high value like 100 or set ENABLED = False in the plugin file.

Player Experience

When a player exceeds the G-limit, they see:
You are exceeding the G Limit for the aircraft!, gValue = 5.2!
And their aircraft takes continuous damage until they reduce G-forces below the limit.

Technical Details

Plugin Hook

The plugin registers on the on_flight_data hook:
def register(self, plugin_manager):
    self.plugin_manager = plugin_manager
    self.plugin_manager.register_hook('on_flight_data', self.on_receive)
This hook fires for every FSNETCMD_AIRPLANESTATE packet received from the client.

Damage Implementation

Damage is applied using the FSNETCMD_GETDAMAGE packet:
FSNETCMD_GETDAMAGE.encode(
    player.aircraft.id,  # Target aircraft
    1, 1,                # Damage source parameters
    player.aircraft.id,  # Source aircraft (self-damage)
    1, 11, 0,            # Damage type and amount
    True                 # Critical damage flag
)

Balancing Tips

Finding the Right G-Limit:
  • Monitor server logs to see typical G-values during normal flight
  • Adjust based on aircraft types in your server
  • Consider your server’s realism vs. arcade balance
  • Test with various aircraft and maneuvers
  • Works alongside Smoke on Damage for visual feedback
  • Compatible with all anti-cheat features
  • Independent of radar and chat systems

Build docs developers (and LLMs) love