View Single Post
  #1    
Old August 8th, 2011 (11:16 AM).
EdensElite's Avatar
EdensElite EdensElite is offline
No0b, but getting there.
 
Join Date: Jun 2011
Location: UK
Gender: Male
Nature: Bold
Posts: 190
Hey PC, My name is Edens Elite and I'm a little bit of newby to this site. But for the last while I've been trying to figure how to edit trainers, and I finally figured it out and I'm glad to share it with you guys ^.^

Ok, Lets begin with Requirements;


You will need...

  • A ROM (duh!)
  • Your Trainer to insert (Double obvs.)
  • FSF (Free Space Finder) - Link
  • UnLZ - Link (Note: UnLZ is included among other programs in this link
  • Irfanview - Link
  • APE (Advanced Palette Editor) - Link
  • MS Paint
  • VBA (Triple Lol ikr)
  • Pedit (PAL to ACT Converter) - Link
Ok, got all that? Lets dive right in.



Ok, These are the two trainers I am going to be using in my hack. The first thing I need to do is to separate them. Open up paint and paste one of the trainers in. Adjust the canvas so it is 64x64 pixels, then give it a background colour that you have not used in the trainer. You should end up with something like this
Spoiler:




Done that? Good now save the image

Spoiler:


Now you saved it, open the image up in Irfanview

Spoiler:


Now we need to Index the image properly and make the first colour of the palette the background colour. If you already know how to do this, skip the spoiler.

Spoiler:
Spoiler:





Make sure you click on the 16 Colours option. (Don't have dithering on)

Spoiler:


Now before you do anything else, copy the image.

Spoiler:


Now click 'Image' > 'Edit Palette'

Spoiler:


Now swap the background colour with the first colour. You do this by noting the three numbers (RGB Value) and double clicking the colour to edit them.

Spoiler:


Spoiler:


As you can see, the result looks a little weird, but don't worry we will sonn fix that.

Spoiler:


Now save the image; I usually overwrite the original but it's up to you.

Spoiler:


Now open it up in paint.

Spoiler:


Now press 'Ctrl+V' (Or Paste) and It should look the same as the original.

Spoiler:


Open it back up in Irfanview to check if the BG colour is the same as the first colour in the palette

Spoiler:


Yay! You correctly indexed your trainer Pat on the back for you!


Now were going to export our palette to use later. Sorry the screeny is screwy

Spoiler:


Spoiler:


Now open up Pedit. Then go to File > Open Palette

Spoiler:


Then just go back to File and click 'Save Palette'. .ACT should be the first default option. The reason we do this is because .PAL files are unreliable and require more effort to use in APE (The palette editing tool) but .ACT nearly always work perfectly.

Spoiler:


Spoiler:


Now open up UnLZ. Click File > Load ROM and select the ROM you shall be inserting the trainer into. In the text box next to 'Goto' type in 1653 and you should roughly be in the trainer area of the ROM use the 'Next' and 'Previous' buttons to find the trainer your editing. Also note (seriously, write down) the Image offset located at the top

Spoiler:


Click import and select your file. Watch out as this program is very buggy and will crash a lot. I noticed it only ever crashes when you are importing and leave it idle for a second or two. So to avoid it crashing, click on random files until you spot your one and then double-click it.

Spoiler:


You should see your Sprite there. If there is an error the image has been most likely indexed incorrectly.

Spoiler:


Click 'Write to ROM' and then click 'OK'.

Spoiler:


If it appears to have worked fine, skip the following spoiler.

Spoiler:
You probably saw something like this didn't you?

Spoiler:


BEFORE YOU DO ANYTHING, backup your ROM here, as you are about to repoint a image, and once you do that it's extremely hard even for a really good hacker to edit the image once it's been repointed. And you don't want to do all that hard work and then realise a un-editable mistake, do you?

Well note down the number, in my case 358 and open up FSF. (If you missed it, follow the last step again and it will give you the same message.) When FSF is open click File > Load ROM and select the same ROM as you selected for UnLZ.

Spoiler:


In the bottom right corner type the number from before. A number should have appeared in the box above right?

Spoiler:


Type the number that just appeared in the box next to 'Needed Bytes'. You can select 'Search from the beginning of the ROM' if you want. But it doesn't really matter. I was once read from the offset 800000 on, the ROM is more stable, but I have never had an issue using before and I never use that option so I guess it's up to you. [/ENDRANT] Then Click Find .

Spoiler:


See the weird number that came up, it's called an Offset. If you imagine a ROM like a city, an Offset is like an address to a house. Click copy.

Spoiler:


Now go back to UnLz, and click 'Write to ROM' again. This time delete the number in the first box (leave the two zeroes though) and check 'Automatically fix pointers'. Then click 'OK'

Spoiler:


You should then get a message saying the image has been pointed to a random offset

Spoiler:


Yay! Your image has been inserted Another pat on the back


All that is left to do now is edit the palette, it's easy but many people mess it up because of one little mistake I'm going to show you. Open up APE and go to file > Open ROM, you know the drill by now.

Spoiler:


See the text box next to 'Offset (Hex)'. Type in that number I told you to write down earlier. (Don't say I didn't tell you.) In my case it was 00E67280, this is the offset for the male hero. Watch out by the way as for some reason UnLZ tells you the palette for the male and female hero is the same. This is wrong. To see a mini-directory of APE offsets, go to the bottom of the page.

Spoiler:


Now click Load.

Spoiler:


See all the pretty colours that just appeared. notice how some of text boxes are red etc. This is the mistake. DO NOT EDIT THIS PALETTE. Because this image L277 Compressed it's palette is a little weird (Sidenote: Any image that looks normal i.e Looks like it would in-game is L277 Compressed) If you attempt to edit this palette it will warn you it is unsafe to do so, listen to it as if you click ignore the game will freeze the second it tries to load the sprite, battle, trainer card anything.

So how do you get around this? Check the 'Compressed Palette (L277)' option and then click the mini-arrow to go back and then click the other arrow. So basically you took a step backwards and forwards so you are in the same spot, except now the palette is normal, like in the image below. We edit this palette.

Spoiler:


Now click the little palette icon at the bottom. (Hover your cursor over it and it should say import.)

Spoiler:


Under 'Files of type' click the little arrow and select '.ACT', Now locate your ACT palette you made earlier and click open.

Spoiler:


Click Replace and then Load.

Spoiler:


The Two sections should now be identical.

Spoiler:


Now check to in-game.

Spoiler:


All Good? Yaaaaaaay

UnLz Numbers

Please note each ROM differs, but they should be located roughly in the area.

149- All Eight Badges
191- World Map- Good Luck with it, though!
208- Titlescreen Movie Text :2004-Pokemon, 1995-Nintendo...
211- Titlescreeen Movie Text 2 :GAMEFREAK
212- GAMEFREAK Logo
213- Titlescreen Movie Animation : stars (1st slide)
214- See 214- 2nd slide
215- See 214- 3rd slide
216- Titlescreen Movie Text 3 RESENTS
217-238- Gengar + Nidoran Intro
280-301- Images when entering an area, eg. Diglett's Cave, Viridian Forest..etc.
419-430- All kinds of Pokeballs.
472- Digits (1,2,3,) that show up via elevator, etc.
Big Gap- Attack Anis
574- the In-Battle EXP/Lv. Box. Only has these 2 values.
576-578- same, but w/out the EXP bar.
579- same, w/out any values.
Gap-More Attack Anis
589- UGLY CURSE ANI.
Gap- see 2nd gap reason
648-649- UGLIEST EVER. SUBSTITUTE FRONT + BACK.
651- Yeah! My fav! Stat Up/Down Animations.
Super Gap- Trainer Sprites, Attack Anis.
1687-IMPORTANT FOR UN-POKEMON GAMES- the pokeball behind your Pokemon in the Pokemon Menu. Pic coming.
1688- "Cancel" option on the Pokemon Menu
1689- Status Afflictions
1695- Male Bag
1696- Female Bag
1702- TMs & HMs
1706- Berry Bag
1720-1932- All items, in HEX ORDER. (0= Masterball) Sorry if that isn't put right, didn't know any other way to put it.
Gap-idk, that's how I wrote it on paper
1968- Trainer Card
1969- Player's Status Menu Trainer Card
1972*- Probably a Pokedex menu
1973- Modes in Pokedex.
1974- Pokemon Summary Wiindows, 1,2,3.
1975+1976- HP bar and EXP bar in summary menu.
1983- Status Afflictions in Summary Window
1987- Commands; In-Battle Pokemon Menu eg. Switch,Send..etc.
1991-2002- Berry Glitch Text and Tilemaps.
2009- "Pokemon Fire Red Version" Titlescreen Text
2011- Titlescreen Charizard
2013- Titlescreen text "Press Start,2004 GAMEFREAK"
2016- "All right, Including..." Text
2079- Pokeballs When showing Pokemon in your Party, at the beginning of Battle. Image coming soon

*Credit to Hellsing


APE Offsets

I only have a few, so feel free to post some if I don't have them. I will add more, when I have some free time.

TEXT BOX - 00471DEC
TITLE SCREEN - 00EAE094
TRAINER CARD - 00E99198
OAK INTRO (BG) - 00460568
TRAINER CARD (BG) - 00E991B8
POKEMON TITLE SCREEN LOGO - 00EAB6C4
MALE BACKSPRITE - E76EC1
FEMALE BACKSPRITE - E76EE9
BAG (NOTE: MALE AND FEMALE SHARE THE SAME PALLETE) 00E83DBC
FEMALE IN-GAME 00E675B4
MALE IN-GAME 00E67280

Newbies Corner

I tried to make this tutorial as beginner-friendly as possible, but if any questions are asked, I will archive them here for future reference.
__________________

ROM Hacking was getting frustrating for me. I've now stopped productions and writing the game from scratch in HTML 5.

That means it will be playable in the browser, and across multiple devices such as the iPod touch.
Reply With Quote