PDA

View Full Version : [Tutorial] Pokepal17's tut no.1 - Resizing Overworlds


Pokepal17
March 28th, 2009, 07:43 AM
In this tutorial, I will teach you how to resize an overworld sprite.

Requirements:
:pokeball:Overworld Editor RE
:pokeball:A Hex Editor (I’m Hex Workshop)
:pokeball:A ROM (I’m using Fire Red BPRE)
:pokeball:An Emulator (I’m using VBA)

Okay now first of all load up your ROM and find the overworld that you want to resize. In my case I will be resizing the fallen old man from Viridian City.
First enable Expert Mode by pressing Crtl + M. Now look at the data. The info 1 sprite header is the main data of the overworld and the info 2 sprite header is the data of the particular overworld frame.

http://img407.imageshack.us/img407/6455/ow1.png (http://img407.imageshack.us/my.php?image=ow1.png)


Let’s look at this in a hex editor. My way of finding the hex data is by searching for the reversed sprite pointer.
So I would do this:
083A0A70 ---> 700A3A08
And when we search it we get a result. Now we find the beginning of the data by going back until we come to FFFF.

http://img403.imageshack.us/img403/4350/ow2.png (http://img403.imageshack.us/my.php?image=ow2.png)

Now I will explain what each bit of data is:

FFFF – Starter bytes
04 – Palette Index
11 FF 11 – Unknown data 1
0002 – The data size (the number of bytes the sprite takes, reversed)
20 – Width (hex)
00 – Unknown byte 1
20 – Height (hex)
00 - Unknown byte 1
14 01 0000 - Unknown data 2
18 37 3A 08 – Unknown pointer 1 (reversed)
F0 37 3A 08 – Unknown pointer 2 (reversed)
68 33 3A 08 – Unknown pointer 3 (reversed)
70 0A 3A 08 – Sprite Pointer (reversed)
FC 1C 23 08 – Unknown pointer 4 (reversed)

And there is the layout

You will need to find a sprite which has equivalent dimensions to the new dimensions of the overworld you’re resizing. Now I will be resizing my sprite to 64 x 64. So what I need to do is find another 64x64 sprite (the speedboat) in overwold editor.


http://img403.imageshack.us/img403/5536/ow3.png (http://img403.imageshack.us/my.php?image=ow3.png)

Now first of all edit the data size to equal the one of the sprite you just looked up in overworld editor. So I will need to change it to 00 08 because that’s the data size reversed.

Next change the dimensions to what you want them to be, I’m having 64 x 64 so I’ll change the length and width bytes to 40 (coz that’s 64 in hex).


http://img403.imageshack.us/img403/6761/ow4.png (http://img403.imageshack.us/my.php?image=ow4.png)

Now for the important bit, change the unknown pointers 1 and 2 to the ones of the sprite you looked up in overworld editor. This will determine how the sprite appears in game. If you don’t change them, then the overworld won’t look right in-game.

So what I’ll do is:
18 37 3A 08 --> 20 37 3A 08
F0 37 3A 08 --> D0 37 3A 08

So for me I change

http://img403.imageshack.us/img403/6798/ow5.png (http://img403.imageshack.us/my.php?image=ow5.png)


to


http://img403.imageshack.us/img403/3811/ow6.png (http://img403.imageshack.us/my.php?image=ow6.png)

Save and look at the resized sprite in overworld editor. You’ll see that the frames have joined, so they need repointing.


http://img403.imageshack.us/img403/5606/ow7.png (http://img403.imageshack.us/my.php?image=ow7.png)

Now follow the sprite pointer and you will come to the pointers of the frames (sprite pointer info 2). Find out how may frames your sprite has and repoint the first (number of frames) pointers to a clean offsets. For the offsets, just find some FF in your hex editor and reverse the offset and replace the first pointer with it. Now to tell how much space you’ll need for each frame, convert the unreversed new data size into decimal.

So I get 0800 ---> 2048

