Welcome to the PokéCommunity!

Hi there! Thanks for visiting PokéCommunity. We’re a group of Pokémon fans dedicated to providing the best place on the Internet for discussing ideas and sharing fan-made content. Welcome! We’re glad you’re here.

In order to join our community we need you to create an account with us. Doing so will allow you to make posts, submit and view fan art and fan fiction, download fan-made games, and much more. It’s quick and easy; just click here and follow the instructions.

Pokémon Sun and Moon are now available! Read our extensive Sun and Moon review at Daily!

The finale of the fourth annual Favorite Pokémon Tournament is underway in Pokémon General!View the poll and vote for as many Pokémon as you'd like. Voting is only open until the 5th of December though, so don't wait to make your picks!

Research & DevelopmentGot a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Research & Development programs in this forum are subject to moderator approval before they are displayed.

Now this has probably posted before but I couldn't find it and it seems like a fun feature: Riding pokémon like in the upcoming games.

I'm not too well versed with programming but my idea is as follows:

My idea would be to have a bit for each pokémon that determines whether it is "ridable" or not. On the menu where you can view the pokémon's stats, held item etc there would be a check for this bit and if it is the value that means its ridable a ride option would appear, if not it wouldn't. Once selected the appropriate overworld would be loaded determined by something unique to each pokemon (id number?) and all would be great. Obviously going through this step everytime you want to ride a pokémon would be tedious so this feature could replace the bike. The last pokemon you rode could be stored somehow so when you press select the game would look to see if that pokémon was in your party and if not it would just load the regular bike sprite.

There would need to be a lot of custom overworlds made but the HGSS pokemon overworlds could be used for now.

As I said previously I'm not familiar with coding so various details could be wrong/far more complicated than I made out.

Something similar could be done with surf I guess.

Has anyone considered/attempted this before? I do think it would make a very interesting feature.

This would be interesting. I'm imagining more of a hack of the surf routine for this.... Just run that whole routine the same, but make the image change.

I acutally thought about this when I was asking the new cut like moves thingy. My current idea is to hijack the overworld routine(which basically takes the Overworld ID as input and then loads the sprite) so that the bike overworld is replaced by a dynamic ID. This way you don't have to concern about graphics anymore. I actually already wrote such a routine, but replaced the normal hero OW, it would not be a problem to extend this for the bike OW though. I also thought about making an item to do this job, one could basically hack the bike routine to do this and just check for any ridable pokémon in the current party. If there is no such pokémon it would basically not work and display a message. It would be way cooler though to have the ability on the pokémon itself(Like on the menu or as a dedicated move)

I may also give you the code sample for this if you want just ask me via PM it's for the german emerald version though (BPED) and you need to figure out the needed branches and routines yourself for your version(also the dedicated offsets)

What would be still really nice would be a way to implement this in a user friendly way. An item would be fine but how would it look like? Like a whip? Guess that would be rather harsh. Also the user can't decide which pokémon to ride this way. Not the best option I suppose...

I acutally thought about this when I was asking the new cut like moves thingy. My current idea is to hijack the overworld routine(which basically takes the Overworld ID as input and then loads the sprite) so that the bike overworld is replaced by a dynamic ID. This way you don't have to concern about graphics anymore. I actually already wrote such a routine, but replaced the normal hero OW, it would not be a problem to extend this for the bike OW though. I also thought about making an item to do this job, one could basically hack the bike routine to do this and just check for any ridable pokémon in the current party. If there is no such pokémon it would basically not work and display a message. It would be way cooler though to have the ability on the pokémon itself(Like on the menu or as a dedicated move)

I may also give you the code sample for this if you want just ask me via PM it's for the german emerald version though (BPED) and you need to figure out the needed branches and routines yourself for your version(also the dedicated offsets)

What would be still really nice would be a way to implement this in a user friendly way. An item would be fine but how would it look like? Like a whip? Guess that would be rather harsh. Also the user can't decide which pokémon to ride this way. Not the best option I suppose...

~SBird

I think a saddle would work. However, your method is much more difficult than mine. The structure of OWs involves 4 different tables, and each sprite, just for headers and pointers, nevermind the images themselves, would need at least 30 bytes, per image. For my idea, we would just read directly from an image table with 12 bytes max (pokemon number (2bytes), img pointer (4 bytes), palette pointer (4 bytes)). And we wouldn't have to deal with all of the extra data that OWs have.

Also, I'm sad to say, that on Emerald, there is no hack to allow more than 256 OWs. Right now, emerald is already at 240. This would limit you to an extreme amount unless you port over JPAN's massive OW hack.

On another note, we could also just hack the OW loader, so that when it is loading the bike, we simply push it to a different table, but using all of the same parameters as the bike. Then we wouldn't need to worry about expanding OWs.

If Jambo is interested, he could code it into a move himself, since he knows how to, but I don't know if this would be his thing.

If you do want to continue with the bike OW thing, go to RHO. I just finished code to force an immediate OW switch that doesn't require a reload of the screen or warping.

