Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#151 2015-03-11 09:36:40

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 255/450
Website

Re: [G/S] Useful Offsets Thread

where are the pointer tables for items' names

Search where the first item name (MASTER BALL) is at in the ROM and write down the starting address of the first and second item name. Calculate the two-byte pointers to these two adresses and finally search the resulting 4 bytes in the ROM. The beginning of the pointer table will most likely be the only match.

Do the same for move names.

Last edited by Crystal_ (2015-03-11 09:37:11)

Offline

#152 2015-03-11 10:57:32

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,002/3,578

Re: [G/S] Useful Offsets Thread

Crystal_ wrote:

where are the pointer tables for items' names

Search where the first item name (MASTER BALL) is at in the ROM and write down the starting address of the first and second item name. Calculate the two-byte pointers to these two adresses and finally search the resulting 4 bytes in the ROM. The beginning of the pointer table will most likely be the only match.

Do the same for move names.

Actually, there aren't pointers to each individual name, there is just a pointer to the first item and each one is just read in order from the list.

Offline

#153 2015-03-11 11:32:44

Rocket Grunt
Member
Registered: 2014-12-27
Post 48/75

Re: [G/S] Useful Offsets Thread

Mateo wrote:

Actually, there aren't pointers to each individual name, there is just a pointer to the first item and each one is just read in order from the list.

If only I had the pointers for moves and items name. But well, can just make the names of Teru-Sama one-byte long, so to extend the names of other items. Also the same for moves.

Last edited by Rocket Grunt (2015-03-11 11:57:16)


Today I won't steal Pokemon

Offline

#154 2015-03-11 12:57:56

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 256/450
Website

Re: [G/S] Useful Offsets Thread

Then it's even easier because it's just a single pointer what you have to change. The easiest thing is to set a breakpoint on read at 72:4000 (where MASTER BALL@ is in Pokemon Crystal) for item names and open your bag. This will head you to a routine that iterates through the item names list to find the item that matches the one in your bag, and then it goes to generic data copying routine to copy the name in a buffer. You'll only need to track it down a little bit to see what makes hl become 4000 initially. If you do this you'll eventually notice (see 0:33E8) that the bank number and pointer to item names is being read from a table at 0:33AB that is also shared with 3-byte pointer to other name lists, such as moves or Pokemon.
Or you can always look in the disassembly: https://github.com/xCrystal/pokecrystal … e.asm#L830

Also, make sure you don't make any name longer than 13 bytes because that's the number of bytes that the game will read by default. If you make a name longer the terminator character won't be read (see 0:33FD).

Last edited by Crystal_ (2015-03-11 13:02:06)

Offline

#155 2015-04-04 08:33:03

Rocket Grunt
Member
Registered: 2014-12-27
Post 55/75

Re: [G/S] Useful Offsets Thread

Mateo wrote:

Editing Attacks

x41AFE = Start of attack data

Format for each attack is this:

[Attack Animation] [Effect] [Base Power] [Type] [Accuracy] [PP] [00]

0x347F3 - Moves with increased critical hit ratio. List ends with 0xFF.

Actually I believe the last [00] bytes is used to determine the rate of secondary effect. For example if you look at Fire Punch, the byte will become [19] instead of [00]. Since 25/255*100%=10%, it matches exactly with the 10% burnt effect in-game. More examples are Powder Snow, Mud-Slap...

Last edited by Rocket Grunt (2015-04-05 05:26:29)


Today I won't steal Pokemon

Offline

#156 2015-04-04 11:19:06

Miksy91
Member
Registered: 2010-10-16
Post 2,165/2,339

Re: [G/S] Useful Offsets Thread

Rocket Grunt wrote:
Mateo wrote:

Editing Attacks

x41AFE = Start of attack data

Format for each attack is this:

[Attack Animation] [Effect] [Base Power] [Type] [Accuracy] [PP] [00]

0x347F3 - Moves with increased critical hit ratio. List ends with 0xFF.

Actually I believe the last [00] bytes is used to determine the rate of secondary effect. For example if you look at Fire Punch, the byte will become [19] instead of [00]. Since 19/255=10, it matches exactly with the 10% burnt effect in-game. More examples are Powder Snow, Mud-Slap...

Makes also sense because the format is fixed-length, and therefore, there is no need for any kind of byte at the end of the structure for telling that the information for this attack ends here.

Offline

#157 2016-06-05 12:49:43

Adam
Member
Registered: 2016-05-07
Post 25/93

Re: [G/S] Useful Offsets Thread

This has been a massive help, although the Attack Animation causes a problem with any new moves. If the animation is for a move with a different typing, it will display that typing in the battle menu. HOWEVER, the move description (when you select "Move" in the Pokemon menu) will display the typing as defined in [type].

Quite strange that the game pulls the animation typing during battle to display, even though the actual move has the effectiveness of the correct typing. Especially as it shows the correct typing outside of battle! Oh well.

Offline

#158 2016-08-06 13:44:06

UberMedic7
Member
From: Greece
Registered: 2013-07-25
Post 33/74

Re: [G/S] Useful Offsets Thread

Im not sure if my question fits here but i'll give it a shot, is there a way to change types in crystal (rom) from physical to special or in reverse, and if so what values do i change and where? Ghost being physical is bad and i wanna change that.

Last edited by UberMedic7 (2016-08-06 13:44:36)

Offline

Board footer

Powered by FluxBB