So I’ll need 2048 bytes for each frame. So I repoint the frames to new offsets with enough space. I’m going to repoint to the offset 71A23C for my first frame so I reverse it and get 3C A2 71 08

After each frame pointer there is the old data size for the frame; replace it with the new one (in my case 00 80.)

Since all my frames are going to have the same images I’m repointing the frames to one offset but you’ll need to repoint to more offsets if you have a different image on each frame.

http://img403.imageshack.us/img403/2712/ow8.png (http://img403.imageshack.us/my.php?image=ow8.png)


Now save and go back to the resized overworld in overworld editor. If all went well, the frame will be the last colour in the palette.


http://img403.imageshack.us/img403/7612/ow9.png (http://img403.imageshack.us/my.php?image=ow9.png)

Now make your new overworlds.

http://img403.imageshack.us/img403/658/ow10.png (http://img403.imageshack.us/my.php?image=ow10.png)


Test it ingame and it should be fine.


http://img300.imageshack.us/img300/2416/1636pokemonfireredversi.png (http://img300.imageshack.us/my.php?image=1636pokemonfireredversi.png)

Credits to HackMew for the overworld editor readme file, Darthatron for his advanced overworld spriting tutorial and to Peyi for his tutorial on WAH.

Copyright 2009 Pokepal17

Matteron (96)
March 29th, 2009, 08:04 AM
U no there i programs to do this right?

Pokepal17
March 29th, 2009, 09:16 AM
U no there i programs to do this right?
Yep and programs can screw up ROMs. Besides this way shows people how to do it for themselves and not depend on a program.

The only program that I know that can do this can also screw up a ROM. And this is more practical :P

machomuu
March 29th, 2009, 09:20 AM
Yep and programs can screw up ROMs. Besides this way shows people how to do it for themselves and not depend on a program.

The only program that I know that can do this can also screw up a ROM. And this is more practical :P
By "only program" do you mean the overworld changer?

Pokepal17
March 29th, 2009, 09:26 AM
By "only program" do you mean the overworld changer?

Yeah, I think that's it. I heard it messes up ROMs

machomuu
March 29th, 2009, 12:14 PM
Yeah, I think that's it. I heard it messes up ROMs
So...you've never tried it?

Pokepal17
March 29th, 2009, 01:03 PM
So...you've never tried it?
I once tried it and it worked okay, so if you want to use it then fine, but if you want some more understanding of overworld sprites and you would like to know how to do it manually then that's what this guide is for :P

Besides, I like to do as much practical hacking as possible :)

machomuu
March 29th, 2009, 01:27 PM
I once tried it and it worked okay, so if you want to use it then fine, but if you want some more understanding of overworld sprites and you would like to know how to do it manually then that's what this guide is for :P

Besides, I like to do as much practical hacking as possible :)
Now that's the sign of a good worker!

destinedjagold
April 8th, 2009, 06:00 AM
Have mercy to those who have a slow internet connection... T_T
make the screenshots smaller and easier to be uploaded...

Pokepal17
April 8th, 2009, 06:40 AM
Have mercy to those who have a slow internet connection... T_T
make the screenshots smaller and easier to be uploaded...

Okay :P The screenshots will be made smaller and hopefully that should fix your problem :P It's annoying having slow internet. ¬_¬

mat1554
August 7th, 2009, 07:35 AM
Hi,
I have a question for you, do you give me autorization to translate your tutorial in french for my forum please ? I you want, can you answer me by MP please.

Thank you !
Mat1554

SharpPoint
August 7th, 2009, 09:27 AM
Hi,
I have a question for you, do you give me autorization to translate your tutorial in french for my forum please ? I you want, can you answer me by MP please.

Thank you !
Mat1554

Well, I like that he actually asks for permission first. Most people would just go translate it without permission. This is the internet nowadays.

mat1554
August 8th, 2009, 03:01 PM
xD I my head if you translate tuto without permission, it's thief the project and work that people who had make.
(sorry my english is not very good xD)

Pokepal17
August 8th, 2009, 03:52 PM
xD I my head if you translate tuto without permission, it's thief the project and work that people who had make.
(sorry my english is not very good xD)

