Post subject: Character's x,y,z Coordinates
Player (196)
Joined: 4/27/2012
Posts: 109
What would be the easiest method to find the x,y,z coordinates of something, such as the character you play as?
I wumbo you wumbo he she me wumbo
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Unknown value search in the cheat function. Do an Equals search over time without moving, and either a greater-than if you're moving "forward" or a not-equals search if you don't know which way the game considers forwards or backwards or if you can't keep a consistent motion going. Once you narrow it down enough, try watching the values continuously and see how they respond to your walking around. Something like that should get you your X values. Then try looking at nearby values for possible Y candidates, or just repeat the process.
Joined: 6/7/2008
Posts: 124
Location: Portugal
Don't rely too much on standing still though. In some games, the idle animations can move the characters out of their spots a bit.
I'm Espyo from the SRB2 Forums. Current project: A Pikmin fan engine, Pikifen
ALAKTORN
He/Him
Former player
Joined: 10/19/2009
Posts: 2527
Location: Italy
a good way I use to check whether what you’ve found is what you’re looking for is freezing the value, in this case you could freeze X position in a spot so that when you tried to move you wouldn’t be able to, if you are then that address isn’t X in DeSmuME you can add cheats massively to every address in the Search list (highlight them, click Add Cheat, hold down Enter key), then you can delete the cheats in bunches until your character is able to move again, that’s another way of narrowing it down
Player (105)
Joined: 1/4/2013
Posts: 117
Location: Belgium
I was wondering something... How are you determinate DataType? I'm looking for those values (and the velocity) on a psx game and I didn't found anything for the moment. Could it be possible that those values are floating point instead of integer? What kind of datatype a playstation use for this? Word or Dword? (Byte is clearly too small) Many thanks in advance for help
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
Hâthor wrote:
I was wondering something... How are you determinate DataType? I'm looking for those values (and the velocity) on a psx game and I didn't found anything for the moment. Could it be possible that those values are floating point instead of integer? What kind of datatype a playstation use for this? Word or Dword? (Byte is clearly too small) Many thanks in advance for help
Your first guess at data type will depend on the type of game as well as the platform it's for. 8-bit consoles like the NES will use one or two bytes. 16-bit consoles like the SNES are probably using two bytes. Early 3D consoles (PS1, N64, etc) could go either way - they might be using floating points (likely 32 bit then) or 16 or 32 bit integers and still calculating position by fixed point arithmetic. If it's a 2D game, it gets more likely it's not using floating points, if it's a 3D game it gets more likely. Also, consider that angle+magnitude may be getting stored instead of x/y/zs for things like facing and velocity. Anything past the PS1 era, floating point is now very likely.
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Player (105)
Joined: 1/4/2013
Posts: 117
Location: Belgium
That's clearer now. Tanks Patashu ! :)