New feature: Lua scripting, like other emulators. Provide functions to read/write game memory, display graphics on screen, poll input, control emulator, etc. (Not Lutro! Scripts running alongside another game.)
Lua 5.3 (or 5.4 if it comes out soon) might be an ideal candidate since it has actual bitwise operators.
@leiradel did some work on his Cheevos Hunter. Would be neat to see it revitalised.
In ChaiLove, when enabled, there's an in-game debug console that runs ChaiScript. Pretty fun to mess with in-game variables.
Tagging @leiradel and @celerizer here as well.
This is being planned here. Feedback very much appreciated.
Totally waiting for this!
I'm running a project that would replace all the individual emulators with this one, once this scripting part is implemented properly!
Is there any update on this?
We're looking into pseudo-multiplayer lua scripts for randomizers that work with other emulators already, but having retroarch support lua would make these a lot more accessible.
Yep, same here.
Since it was bumped let me chime in as well. It's a great way to do some simple modifications without having to deal with the usual dev tools. And unlike BizHawk which is always gonna be Windows-only, it'd be a multiplatform opening for Lua-based hacks.
Currently I'm controlling FCEUX using lua scripting.
(See this issue for details - https://github.com/TASVideos/fceux/issues/22)
Since RetroArch is cross-platform it will be an worthwhile addition to provide lua scripting support (and basic listener scripts) to control it.
Is LUA scripting available in RA 1.7.7 ? What is the folder name that stores the plugins?
I would love to see an hiscore plugin like MAME has (for games that do not save hiscores natively).
I stumbled across this issue while trying to research whether retroarch can be scripted at all. Because of the recently added Narrator feature, it would be a great platform to make games more accessible for players with disabilities. For an example how useful this would be, see Pokemon Crystal Access which takes advantage f lua scripting in a VBA fork to not only speak any displayed text automatically and what menu items are highlighted, but also assist in walking around the map.
Given the number of supported platforms, I will pitch in for a more simple solution: perhaps expose some sort of API that is agnostic to any programming language? REST or somesuch?
Given the number of supported platforms, I will pitch in for a more simple solution: perhaps expose some sort of API that is agnostic to any programming language? REST or somesuch?
REST or any other network protocol would be too slow for many scripting applications. This issue is to embed Lua in RetroArch.
As alternative the next RA release will have some new network commands for scripting purposes (see my recent PRs: https://github.com/libretro/RetroArch/pull/10073 and https://github.com/libretro/RetroArch/pull/10095).
If you want an easy start check my python wrapper here.
As alternative the next RA release will have some new network commands for scripting purposes (see my recent PRs: #10073 and #10095).
If you want an easy start check my python wrapper here.
Very cool - can some events/callbacks be added somehow? As in, when something happens, retroarch tries to connect back to a given IP / port (as per your protocol) via UDP and deliver a packet describing the event?
that is much more complicated to do in pure C, but nothing is stopping you to make a thread in your script that polls the GET_STATUS command, see also the old python wrapper using piping+threads.
@eadmaster I am using the following mechanism to announce netplay players joining the game: http://grimore.org/retroarch/announcing_netplay_activity_using_iot and mention them with Amazon Alexa (node-red is the glue). It does not seem along the lines of the OP request, or rather a subset thereof, but an example for what I mentioned concerning callbacks/events.
running RA in verbose mode and parsing the log via a thread is the only way to go currently, this old python wrapper has all the logic for that.
If the event you want to catch is not logged adding it should be trivial, but please open another issue for that.
Only reason im using fightcade for training is that I can load training modes and combos. I prefer features like the extensive CRT library though.
Most helpful comment
As alternative the next RA release will have some new network commands for scripting purposes (see my recent PRs: https://github.com/libretro/RetroArch/pull/10073 and https://github.com/libretro/RetroArch/pull/10095).
If you want an easy start check my python wrapper here.