[WIP] Hybrid Energy Control Plugin - Active Aero Plugin - Vehicle Radar Plugin

Nick9320

Registered
screenshots-template-2.jpg


ASMG Formula Hybrid-26 Plugin Suite for rFactor 2

We are preparing a small plugin suite designed around the upcoming Formula Hybrid-26 car by Advanced Simulation Modding Group. The goal is to make the car's active-aero and hybrid systems easier to use while keeping the actual vehicle physics inside rFactor 2.

Formula Hybrid-26 Highlights

Formula Hybrid-26 is being developed around the major technical changes of the 2026 generation:
  • A fully working electric-motor and turbo-engine combination producing an approximately 50:50 power split.
  • Native hybrid behavior inside the rFactor 2 physics system instead of imitating electric deployment through artificial engine mappings or scripted power increases, as was often necessary with older-generation solutions.
  • Driver-controlled electric motor output, battery regeneration and deployment strategies that directly affect how the car uses and recovers energy.
  • Functional front and rear active-aero elements integrated with the vehicle physics.
  • A completely overhauled internal engine sound package created to represent the character of the 2026 turbo-hybrid power units, with carefully blended acceleration samples and detailed electric and turbo layers.
The plugins described below support these systems; they do not replace the underlying vehicle physics.

New-Project-2.jpg


ASMG Active Aero

Active Aero watches rFactor 2's native DRS legality together with throttle, brake, speed and gear telemetry. When the car is inside a valid DRS zone and the driving conditions are safe, it operates both the front and rear flaps through their controls.

The system includes hysteresis, so small throttle or brake fluctuations do not repeatedly toggle the aero. If either flap closes while the car remains eligible, the plugin requests it again. A compact overlay shows DRS availability, requested state and the actual state of both flaps.

The current FH26 calibration opens the flaps above 95% throttle, below 2% brake and above 60 km/h. Once open, slightly wider thresholds are used to prevent flickering.

ASMG Energy Deployment Control

Energy Deployment Control manages the FH26 hybrid deployment through the car's native Push-to-Pass system. It reads the selected Electric Motor Map, Battery Regeneration Level and Push-to-Pass Hybrid Map from the active setup and follows changes made through the driver's assigned controls.

The four FH26 deployment strategies are:
  • Map 1 - Charging: automatic deployment disabled.
  • Map 2 - Safe: conservative race deployment with a 40% battery target.
  • Map 3 - Race: stronger deployment with a 20% battery target.
  • Map 4 - Qualifying: maximum deployment and permission to use the full battery.
Deployment also considers throttle, brake, gear, RPM, speed, battery state and regeneration level. First and second gear are excluded, while higher regeneration settings reduce deployment duration and preserve more energy.

Manual Push-to-Pass works as an additive override. A driver can activate P2P outside a recorded deployment zone without disabling map playback. The map continues running in the background; pressing P2P again removes the manual override and automatic deployment resumes from the current track position.

The dashboard displays:
  • Battery level, electric-motor output, harvesting level, deployment mode and current P2P state.
  • FH26-specific shift guidance calculated from the engine torque curve and gear ratios.
  • Fuel usage, last-lap consumption, rolling average, target consumption and projected finish delta.
  • Track Traffic table centered on the player, showing the three physically nearest cars ahead and behind—including lapped traffic—with live gaps and cached completed S1, S2 and S3 times.
Deployment Map Recording

Drivers can record their own hybrid deployment lap and replay it on following laps:
  • Shift+S starts or stops manual recording.
  • Shift+Q enables or disables map playback.
Automatic deployment is disabled while recording, leaving the driver in control of Push-to-Pass. Recordings are stored by car class and track in one shareable file containing the available P2P-map recordings:

Code:
UserData\player\Settings\ASMG_EnergyDeploymentMaps\<car-class>_<track>.map

Battery targets from the selected FH26 deployment mode still apply during playback. Recorded zones and recording mode are allowed to exceed the normal 320 km/h automatic cutoff.

ASMG Vehicle Radar

Vehicle Radar is a separate lightweight overlay. It appears only when another car is close to the player, shows surrounding vehicle positions and fades smoothly when the area becomes clear.

