VersaceBot Posted October 27, 2019 Share Posted October 27, 2019 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.)? 1 Link to comment Share on other sites More sharing options...
VeteranJaimeYT Posted October 28, 2019 Share Posted October 28, 2019 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 Link to comment Share on other sites More sharing options...
VersaceBot Posted October 29, 2019 Author Share Posted October 29, 2019 Thanks! Is there an API you can point me to? Or should I try and copy FCEUX code? 1 Link to comment Share on other sites More sharing options...
VeteranJaimeYT Posted October 29, 2019 Share Posted October 29, 2019 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. Link to comment Share on other sites More sharing options...
VersaceBot Posted October 30, 2019 Author Share Posted October 30, 2019 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 1 Link to comment Share on other sites More sharing options...
VersaceBot Posted November 1, 2019 Author Share Posted November 1, 2019 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 Link to comment Share on other sites More sharing options...
VersaceBot Posted December 26, 2019 Author Share Posted December 26, 2019 Finished the project, I posted the results in NDS Discussion and Help! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now