• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Pokémon Generation III ROM Hacking Tutorials [Video Series]

417
Posts
9
Years
  • Age 33
  • Seen Nov 20, 2016
Thanks!

I'm updating this thread to alert that the fifteenth tutorial has been completed and released!
I haven't really been following these, so I only watched the most recent tutorial. It was mostly good, but here are the issues I noticed:

Using Advanced Trainer is dated. It doesn't allow for things that most hacks have nowadays like expanded pokemon, attacks, items (ignoring shenanigans like what people do to A-Map, I'm guessing). I've never used it, but most people seem to recommend Hopeless Trainer Editor.

"AI Value" in A-Trainer is NOT the AI of the Pokemon. IIRC, bitshifted by 0x3, they're for the IVs of the Pokemon.

It should also be worth noting that for trainer AI - it's actually a bitfield. It seems that you may know this because you even point it out and say it "doesn't work like you might think." But if I were listening, I would be left wondering what it really is. In fact, even in the link you posted, it isn't made clear that it's a bitfield. Speaking of the link, you should probably credit knizz and daniils since that looks like a direct copy + paste?

On set trainer flag and clear trainer flag - XSE has it reversed. A set trainer flag means the battle is done. To clear the flag would mean you can do the battle again. The trainer flags work the same way you would expect any other flag and event to work. I think it would be better to just explain that XSE has the names wrong, rather than explain it with the wrong terminology just to conform to XSE's names.

Other than that, nice tutorial :D I'm glad someone is making this to help people get started.
 

Anthroyd

Professor
211
Posts
7
Years
Using Advanced Trainer is dated. It doesn't allow for things that most hacks have nowadays like expanded pokemon, attacks, items (ignoring shenanigans like what people do to A-Map, I'm guessing). I've never used it, but most people seem to recommend Hopeless Trainer Editor.
The main gig in this tutorial was to show off how to script a trainerbattle and how to properly use its various types. AdvancedTrainer is dated, but for the most part it gets the job done. The real point I was trying to nail with showing off a trainer editor to begin with was that there are resources out there that allow you to edit and customize your own trainers, and these tools will give you each trainer's flag value so you know how to reference them in XSE. Expanded features are indeed becoming more frequent nowadays, but I have never mentioned them in my past tutorials since I'm aiming to keep things beginner-friendly. I think the realization that one needs to find a more robust trainer editor will come naturally as one gains more experience with hacking and decides to try out some more advanced things.
azurile13 said:
"AI Value" in A-Trainer is NOT the AI of the Pokemon. IIRC, bitshifted by 0x3, they're for the IVs of the Pokemon.
I did not know this! I'll make sure to mention it in the next Adv and Era video.
azurile13 said:
It should also be worth noting that for trainer AI - it's actually a bitfield. It seems that you may know this because you even point it out and say it "doesn't work like you might think." But if I were listening, I would be left wondering what it really is. In fact, even in the link you posted, it isn't made clear that it's a bitfield. Speaking of the link, you should probably credit knizz and daniils since that looks like a direct copy + paste?
It doesn't matter how it works under-the-hood. It's important for the audience to know what will happen if the value is set to some number. Nothing beyond that is necessary and I think it would just confuse people.
As for the link, I actually asked what the different values represent in a thread not too long ago and was given that list by a user; however, the quote didn't have an "originally from:" label on it. That may have been impatience on my end.
azurile13 said:
On set trainer flag and clear trainer flag - XSE has it reversed. A set trainer flag means the battle is done. To clear the flag would mean you can do the battle again. The trainer flags work the same way you would expect any other flag and event to work. I think it would be better to just explain that XSE has the names wrong, rather than explain it with the wrong terminology just to conform to XSE's names.
Yeah, maybe it would be better that way, I'm not sure. I just figured in the moment that it would be more confusing for someone who has never worked with trainers before to have to remember that the wording is flip flopped. But I agree I should say something about that. I'll make sure to add it to my next Adv and Era video!
azurile13 said:
Other than that, nice tutorial :D I'm glad someone is making this to help people get started.
Thank you! :)
 
Last edited:
18
Posts
7
Years
  • Age 28
  • Seen Aug 7, 2016
This is exactly what i needed! thank you so much. ill even disable adblock while watching :)
 

Supportartonline

a real noob
3
Posts
8
Years
Thank you very much for these tutorials ! as a very complete beginner to rom-hacking, these videeos are helpful and simple to understand !
 

Anthroyd