Why Attack Mode Is Not Included

We investigated using rFactor 2's native Attack Mode as an additional overtaking system for Formula Hybrid-26. The native implementation can select a temporary engine map and require a car to cross track-side XAttack triggers, but it cannot enforce the eligibility rule we need: activation only during a race and only when the driver is within one second of the car ahead.

The current Internals Plugin API also does not expose a reliable Attack Mode armed/active state or the native engine-mixture value. EngineMixture is available to the in-car dashboard renderer, but not to the plugin telemetry interface. A client plugin can block the Arm Attack Mode control under known conditions, but it cannot securely prevent every illegal activation or reliably cancel native Attack Mode after the trigger sequence has been completed.

For that reason, Attack Mode has been removed from the Formula Hybrid-26 physics and dashboard for this release. We do not want to advertise a competitive feature that cannot be enforced consistently or fairly.

We would be very interested in discussing better solutions with Studio 397, vehicle and circuit modders, plugin developers and league administrators. Possible directions include:
  • Exposing the native Attack Mode state to plugins.
  • Adding opponent-gap and session requirements to the vehicle physics.
  • Providing server-side Attack Mode validation.
  • Exposing track attack-zone information through the plugin API.
If you have experience with Attack Mode implementation or ideas for representing a fair, enforceable overtaking boost without interfering with the existing hybrid/P2P system, please join the discussion.

Required Controls

The plugins read the active rFactor 2
Code:
Controller.JSON
file. No native driving action is tied to our personal key layout. Drivers can choose any unused keys or buttons, but the following controls must be assigned.

Keyboard assignments strongly recommended:
  • Activate Push 2 Pass - the driver can use any device manually, but reliable automatic P2P toggling requires the plugin to reproduce the assigned input. rFactor 2 accepts a simulated keyboard press more consistently than a synthetic wheel or button-box press.
  • Front Flap - Active Aero must reproduce this control automatically when DRS conditions are satisfied.
  • Rear Flap - Active Aero must reproduce this control automatically when DRS conditions are satisfied.
The actual keyboard keys are not hardcoded. Assign any suitable keys in rFactor 2; the plugins read those assignments from
Code:
Controller.JSON

Keyboard, steering wheel, gamepad or button-box assignments supported:
  • Increment Electric Motor Map.
  • Decrement Electric Motor Map.
  • Increment Regeneration.
  • Decrement Regeneration.
  • Increment Push-to-Pass Map.
  • Decrement Push-to-Pass Map.
These controls can remain directly assigned to any device because the plugins only observe the driver's changes; they do not need to reproduce these button presses automatically.

Fixed plugin-only keyboard shortcuts:
  • Shift+S - start or stop deployment-map recording.
  • Shift+Q - enable or disable deployment-map playback.
These shortcuts are fixed because rFactor 2 has no native controls that can be assigned to the plugin-only recording functions.

Steering-wheel workaround:

If the driver wants P2P, Front Flap, Rear Flap, Shift+S or Shift+Q on the steering wheel, many high-end wheel and button-box software packages can map a physical button to a keyboard key or key combination. Assign the same keyboard input in rFactor 2. The physical button still behaves like a normal wheel control, while the game and plugin share the more reliable keyboard input path.

