Kalashnikov Posted February 4, 2012 Posted February 4, 2012 That part of data is not documented, so how exactly the date is stored? And why is it 3 bytes long? When all bytes are set to 0 it appears as 1 January of 2000, which also makes no sense. Same for location, though I only need to know how to set to something which makes sense for all pokemon.
Delta Blast Burn Posted February 5, 2012 Posted February 5, 2012 Date is number of seconds since that day, location is the location id, i.e. g4 pal park would be 0x55
Kalashnikov Posted February 5, 2012 Author Posted February 5, 2012 But why how exactly is it stored in 3 bytes? That's what I'm trying (javascript): var seconds = ((new Date()).getTime() - (new Date('January 1, 2000 00:00:00')).getTime()) / 1000; var date = new Uint8Array(a, 0x7B, 3); date[2] = seconds >> 0 & 0xFF; date[1] = seconds >> 8 & 0xFF; date[0] = seconds >> 16 & 0xFF; Or, if the date is 111111111111111111111111 I write it this way: 0x7B 11111111 0x7C 11111111 0x7D 11111111 But according to Pokesav today is 14 of thirteenth month, 2193...
Delta Blast Burn Posted February 6, 2012 Posted February 6, 2012 it's stored little endian, so basically reverse the order of the bytes
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