Professor
211
Posts
7
Years
This is exactly what i needed! thank you so much. ill even disable adblock while watching :)
My videos currently are not monetized so I don't make any money off of them, haha. But thank you for your support!
Supportartonline said:
Thank you very much for these tutorials ! as a very complete beginner to rom-hacking, these videeos are helpful and simple to understand !
You're welcome!
Stormzy said:
I'm going to sticky this thread because it's awesome :)
Thank you for that! That'll help out a lot.

I'm updating this thread to alert that the sixteenth tutorial has been completed and released!
 
18
Posts
7
Years
  • Age 28
  • Seen Aug 7, 2016
My videos currently are not monetized so I don't make any money off of them, haha. But thank you for your support!

You're welcome!

Thank you for that! That'll help out a lot.

I'm updating this thread to alert that the sixteenth tutorial has been completed and released!

After tutorial #3 i thought it was time for me to try and edit a block of tiles to make my trees white/gray. easier said than done 0.0 I guess practice makes perfect! it makes me appreciate your efforts even more when i think of how much you worked hard to be able to do what you do.
 

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
Would these tutorials be a guide to the best tools for FireRed hacks? It's quite difficult to find the latest/most effective.
 

Anthroyd

Professor
211
Posts
7
Years
After tutorial #3 i thought it was time for me to try and edit a block of tiles to make my trees white/gray. easier said than done 0.0 I guess practice makes perfect! it makes me appreciate your efforts even more when i think of how much you worked hard to be able to do what you do.
It's a lot of doing and redoing and doing over again, but in the end all of the practice pays off like you say!
waw said:
Would these tutorials be a guide to the best tools for FireRed hacks? It's quite difficult to find the latest/most effective.
Not necessarily the absolute best tools, but I show off everything that needs to be shown in order to accomplish whatever tasks each tutorial sets out to accomplish. I may end up pointing out more robust and flexible tools if we get into more complex things that warrant better tools, but at the moment the topics being discussed don't require super impressive or modern tools.
 

PankajBlitz

Taiyoh!
216
Posts
8
Years
Really helpful tutorial. Finally I understood inserting tilesets.

Q- What is the name for those tiles that are squared? Like the tree one or that statue.

Maybe you should dedicate a video to tile behavior.

Cool.
 

Anthroyd

Professor
211
Posts
7
Years
Really helpful tutorial. Finally I understood inserting tilesets.

Q- What is the name for those tiles that are squared? Like the tree one or that statue.

Maybe you should dedicate a video to tile behavior.

Cool.
Those tiles that are squares? Not sure I understand. The tree is made up of six 16 x 16 blocks. Each block is made up of four 8 x 8 tiles, as explained in The Nature of Tiles (Video 3).

I'm not sure what you mean by tile behavior. If you haven't seen Video 3 yet though, the answer you're looking for is probably explained there.
 

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
You illustrate making a map from scratch at the end of the video. Can you speak to the nature of over-writing existing maps? Or making new ones?

If you save them as... new, you would need to find hex data that's free, right? I think Usually they're just over-written. If that's the case, what do you do if you wanted to rotate a route, for example, horizontal? Can you invert the Width and Height to change tall routes to be long?
 

Anthroyd

Professor
211
Posts
7
Years
You illustrate making a map from scratch at the end of the video. Can you speak to the nature of over-writing existing maps? Or making new ones?

If you save them as... new, you would need to find hex data that's free, right? I think Usually they're just over-written. If that's the case, what do you do if you wanted to rotate a route, for example, horizontal? Can you invert the Width and Height to change tall routes to be long?
When creating new custom maps, do not add additional map banks or map numbers to AdvancedMap. This is unstable. Instead, clear an already-existing map of its tiles, shove all of the events in a corner, and start anew.