Known Limitations and Workarounds
  • The rFactor 2 Internals Plugin API exposes electric-motor output, but it does not expose a reliable native P2P toggle-state value or a direct partial-torque command. The plugin therefore controls the native P2P toggle and verifies deployment using motor telemetry.
  • Automatic control is most reliable when the relevant rFactor 2 action has a keyboard assignment. Some steering wheels, gamepads and button boxes may not accept a synthetic automatic press through the same path as physical device input.
  • Many high-end wheel and button-box software packages can map a steering-wheel button to a keyboard key. Assign that same key to the required action in rFactor 2 to retain wheel control while providing the plugin with the most reliable automatic-input path.
  • Manual wheel, gamepad and button-box input remains available. Manual P2P adds deployment on top of the running automatic map rather than disabling playback.
  • Map recording uses fixed Shift+S and Shift+Q keyboard shortcuts because rFactor 2 has no dedicated controls for these plugin-only actions.
  • Map values are not exposed directly in live telemetry. The plugin reads the current setup file and monitors the assigned increment/decrement controls, so unusual external setup changes may take up to approximately half a second to appear.
  • Active Aero still depends on the circuit's native rear-flap/DRS legality data. Incorrect or missing DRS zones in the track configuration cannot be repaired by the vehicle plugin.
  • Attack Mode is intentionally not included because the current native physics and plugin API cannot enforce our race-session and one-second-gap eligibility rules securely.
  • Desktop overlays work best in windowed or borderless mode. Exclusive fullscreen can place Windows overlays behind the renderer.
  • The Internals Plugin API cannot rename rFactor 2's native Push-to-Pass text or selectively suppress its chat/status messages.
  • The current deployment thresholds and shift targets are calibrated specifically for ASMG FH26. Other vehicles may load the plugin, but their behavior is not supported or guaranteed.
  • Servers and leagues should explicitly permit automated control plugins before they are used online.
This project is still being refined through real driving tests. Feedback about hardware compatibility, track behavior and usability will be very welcome.
 
Can this be used in LMP1-H mods?
Absolutely.

It will require some adjustments for LMP1-H, and the physics should be adjusted to properly use the electric motor, but it’s definitely possible. I would love to help with some hybrid cars if someone is working on it.

This particular plugin might be used only alongside with the Formula Hybrid-26 mod due to rF2 engine limitations, but it’s not gonna be hard to adjust it for another car.

I’m not sure how the mid 10’s hybrid cars works, I heard it’s enabling the AWD on the straights, that would be interesting project to do for sure with all electric motor features we have in rF2.
 
Absolutely.

It will require some adjustments for LMP1-H, and the physics should be adjusted to properly use the electric motor, but it’s definitely possible. I would love to help with some hybrid cars if someone is working on it.

This particular plugin might be used only alongside with the Formula Hybrid-26 mod due to rF2 engine limitations, but it’s not gonna be hard to adjust it for another car.

I’m not sure how the mid 10’s hybrid cars works, I heard it’s enabling the AWD on the straights, that would be interesting project to do for sure with all electric motor features we have in rF2.
Cars from the 2010s tended to use energy from the exit of corners up to the midpoint of the straights, switching to pure combustion mode at high speeds while reserving some power for overtaking. In the case of more modern cars—such as hypercars—I believe the issue could be resolved simply by linking the electric motor and internal combustion engine maps.
 
Last edited:
Guys, I don't want to take the topic off-track, but do you know if it's possible to create a system like the one on the Williams FW14B—activated on straights to gain speed by lowering the car's ride height, reducing drag, or serving any other aerodynamic function?
 
Guys, I don't want to take the topic off-track, but do you know if it's possible to create a system like the one on the Williams FW14B—activated on straights to gain speed by lowering the car's ride height, reducing drag, or serving any other aerodynamic function?
Yes that would be ideal for the active suspension model.
 
Guys, I don't want to take the topic off-track, but do you know if it's possible to create a system like the one on the Williams FW14B—activated on straights to gain speed by lowering the car's ride height, reducing drag, or serving any other aerodynamic function?
Not through the plugins for sure, it has to be somewhere in the car's physics, we couldn't manipulate the car physics through the plugins but we can control some parts of the car dynamically. As far as I know the active suspension could be simulated through the rF2 UltraChassis system, but it's not gonna be something like a computer system regulated ride height, more like the suspension model that keeps the ride height stable.
 
Not through the plugins for sure, it has to be somewhere in the car's physics, we couldn't manipulate the car physics through the plugins but we can control some parts of the car dynamically. As far as I know the active suspension could be simulated through the rF2 UltraChassis system, but it's not gonna be something like a computer system regulated ride height, more like the suspension model that keeps the ride height stable.
Actually, I just wanted to know if it is possible to create a device that reduces the car's drag on the straight via a control, like the Williams car had in 1992 and 1993.
 
Back
Top