I think a saddle would work. However, your method is much more difficult than mine. The structure of OWs involves 4 different tables, and each sprite, just for headers and pointers, nevermind the images themselves, would need at least 30 bytes, per image. For my idea, we would just read directly from an image table with 12 bytes max (pokemon number (2bytes), img pointer (4 bytes), palette pointer (4 bytes)). And we wouldn't have to deal with all of the extra data that OWs have.

Also, I'm sad to say, that on Emerald, there is no hack to allow more than 256 OWs. Right now, emerald is already at 240. This would limit you to an extreme amount unless you port over JPAN's massive OW hack.

On another note, we could also just hack the OW loader, so that when it is loading the bike, we simply push it to a different table, but using all of the same parameters as the bike. Then we wouldn't need to worry about expanding OWs.

If Jambo is interested, he could code it into a move himself, since he knows how to, but I don't know if this would be his thing.

If you do want to continue with the bike OW thing, go to RHO. I just finished code to force an immediate OW switch that doesn't require a reload of the screen or warping.

I don't think it would be a problem to expand the OW table or at least use some sort of switch to use an alternate table if needed. I did not try it though. I already have my code to change the OW. Actually as said i'm only hijacking the loader routine and switching out the parameter(which is passed by r0 or r1, not quite sure at the moment) to make the game load a different OW. It does not actually effect how the sprite is handled by the game, so if you load a sprite without running animation you won't have one, the game will just accept it as being the new hero OW. If you do load a sprite with a few extra frames it will be no problem eighter, they are just not used. Also if you replace the bike and use the bike routine one will be able to "ride" a pokémon. If it is needed you would also have to expand the OW table. In fact this is (i guess) regulated by a simple cmp opcode to check if the passed argument is greater than the fixed value, if it is, it handles it differently and I guess OWs over 255(1byte) will be killed by the standardized lsl lsr structures that classifies the argument as a byte value, leaving only the last 8 bit of the parsed value. If someone wants to increase the amount of OWs in the table he would have to a) repoint the table to somewhere in the rom, b) increase the parsed value to at least half-word size and c) bypass the compare that is used by the game to check wether the OW is one of the "special treated" ones. Maybe you could arrange it so that those won't get lost and you just load your real OWs above the byte border again. I don't know exactly what those few OWs are for, but I guess if you are able to keep them you always should because it's part of the main game.

I did once write a routine to at least use more than one OW table therefore I know that it's working, but I did not test to expand the current table at all. I just don't see any obstacles(I did not look at JPANs routines eighter, since they are all for Firered and I guess at least in the part of how the game handles overworlds those two have some differences, at least in FR OWs are also captable of executing scripts if the right sort of behavior byte is set, this is not the case in Emerald)

Well I guess i will try to use some sort of item first, for the moment I just can't come up with another solution probably it is also possible to implement some sort of "professional tamer" who allows you to "set" your saddle to a specific pokémon which of course can be "ridden" so you have an actual explanation for the player. Still using a ride move would be the best solution(in my opinion) but who knows what the future brings...

~SBird

Edit: I guess if one expands the OW table he is also not able to use the new OW regularly on a map, at least advance map does not allow half word sized values. I don't know if this is also stored in byte form but it should'nt bother the game if it loads it from a dynamic ram adress like a in-game variable or something, you can basically store the "new bike" OWs and everything you do not need to use like regurarly on a map beyond the byte limit and your regular ows befor that. I don't know how JPAN worked himself arround this problem, I'm pretty sure advance map and other mapping tools won't support entrys beyond one byte if the map structure does not allow it. JPAN would have to hack the whole map structure which would make all the normal maps unuseable and the tools had to adapt themselves which is also unknown to me(Maybe i'm just uninformed)

I don't think it would be a problem to expand the OW table or at least use some sort of switch to use an alternate table if needed. I did not try it though. I already have my code to change the OW. Actually as said i'm only hijacking the loader routine and switching out the parameter(which is passed by r0 or r1, not quite sure at the moment) to make the game load a different OW. It does not actually effect how the sprite is handled by the game, so if you load a sprite without running animation you won't have one, the game will just accept it as being the new hero OW. If you do load a sprite with a few extra frames it will be no problem eighter, they are just not used. Also if you replace the bike and use the bike routine one will be able to "ride" a pokémon. If it is needed you would also have to expand the OW table. In fact this is (i guess) regulated by a simple cmp opcode to check if the passed argument is greater than the fixed value, if it is, it handles it differently and I guess OWs over 255(1byte) will be killed by the standardized lsl lsr structures that classifies the argument as a byte value, leaving only the last 8 bit of the parsed value. If someone wants to increase the amount of OWs in the table he would have to a) repoint the table to somewhere in the rom, b) increase the parsed value to at least half-word size and c) bypass the compare that is used by the game to check wether the OW is one of the "special treated" ones. Maybe you could arrange it so that those won't get lost and you just load your real OWs above the byte border again. I don't know exactly what those few OWs are for, but I guess if you are able to keep them you always should because it's part of the main game.

