• 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

C me

Creator of Pokemon League Of Legends
681
Posts
10
Years
    • Seen Apr 9, 2021
    This is for Pokemon Emerald.

    Basically to balance strong moves like hyper beam, those moves have a recharge turn where you can't use any moves. This forces the player to use these moves in a more tactical way like behind a substitute or something. As I am thinking of implementing new moves into my hack, some of them will be op and therefore would be unfair to spam every turn.

    The 'recharge' effect would not be optimal for what I want to do though, what would seem more optimal is something similar to the disable feature.

    I can't post links yet but im sure you know how it works.

    The 'cooldown' mechanic would work like this: after a move has been used the next turn it cannot be used again but other moves can. Just like with disable there is a message box saying 'cooldown'which conveniently has the same number of letters as 'disabled' so no need to repoint. If the move is selected a message box will appear saying 'X is on cooldown', x being the move. Unlike the move disable, the number of turns the move would be disabled for isn't random but is preset somewhere in the ROM in a 'disable table' where each move would have a value for the number of turns to be disabled. Multiple moves can be disabled at the same time and if all the moves are disabled then struggle is used, although this would almost never happen because most moves will be disabled for less than 4 turns. This effect would also have to happen for the AI. If possible the disable timer wouldn't stop through status effects and a move will not be enabled after switching the pokemon out,i.e not a temporary status condition.

    I know this will require ASM knowledge which I really don't have but I can work my way around a hex editor if that helps.

    So I guess my question is how could this be implemented and how difficult is it to implement?

    I understand this is a big ask but it's a core feature to my new battle system and I don't think it is impossible to do.

    Thank You
     
    9
    Posts
    11
    Years
  • if possible could you make a code to give gift pokemon custom/hidden abilities that are carried during evolution and also a code that lets you choose which ability a trainers pokemon has
     
    Last edited:

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • if possible could you make a code to give gift pokemon custom/hidden abilities that are carried during evolution and also a code that lets you choose which ability a trainers pokemon has

    Hi, the Pokemon with custom attack routine covers "gifted" Pokemon's movesets. I'm not sure what you mean by, "carried during evolution". Perhaps you can specify a little more?

    I'll work on a routine to edit trainer Pokemon's stuff soon. Btw, I'm personally open to requests again, though I probably don't want to do anything battle related :x
     
    9
    Posts
    11
    Years
  • Hi, the Pokemon with custom attack routine covers "gifted" Pokemon's movesets. I'm not sure what you mean by, "carried during evolution". Perhaps you can specify a little more?

    I'll work on a routine to edit trainer Pokemon's stuff soon. Btw, I'm personally open to requests again, though I probably don't want to do anything battle related :x

    What i mean is that say in your hack you had given bulbasaur overgrow and effect spore but you wanted a special gift one with chlorophyll well would it be possible to do that and by carried by evolution i mean if said bulbasaur was to evolve it would still have chlorophyll
     

    Kenny1

    On a break from Rom hacking, to improve other skil
    86
    Posts
    10
    Years
    • Seen Nov 6, 2017
    I googled it so I dont know if it has been done, I have watched a youtube vid about changing player OW in FireRed but the uploader didnt give the code, could you find that out?

    JPAN did it, I think that is what you're looking for.
     

    Lance32497

    LanceKoijer of Pokemon_Addicts
    792
    Posts
    9
    Years
  • hello, can anyone here make an evolution method where when pokemon's holding an specific item(like trade holding item) maxed out its happiness, it will evolve..
    I think it will just combine Via Happiness and Trade holding item)
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • What i mean is that say in your hack you had given bulbasaur overgrow and effect spore but you wanted a special gift one with chlorophyll well would it be possible to do that and by carried by evolution i mean if said bulbasaur was to evolve it would still have chlorophyll

    I'm pretty sure that's how it works ingame already. The ability bit doesn't change when a Pokemon evolves in FR. 90% sure.

    hello, can anyone here make an evolution method where when pokemon's holding an specific item(like trade holding item) maxed out its happiness, it will evolve..
    I think it will just combine Via Happiness and Trade holding item)

    Yeah, that's exactly how it would be done. Though these kind of evolutions, which can happen at any time are harder to handle in game. We would have to do the checks kinda frequently. The question becomes, how frequent? Well actually not frequent at all. Just two checks in both scenarios. Pokemon reaches max happiness and Pokemon receives item. So if I was coding this I'd make two different breaks at the Happiness adder, and a second at the give item part.

    Was that the information you were looking for? Or did you want me to do one for you?
     

    Lance32497

    LanceKoijer of Pokemon_Addicts
    792
    Posts
    9
    Years
  • I'm pretty sure that's how it works ingame already. The ability bit doesn't change when a Pokemon evolves in FR. 90% sure.



    Yeah, that's exactly how it would be done. Though these kind of evolutions, which can happen at any time are harder to handle in game. We would have to do the checks kinda frequently. The question becomes, how frequent? Well actually not frequent at all. Just two checks in both scenarios. Pokemon reaches max happiness and Pokemon receives item. So if I was coding this I'd make two different breaks at the Happiness adder, and a second at the give item part.

    Was that the information you were looking for? Or did you want me to do one for you?

    Since you gave the detailed info, it is both, actually, all I know is to make it happens, we must combine Trade holding item and Happiness, and this is a request lol, since you are now accepting again, but you can use Kearnseyboy6's routines to compare, I think
     

    daniilS

    busy trying to do stuff not done yet
    409
    Posts
    10
    Years
    • Seen Jan 29, 2024
    oh it is great and why not have Emerald ASM code?

    FBI likes being silly so he hates Emerald :P. I do believe some routines on here are for Em though, and you can always port the others yourself.
     

    RichterSnipes

    Not even a nibble...
    513
    Posts
    12
    Years
  • I'd like to report an issue with the code pertaining to the Infinte TM Usage implementation for FireRed. If you teach a TM to a Pokémon with less than four known moves and watch the entire TM learning animation, the TM will be removed from your TM Case.

    I actually would have never noticed that this happened had someone else not pointed it out to me. Everything else works wonders!
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • What i mean is that say in your hack you had given bulbasaur overgrow and effect spore but you wanted a special gift one with chlorophyll well would it be possible to do that and by carried by evolution i mean if said bulbasaur was to evolve it would still have chlorophyll

    I know what you're talking about, but abilities are done wierdly so they don't allow themselves to be easily changed/edited to any arbitrary ability. Abilities in FireRed are derrived from the PID and is represented by a single bit. If that bit is ON then the Pokemon gets it's second ability otherwise it gets it's first ability as defined in the Pokemon table. My ability swapper hack simply just inverses the bit, however you're restricted here. Since the ability is stored as a single bit, there is no way for us to calculate which ability to give, because it simply only has two possible states. You can't really expand this because the bit is stored in the Pokemon data structure in RAM which doesn't have very much free space. While I probably can find a little bit of space inbetween the 0x0 padding of values, these bytes are probably better used for things like a Pokerus feature.

    I googled it so I dont know if it has been done, I have watched a youtube vid about changing player OW in FireRed but the uploader didnt give the code, could you find that out?

    You'll see my version...soon.

    I'd like to report an issue with the code pertaining to the Infinte TM Usage implementation for FireRed. If you teach a TM to a Pokémon with less than four known moves and watch the entire TM learning animation, the TM will be removed from your TM Case.

    I actually would have never noticed that this happened had someone else not pointed it out to me. Everything else works wonders!

    Thanks for reporting it, I'll look into the cause!

    For everyone using these routines:
    If you find any bugs in anything please do report them. Make sure that the bugs are caused by the code and not insertions errors on your part though, ty.
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • Changing the Player's Overworld ingame


    Intro:

    I recently made this routine, it's kind of limited in the sense that you can only be change to 30 different overworlds (excluding the special version of the default characters). While it is limited, I don't really think that that's a problem (you'd probably only be OWs swapping to 2-3 different OWs the entire game anyways, so unless you wanted to player to play as more than 30 characters, this routine will work just fine for you). It's also a little "smaller" in comparison to JPAN's 6 seperate routines which he used (though in his favor, I don't think his limits the amount like mine). I blame the table, it's weird. Actually the whole overworld loading thing is weird..it's done in like 9 places lol.

    I should also note that if the OW you're changing to doesn't have a running frame, things are going to look weird when you try to run~

    How to insert:

    Compile into free space the following routine:
    Spoiler:


    Now navigate to 0x5CA4C and insert the following byte changes:
    Code:
    00 48 00 47 XX XX XX 08
    Where XX XX XX is where you inserted this routine +1.


    Usage:

    The routine requires two conditions to toggle.
    1) Flag 0x406 is set
    2) Var 0x8000 is not 0xFF

    As you may have guessed you need to set variable 0x8000 to a value which matches the overworld you want the player to transform into. Please note that for the effect to happen, you need to warp first.
    Here's a list of values and their corresponding sprite to the left:
    Spoiler:

    While no particular value will cause a crash, I've excluded values which are "repeated" OWs. If you experience bugs, use it in conjunction with the backsprite hack I made. If you still have bugs, report them here!
     
    40
    Posts
    10
    Years
  • Is it possible to make an effect like Absorb, but which the percentage of recover HP can be chosen?
    I have a little idea on how to do this but i think the animation will not work.
     

    El Diabeetus

    Amateur Voice Actor / ROM Editor ('Hacker')
    1,064
    Posts
    17
    Years
    • Age 30
    • Seen Jun 10, 2020
    Is it possible to make a different track play for a last Pokémon like the Gym Leaders in Black and White/cut the HP sound off after a few beeps like X/Y? Or if Characteristic / colored text for +/- stats due to ability?

    I know I ask a lot of questions, but, these are things I wonder if it's possible to do.
     
    Last edited:
    Back
    Top