• 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.

Code: ASM Resource Thread

Blah

Free supporter
1,924
Posts
11
Years
If this is not ASM just tell me i'm being stupid, but is there an ASM code that you can use to help you change the HP bars? I want to change mine and ive discovered nothing yet :S

Hi this is just simple graphics hacking. I'm 98% sure that the HP boxes are in UNLZ, it's hacked the same as most other graphics, except there are limitations to size and position due to where the animations take place iirc. But, yes, there isn't the need for ASM hacks to edit this.

Your works are insanely great, I like them all, thanks!

Here are some request
Custom Runtime Trainer
Simply read every data from RAM to built a custom trainer via script, very useful when doing something like battle tower

The ability to adjust the chance to meet a shiny pokemon
Double (or adjust by using percentage) the original chance when set, or having a Shiny Charm inside your bag.

I will work on adjusting shiny encounters. I don't really understand what you mean by "custom runtime trainer".

Aaahmmm....
I dont know how to expand Move tutor, but its ok ^_^ I should throw my request in garbage and think of an implementation that fits on your taste.
Updating Daycare System
This routine will let you put 6 Pokemons in a daycare, making the first 2 Pokemon you put in a daycare will be able to gain experience and to produce an egg, and the remaining 4 pokemon will grow only.
Static Level for a Pokemon
It will be useful for events, like a disease spreads out that causes an Specific pokemon not to grow or gain experience and EV's...
in short, making Magikarp,example, to be permanent level 0

I said I wasn't going to finish the day care system a week ago-ish for imo valid reasons. Static lvls for Pokemon is too hack-specific for me to work on. Not to mention I think it ruins game play.

Hmm... Interesting. Have you tried using it from an item script using Darthatron's item hack? (I know that's a shot in the dark asking that, but that's when I encountered the bug).

At the time, I didn't know there was a built-in decryption function.

Thank you and thank you for this thread. It has inspired me to restart rom hacking. I wish you the best of luck in your future endeavors (and routines).

Admittedly, I haven't used it from an item script. I've used it in overworld plenty of times in different occasions and it all seems to work. Make sure you have a "waitstate" or "waitspecial" right after the special is used. I believe it's set as a task in game, so the rest of the script/routine runs before the special finishes if you don't have those lines following.

Setting Gender for A Trainers Pokemon
All it does is set a var for into whatever slot we want(0-5), then set a var again for gender(0-2) or whatever method you will use, The problem that I think this implementation will encounter is for when we attempt to set the 6 slot even thought it only has 4 Pokemon, but we can prevent that.

Setting gender is actually a harder problem than what you may be lead to believe. It requires mathematical manipulation of the last byte of a Pokemon's PID. This byte ends up controlling to a degree not just gender, but ability, nature and the s.def speed IV as well. Setting "gender" while still hoping to keep randomized stats is actually the same problem as the Shiny Pokemon problem (which I actually solved :P). Why do you want to set gender to enemy Pokemon? It seems like you're just suggesting random things for the sake of making suggestions :/


Kinda announcement:
I'm probably going to stop taking requests by the end of this week. When I started this thread I used to know next to nothing and it was quite fun to discover things, make algorithms and learn stuff all while helping out the community. I've felt some growth as a hacker and the experience was very nice. Recently, I've been a little tempted to make my own hack (that and I'll be helping someone else with theirs as well), so I won't have the time to be dedicating to fulfill requests anymore. Feel free to keep posting them though, if I see something that looks cool, I'll likely come up with an implementation :)

But yeah, thank you so much for the requests and fun these past couple of weeks. It was a blast!
 

Smeargle

Illusory
160
Posts
11
Years
Hey man, love everything you've done so far. You've done a great service to the hacking community along with everyone else who has posted their ASMagic codes here.

That being said now that I've buttered you up :P... Pokemon XY and ORAS have a feature called Consecutive fishing or chain fishing. Basically once the player hooks a pokemon it starts a counter at the end of the battle that goes up by one every consecutive time the player encounters the same pokemon. It greatly increases the chance of the same pokemon getting hooked as well, however if the player encounters a different pokemon or moves from the tile he was fishing on the counter goes back down to 0.
The higher the counter goes the greater the chance of the pokemon being shiny.

If I may request one thing before you stop mass producing these magic codes, It would be this.
However, if it is easier I believe it would be more rewarding if the pokemons level raised as the counter did instead of the pokemon becoming shiny. Or perhaps having the ability to hook it to your wild battle special attacks.

Here are some links:
http://bulbapedia.bulbagarden.net/wiki/Fishing
http://www.serebii.net/xy/fishchain.shtml