Well said, Also, while translating it, please credit the people I credited in the tutorial.

mat1554
August 8th, 2009, 06:06 PM
Yeah, when I translate in title tuto

Tuto name
Author
Credit Author
Tranlate By : me xD

Thanks you so much for you're permission

Sarcastic Prince
August 9th, 2009, 05:37 AM
Yep and programs can screw up ROMs. Besides this way shows people how to do it for themselves and not depend on a program.



Actually, that Program doesn't screw up the Rom. I've used that Program bunches of times in a "so called unstable rom", a Emerald Rom. Well, I do depend things on programs, most of the Time unless I have to insert OW's from a sheet in a Emerald Rom.

Pokepal17
August 10th, 2009, 06:39 AM
Actually, that Program doesn't screw up the Rom. I've used that Program bunches of times in a "so called unstable rom", a Emerald Rom. Well, I do depend things on programs, most of the Time unless I have to insert OW's from a sheet in a Emerald Rom.

I see. Well using programs is fine IMO, but this is a method using mainly a hex editor.

Satoshi Ookami
August 12th, 2009, 02:15 AM
This is cool tutorial but I have a huge problem...
After I repoint the frames and the black 64x64 square in OWE appear I import some bitmap (I used Giratina and Rayquaza) but in game it's just blank space... but for some reason in A-Map the OW appear...

Pokepal17
August 12th, 2009, 10:12 AM
This is cool tutorial but I have a huge problem...
After I repoint the frames and the black 64x64 square in OWE appear I import some bitmap (I used Giratina and Rayquaza) but in game it's just blank space... but for some reason in A-Map the OW appear...

Check, the sprites pointers and compare it to the ones I used. Sometimes, the wrong pointers makes it appear wrong in game.

Satoshi Ookami
August 12th, 2009, 11:20 PM
Check, the sprites pointers and compare it to the ones I used. Sometimes, the wrong pointers makes it appear wrong in game.
I wasn't resizing the Old Man
I was doing the biker...
And the problem is also that I can't do it with Overworld Changer...

Pokepal17
August 13th, 2009, 02:38 PM
I wasn't resizing the Old Man
I was doing the biker...
And the problem is also that I can't do it with Overworld Changer...

Well the pointers for unknown 1 and 2 were for 64x64 OW sprites. So if you were resizing the biker to 64x64 you should have made the same alterations as I did in the tutorial.

Satoshi Ookami
August 13th, 2009, 11:20 PM
Well the pointers for unknown 1 and 2 were for 64x64 OW sprites. So if you were resizing the biker to 64x64 you should have made the same alterations as I did in the tutorial.
Yeah I think I wrote those correctly...
I'll try it again and if not can I send ya the ROM so ya can check it?

Robert Conley
August 18th, 2009, 12:51 PM
I tried following this to change the may ow in FR and when i search in the hex editor it says it cant find the pointer.

The sprite pointer is 083A0470 and I search for 70043A08 which seems to match what you did but it still doesnt find it. But when I copy/paste what you did it finds the old man.

TehBazzard
August 28th, 2009, 05:05 PM
I tried following this to change the may ow in FR and when i search in the hex editor it says it cant find the pointer.

The sprite pointer is 083A0470 and I search for 70043A08 which seems to match what you did but it still doesnt find it. But when I copy/paste what you did it finds the old man.
I am having the same problem too.
I am changing Deoxys's Defense Form OW sprite, which the pointer is 08930328. I looked for 28039308 and nothing came up.
EDIT:Never mind I fixed it. I used the wrong pointer, its in Info1:Sprite Header.
EDIT2:Ok how did you find the offset of 71A23C? I would like to know so I can do it myself. I have no idea how you got to that offset so I can't continue.

Pokepal17
August 28th, 2009, 06:00 PM
I am having the same problem too.
I am changing Deoxys's Defense Form OW sprite, which the pointer is 08930328. I looked for 28039308 and nothing came up.
EDIT:Never mind I fixed it. I used the wrong pointer, its in Info1:Sprite Header.
EDIT2:Ok how did you find the offset of 71A23C? I would like to know so I can do it myself. I have no idea how you got to that offset so I can't continue.