I did once write a routine to at least use more than one OW table therefore I know that it's working, but I did not test to expand the current table at all. I just don't see any obstacles(I did not look at JPANs routines eighter, since they are all for Firered and I guess at least in the part of how the game handles overworlds those two have some differences, at least in FR OWs are also captable of executing scripts if the right sort of behavior byte is set, this is not the case in Emerald)

Well I guess i will try to use some sort of item first, for the moment I just can't come up with another solution probably it is also possible to implement some sort of "professional tamer" who allows you to "set" your saddle to a specific pokémon which of course can be "ridden" so you have an actual explanation for the player. Still using a ride move would be the best solution(in my opinion) but who knows what the future brings...

~SBird

Edit: I guess if one expands the OW table he is also not able to use the new OW regularly on a map, at least advance map does not allow half word sized values. I don't know if this is also stored in byte form but it should'nt bother the game if it loads it from a dynamic ram adress like a in-game variable or something, you can basically store the "new bike" OWs and everything you do not need to use like regurarly on a map beyond the byte limit and your regular ows befor that. I don't know how JPAN worked himself arround this problem, I'm pretty sure advance map and other mapping tools won't support entrys beyond one byte if the map structure does not allow it. JPAN would have to hack the whole map structure which would make all the normal maps unuseable and the tools had to adapt themselves which is also unknown to me(Maybe i'm just uninformed)

JPAN's hack, in its entirety, enables up to 65000 and most of the routines taken exist in all Advance Gen games, especially the main loader, which is exactly the same. However, I have a better idea.

What I am seeing, if we continue with the bike, is a hack near the end of the routine which branches if the hero's bike is being loaded. At that point, we send it to check a var which will then read from a table and load the correct sprite. This, combined with my OW hack (simply for instaloading of palettes) would work well and wouldn't require an expansion of OWs.

JPAN's hack, in its entirety, enables up to 65000 and most of the routines taken exist in all Advance Gen games, especially the main loader, which is exactly the same. However, I have a better idea.

What I am seeing, if we continue with the bike, is a hack near the end of the routine which branches if the hero's bike is being loaded. At that point, we send it to check a var which will then read from a table and load the correct sprite. This, combined with my OW hack (simply for instaloading of palettes) would work well and wouldn't require an expansion of OWs.

That could probably work as well, guess I'm going to consider implementing some of that after I finished implementing all the gen4/5 stuff...
There is still no solution for the "how", I'm still not converned by the idea of implementing an item for the sole purpose of riding a pokémon which you can't even choose.

If you ever feel the urge to stone a Pokemon to death, setting the byte at 080169D4 from 0x6 to 0x0 will make it so Pokemon don't flee after throwing 20 rocks at them in the safari zone in Fire Red. Not sure if anyone will ever actually use this but whatever.

That could probably work as well, guess I'm going to consider implementing some of that after I finished implementing all the gen4/5 stuff...
There is still no solution for the "how", I'm still not converned by the idea of implementing an item for the sole purpose of riding a pokémon which you can't even choose.

~SBird

How is REALLY easy. We just make an item that checks species vs a table. If the species number appears on the table, said pokemon can be ridden. Now, it is only what that item is.

The behavior bytes in Advance Map are stored in a really weird format. The later ones such as 80s-90s usually display messages. Each script is 9 bytes long, and is stored in a table. So I decided to find the start of said table by going 9 bytes left until I hit 0. The problem is, The area where I ended contains scripts like adding an item from "MSG_OBTAIN". So this is a stumble...

In Jambo's DirectSound voices per moment extention he said that the maximum for FR/LG/E is 12 DirectSound voices per moment and 7 in R/S. If you will choose a higher number, the game will probably freeze, crash, slow down etc.

In Jambo's DirectSound voices per moment extention he said that the maximum for FR/LG/E is 12 DirectSound voices per moment and 7 in R/S. If you will choose a higher number, the game will probably freeze, crash, slow down etc.

So is it possible to extend the limit using an ASM code?

It's tied to the way that the IWRAM is used, so not without a huge overhaul of the engine, and even if you did, you could only gain 4 extra channels (not tracks).

In all the GBA games, the max number of tracks is 10. The max number of channels is what you're changing.

__________________

Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

I just finished code to force an immediate OW switch that doesn't require a reload of the screen or warping.

Could your code in theory be adapted for an item. I could think of a load of uses for various costumes within the game, especially if the game is able to check the players OW id number. And if the bag had its own "costume" pocket it could had a whole new level of customisation.

Oh and I think a saddle would be the most appropriate item in order to ride pokemon.

Just a little random thing, in Emerald, editing the byte at 0x08070978 and 0x08071414 will change the level an egg will hatch at. This works for stuff given by the giveegg command, as well as from the Day-Care.

__________________

I think I'm done with ROM hacking. I'll still pop in and visit, though.

The offsets 0x02023C5D and 0x02023C5E control the opponent Pokémon's primary and secondary type, respectively.
Changing them will also change attack effectiveness, and probably also catch rates of balls like the net ball.

Help

The PokéCommunity

Meta

Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, or The Pokémon Company International. We just love Pokémon.