Finally, in XY it keeps record of your highest score. If you manage to beat the man who teaches you about this trick record he will reward you with an item.

Now, I'm sure that was a tall order, but if your looking for final requests figured I'd give something I've been looking for.
Thanks either way~
 
215
Posts
11
Years
  • Seen Jul 14, 2020
Hi this is just simple graphics hacking. I'm 98% sure that the HP boxes are in UNLZ, it's hacked the same as most other graphics, except there are limitations to size and position due to where the animations take place iirc. But, yes, there isn't the need for ASM hacks to edit this.

Hey do you know if there is a guide helping me do this? Ive been trying forever!
 

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
Setting gender is actually a harder problem than what you may be lead to believe. It requires mathematical manipulation of the last byte of a Pokemon's PID. This byte ends up controlling to a degree not just gender, but ability, nature and the s.def speed IV as well. Setting "gender" while still hoping to keep randomized stats is actually the same problem as the Shiny Pokemon problem (which I actually solved :P). Why do you want to set gender to enemy Pokemon? It seems like you're just suggesting random things for the sake of making suggestions :/

Sorry, I just want to make a trainer who's his gender is same to his pokemon, sorry for my damn question
 

Blah

Free supporter
1,924
Posts
11
Years
Hey man, love everything you've done so far. You've done a great service to the hacking community along with everyone else who has posted their ASMagic codes here.

That being said now that I've buttered you up :P... Pokemon XY and ORAS have a feature called Consecutive fishing or chain fishing. Basically once the player hooks a pokemon it starts a counter at the end of the battle that goes up by one every consecutive time the player encounters the same pokemon. It greatly increases the chance of the same pokemon getting hooked as well, however if the player encounters a different pokemon or moves from the tile he was fishing on the counter goes back down to 0.
The higher the counter goes the greater the chance of the pokemon being shiny.

If I may request one thing before you stop mass producing these magic codes, It would be this.
However, if it is easier I believe it would be more rewarding if the pokemons level raised as the counter did instead of the pokemon becoming shiny. Or perhaps having the ability to hook it to your wild battle special attacks.

Here are some links:
http://bulbapedia.bulbagarden.net/wiki/Fishing
http://www.serebii.net/xy/fishchain.shtml

Finally, in XY it keeps record of your highest score. If you manage to beat the man who teaches you about this trick record he will reward you with an item.

Now, I'm sure that was a tall order, but if your looking for final requests figured I'd give something I've been looking for.
Thanks either way~

Well, since you buttered me up...I'll accept this request. Nahh, jk. I actually didn't know about this kinda feature but it seems fun. I love doing ports and "systems" and stuff because those can be challenging to implement as well as rewarding to finish. Anyways, your request is accepted :P

Hey do you know if there is a guide helping me do this? Ive been trying forever!

Hi, I'm 99% sure it's just an image in UNLZ. http://www.pokecommunity.com/showthread.php?t=129606
Changing the size and the position of it may be difficult, but the image change is kinda easy. Anyways, if you're not sure if something belongs here, it's fine to ask in the simple questions thread first before bringing it here. Not that I really mind, but it keeps the thread organised :)

Sorry, I just want to make a trainer who's his gender is same to his pokemon, sorry for my damn question
It seems I may have offended you. Let me explain why I think making Pokemon the same gender as their trainer is not worth the effort. Before that, I want to point out that I said that I wouldn't make routines that didn't interest me or that not more and a few people can use. I want to make relevant routines which will stay relevant. I don't want to make a routine that'll be used in someone's hack once or twice and that's it. It's just not worth the effort or the work.

Think about it for a second. Make the trainer with the same gender as his Pokemon? I just don't see the point. Things like nicknaming, I've done for you because I can see SOME people using it. However, gender setting? Honestly, who cares about gender unless you were going to make a complete anime/mange remake with genders for the MC's Pokemon. Mostly, this routine is a little hard and the reward is null. Only you would use it since its creation, and I'm not writing routines for you, I'm writing them for everyone's uses and my enjoyment.
 
199
Posts
12
Years
  • Seen Jul 18, 2016
I'm not 100% sure about this, but wasn't the gender of the Pokemon automatically set to the trainers gender?
 

Ephraim225

Freaky Frillish Guy
161
Posts
10
Years
Oh darn. I should've posted my request sooner. Guess I'll do it anyways. I have a request and something to contribute actually; these are both for Emerald.

My contribution is this:

Evolution based on contest condition
Spoiler:


And my request is an ASM code to Check the number of ribbons a Pokemon has from a particular contest. I'm not sure if Emerald has anything like Special 0x9F from Fire Red so if the code is only able to read the first Pokemon in the party I'm okay with that as I can check a Pokemon's ribbons from a particular contest and have that be output to LASTRESULT or something. I could probably do this on my own actually, but, I don't know where the game stores ribbon data, unfortunately.

