Post subject: Seeking Feedback: Dolphin with Python Scripting support
Felk
He/Him
Joined: 8/4/2020
Posts: 3
Hello everyone, I've spent the past few weeks getting a little side project of mine to a state where I consider it barely usable by other people, that being added Python Scripting support for the Dolphin Emulator. To get it from a barely working state to something that might eventually become stable, useful and polished, I've decided to seek people willing to play around with it and give some general feedback. Any kind is welcome, be it bug reports, unclear or missing documentation, feature requests, dismay of it being Python and not Lua, etc.. Please take a look https://github.com/Felk/dolphin The README on the GitHub page has further information. Right now it's only available for Windows x64. You can find a pre-built version on GitHub under "releases" https://github.com/Felk/dolphin/releases/tag/scripting-preview1
Discord Felk#0552
Dimon12321
He/Him
Editor, Reviewer, Experienced player (596)
Joined: 4/5/2014
Posts: 1222
Location: Romania
I'm a big fan of Dolphin, but I don't know neither LUA nor Python to use their benefits. What it can do for me? For example, I have a round crosshair and, if I keep shooting from my machine gun, it gets bigger and there is no clear pattern where exactly the next bullet will fly (aka dynamic random bullet spread). Is it possible to write a script that would track that pattern and mark on the screen where the next bullet is going to fly?
TASing is like making a film: only the best takes are shown in the final movie.
Felk
He/Him
Joined: 8/4/2020
Posts: 3
That will most likely depend on domain knowledge of the game. If there is a way to know where the bullet is going to land, e.g. by reading the rng seed from the game's memory and re-implementing the random spread algorithm to be able to simulate it ahead of time, then sure, that can be drawn on the screen for you.
Discord Felk#0552
Dimon12321
He/Him
Editor, Reviewer, Experienced player (596)
Joined: 4/5/2014
Posts: 1222
Location: Romania
Oh no, I'm too young for reverse engineering though I'm learning Java.
TASing is like making a film: only the best takes are shown in the final movie.
THC98
He/Him
Experienced player (920)
Joined: 8/7/2012
Posts: 279
Location: Brazil
Wow, this project is amazing! Well done, I really wanted to see a nice build of Dolphin with Python support. A while ago I was helping to port a Dolphin build with Lua support, which was originally made by dragonbane0. Here's my fork on that: https://github.com/Tales-Carvalho/dolphin Is there an interest to port this engine to wxWidget based Dolphin versions as well? As the latest stable revision (5.0), that's still the most used version for TASing as far as I know.
Youtube Channel | Twitch Channel • Finished projects: GC Sonic Adventure DX - Sonic | GC Sonic Adventure DX - Tails | GC Sonic Adventure 2: Battle - Hero Story | GC Sonic Heroes - Team Sonic • Current projects: GC Sonic Adventure 2: Battle - Dark Story - 1st WIP • Paused projects: GC Sonic Adventure DX - Knuckles - 1st WIP • Individual levels records: Sonic Adventure DX | Sonic Adventure 2: Battle • My Discord: Tales98#0408
Felk
He/Him
Joined: 8/4/2020
Posts: 3
Thanks! Is there anything in particular in your Lua fork that you deemed useful? One major thing I had on my todo list was an API for storing data across scripts, maybe just a "userdata"-library similar to bizhawk has it. With that I think your Lua showcase video could be replicated. I currently do not plan on backporting it to any earlier versions of dolphin, but if you leave out the UI that might not be all that hard if anyone wants to try. Are there any particular reasons beta or development builds are not used for TASing? movie file incompatibilities maybe? Or is it just because there hasn't been any official stable release since 5.0?
Discord Felk#0552
THC98
He/Him
Experienced player (920)
Joined: 8/7/2012
Posts: 279
Location: Brazil
I think something that was implemented in the Lua fork that's pretty useful is being able to load a script from a list of saved scripts, instead of looking for the file itself. This was done by keeping a folder of scripts in Dolphin's main folder, so the list would load the scripts saved in that. Furthermore, we could save files with a special formatting (in our cause, with an underscore at the start of the file) so it'd be executed automatically when we'd load a game. For storing data, what I used to do with Lua was to write a csv file with a normal file output function, built in Lua. With that, I could save data in Dolphin's folder. It wasn't the prettiest solution, but it worked. That's good to know that it probably isn't that hard to backport it to an older version, I might give it a shot soon. Most TASers that I know of, including myself, just prefer using 5.0 or older because the interface works slightly better for TASing. I myself have experienced some slowdowns in savestates with newer versions (probably due to compression/decompression), and didn't really get used to the Qt TAS input interface yet. And also, as most of the TASes of the games I play were made in older versions of Dolphin, they don't sync in the development versions, due to emulation differences.
Youtube Channel | Twitch Channel • Finished projects: GC Sonic Adventure DX - Sonic | GC Sonic Adventure DX - Tails | GC Sonic Adventure 2: Battle - Hero Story | GC Sonic Heroes - Team Sonic • Current projects: GC Sonic Adventure 2: Battle - Dark Story - 1st WIP • Paused projects: GC Sonic Adventure DX - Knuckles - 1st WIP • Individual levels records: Sonic Adventure DX | Sonic Adventure 2: Battle • My Discord: Tales98#0408