rFactor2Python is a plugin for rFactor that forwards plugin calls to Python scripts, passing game data as well, making the task of programming rFactor plugins much easier, specially useful for prototyping, since Python is loaded with tons of useful modules ready to use.
Some of the features and possibilities are:
- You don't have to know C++
- You don't have to compile anything
- Most of the rFactor Internals Plugin methods are exposed to Python!
- Python provides huge functionality with little work and has high quality documentation
- Multiple python plugins supported.
For example, you can easily:
- Save players timings to a database
- Create a webpage with live server status
- Send an email with results, timings, etc, when a race ends
- Interact with an Arduino
- new: Python threading is now possible (finally...but needs further testing) download
- new: Multiple plugins support! Place Python plugins inside rf2py_plugins/.
- new: Plugins are classes now! See rfactor.py.
- update: small updates here and there...
- new: CheckHWControl implemented.
- update: examples updated with CheckHWControl.
- update: fixed a crash when calling xdecref on loaded module
- update: print python version to log file
- new: mysqldb example. rfactor-mysqldb.sql contains the database structure
- new: test-score.py script. Very useful to simulate score updates and
- new: rfactor-frames.py example. The output of this script can be used
test-score.py. Example output: rfactor2python.frames.txt.tar.gz
- update: mLapDist field was missing. Added.
- Examples directory added
- Two examples added: log and serial
- rfactor.py functions are empty now. A brief description, from original
added at the top of every function.
- Telemetry updates! New function available: UpdateTelemetry. (check rfactor.py)
- Python exceptions tracebacks are now printed to log file. This helps debugging rfactor.py.
- Initial release
- Python (correct version) is the only requirement
- rfactor.py is self explanatory.
- rfactor2python_examples/ directory contains multiple plugin examples
- All attributes and functions have the same name as in Internals Plugin SDK (download from official rFactor site)
- Extract plugin zip file into rfactor root directory.
- Read rfactor.py.
- Place plugins inside rf2py_plugins/.
- If you have any issues, check rfactor2python.log file. Python exceptions are logged to this file.