Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-06-29 19:03:07

jestbone89
New member
Registered: 2011-01-28
Post 3/5

[crystal] in-game trades edit

Hi there,
I would like to know how to change IV values of those pkmns you can trade in-game. Possibly with hex editor only. With one example please.
The game should contain IV data of traded pkmns according to
http://bulbapedia.bulbagarden.net/wiki/ … ame_trades

I wanna make those pkmns you can get to be shiny and I just need to find locations of those IV values for those pkmns.
Thanks for help :)

Offline

#2 2012-06-29 19:11:52

Miksy91
Member
Registered: 2010-10-16
Post 943/2,305

Re: [crystal] in-game trades edit

This is what the trade data looks like in G/S (and likely also in Crystal):
http://hax.iimarck.us/files/scriptingco … zDokTausch

Hopefully this explanation as itself is enough for you :)

Offline

#3 2012-07-01 09:35:38

jestbone89
New member
Registered: 2011-01-28
Post 5/5

Re: [crystal] in-game trades edit

Thanks, that was very helpful.
I just had to figure out that for trainer ID the first byte is 2nd and 2nd is first, then there was no problem to find those values in my goldfinger.

Example of trade bellsprout for onix in violet city:
53 1E BF
those are 1B of held item and 2B of trainer ID in hexadecimal and reversed order.
And it matched perfectly along with other stats.

Offline

#4 2012-07-01 16:16:08

473/700

Re: [crystal] in-game trades edit

jestbone89 wrote:

Thanks, that was very helpful.
I just had to figure out that for trainer ID the first byte is 2nd and 2nd is first, then there was no problem to find those values in my goldfinger.

This is one of the characteristics of the Z80 CPU used by the Game Boy: nearly all 16‐bit values are stored little‐endian (that is, smaller byte first), because that’s what the CPU natively understands.

#5 2012-07-01 22:17:43

Tauwasser
Member
Registered: 2010-10-16
Post 286/447

Re: [crystal] in-game trades edit

Actually, the Z80-GB CPU is a mixed 8/16-bit CPU. However, it does not natively understand LE or BE, so this isn't a clear-cut case as with, say, ARM-Processors. Indeed, the GB CPU does not have any load or store instructions for more than 8-bit data. However, the CPU itself does use LE format in jumps jp $nnnn; memory access ld a,[$nnnn]; ld [$nnnn], a; etc. However, since ROM/RAM access is byte-wise only, the CPU does not determine data order here.

EDIT: Actually, there is one method of accessing data in 16-bit units: The stack. One can set the SP to a location in ROM and actually will read 16-bit LE data. But IMO it can hardly be said that this determines the GB's Endianness, as it is not openly intended to be used that way.

The IMO most-likely reason for most games being LE is the fact that the development platforms were using Little Endian when cross-compiling. Also, there are some games that use BE throughout and some who mix.

cYa,

Tauwasser

Last edited by Tauwasser (2012-07-02 20:26:04)

Offline

#6 2012-08-18 18:40:51

wuzzupdude5
Member
From: Spark Haven
Registered: 2012-08-16
Post 4/36
Website

Re: [crystal] in-game trades edit

What about the location (city) for the trade? How would you know where that was to be able to change it or add new trades?

Last edited by wuzzupdude5 (2012-08-18 18:55:18)


“放慢生活的脚步,你会活得更加快乐。”
"Slow down the pace of life and you will live with even more happiness."

Offline

Board footer

Powered by FluxBB