Pokecrystal pokecrystal For Dummies

Started by Pia Carrot September 19th, 2016 6:10 PM
  • 23422 views
  • 30 replies

Pia Carrot

Driver's High

Age 24
Male
Pummelo Island
Seen 2 Days Ago
Posted May 28th, 2020
854 posts
9.9 Years
November 2019 Update. A lot has changed over the years and the old tutorial just does not cut it anymore.

Hello, I am Pia Carrot and I hack gen 2 exclusively. Long gone are the days of using Goldmap, PKSV, AGIXP, and other tools that barely work on new OS these days. Since 2015, disassembly hs been pretty much the only logical choice for the aspiring gen 2 rom hacker. Why? Well, because it's already completely taken apart and put into easy-to-read code for you! With a simple text editor and a command, you can change things within seconds and build the rom from scratch. Do not fret, my young donut ASMs, ASM isn't necessary unless you are trying to change something very specific like a UI or a new feature. We even have some tutorials to do some of that work for you!

First off, where do I find pokecrystal? Well, here's some links!

Pokegold (incomplete): https://github.com/pret/pokegold
Pokecrystal: https://github.com/pret/pokecrystal

Install guide: https://github.com/pret/pokecrystal/blob/master/INSTALL.md
FAQ: https://github.com/pret/pokecrystal/blob/master/FAQ.md
Documentation: https://pret.github.io/pokecrystal/
Tutorials: https://github.com/pret/pokecrystal/wiki/Tutorials

Some tools you will need:
RGBDS: https://github.com/rednex/rgbds
Cygwin (windows only, refer to INSTALL.MD): https://www.cygwin.com/
Notepad++: https://notepad-plus-plus.org/

Graphics editors:
GraphicsGale: https://graphicsgale.com/us/
PaintXP: https://archive.org/details/MSPaintWinXP
Irfanview: https://www.irfanview.com/

Rangi's epic tools that will make life easy for you:
PolishedMap (Map Editor): https://github.com/Rangi42/polished-map/releases
Tilemap Studio (Tilemap Editor, useful for the town map): https://github.com/Rangi42/tilemap-studio/releases