Yes, I am a contest nut.
 

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
It seems I may have offended you. Let me explain why I think making Pokemon the same gender as their trainer is not worth the effort. Before that, I want to point out that I said that I wouldn't make routines that didn't interest me or that not more and a few people can use. I want to make relevant routines which will stay relevant. I don't want to make a routine that'll be used in someone's hack once or twice and that's it. It's just not worth the effort or the work.

Think about it for a second. Make the trainer with the same gender as his Pokemon? I just don't see the point. Things like nicknaming, I've done for you because I can see SOME people using it. However, gender setting? Honestly, who cares about gender unless you were going to make a complete anime/mange remake with genders for the MC's Pokemon. Mostly, this routine is a little hard and the reward is null. Only you would use it since its creation, and I'm not writing routines for you, I'm writing them for everyone's uses and my enjoyment.

sorry again, dont worry I didnt took it seriously, I know that this is my fault, Ill think a better suggestion, I also recognized that my requests will be used for particular hacks, not for general. sorry again.
 

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
A bit late, but actually, the gender of a Pokemon is determined by the "trainer gender" if and only if the Pokemon has a 50-50 gender. Other than that, it goes to the one that has a higher chance, like for example, a trainer's Torchic will always be male unless edited.
 

Mystery Man

Don't be like me!
207
Posts
12
Years
  • Age 28
  • Seen Aug 21, 2023
[FONT=&quot]Thank you so much for all of your work. So many conveniences we can easily add to our hacks! Really, thank you![/FONT]

[FONT=&quot]I do have some requests, mostly for those who seek to make battle facilities (i.e. tournaments) and the like into their hacks.[/FONT]
[FONT=&quot]…The ability to turn off experience gain upon setting a flag (and [FONT=&quot]on upon clearing it[/FONT]). This could also work well with the set level routine you've made, especially in parts where the team is temporarily set to a level to match the opponents (to avoid having the slightest advantage over them (gaining a level [FONT=&quot]during the[/FONT] fight.))[/FONT]
[FONT=&quot]…The ability to change battle styles (Shift, Set) via script. The battle style in battle facilities is always Set. In addition to that, this can be useful to people who want to make the important fights in their hack more chal[FONT=&quot]lenging and [FONT=&quot]perhaps "fairer"[/FONT][/FONT] -- by eliminating that one huge advantage the player has over the opponent temporarily.[/FONT]
[FONT=&quot]…Givepokemon with custom attacks. Like Extremespeed Dratini in Crystal and event Pokémon.[/FONT]
 
33
Posts
10
Years
  • Age 28
  • Seen Sep 23, 2022
How about some requests to actually break some trainers?

Can you add a battle mode like Battle Frontier battles? (You can't use items, battle is turned to set, you don't get XP during the battle.)
Let's say you use this battle style for certain trainers like Gym Leaders and Rivals. It would ramp up the difficulty of a hack without needing for some crazy stuff like giving Brock a lv.100 Diancie for the player's first gym battle.