Use FSF and search for the data size converted into decimal. Or do the same with a hex editor.

TehBazzard
August 28th, 2009, 06:02 PM
Use FSF and search for the data size converted into decimal. Or do the same with a hex editor.
Free Space Byte:FF
Needed Bytes:2048
Skip Interval:16
Dec:2048
Hex:800
Search from the beginning of the Rom
Should I search for it like that? Because I get 3C9DB8, and even when I search for that in Hex Workshop, it can't find it.

Pokepal17
August 28th, 2009, 06:07 PM
Free Space Byte:FF
Needed Bytes:2048
Skip Interval:16
Dec:2048
Hex:800
Search from the beginning of the Rom
Should I search for it like that? Because I get 3C9DB8, and even when I search for that in Hex Workshop, it can't find it.

Serach after 0x700000 because sometimes FF isn't free space.

TehBazzard
August 28th, 2009, 06:11 PM
Serach after 0x700000 because sometimes FF isn't free space.
I got 71EC00, but even then, a search in Hex Workshop can't find it. What is my problem?

Pokepal17
August 28th, 2009, 07:27 PM
I got 71EC00, but even then, a search in Hex Workshop can't find it. What is my problem?

Hex workshop searches bytes, not offsets, use the goto opton to goto an offset.

TehBazzard
August 28th, 2009, 08:18 PM
Hex workshop searches bytes, not offsets, use the goto opton to goto an offset.
Well I am there.
I also have tryed to insert my hex. But I get this error in Overworld Editor:
Error 63 (Bad Record Number) in procedure LoadSpriteStructure of frmOverworldEditor.
What did I do wrong?

Pokepal17
August 29th, 2009, 06:36 AM
Well I am there.
I also have tryed to insert my hex. But I get this error in Overworld Editor:
Error 63 (Bad Record Number) in procedure LoadSpriteStructure of frmOverworldEditor.
What did I do wrong?

I don't know, I never got that error. Sorry.

Cello
September 5th, 2009, 07:37 PM
This is interesting. Thanks for this, I'm interested into looking into what else I could change.

Would you happen to know of any variables tangled up in the hex to change the sprite frame count?
I was hoping to add more frames so I can have gym leaders walk.

Pokepal17
September 6th, 2009, 05:18 AM
This is interesting. Thanks for this, I'm interested into looking into what else I could change.

Would you happen to know of any variables tangled up in the hex to change the sprite frame count?
I was hoping to add more frames so I can have gym leaders walk.

Unfortunately not. I had a little experiment and it seems that the number of frams dpeneds on the OW slot so if I took the player data and pasted that ocer the policeman data, the player would only have 8 frames instead of the full 20.

Cello
September 6th, 2009, 05:42 AM
Unfortunately not. I had a little experiment and it seems that the number of frams dpeneds on the OW slot so if I took the player data and pasted that ocer the policeman data, the player would only have 8 frames instead of the full 20.

Oh, I see. Oh well.
Guess I'll just have to make do and overwrite some trainers. :)

Thanks again!

Pokepal17
September 7th, 2009, 08:17 AM
Oh, I see. Oh well.
Guess I'll just have to make do and overwrite some trainers. :)

Thanks again!

Well you could try repointing the pointer to frames and then make more than eight frames and see if it works.

ryolo
April 7th, 2010, 02:06 AM
how do i search for the offset things in hex workshop?

xGGxToiZ
April 10th, 2010, 01:16 AM
Oh, wow! It worked perfectly on my Ruby ROM. (Good thing they only have 2 different sprite pointers ^^)

Thanks man! Excellent tut!

Gym leader ???
December 29th, 2010, 03:36 PM
Where can I find hex workshop? A link?