Other useful tools:
GSC Town Map Editor By Harrison (if you use this over Rangi's tool, not recommended, you will need a hex editor): https://hax.iimarckus.org/topic/97/
GoldFinger (hex editor): https://www.romhacking.net/utilities/204/
Midi2asm: https://hax.iimarckus.org/topic/7671/

OK, I guess this isn't really a tutorial anymore, and more of a resource, but that's how this community rolls! We love to share and keep (almost) everything open to everyone!

Music:
Mmmmmm: https://hax.iimarckus.org/topic/6777/
TriteHexagon: https://hax.iimarckus.org/topic/7684/ https://hax.iimarckus.org/topic/7697/
AzureKeys: https://hax.iimarckus.org/topic/7636/

Graphics:
PiaCarrot (check out the other artists I have linked on my page, they all do GSC graphics!): https://www.deviantart.com/piacarrot
Custom Graphics Thread (older pages are mostly 404d): https://hax.iimarckus.org/topic/197/
I will update graphics with more once we have something more solid to link to, it's kind of all over the place.

Useful Discords:
Pret: https://discord.gg/6EuWgX9
Orange: https://discord.gg/hA96ewC
Polished Crystal: https://discord.gg/2Vtw8Vj
Red++: https://discord.gg/Xah4PRr
Ancient Ruby: https://discord.gg/ZRZg5fG

Gen 2 Banzai!


Seen May 13th, 2020
Posted September 9th, 2018
55 posts
4.5 Years
cool, it's great to have a resource like this!

i understand it's a work in progress so maybe you're planning to add these, but there are definitely more features that are relatively easy to add - replacing/adding moves, changing trainer teams, adding types and items, so on and so forth. i could certainly contribute if you'd like

Pia Carrot

Driver's High

Age 24
Male
Pummelo Island
Seen 2 Days Ago
Posted May 28th, 2020
854 posts
9.9 Years
cool, it's great to have a resource like this!

i understand it's a work in progress so maybe you're planning to add these, but there are definitely more features that are relatively easy to add - replacing/adding moves, changing trainer teams, adding types and items, so on and so forth. i could certainly contribute if you'd like
If you'd like to add on, certainly. I will include it in the resources section as a link to your post. I wanted to provide the bare necessities required to make a basic Pokémon game, anything else would be great!

Also, I assume you are the BynineB, in that sprite pack are a lot of your old sprites that are no longer available online (dead links, etc.) there are a couple I had to restore via google images, so maybe have yourself a nostalgia trip, if you'd like :)


Seen May 13th, 2020
Posted September 9th, 2018
55 posts
4.5 Years
If you'd like to add on, certainly. I will include it in the resources section as a link to your post. I wanted to provide the bare necessities required to make a basic Pokémon game, anything else would be great!

Also, I assume you are the BynineB, in that sprite pack are a lot of your old sprites that are no longer available online (dead links, etc.) there are a couple I had to restore via google images, so maybe have yourself a nostalgia trip, if you'd like :)
oh man, weird to see those, it's been probably 5-6 years since i made them! i should probably touch them up at some point...

anyway, yeah, i'd be happy to help. let's start off with a pretty simple one: changing trainer rosters.

Changing Trainer Rosters
Spoiler:

Locate the "trainers.asm" file in pokecrystal/trainers and open it up in the text editing program of your choice. Helpfully, the top part provides a brief blurb about the formatting of each trainer. They're set up thusly:

db "NAME" (The trainer's name.)
db # (This number determines what values you set for each of that trainer's Pokemon. 0 is just their level and species, using their level up moves as their moveset. 1 lets you define their moveset, too. 2 lets you define their held item, but not their moveset. And 3 lets you define their moveset and their held item.)
Then, below that is the contents of their party. Let's take Falkner, at the very top, as an example. First, we can see that his name is defined as FALKNER and his number is 1, meaning his party has custom moves but no custom items. Second, we can see he has a PIDGEY and a PIDGEOTTO. They're formatted like so:

db #, SPECIES (This is the Pokemon's level and species, respectively.)
db MOVE or 0, repeated 4 times (If a move is listed in one of these four slots, the Pokemon has that move. If a 0 is listed, there will be no move there. Make sure to set all 4 slots, even if it only has one move!)
Editing this is straightforward. If you wanted to change the PIDGEY to a SPEAROW, you'd just write SPEAROW where PIDGEY is. (Caution: Since Falkner has custom movepools, if you don't change that SPEAROW's moves, it'll have the same moves the PIDGEY had! This isn't a problem if custom movepools aren't defined.) If you want to give the PIDGEY GUST instead of TACKLE, you would would replace TACKLE with GUST. If you wanted the Pidgey to have TACKLE, MUD_SLAP, and GUST, you simply have to replace one of the 0s with GUST. And if you wanted to give him a new Pokemon, say PIDGEOT, you would just copy paste PIDGEOTTO or PIDGEY's entry at the bottom above the "db $ff" , replacing their name with PIDGEOT, and changing its level and moves as you see fit. Simple!

Now CTRL-F "BETH". You should arrive at COOLTRAINERF BETH - you'll notice she has db 3, meaning her moves and items are defined! Defining items is also very simple - you'll see in front of RAPIDASH is a comma followed by FOCUS_BAND. If you want to give a roster custom items, make sure the trainer is db 2 or 3, then add a comma in front of their Pokemon's name, followed by the item's name! (If you want one of their Pokemon to have no item, just write NO_ITEM instead.)



Hope this helps!
Male
Seen November 10th, 2016
Posted November 10th, 2016
1 posts
3.7 Years
Hello!

I'd like to know more about scripting. I want to at least make it so that the legendary dogs can be encountered similarly to ho-oh and lugia, so they're in some area where you can walk up to their sprite, talk to them and fight them. I would probably make an event constant that will be set whenever you've fought them in that area, but at the bottom theres this long line of variables. What are they? I notice some of them indicate sprites and the event, but some are numbers with 0 explanation.. Can someone help me with this? I don't want to break the code.

One other thing I'd like to do is make it so you have to fight a new elite 4 when you've gotten all the kanto gyms too..

partys over

Male
california
Seen 3 Weeks Ago
Posted March 17th, 2019
268 posts
5.4 Years
oh man, weird to see those, it's been probably 5-6 years since i made them! i should probably touch them up at some point...

anyway, yeah, i'd be happy to help. let's start off with a pretty simple one: changing trainer rosters.

Changing Trainer Rosters
Spoiler:

Locate the "trainers.asm" file in pokecrystal/trainers and open it up in the text editing program of your choice. Helpfully, the top part provides a brief blurb about the formatting of each trainer. They're set up thusly:



Then, below that is the contents of their party. Let's take Falkner, at the very top, as an example. First, we can see that his name is defined as FALKNER and his number is 1, meaning his party has custom moves but no custom items. Second, we can see he has a PIDGEY and a PIDGEOTTO. They're formatted like so:



Editing this is straightforward. If you wanted to change the PIDGEY to a SPEAROW, you'd just write SPEAROW where PIDGEY is. (Caution: Since Falkner has custom movepools, if you don't change that SPEAROW's moves, it'll have the same moves the PIDGEY had! This isn't a problem if custom movepools aren't defined.) If you want to give the PIDGEY GUST instead of TACKLE, you would would replace TACKLE with GUST. If you wanted the Pidgey to have TACKLE, MUD_SLAP, and GUST, you simply have to replace one of the 0s with GUST. And if you wanted to give him a new Pokemon, say PIDGEOT, you would just copy paste PIDGEOTTO or PIDGEY's entry at the bottom above the "db $ff" , replacing their name with PIDGEOT, and changing its level and moves as you see fit. Simple!

