juju2143 / twitchplaysbot

Simple reimplementation of the Twitch Plays Pokémon bot
GNU General Public License v2.0
2 stars 1 forks source link

I'm trying to run this with BizHawk. #1

Open zmarotrix opened 6 years ago

zmarotrix commented 6 years ago

Bizhawk DOES natively support Lua, however, if I run it without the LuaSocket, it fails to find needed files. If I run it WITH LuaSocks, it gives me this error;

"NLua.Exceptions.LuaScriptException: [string "main"]:1: loop or previous error loading module 'irc'"

Any ideas?

juju2143 commented 6 years ago

I don't know really how BizHawk's Lua works, but this is definitely something to investigate. From what I see from the API, it should probably work, I should check if I can reproduce it. Until then:

  1. Did you edit the settings.lua file and renamed it?
  2. Are you running ircbot.lua with irc.lua, settings.lua and the LuaSocket files in the same folder as instructed in the readme?
  3. Is there any other error lines?
  4. Operating system and BizHawk versions?
zmarotrix commented 6 years ago

No other error lines, Everything is in the same folder and settings has been renamed.

one thing I noticed for Bizhawk, is your joypad.set needs to be reversed. (joypad.set(input, null) rather than (1, input) )

zmarotrix commented 6 years ago

How are you running it? Because I'm using Bizhawks build in Lua script feature.

juju2143 commented 6 years ago

Been a while I used this software, I don't quite remember, but back then I used it with FCEUX and Snes9x-rr and it was working well.

juju2143 commented 6 years ago

The Lua API may or may not be exactly the same in BizHawk as these emulators, plus there's compiled Lua libraries in there I'm not sure it would work too. Might want to talk with the devs at TASVideos on their IRC or forums if possible.

zmarotrix commented 6 years ago

So I get a different error if it's the 1st time running the xcript after opening the emulator.

NLua.Exceptions.LuaScriptException: error loading module 'socket.core' from file '.\socket\core.dll': dynamic libraries not enabled; check your Lua installation

Guess I need to update my Lua installation?