Post subject: Manipulation of movies/input logs through Lua
Joined: 4/16/2013
Posts: 8
I've been hacking away at the MarI/O code (quite extensively, actually), and have it working with multiple save state files. It basically creates 60 frames of a genome run during each new generation, so that every bot isn't starting at the beginning all of the time. My problem is that I don't see a lot of functionality in BizHawk's Lua interface for movie manipulation. I have a save state with an InputLog (I checked the zip), but loading this file doesn't actually tell BizHawk to keep recording the inputs. I also don't see anything in the movie functions for loading a movie or restarting the recording. I can save and stop the movie, and get a bunch of statuses, but I'm missing something here. If it's not in movie category, can I get the savestates to record and retain the input log? Do I have to roll my own logger and then splice it together when I'm ready to produce a movie? (And pray that it actually works...)
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
I think lua's meant to be used during one movie recording session. Don't start and stop it.
Masterjun
He/Him
Site Developer, Skilled player (1987)
Joined: 10/12/2010
Posts: 1185
Location: Germany
If you're on SNES, why not use lsnes. It's full of neat lua functions. (You'd have to port MarI/O over to lsnes though.) Edit: Don't get me wrong here. The reason I'm suggesting lsnes for extended lua script needs is simply because it's the emulator with the most amount of lua features you can find. (Edit2: Oh and also it supports Lua 5.3 whereas BizHawk only supports Lua 5.1)
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Joined: 4/16/2013
Posts: 8
I dunno... I figured BizHawk was the recommended emulator for most everything, and I really like the interface. I guess I'll write my own input writer. The file format doesn't seem all that hard to emulate.
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
or start a session and leave it running while loading and saving states. people do this _all the time_, its the basic ingredient of "botting". You're not doing anything completely new.
Joined: 4/16/2013
Posts: 8
Okay, good, thanks. I thought I tried that already, but loading the movie seems to work. The input log is being saved in the auto-generated savestate files. At least I can use the functions I've got to bleet out some warnings.