It isn't possible to invert width and height unfortunately. The reason for this is that inverting would mean changing horizontal-looking tiles into vertical-looking ones, such as mountain ledges, and AdvancedMap has no way of knowing what tiles are what.
 

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
What about the data usage? Route X is 10 by 30. (it's long vertically, right? If I switched that to 30 x 10 when I do a new map, would it become unstable? Can the memory realize it's the same amount, just... switched?
 

Anthroyd

Professor
211
Posts
7
Years
What about the data usage? Route X is 10 by 30. (it's long vertically, right? If I switched that to 30 x 10 when I do a new map, would it become unstable? Can the memory realize it's the same amount, just... switched?
Oh! I see what you mean. You're talking about resizing the map under the Header tab, but not adding a completely new map bank to AdvancedMap, right? Yes, that's what you should do. You can edit the existing map sizes as much as you'd like and I don't think you'll ever run into problems. I've never heard of anyone having problems with that.
 

waw

20
Posts
11
Years
  • Seen Nov 12, 2021
Great, thanks.

These are really helpful, the step by step bits. The one thing I might recommend/request is putting out your bits of code you use in the game for download, like you do the info guides (pokemon number, etc). In this way, we can see your data, play with it, as you talk. Probably not necessary, just an idea.
 
7
Posts
7
Years
  • Age 31
  • Seen Jul 31, 2016
This tut series is great so far, but I have some nuanced questions about editing EXISTING scripts. With the way the addressing works, does adding your own lines into an existing script throw off the offsets? Is it best practice to simply copy the script, edit it to have the new behavior, then add it into free space and repoint to your stuff? If I do this, do I need to replace every instance of #org [address] with an #org @name of my own?

Primarily, I'm concerned with editing the opening scene in FR with oak. I want to add the gen 2 starters. How it currently works, is when you pick a pokeball, it sets certain variables (which you're picking, which the rival should pick, etc) at the top, then runs some common code blocks using those variables. I'm concerned about mucking with it, but at the same time, seems a waste to not use perfectly good code.
 

Anthroyd

Professor
211
Posts
7
Years
This tut series is great so far, but I have some nuanced questions about editing EXISTING scripts. With the way the addressing works, does adding your own lines into an existing script throw off the offsets? Is it best practice to simply copy the script, edit it to have the new behavior, then add it into free space and repoint to your stuff? If I do this, do I need to replace every instance of #org [address] with an #org @name of my own?

Primarily, I'm concerned with editing the opening scene in FR with oak. I want to add the gen 2 starters. How it currently works, is when you pick a pokeball, it sets certain variables (which you're picking, which the rival should pick, etc) at the top, then runs some common code blocks using those variables. I'm concerned about mucking with it, but at the same time, seems a waste to not use perfectly good code.

That's a great question! Unfortunately I'm busy kicking major ass today, but I'll make sure to answer your question thoroughly by the end of the night. I'll edit this post.

EDIT:
"Does adding your own lines into an existing script throw off the offsets?"
- Yes. If you add new commands, extend stings of dialog, append new movements, or anything else that requires extra data usage in various locations in the ROM, there will be side effects. For example, if two strings of dialog are stored one after the other in the ROM and you extend the first string by a few characters, part of the second string will be overwritten.

"Is it best practice to simply copy the script, edit it to have the new behavior, then add it into free space and repoint to your stuff? If I do this, do I need to replace every instance of #org [address] with an #org @name of my own?"
- (1) Yes (2) No. If you insert new commands or extend anything, remember to add a #dynamic 0xXXXXXX command to the first line of the decompiled script before you recompile it. XSE will do all of the repointing for you if you use the #dynamic command; you don't have to worry about going through each and every #org 0xXXXXXX line and changing the address.

"I want to add the gen 2 starters."
- If you just change the hex values of givepokemon, showpokepic, etc in the decompiled script, you'll be able to recompile it without any additional data overwriting anything. There might an issue with changing the strings to display other Pokemon names because of the reason mentioned earlier, so it would be best to change what you want to change, add what you want to add, then insert a new #dynamic 0xXXXXXX command at the top.

Copying existing code, changing it slightly, then recompiling it might seem like a waste of data in the ROM. Don't worry about this, it's not a big deal whatsoever, especially if you're hacking Fire Red. If you ever get to the point where you need more space to finish a hack, you can always just expand the file size to 32 MB! :)
 
Last edited:
7
Posts
7
Years
  • Age 31
  • Seen Jul 31, 2016
Okay, that follows what my intuition was saying. Thank you!

"I want to add the gen 2 starters."
- If you just change the hex values of givepokemon, showpokepic, etc in the decompiled script, you'll be able to recompile it without any additional data overwriting anything. There might an issue with changing the strings to display other Pokemon names because of the reason mentioned earlier, so it would be best to change what you want to change, add what you want to add, then insert a new #dynamic 0xXXXXXX command at the top.

In response to this, though, it isn't that simple. I'm putting in 3 more balls, not replacing. Which will be pretty easy. Getting the rival to randomly pick between the two fire types (if you pick grass), et al, will be fun.
 

Anthroyd

Professor
211
Posts
7
Years
InAmberClad said:
Getting the rival to randomly pick between the two fire types (if you pick grass), et al, will be fun.
I remember when I first started getting the hang of scripting, writing the exact same randomness code that you're referring to was very fun and rewarding when I finally got it to work correctly!

I'm updating this thread to alert that the seventeenth tutorial has been completed and released!
 
Back
Top