PDA

View Full Version : [Tutorial] Item Creation in FireRed: Step by Step, From Start to Finish


DavidJCobb
July 26th, 2011, 04:10 PM
Item Creation in FireRed

Pokemon FireRed contains numerous "????????" items. These are unused items that serve no purpose in the game. Using hex editing and some programs, we can turn these into real items, with their own names, descriptions, and images. Certain hacks that have been released even allow us to make our items run scripts.

This tutorial will tell you how to do all of that -- that is, how to create an item with a custom name, description, image, and (if using JPAN's hacked engine) function.

Requirements
To follow this tutorial, you will need:

XSE (http://www.pokecommunity.com/showthread.php?t=85025)
Item Manager (http://www.pokecommunity.com/showthread.php?t=198705)
Item Image Editor (http://www.pokecommunity.com/showthread.php?t=134016)
Free Space Finder (FSF) (http://www.pokecommunity.com/showthread.php?t=85025)
NSE Classic (http://www.pokecommunity.com/showthread.php?t=205687)
A hex editor, such as HxD, if you want the item to run scripts when used
JPAN's FireRed Hacked Engine (http://mail.pokecommunity.com/showthread.php?t=194241), if you want the item to run scripts when used


Basic changes
Start up Item Manager, and choose any of the "????????" items. In this tutorial, we will be editing the "????????" that comes right after "GREEN SHARD".

http://img195.imageshack.us/img195/5458/step1rv.png

Use Item Manager to change the item's name and attributes as desired. Do not touch the "Description" or "Index" fields; we will deal with the description later.

http://img15.imageshack.us/img15/3856/step2j.png

Correcting the index
Every item has an "index" value, which the game seems to use to verify that the item is real. The index values correspond to the order the items' data is stored in. The "????????" items, however, don't have valid indices; they all have index values of 0. To turn our "????????" into a real item, we must give it a valid index.

If you look at the indices of valid items, you'll find that they're all numbered in sequence. BLUE SHARD has an index of 31, YELLOW SHARD is 32, GREEN SHARD is 33... and the "????????" after it is 0. We need to give it an index that follows the pattern -- in this case, 34.

Remember that we're dealing with hex, not decimal.

Change the index and save your changes. Close the Item Manager.

http://img855.imageshack.us/img855/744/step3yq.png

Changing the description
XSE is a script editor. People use it to make NPCs talk and perform other actions. One of XSE's features is the ability to add new strings (chunks of text) to the ROM, for scripts to use. We're going to do something a little different, though: we're going to write a "script" that consists of a string... and nothing else. And then we are going to tell the game to use that string as the description for our new item.

Open XSE and load your ROM.

http://img62.imageshack.us/img62/5403/step4pa.png

In the main textbox, type the following:
#dynamic 0x0800000
#org @string
= This is a description for our new\nitem.The first line (#dynamic 0x0800000) tells XSE to automatically look for unused space in the ROM, and to store our string in any free space it finds. The number (0x0800000) just tells XSE where to start looking.

The second line (#org @string) tells XSE that we are creating a new section for our "script". In this case, the section is a string.

The third line is the actual value of our string. (The equal sign and first space won't be stored.) The "\n" represents a line break. Feel free to use any value of your choosing; XSE has a "Text Adjuster" that you can use to place line breaks in the proper spots. Remember that you only have three lines of text to work with.

http://img840.imageshack.us/img840/551/step5x.png

Click the button with an image of two gears ("Compile"), and pay very careful attention to the window that pops up when you do.

http://img543.imageshack.us/img543/6826/step6c.png

At the bottom of the "Compiler Output" window, there will be two list-boxes. Above them is the text "Dynamic Offsets". These boxes tell us the specific offset that XSE saved the string to. Click the "Copy" button to copy the offset. Do not lose this number.

(The number probably will not be the same as the one in my screenshots. For this tutorial, I am using a FireRed ROM that has had no other changes applied to it, so the offset for my description is 800000. If you've made changes to your ROM, your offset will probably be different. This is perfectly normal.)

Close XSE. You don't have to save, if it asks you.

Using the item description
Reopen the Item Manager.

Go back to the "Description" box, and replace its contents with the offset that the description was saved to. Hit the "Save" button, and you should see your new description.

http://img837.imageshack.us/img837/8623/step7u.png

Adding a new item image to the game
Before we can give the item a new image, we must insert that image into the ROM. And before we can insert the image into the ROM, we have to create it.

Open the image editor of your choice, and create a 24x24-pixel image. Do not use more than 16 colors (including the background color, which should become transparent). When you are finished, use the image editor to decrease the color depth of the image, and save it as a 16-color bitmap (*.BMP) or PNG. (Microsoft Paint won't be able to reduce the color depth, but the freely-available editor IrfanView (http://irfanview.com/) can.)

For the tutorial, we will be using this image:

http://img703.imageshack.us/img703/373/itemimage16c.png

Now that we have created the image, open NSE, and use it to load your ROM. When you do, NSE will automatically open the Hero overworld sprite for viewing.

http://img824.imageshack.us/img824/7681/step8i.png

Open the "View" menu, and choose "Offset". You should see this dialog box:

http://img84.imageshack.us/img84/9296/step9n.png

In order to create a new sprite, we have to find unused space in the ROM. Open the Free Space Finder, and load your ROM.

http://img841.imageshack.us/img841/7631/step10d.png

Use FSF to find 256 bytes of free space starting at 800000. Copy the offset that it gives you. Note that it may not give you the same offset that it gives me in these images; it depends on how much content you have added to your ROM.

The offset must end in "0", "4", "8", or "C". If it doesn't, then the game will crash when it attempts to load the sprite!
If the offset doesn't end in one of those characters, then simply increase it until it does. If you so desire, you can use FSF to make sure that the revised offset still has enough room.

http://img828.imageshack.us/img828/3121/step11o.png

Paste the offset into the NSE dialog ("Offset Browsing") that you opened before. Write it down somewhere else as well, as you will need it later.

http://img807.imageshack.us/img807/6367/step12.png

Add 0x100 to the offset. If you don't know how to do math in hex, then you can use Windows Calculator (in "Programmer" mode). Insert the new offset into FSF's "Search from offset" textbox. Search for 128 bytes of free space.

http://img98.imageshack.us/img98/9443/step13.png

Copy the result, and paste it into the "Palette" field in the NSE dialog. Write it down somewhere else as well, as you will need it later.

The offset must end in "0", "4", "8", or "C". If it doesn't, then the game will crash when it attempts to load the sprite!
If the offset doesn't end in one of those characters, then simply increase it until it does. If you so desire, you can use FSF to make sure that the revised offset still has enough room.

http://img828.imageshack.us/img828/356/step14.png

In the NSE dialog, change the "Size" fields to both read "24", and then click "Open". Then close the dialog. Close FSF.

http://img40.imageshack.us/img40/7011/step15x.png

You should see this:

http://img585.imageshack.us/img585/9039/step17.png

Now, we need to import the image file into NSE. Go to File -> Import -> Import Image. This dialog box will appear:

http://img163.imageshack.us/img163/5987/step18.png

Use the "Load" button to select your image file. Then, change the "Image" dropdown to "All" and click "Save". You'll see a confirmation dialog; click "Yes". On the Import dialog, click "Close".

The main NSE window should now look like this:

http://img220.imageshack.us/img220/9311/step19.png

Go to File -> Insert. Insert your image and your palette, using the offsets that you entered earlier. For both dialog boxes, check "Compress Data [Lz77]".

Go to File -> Save. Close NSE.

Using the new item image
Open Item Image Editor and load your ROM.

http://img163.imageshack.us/img163/9253/step20z.png

Find your item in the list and select it. This may be a bit difficult, as Item Image Editor does not use the item names that are stored in the ROM.

http://img847.imageshack.us/img847/6015/step21c.png

Change the image and palette offsets to the ones that you copied out of FSF. Go to File -> Save ROM, and then exit the Item Image Editor.

Making the item do something
NOTE: This part of the tutorial only works if you are using JPAN's Hacked FireRed Engine. If your ROM does not use that hack, then attempting to follow these instructions will only cause problems.

JPAN's FireRed Hacked Engine contains an interesting little feature. It is possible to make an item that, when used, backs the player out of their Bag and runs an XSE script. We are going to explore how to do that, but first, a warning: it does not work if you activate an item by pressing Select.

First, we have to create a script for our item to use. Open XSE. You can create any kind of script you want; I'll be making a script that teleports a player to Map 4.1 -- the player's bedroom, in an unmodified FireRed ROM. The code:

#dynamic 0x800000
#org @start
warp 0x04 0x01 0x00 0x00 0x00
release
end

Compile the script and write its offset down somewhere. For my FireRed ROM, the offset is 800154.

Open the Item Manager. Click the ">>" button to go to the second "page" of the form. Change the "Field Usage" value to 161521; this is where some of JPAN's code is stored. Click the "Save" button.

http://img26.imageshack.us/img26/8840/step22b.png

Unfortunately, we'll need to break out the hex editor now. And we'll also need to do some math. Open your ROM using the hex editor of your choice, and go to offset 03DB028.

http://img69.imageshack.us/img69/3631/step23y.png

Here is where we need to use some math. Take the hex index of the new item -- 34, in this case -- and multiply it by 2C. (You can use Windows Calculator's "Programmer" mode for this.) The result, for index 34, is 8F0. Add the result to the hex number 03DB028. When you're done with all the math, you'll have the offset of the first letter in your item's name -- 3DB918, for this tutorial. Go to that offset in your hex editor. Write it down somewhere, too.

http://img707.imageshack.us/img707/6901/step24.png

Add hex E to that offset (result 3DB926, for this tutorial) and verify that the value of the byte at that new offset is the same as the item's index. For this tutorial, we check if the byte at offset 3DB926 has the hex value "34". If it does, then proceed.

Take the offset of your script. Split it into bytes and put them in reverse order. My script offset, 800154, should become 54 01 80. Put an 08 at the end of your rearranged offset: for me, the result is 54 01 80 08. This data is called a "pointer"; it tells the game where to look for something. We need to insert that pointer into a part of the item data that most programs don't allow you to modify.

Remember the offset that I said to write down? The offset of the first letter in your item's name? Take that offset and add hex 28 to it. For this tutorial, that's 3DB918 + 28 = 3DB940. Go to that offset in your hex editor. Select the four bytes located there.

http://img109.imageshack.us/img109/8422/step25.png

Replace them with your pointer.

http://img577.imageshack.us/img577/5318/step26.png

Take the offset of the first letter again, and add 1C to it. (For this tutorial, that'll be 3DB934.) Go to that new offset. The first three bytes at that offset should be 21 15 16. If the byte after those three is not 08, change it to 08. (Apparently, Item Manager is a bit forgetful sometimes...)

http://img42.imageshack.us/img42/9642/step27.png

http://img220.imageshack.us/img220/5097/step28.png

Save the changes and exit your hex editor.

Done!
All that remains is for you to test the item. Since it's an unused item, there's no normal way to obtain it in-game. You'll have to use XSE to create or modify a script to give it to you.

Here are some images of me testing the new item out; if you used the text and images provided in this tutorial, your finished item should look pretty much the same. To test, I created a separate copy of the ROM and in that copy, I replaced the bedroom PC script with one that just hands out the item.

http://img402.imageshack.us/img402/7766/result1w.png http://img844.imageshack.us/img844/4859/result2f.png http://img7.imageshack.us/img7/6937/result3j.png
http://img850.imageshack.us/img850/3232/result4.png http://img705.imageshack.us/img705/1483/result5.png

I took the item from the PC. Checked the icon and description. Went outside, used it. And it worked.

Acknowledgments
My instructions on how to use the item functionality in JPAN's hacked engines were based on the instructions that he posted (http://mail.pokecommunity.com/showpost.php?p=5494430&postcount=174) in his thread. Info on the Select-button bug in that functionality also posted by JPAN (http://www.pokecommunity.com/showpost.php?p=5499972&postcount=190).

Questions? Comments?
Feel free to post and I'll answer to the best of my ability.

Quickster
July 27th, 2011, 07:37 AM
This is a great tutorial! Everything seems to be covered here, and the screen shots make it so much easier to follow. If I ever get back into hacking Ill deffinately use this!

Spherical Ice
July 27th, 2011, 08:44 AM
Just like your debugging tutorial, this is great. There's only one problem I have--there is no Field Usage section in the version of the Item Manager you linked to (or, for that matter, the version I had beforehand). Is this an older version of the Item Manager? If so, what version is it? Thanks in advance, and, again, this is an awesome tutorial. ^^

DavidJCobb
July 27th, 2011, 10:39 AM
There's only one problem I have--there is no Field Usage section in the version of the Item Manager you linked to (or, for that matter, the version I had beforehand). Is this an older version of the Item Manager? If so, what version is it? Thanks in advance, and, again, this is an awesome tutorial. ^^It's a version from way back in 2010, actually, but...

Wait, did you hit the ">>" button when editing your item's details? It's easy to miss; it takes you to the next "page" of the form, which is where the Field Usage section is.

If the field isn't there in the newest version of the program, then I can modify the tutorial and show how to do it in hex.

Spherical Ice
July 27th, 2011, 11:25 AM
Aha! Yeah, the >> button needs to be used (you should probably add that to the first post in case). Thanks.

DavidJCobb
July 27th, 2011, 03:31 PM
Aha! Yeah, the >> button needs to be used (you should probably add that to the first post in case). Thanks.
Happy to help. Post has been updated accordingly.

sky_queen3
July 29th, 2011, 01:25 AM
So, would following this tutorial allow the creation of functioning new evolution stones?

DavidJCobb
July 29th, 2011, 09:21 AM
So, would following this tutorial allow the creation of functioning new evolution stones?No, unfortunately. That would involve some extensive changes to, among other things, the parts of the game engine that handle evolution.

Anything that can be done in an XSE script can be done when using a custom item, if you're using JPAN's FireRed Hacked Engine. Anything beyond that will require knowledge that I don't have.

Spherical Ice
July 29th, 2011, 09:25 AM
What you could do with JPAN's engine, you could technically replace the Pokémon with a new species through a new special, so you could potentially have an evolutionary stone that just wouldn't show the evolution animation.

DavidJCobb
July 29th, 2011, 06:51 PM
What you could do with JPAN's engine, you could technically replace the Pokémon with a new species through a new special, so you could potentially have an evolutionary stone that just wouldn't show the evolution animation.
True... But you'll be hard-pressed to preserve some of the Pokemon's unique data, i.e. gender. I haven't found a way to manipulate (read or write) Poke gender, even with JPAN's hack; I don't think there is a way. Earned EXP could also be a problem.

(Of course, if I'm wrong and those data, too, can be preserved, then that's totally awesome and "pseudo-evolution" with scripting then becomes practical.)

sky_queen3
July 29th, 2011, 09:46 PM
No, unfortunately. That would involve some extensive changes to, among other things, the parts of the game engine that handle evolution.

Anything that can be done in an XSE script can be done when using a custom item, if you're using JPAN's FireRed Hacked Engine. Anything beyond that will require knowledge that I don't have.

Ok, thank you. *goes back to the drawing board for new evo stones* This is still useful to me, once I learn how to use JPAN's FireRed Hacked Engine anyway. :)

EdensElite
August 1st, 2011, 12:09 PM
Does anyone know the script to make items act as HMs. I want to make a Item that cut trees and lets me surf etc.

DavidJCobb
August 1st, 2011, 12:35 PM
Does anyone know the script to make items act as HMs. I want to make a Item that cut trees and lets me surf etc.I think that would depend on the scripts for trees.

There's only one real difference, I think, between how the press-A-at-tree script is initiated and how an item-based Cut script would work:

When using a Pokemon, you press A on the tree -- it's a Person event. Therefore, when the Cut HM script runs, the game already knows that you are next to and facing the tree. However, your item script can be used from anywhere, so you will have to manually check if the player is next to and facing a tree.

With that sole exception, things would proceed more-or-less as they do when using the normal Cut script. So you'd want to go into a clean FireRed ROM with AdvanceMap, find a Cut tree, and open its script in XSE to see what it does. You'd then copy (or rewrite from scratch, if desired) the relevant parts of the script.

I may provide more info on this (a kind of sub-tutorial) if I feel like it. :\

EDIT1: You'd need two scripts: one for if you press A on the object in the overworld, and one for if you use the item from the Bag. The first is the easiest -- you could take the default scripts from an unaltered FireRed ROM, and change them so that they check for an item instead of an attack.

The second is the hardest because, as I said above, you don't know if the player is next to a tree/rock/etc. OW, and there are no specific commands to find that out. Out of sheer boredom I am doing a search to see if I can, for example, loop through all OWs and check their positions manually.

EDIT2: I can't find a way to check the necessary OW data. Using a Cut item from the Bag requires that one loop through all OWs, checking their positions relative to the player and the sprites they are currently using. (You need to know if the player is next to an OW, and if that OW is a tree.) I can't find any info on this data in RAM.

jvpski3
August 28th, 2011, 03:14 PM
The Hacked Engine has some (couple) of boot errors.

Trojan.DHSAF
4WLF
Any help? Ohhhhh just viruses.

Craver
August 29th, 2011, 09:08 AM
How must i do if i want create a TM/HM on the ????? item?

DavidJCobb
August 29th, 2011, 10:04 AM
The Hacked Engine has some (couple) of boot errors.

Trojan.DHSAF
4WLF
Any help? Ohhhhh just viruses.Did you use the patch or the tool? I used the patch and my computer's just fine. 0_o

How must i do if i want create a TM/HM on the ????? item?I have no clue.

For the image, you could just copy the image and palette offsets for any TM with the same move type (i.e. if your TM teaches a Dark move, copy the image data for another Dark TM). But I don't know how you'd go about actually making the new item work as a TM.

ManInTheMask
September 19th, 2011, 05:41 AM
ManInTheMask here, it is possible to do this on Leaf Green, and Emerald, right? Because if it is, you should mention rom names that we can do this on too, other than Fire Red. It's just a suggestion.

Also, can I do this on Ruby and Sapphire, minus the pictures? Ruby and Sapphire doesn't use item pictures, except berries.

DavidJCobb
September 19th, 2011, 01:34 PM
ManInTheMask here, it is possible to do this on Leaf Green, and Emerald, right? Because if it is, you should mention rom names that we can do this on too, other than Fire Red. It's just a suggestion.

Also, can I do this on Ruby and Sapphire, minus the pictures? Ruby and Sapphire doesn't use item pictures, except berries.The process itself should be possible in all of the Advance-gen games, but the offsets will differ and I haven't done it myself.

Since Ruby and Sapphire don't have item images, the data structure for items will probably be different in those games, so that would affect things, too.

Hongos
December 11th, 2011, 02:24 PM
Can you create your own unique gym badges using this?

DavidJCobb
December 11th, 2011, 09:10 PM
Can you create your own unique gym badges using this?If you want them to show up on the Trainer Card? No.

droomph
December 17th, 2011, 01:54 PM
How must i do if i want create a TM/HM on the ????? item?

Hey, I don't know if this is exactly what it is, but this might help:


#org 0xFDF48
#thumb
-PUSH {R4,LR}
-LSL R0,R0,18
-LSR R4,R0,18
-LDR R0,[PC,18] 'FDF68
-LDRH R1,[R0,0]
-MOV R0,A9
-LSL R0,R0,1
-CMP R1,R0
-BLS +1C
-LDR R2,[PC,10] 'FDF6C
-LDR R3,[PC,10] 'FDF70
-ADD R0,R4,0
-MOV R1,1
-BL_PART1 AD000
-BLH 5F3
-B +1A 'FDF80


#org 0xFDF74
#thumb
-LDR R2,[PC,10] 'FDF88
-LDR R3,[PC,14] 'FDF8C
-ADD R0,R4,0
-MOV R1,1
-BL_PART1 AD000
-BLH 5E6
-POP {R4}
-POP {R0}
-BX R0


#org 0xFDF80
#thumb
-POP {R4}
-POP {R0}
-BX R0


#org 0xFDF68
#dword 0x203CE7C

#org 0xFDF6C
#dword 0x85E9047

#org 0xFDF70
#dword 0x80FDF91

#org 0xFDF88
#dword 0x85E9037

#org 0xFDF8C
#dword 0x80FDF91

I found this routine on every TM item, so maybe you can work from there. It's a start, I guess.

Just a thought.

papayaperson
December 20th, 2011, 04:47 PM
I try to load my leafgreen game in item manager and it doesn't work?

DavidJCobb
December 25th, 2011, 04:32 PM
I try to load my leafgreen game in item manager and it doesn't work?You'll have to ask the creator of that program for help, sorry.

shiningscorpion9
February 4th, 2012, 07:47 AM
Eh i am having a little problem with geting the item Could anyone help? (ingame)
I am using PKSV but i have no idea whats the item ID.

DavidJCobb
February 5th, 2012, 05:18 PM
Eh i am having a little problem with geting the item Could anyone help? (ingame)
I am using PKSV but i have no idea whats the item ID.Item ID is the same as the item index I referred to in the tutorial.

As a side note, you should probably use XSE for your script-editing needs. There's more documentation for it, and it has a cleaner syntax.

Jay the penguin
February 19th, 2012, 11:43 AM
So where did you get 2C from when you multiplyed 34 by 2C?

DavidJCobb
February 19th, 2012, 04:41 PM
So where did you get 2C from when you multiplyed 34 by 2C?IIRC that's the size of one item's data. 0x2C bytes.

Jay the penguin
February 19th, 2012, 11:09 PM
I'm just being courious but is it different for each item or is it all the same?

DavidJCobb
February 26th, 2012, 04:50 PM
I'm just being courious but is it different for each item or is it all the same?The 0x2C? That's the same for every item.

Jay the penguin
February 27th, 2012, 07:47 PM
I'm still a bit confuesed here. the whole image comes out right but the script just feezes the screen I probably messed up in the hex edit, but idk. any advice?

Tanveer
March 17th, 2012, 01:36 AM
Completely new item? Wow..
So many good guides on here!
I cant decide which ROM to hack lol.

Death_Mande
March 21st, 2012, 07:07 PM
Sorry if I'm bothering you, but while following your tutorial I accidentally indexed the "??????" after the Green Shard a 34, without noticing that my Green Shard is indexed at 51 and not 33. The game runs fine, and I can receive my item normally, but I can no longer edit the items with any editor.

I have tried using thethethe's (sorry if I misspelled it), ZodiacDaGreat's and Team Snag Em's version of thethethe. Any ideas on how I could fix this? I don't mind if it requires some or a lot of HEX Editing. Any assistance is appreciated!

DavidJCobb
March 25th, 2012, 04:33 PM
Sorry if I'm bothering you, but while following your tutorial I accidentally indexed the "??????" after the Green Shard a 34, without noticing that my Green Shard is indexed at 51 and not 33. The game runs fine, and I can receive my item normally, but I can no longer edit the items with any editor. 51 decimal is 0x33 hex.

I think you may have made other mistakes besides assigning the wrong index, as setting a bad index shouldn't break item editors. (Technically speaking, the index was already bad.) Unfortunately, I've no clue what could cause this problem or how to fix it.

Hopefully, you've been creating regular backups of your hack. If not, well... lesson learned. Sorry, mate. :(

Death_Mande
March 25th, 2012, 05:32 PM
51 decimal is 0x33 hex.

I think you may have made other mistakes besides assigning the wrong index, as setting a bad index shouldn't break item editors. (Technically speaking, the index was already bad.) Unfortunately, I've no clue what could cause this problem or how to fix it.

Hopefully, you've been creating regular backups of your hack. If not, well... lesson learned. Sorry, mate. :(

No worries! I didn't have a backup xD! I opened the game with a HEX editor and went to the offset in which the item data is stored in. The first few bytes were rather screwed up, so I changed them with new ones from a clean ROM. I saved and opened the item editor and it worked fine! xD! Thanks for your response though.

I have no idea why the index was 51. The clean ROM I have has the same number. xD!

Imperialdramon123
May 25th, 2012, 03:41 PM
does this work for ruby?
file:///C:/Users/GBA%20Hacker/Desktop/animation-Wilderness1-3.gif

Robert Conley
June 16th, 2012, 04:46 PM
Would it be possible to make new evolution items with this? Or would that require more than a simple script?

Sagiri
June 16th, 2012, 06:03 PM
Would it be possible to make new evolution items with this? Or would that require more than a simple script?

Evolution stones are trivially easy to make, and they do not require any sort of script.

Going from this tutorial, follow it up until the step on Item Manager. When you get there, go ahead and do what he tells you (the item's index, name, and description), but also check the values for one of the existing evolutionary stones (the specials and things like that). Set all of those exactly the same in your new stone.

Then, convert the item's index into decimal, subtract 13 from it, and multiply the result by 4. Now, convert the result into hex, and add it to 0x2528BC. Open up your hex editor, and go to that address, and replace what is there with "56 28 25 08.

Now, if you set a Pokemon to evolve using your item, it'll work.

Then, continue his tutorial through the image and palette inserting and you're done - you do not need to do any kind of script. For this method (and it is the only method I know of), you do not even need JPAN's Hacked Engine.

EDIT: This is very late, but I should've mentioned this - this method works with FR. Offsets will be different for RSE or LG.

Robert Conley
June 17th, 2012, 11:24 AM
Evolution stones are trivially easy to make, and they do not require any sort of script.

Going from this tutorial, follow it up until the step on Item Manager. When you get there, go ahead and do what he tells you (the item's index, name, and description), but also check the values for one of the existing evolutionary stones (the specials and things like that). Set all of those exactly the same in your new stone.

Then, convert the item's index into decimal, subtract 13 from it, and multiply the result by 4. Now, convert the result into hex, and add it to 0x2528BC. Open up your hex editor, and go to that address, and replace what is there with "56 28 25 08.

Now, if you set a Pokemon to evolve using your item, it'll work.

Then, continue his tutorial through the image and palette inserting and you're done - you do not need to do any kind of script. For this method (and it is the only method I know of), you do not even need JPAN's Hacked Engine.


Thanks, glad to see that it's so simple!

sky_queen3
June 17th, 2012, 11:51 PM
Evolution stones are trivially easy to make, and they do not require any sort of script.

Going from this tutorial, follow it up until the step on Item Manager. When you get there, go ahead and do what he tells you (the item's index, name, and description), but also check the values for one of the existing evolutionary stones (the specials and things like that). Set all of those exactly the same in your new stone.

Then, convert the item's index into decimal, subtract 13 from it, and multiply the result by 4. Now, convert the result into hex, and add it to 0x2528BC. Open up your hex editor, and go to that address, and replace what is there with "56 28 25 08.

Now, if you set a Pokemon to evolve using your item, it'll work.

Then, continue his tutorial through the image and palette inserting and you're done - you do not need to do any kind of script. For this method (and it is the only method I know of), you do not even need JPAN's Hacked Engine.

That didn't work for me, I did all that but when I go to use the item it just goes back to the pause screen. :| What did I mess up on?

Robert Conley
June 19th, 2012, 09:55 AM
Evolution stones are trivially easy to make, and they do not require any sort of script.

Going from this tutorial, follow it up until the step on Item Manager. When you get there, go ahead and do what he tells you (the item's index, name, and description), but also check the values for one of the existing evolutionary stones (the specials and things like that). Set all of those exactly the same in your new stone.

Then, convert the item's index into decimal, subtract 13 from it, and multiply the result by 4. Now, convert the result into hex, and add it to 0x2528BC. Open up your hex editor, and go to that address, and replace what is there with "56 28 25 08.

Now, if you set a Pokemon to evolve using your item, it'll work.

Then, continue his tutorial through the image and palette inserting and you're done - you do not need to do any kind of script. For this method (and it is the only method I know of), you do not even need JPAN's Hacked Engine.


I did all of this and everything seems to work fine except when I set Pokemon to evolve with the item they don't. For testing purposes I set Bulbasaur to evolve into Butterfree using the item but when I tried to use it it said it would have no effect. I'm not sure but the hex editor might be my problem, do I just replace the first four values or the whole 16 value line?

To give some more info:

I made the index number 34, subtracted 13 to get 21, multiplied that by 4 to get 84, switched it to hex and got 54, added it to 0x2528BC to get 0x252910.

Ark_Silvanos
June 19th, 2012, 12:00 PM
convert 34 to decimal, so u should get 52 subtract 13, to get 39, multiply by 4 to get 156, convert to hex to get 9C, add that to 0x2528BC, and get 0x252958, go to that offset, the first four digits from that offset should be 00 00 00 00 (assuming ur using a blank space)

not sure if the math is right, so u'd have to check it.

An offset specifies only 1 byte. since ur hex editor displays 16 bytes per row, add the hex number of the row to the hex number of the column, thats the offset of the byte ur on. u'd start from the byte that gets highlighted when u use the goto function.

Robert Conley
June 19th, 2012, 03:02 PM
convert 34 to decimal, so u should get 52 subtract 13, to get 39, multiply by 4 to get 156, convert to hex to get 9C, add that to 0x2528BC, and get 0x252958, go to that offset, the first four digits from that offset should be 00 00 00 00 (assuming ur using a blank space)

not sure if the math is right, so u'd have to check it.

An offset specifies only 1 byte. since ur hex editor displays 16 bytes per row, add the hex number of the row to the hex number of the column, thats the offset of the byte ur on. u'd start from the byte that gets highlighted when u use the goto function.


Thanks, somehow I completely spaced and forgot that the 34 was already a hex value. Tested and everything works as it should.

sky_queen3
June 19th, 2012, 05:37 PM
Ok, I see what I did wrong, I was using a diferent item editer that already made the index numbers decimal. I'll try again and see if it'll work for me this time.

It worked! I'm so happy right now!

Ok, this is weird, I did the same thing again and it didn't work, I'm so confused.

destinydownloads
July 31st, 2012, 07:09 AM
Is there a way to actually add a function to the item for example the item should make the pokemon heal 90HP?

Jambo51
July 31st, 2012, 07:30 AM
Evolution stones are trivially easy to make, and they do not require any sort of script.

Fantastic post, but they are only trivially easy to make if they act like the "old" evolution stones. That is, the ones already in the game.

If you want to create the function of the Dawn Stone, for example, you require extra code to deal with the male/female only aspect of it.

Is there a way to actually add a function to the item for example the item should make the pokemon heal 90HP?

Using Item editor, create a clone item of a Potion. Make sure it looks like this:

https://dl.dropbox.com/u/24219056/ItemEd.png

(The reason I have ?'s is that I haven't actually saved the item to my ROM, the index I'm using happens to be 72, change it to whatever your item's index is). Obviously, you can have the price, name, and pictures be whatever you desire.

Now, on your cloned item, the "Special" values should be 00 and 20, correct?

That 20 stands for how much HP it recovers! So if you change that to 90, it will recover 90 HP. Easy huh?
(Note, I haven't actually tested it, but it should work in theory).

destinydownloads
August 1st, 2012, 10:06 AM
Fantastic post, but they are only trivially easy to make if they act like the "old" evolution stones. That is, the ones already in the game.

If you want to create the function of the Dawn Stone, for example, you require extra code to deal with the male/female only aspect of it.



Using Item editor, create a clone item of a Potion. Make sure it looks like this:

https://dl.dropbox.com/u/24219056/ItemEd.png

(The reason I have ?'s is that I haven't actually saved the item to my ROM, the index I'm using happens to be 72, change it to whatever your item's index is). Obviously, you can have the price, name, and pictures be whatever you desire.

Now, on your cloned item, the "Special" values should be 00 and 20, correct?

That 20 stands for how much HP it recovers! So if you change that to 90, it will recover 90 HP. Easy huh?
(Note, I haven't actually tested it, but it should work in theory).

Oh thanks, but is there a way to create an item that boosts stats if held.

DavidJCobb
August 6th, 2012, 03:47 PM
Oh thanks, but is there a way to create an item that boosts stats if held.Look for an item that already does that, and see if it has special values that work like those found on Potions. If so, then the Potion trick should work; if not, then you'll probably need ASM or something.

chaoticlapras
August 19th, 2012, 10:54 AM
Is there an alternative to NSE that I can use? I just did everything up to opening it, and my computer can't run it.

Golden Empoleon
August 21st, 2012, 01:48 PM
How do make a item act like a pokeball?

rosehudson
September 22nd, 2012, 08:28 AM
Great tutorial, though I'm haveing one recurring problem.

Everything works great, I get my item image, name and price working and in place, and the index number (I think I even got my new evolutionary stones working though I've not tested this yet due to being between 3 computers) however, when I change my description pointer it seems to work fine but the first ?????? and masterballs names get changed to parts of my new description.

When I reload my game (in either version of item edtor) it brings up a 308 error and crashes meaning I can't add the rest of my item descriptions, I haven't had chance to test if the first ?????? and masterball work properly in-game yet due to a-mart not working on this computer.

Any ideas on fixing this?

EDIT: solved my probelm, it would seem Item Editor doesn't support repointing descriptions on ????? items as changing to item manager resolved the issue.


How do make a item act like a pokeball?


All pokeballs use the same battle usage number and the same battle usage pointer. Have you tried following the pointer and recreating a pokeball from the data held in there? (though i think i read somewhere that creating a pokeball would require ASM hacking knowledge)

GoGoJJTech
February 9th, 2013, 03:18 PM
I can make evolutionary stones with this
thanks

Criminon
July 10th, 2013, 10:31 PM
A couple questions about the evolution stones. I'm new to hex editing, and when I search for the offset, it doesn't find it. I'm making an evolution stone, and I figured it would make sense to use the ????? after leaf stone. It's 63, in dec, it's 99. subtract 13, and I have 86. multiply by 4 and I have 344. Converting to hex I have 158. Adding that to the offset, I have 252A14. When I open hex workshop, I click edit -> find and I type in the offset 252A14. It says it cannot be found. When I right click the info and go to "goto" and type it in, it brings me to what seems to be a random spot. When I type the digits into that spot, it has no effect. Could someone explain hex workshop, or maybe lead me to a better one? Thanks!


edit - got it. thanks!

awipe1
August 5th, 2013, 07:44 PM
Alright so I created my item but I am having a problem.

I don't want this item to be able to be used, or to be tossed or to be given to a pokemon. It's an important item and you need to collect 20 of them in the game. Is there a way to make the item so the player can't throw them away?

Gorrioncillo
November 24th, 2013, 09:28 AM
sorry to reopen the post, i find this very useful, but for some reason the pointer of the bag, after use the custom item, goes to some place far away from the custom item, i don't know what i'm doing wrong, is there some way to fix it?
if you need mor explain, well, the pointer to the item which i want to use just disappears.
when i move the arrows up it appears again, but with some bugs, i follow, and many times, the steps of this tutorial, please help me.

Seth1353
May 27th, 2014, 05:40 AM
nice man. small problem tho when i go into my bag to get the item my screen goes black and it doesnt work, help?

Huy567
July 9th, 2014, 08:15 AM
Uhm..is there a way to make a custom item that has more than one effect? like arceus's plates or giratina's griseous orb. I'm trying to recreate those items in pokemon firered for my hack in progress and i have no idea how to make an item that changes type. As for forme, the only instance i can think of is castforme, but it changes according to weather.

NICKSID14
August 17th, 2014, 07:04 AM
Hey guys,i have a problem,when i use my new item is not running my script,the only thing is doing is closing the bag

daniilS
August 18th, 2014, 12:17 AM
Uhm..is there a way to make a custom item that has more than one effect? like arceus's plates or giratina's griseous orb. I'm trying to recreate those items in pokemon firered for my hack in progress and i have no idea how to make an item that changes type. As for forme, the only instance i can think of is castforme, but it changes according to weather.

That requires ASM. I've got some code that will change a poke's index number when it's holding certain items, but I still need to document and post it.

Lance32497
October 11th, 2014, 06:33 AM
What if Im not using JPAN ENGINE? What offset will I put in FIELD USAGE?