Jump to content

Recommended Posts

Posted

I found a Pokemon Diamond/Pearl LUA script for X/Y co-ordinates (this one, to be precise) but it no longer works on Desmume anymore because the numbers will not change correctly (Being in Twinleaf town and having X 0 Y 140 when it should be X 115 Y 880). Can I get an updated version that will work, as well as have Z-axis support as well?

Posted
while true do
gui.text(1,184, string.format("Map: %d, X: %d, Y: %d, Z: %d", memory.readword(0x0226E750), memory.readword(0x0226E758,2), memory.readword(0x0226E75C), memory.readword(0x021CEF76)))
emu.frameadvance()
end

Thanks. But for some reason, it still refuses to work. When I stand in front of the Rival's house, it tells me I'm on map 876, X 414 Y 0 Z 1 when it should Map 410, X should be in the 100s, and Y should be in the 800s (knowing this from my scripting work on my hack). Why does Desmume hate me? Oddly, HGSS position LUA scripts work fine. And to boot, those values change randomly. In this example, Map turned into my Y co-ordinate. But I can't get them to work correctly.

incorrectpositioning.png

-Taken using a clean rom

Posted
save game, save state

open pokesav, get coordinates

ram search the hex values of the coordinates (4 hex long)

eliminate by moving and resaving, etc. Change the memory locations to reflect the correct location.

Ok. I'll try that. More than likely fail, but try.

Edit: Thanks for telling me that. I got it to register correctly and now it is far more accurate. Thanks.

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...