Post subject: really basic help
Joined: 6/14/2015
Posts: 19
Please forgive this REALLY NOOB question. But the first bunch of search hits (Bing,google) point me here so I'll ask. How do I use LUA scripting with Bizhawk? I read this: http://tasvideos.org/LuaScripting.html but it's more of a manual and unfortunately I could not find a REALLY BASIC tut on youtube. I downloaded bizhawk and got it to run with a bunch of roms. I also got LUA running and have written some basic LUA scripts, but nothing that runs *inside* of another program or game. So for example I put the Super Mario World ROM inside the SNES folder in the bizhawk folder. I start EmuHawk and I go to Tools>LUA console. I open the script in the folder Bizhawk>LUA>SNES named super mario world. I get an error in the output window Error: NullHawk does not implement memory domains Unable to find domain: CARTROM Error: NullHawk does not implement memory domains LuaInterface.LuaScriptException: 148 OK so I forgot to start the game. I start it and it's running nicely (music too!) Now I reload the script and it's state is active. I'm still at the opening mario screen. Maybe I have to start the game? I hit return three times and there is Mario standing in front of his house. The L and R keys move him. The Z key selects my choice. He is STILL standing there - in a garden but now I see a little blue box around him. I would like to understand what the script is doing but of course it is 245 lines long. In the script are a bunch of what look like local variables being assigned memory addresses? 6 character hex digits. Then memory.usememorydomain("CARTROM") Then a bunch of local functions are defined mario() projectiles() objects() invulns() then the main loop while true do mario() objects() invulns() projectiles() emu.frameadvance() end So basically this script draws a box around the active objects in this game?
Post subject: Re: really basic help
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3599)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
skypickle wrote:
So basically this script draws a box around the active objects in this game?
Tip: It would be helpful to mention the script you are talking about (if it came with bizhawk, or pastebin it if it is something else) It sounds like you opened a hitbox script. And yes, that's all it does. Also, it sounds like you got the hang of things just fine.
It's hard to look this good. My TAS projects
Joined: 6/14/2015
Posts: 19
thank you for a prompt reply. Yes, it is one of the scripts that came with bizhawk.
Invariel
He/Him
Editor, Site Developer, Player (169)
Joined: 8/11/2011
Posts: 539
Location: Toronto, Ontario
But... which script? Filename? That will help people help you more effectively. :)
I am still the wizard that did it. "On my business card, I am a corporate president. In my mind, I am a game developer. But in my heart, I am a gamer." -- Satoru Iwata <scrimpy> at least I now know where every map, energy and save room in this game is
Amaraticando
It/Its
Editor, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
This is Pasky13's script Super Mario World.lua, that comes with BizHawk. It only shows the hitbox of Mario vs Sprites and Mario vs some extended sprites. That is, ideally, if some rectangle goes onto another rectangle, then there's contact. For a more suitable script for TASing in BizHawk, try my script (though it is pretty good for lsnes and Snes9x, I haven't updated BizHawk's script, because people didn't seem to use it).
Joined: 6/14/2015
Posts: 19
yes, Pasky13's script. And i also got Amaraticando's script working. But cannot get MarIO to run. see my post in that thread.