I want to add a mod controller and I want it to be added to all existing cars by default, I created a stub out of the esc controller, but I don't know how would I go and thell the main controller to call my modded controller
You can put it in lua/vehicle/extensions/auto Then your the code will run automatically on all cars, even modded ones You need to change some things btw For example you need to change the onInit function to onExtensionLoaded But if you want your controller to be loaded when a certain part is applied, you need to put it in lua/vehicle/controller and write something like this in the jbeam file "controller":{ ["fileName"] {"write_controller_name_here", []} }
wow thanks that was fast! is there a documentation of the extensions public interface? --edit-- nvm found this https://gist.github.com/codecat/c9315c6f4af1aeba3289196bd136a547