Now CTRL-F "BETH". You should arrive at COOLTRAINERF BETH - you'll notice she has db 3, meaning her moves and items are defined! Defining items is also very simple - you'll see in front of RAPIDASH is a comma followed by FOCUS_BAND. If you want to give a roster custom items, make sure the trainer is db 2 or 3, then add a comma in front of their Pokemon's name, followed by the item's name! (If you want one of their Pokemon to have no item, just write NO_ITEM instead.)



Hope this helps!
Is this really needed? I feel like anyone can look at the already existing code and edit it themselves. Maybe I'm overestimating hackers, but I don't think anyone really needs a guide for this type of thing. Same with the stuff you mentioned before, I think it's pretty easy to figure out.

Pia Carrot

Driver's High

Age 24
Male
Pummelo Island
Seen 2 Days Ago
Posted May 28th, 2020
854 posts
9.9 Years
Is this really needed? I feel like anyone can look at the already existing code and edit it themselves. Maybe I'm overestimating hackers, but I don't think anyone really needs a guide for this type of thing. Same with the stuff you mentioned before, I think it's pretty easy to figure out.
You'd be surprised, I think it's better to spoonfeed, especially when we are trying to encourage people to try the Gen 2 scene out.


partys over

Male
california
Seen 3 Weeks Ago
Posted March 17th, 2019
268 posts
5.4 Years
You'd be surprised, I think it's better to spoonfeed, especially when we are trying to encourage people to try the Gen 2 scene out.
Well, the thing about GSC hacking is the lack of spoonfeeding. I think that people would be discouraged when after reading the guide to editing pokecrystal trainers, they look elsewhere for more delightfully spoonfed tutorials, only to find there are not many more. If you're going to make tutorials showing hackers how to hack every single part of gsc, go ahead, but I don't think the tutorials you are writing help much, because there's a few things more challenging than editing pokecrystal trainers.

Pia Carrot

Driver's High

Age 24
Male
Pummelo Island
Seen 2 Days Ago
Posted May 28th, 2020
854 posts
9.9 Years
Well, the thing about GSC hacking is the lack of spoonfeeding. I think that people would be discouraged when after reading the guide to editing pokecrystal trainers, they look elsewhere for more delightfully spoonfed tutorials, only to find there are not many more. If you're going to make tutorials showing hackers how to hack every single part of gsc, go ahead, but I don't think the tutorials you are writing help much, because there's a few things more challenging than editing pokecrystal trainers.
It's up to other people to contribute and build it up the same way gen 3 hacking was. Before XSE and Advance Map I would argue gen 3 hacking was in a similar state. Everything provided here is enough to build a simple Pokemon game.


Seen September 15th, 2017
Posted September 14th, 2017
2 posts
2.8 Years
As someone completely new to hacking, nice guide. Hopefully someone can add something for changing moves/attacks properly. That's my main issue right now with regard to my goals (I.E. Rebalancing the game as well as making it more difficult).

Gen 3 has so much support (guides) it seems, but I think quite a few people like myself are very interested in Gen 2 and have good ideas, but learning the basics does not seem to be as accessible. This is a good start though.

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 6th, 2019
Posted August 30th, 2019
1,485 posts
11.7 Years
I cant find map_header.asm please help me
It seems they have either renamed and located the file elsewhere than under /maps, or integrated the map headers data in some other file.

Nevertheless, you could either check the commit history of pokecrystal master branch where the data has been moved (google "view commit history github", or try finding help with similar keywords if that doesn't help). You could also join the pret server in Discord and ask others there, where the map headers data has been moved.
Pokémon Dark Energy
Some ROM hacking related stuff

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 6th, 2019
Posted August 30th, 2019
1,485 posts
11.7 Years
Srry but I tried everything exept I cant find the "pret" server can you send me the discord password
Here's an invitation link: https://discord.gg/7pSjRu

It only works for 24 hours, so register tomorrow if you're not registered in Discord yet, and follow that link before it expires in order to join.
Pokémon Dark Energy
Some ROM hacking related stuff