Spherical Ice
December 30th, 2010, 03:32 AM
Well, Google is your friend (click me) (http://tinyurl.com/yk5yldb).

Swolligator
January 12th, 2011, 02:02 AM
everytime I change a new frame, saving on Hex Worshop to a new offset for the Hero frames, it reverts the previous frame to a full black sprite.
What have I done wrong?

eg; I sprite frame 1 of the hero sprite, then go and make a new offset for frame 2 and when I reopen in OERE frame 1 and 2 are entirely black.

Pokepal17
February 2nd, 2011, 08:25 AM
everytime I change a new frame, saving on Hex Worshop to a new offset for the Hero frames, it reverts the previous frame to a full black sprite.
What have I done wrong?

eg; I sprite frame 1 of the hero sprite, then go and make a new offset for frame 2 and when I reopen in OERE frame 1 and 2 are entirely black.

That's good because it means its been repointed to free space. Now just draw your new OW on top of the black frame. :3

brian1666
May 15th, 2011, 09:34 AM
My sprite pointer is 083701E0 and reversed it is 0E107380, but when I search for that in HEX Workshop it doesn't find anything. Any ideas?

Pokepal17
May 15th, 2011, 09:39 AM
My sprite pointer is 083701E0 and reversed it is 0E107380, but when I search for that in HEX Workshop it doesn't find anything. Any ideas?

You reversed it wrong.
It was originally 08 37 01 E0.
It should be E0 01 37 08.

You reverse each group of two digits, not each single digit. :3

brian1666
May 15th, 2011, 10:55 AM
You reversed it wrong.
It was originally 08 37 01 E0.
It should be E0 01 37 08.

You reverse each group of two digits, not each single digit. :3
Thanks! But i really don't get this part:
Now follow the sprite pointer and you will come to the pointers of the frames (sprite pointer info 2). Find out how may frames your sprite has and repoint the first (number of frames) pointers to a clean offsets. For the offsets, just find some FF in your hex editor and reverse the offset and replace the first pointer with it. Now to tell how much space you’ll need for each frame, convert the unreversed new data size into decimal.

So I get 0800 ---> 2048

So I’ll need 2048 bytes for each frame. So I repoint the frames to new offsets with enough space. I’m going to repoint to the offset 71A23C for my first frame so I reverse it and get 3C A2 71 08

After each frame pointer there is the old data size for the frame; replace it with the new one (in my case 00 80.)

Since all my frames are going to have the same images I’m repointing the frames to one offset but you’ll need to repoint to more offsets if you have a different image on each frame.
What do i have to do?

Pokepal17
May 15th, 2011, 11:06 AM
What do i have to do?

The sprite pointer leads to the frames of the sprite. Repoint the frames to new offsets. The amount of space each frame takes up is determined by the sprite's data size. :3

So if the new sprite's data size was 0800 (in hex), the amount of space each frame would need would be 2048 bytes. :3

brian1666
May 15th, 2011, 11:14 AM
The sprite pointer leads to the frames of the sprite. Repoint the frames to new offsets. The amount of space each frame takes up is determined by the sprite's data size. :3

So if the new sprite's data size was 0800 (in hex), the amount of space each frame would need would be 2048 bytes. :3
I get that part, but not with ''Find some FF" and ''Repointing".

Pokepal17
May 15th, 2011, 12:02 PM
I get that part, but not with ''Find some FF" and ''Repointing".

When I say "Find some FF", I mean find some free space. Repointing is pointing something to a new piece of data. If you don't know how to, I suggest you find a tutorial as it is a necessity for hacking.

Melloeta_Step
October 23rd, 2011, 12:24 AM
Is there any other ways to Resize Overworlds except That and using Overworld Changer?..
I used Overworld Changer But the palette of the other sprites became Other Colors...

link12552
October 23rd, 2011, 12:51 PM
Is there any other ways to Resize Overworlds except That and using Overworld Changer?..
I used Overworld Changer But the palette of the other sprites became Other Colors...

You could use Nameless Sprite Editor Classic.
Almost any sprite can have its size edited, and there shouldn't be undesired side-effects.