The Future of Simulation: Lua Safety and 2026 F1 ERS Logic
As the sim racing community evolves, so do the tools we use to push the boundaries of realism. Recently, custom Lua scripts have received some negative attention regarding security and stability. At Assetto Workshop, we believe transparency is the best policy. We remain confident that Lua is the future of Assetto Corsa, and we are working closely with the latest standards set by the CSP (Custom Shaders Patch) author to ensure all our scripts are safe, optimized, and hardware-friendly.
Our current focus is shifting toward one of the most significant technical shifts in motorsport: the 2026 Formula 1 Power Unit regulations.
Beyond Base Physics: The 2026 Recovery Challenge
In the current version of Assetto Corsa, the base physics engine handles ERS (Energy Recovery System) in a relatively linear way. You harvest energy during braking (MGU-K) or when lifting off the throttle, and some cars utilize the MGU-H (Heat) to recover energy from the turbocharger.
However, the 2026 regulations change everything:
- Removal of the MGU-H: The heat recovery system is being eliminated, placing the entire burden of electrical power on the MGU-K.
- Active Harvesting: The new regulations allow for energy recovery during full-throttle application in specific scenarios to ensure the battery remains charged for the increased 350kW electrical output.
Bridging the Gap with Lua
This “Full Throttle Harvesting” is something the base Assetto Corsa physics engine was never designed to handle. In the standard simulator, if you are at 100% throttle, the sim assumes you are in maximum deployment mode, not recovery mode.
To solve this, we are developing a custom ERS Logic Script. By using Lua, we can bypass the hard-coded physics limitations to:
- Simulate Variable MGU-K Drag: Allow the car to harvest energy while the driver is still on the gas, creating a more complex “power management” game for the driver.
- Adaptive Deployment Maps: Create logic that shifts power delivery based on the state of charge (SoC) more dynamically than the default “Hotlap” or “Race” presets.
- Regulation Compliance: Ensure that the power curves match the 50/50 split between internal combustion and electric power required by the 2026 FIA rules.
Our Commitment to Safety
We understand the concerns regarding custom scripts. That is why our development process involves rigorous benchmarking to ensure zero performance loss and “Sandboxed” execution. As the CSP author continues to harden the security of the platform, Assetto Workshop will be at the forefront, providing scripts that are as safe as they are revolutionary.
The 2026 era of racing is about efficiency and strategy. With our upcoming ERS rework, you won’t just be driving a car; you’ll be managing a power plant.

