Jump to content

Recommended Posts

I've been looking into writing a script to run on Desmume. I'm thinking of running it on either Platinum or one of the Gen V games. I haven't been able to find any detailed instructions for setting things up, can anyone help me out? It doesn't have to be Lua, really it should be something that "plugs in" to the emulator (fires button inputs straight into the emulator rather than using something like the Robot in Java to send keyboard and mouse events over the desktop). Also, if I wanted to look into reading the memory from the frame, how would I figure out what address and value correspond to what (ie. tiles, items, Pokemon health, player position, etc.)? 

  • Like 1

Share this post


Link to post
Share on other sites

it´s been a while since i´ve messed with lua scripting and Desmume. ok, so i´m gonna go off the assumption that you do have prior knowledge with writing scripts and Lua Scripting. So far, i´ve found this fourm post about this subject,kinda, so it might help to an extent, but if it doesn´t, let me know and i´ll just tell you how instead.

https://www.romhacking.net/forum/index.php?topic=22681.0

 

but, in the instance you are unfamiliar with Lua scripting, here is an explanation about it:

http://www.fceux.com/web/help/fceux.html?LuaScripting.html

Share this post


Link to post
Share on other sites

there is no direct API i can direct you to as i could not find anything that directly relates to what you were looking for. you could try and copy FCEUX code and see if that works, but if not, let me know and i´ll let you know what else you can try.

Share this post


Link to post
Share on other sites

Okay I'll try that out. Basically the project is a simple grinder that'll automatically train Pokemon for me. All it'll do is run in the grass and fight Pokemon (use a set move I provide beforehand) until PP runs low or it needs to be healed, where it'll use Fly to get back to the closest city, heal, and run back to continue fighting. I have a couple more features I might want to build on but that's the general idea. I was thinking Lua to give input to the emulator but either a) reading through the memory or b) analyzing the frame for text to figure out what the player needs to do. Is Lua a good option for the second part or would it be better to use another language to figure this out? I've combed through the memory files here:

https://projectpokemon.org/docs/gen-4/list-of-items-by-index-number-r23/

but I'm not sure what to be looking for. Thanks

  • Like 1

Share this post


Link to post
Share on other sites

Was just able to run a Lua script on Desmume, thanks for the previous links! Now just need to figure out how to make the project I want :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...