A Source.Python plugin that is able to run EventScripts addons.
Most of the work is already done. The following is a list of things that need to be done.
- Add the possibility to unload the emulator.
- Do extensive testings
- Implement es.old_mexec()
- Implement es.physics('start', ...)
- Implement es.regexec()
- Implement pycmd_register
- Implement mattie_eventscripts
- Implement eventscripts_debug_showfunctions
- Implement mattie_python
On Windows you might need to install the 32bit version of Visual C++ Redistributable for Visual Studio 2015
if it missing on your system:
https://www.microsoft.com/en-US/download/details.aspx?id=48145
- Put
es_emulator
in../addons/source-python/plugins/
- Load the EventScripts Emulator with
sp plugin load es_emulator
- Put the EventScripts addon you would like to run in
../addons/source-python/plugins/es_emulator/eventscripts/
. - Run the server command
ese convert <your addon name>
to run the Python 2 to 3 converter. - Load the addon via
es_load <your addon>
.
Funny side note: You can also use the EventScripts API in Source.Python plugins.
- es.getuserid() also works with SteamID3. A possible crash has also been fixed when using handles.
I took the original EventScripts libraries from the latest release and adapted them to work with Python 3. I have also removed the example addons like mugmod
or slingshot
to keep it simple.
Unlike EventScripts this emulator also supports CS:GO. Though, es.usermsg()/es_usermsg is not supported. Use the usermsg library directly.