Another suggestion I think that it would be interesting is expanded trainer sight.
For example, a trainer can spot you from a wider range (I always thought it was weird seeing the player at a diagonal spot close to the trainer and the trainer not even noticing.

How about a player detection system? Let's say the player is captured by team rocket.
The player needs to get out of the rocket base and there are no allied pokémon or cardboard boxes, so he needs to avoid the grunts patrolling. If he gets caught, he gets locked in again. That would be interesting to use with the expanded trainer sight I mentioned earlier.

A NPC that explicitly tells a pokémon's current IV and EV spread would be cool too, but I don't know if that can be done just with scripting.

Another NPC that tells what moves a pokémon can learn via level-up would be very useful too, since most hacks mess up with movepools, and since most hackers don't post their movepool changes the players are often left in the dark. And that's terrible.

And just some personal curiosity here. Is there a limit to how many Move Tutors you can have in the game?
Edit: More random curiosity. Since apparently there's no simple tool to edit some move effects of MrDollSteak's Rom Base, could you explain how I can edit the moves manually? I wanted to get more moves boosted by Mega Launcher, but I really have no idea on how to do that. Since it could require ASM, I figured that you might know something.

Good luck with your hack. Considering how much you've done just in this thread, I know that it's something to look forward to.
 
Last edited:

Smeargle

Illusory
160
Posts
11
Years
I love the all asm everyone on this topic has created for the community,
That being said, with permission, I am going to take it one small step further to make some of the more complicated asm into fully compatible patches; just for those of you out there who see these features, love them to bits, but can't work a hex editor to save your soul. ;P

Anyways, I was just going to go down the line of codes and patch them but I think it may be better to ask what you guys want as patches.
I'd like to also be careful I don't derail this thread by turning it into a patch request section, so if you do have one you would like send me a vm or pm so we can keep things organised here.

Furthermore, all future patches will be placed onto this post here, along with notes containing the locations of all the routines inside the rom.
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
I love the all asm everyone on this topic has created for the community,
That being said, with permission, I am going to take it one small step further to make some of the more complicated asm into fully compatible patches; just for those of you out there who see these features, love them to bits, but can't work a hex editor to save your soul. ;P

Anyways, I was just going to go down the line of codes and patch them but I think it may be better to ask what you guys want as patches.
I'd like to also be careful I don't derail this thread by turning it into a patch request section, so if you do have one you would like send me a vm or pm so we can keep things organised here.

Furthermore, all future patches will be placed onto this post here, along with notes containing the locations of all the routines inside the rom.

I feel like the only issue with patches is that they don't adjust well to existing ROMs. If you patch the ROM with the routine at 800000, then it could mess up someone else's hack by causing existing data to be overwritten. It would actually be kinda interesting (and maybe worthwhile as a personal project) to have a patcher which adjusts properly to different offsets and freespace, ie it could contain the binary data for the routine and a list of offsets to modify, and then just relocate the data as needed.
 
3,044
Posts
9
Years
I love the all asm everyone on this topic has created for the community,
That being said, with permission, I am going to take it one small step further to make some of the more complicated asm into fully compatible patches; just for those of you out there who see these features, love them to bits, but can't work a hex editor to save your soul. ;P

Anyways, I was just going to go down the line of codes and patch them but I think it may be better to ask what you guys want as patches.
I'd like to also be careful I don't derail this thread by turning it into a patch request section, so if you do have one you would like send me a vm or pm so we can keep things organised here.

Furthermore, all future patches will be placed onto this post here, along with notes containing the locations of all the routines inside the rom.

Patches would be incredible to some FireRed hackers out there. And if you can do the find free space thing Shiny Quagsire was talking about, its gonna be legendary.
 

Smeargle

Illusory
160
Posts
11
Years
I feel like the only issue with patches is that they don't adjust well to existing ROMs. If you patch the ROM with the routine at 800000, then it could mess up someone else's hack by causing existing data to be overwritten. It would actually be kinda interesting (and maybe worthwhile as a personal project) to have a patcher which adjusts properly to different offsets and freespace, ie it could contain the binary data for the routine and a list of offsets to modify, and then just relocate the data as needed.

That's a really good idea, I've already written down areas of free space compatible with Jpan and Mrsteakdolls Rom-bases so I will definitely get looking into a more organized way of using these patches. Compatibility is my main concern with these patches, I had already made plans to make them modular as best I could.

I totally agree though, it's about time patches got more love.
Once I get a bit of planning done, I will look to collaborate with someone around the forum who can make a tool.
The idea now, based off what you've said, is to create a table of offsets leading to the actual routines which the program would locate the space for. However if I cannot get assistance from anyone with knowledge I will work my best to replicate a system using data near the end of the 16mb rom (ie. 80EB0000+) and one for a 32mb rom.
The new idea would be an easy way to add and remove patches, like a mod system. The program would look at the table of offsets, were you could then have the choice to delete, add, or edit. I understand some routines require hooks into vanilla stuff, but I imagine someone with programming skills can have it save a backup of all edits made in case deletion is required.

I actually think I may make a new thread on this, this will get more attention that way. But before I do I will make some form of a mockup.
 
Last edited:
416
Posts
11
Years
  • Age 34
  • Seen Feb 10, 2024
I agree patches are a bad idea... a tool is a far better idea... maybe someone should get on that... hrmm that locksmitharmy guy might be tempted to make one. ;)

Im just worried about how adjustible they should be. I could make a tool that is expandible to add more stuff later...

What would we call it... the "awesome asm adder tool"?
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
While it seems pretty obvious most people are against a patch, I'd also like to say that I think that a patch would be a bad idea. It gets rid of the whole customisation aspect, as well as having quite a few logistical issues to work.

I agree patches are a bad idea... a tool is a far better idea... maybe someone should get on that... hrmm that locksmitharmy guy might be tempted to make one. ;)

Im just worried about how adjustible they should be. I could make a tool that is expandible to add more stuff later...

What would we call it... the "awesome asm adder tool"?

What about naming it something to do with FBI, such as FBI's Babies Inserter. Something like that.
(Babies cause y'know these routines are his babies).
 
Back
Top