• 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

PurpleOrange

still don't know what I'm doing
367
Posts
10
Years
  • i'm not 100% sure if this requires asm, but is there a way to temporarily change what pokemon appear in the wild? i'm thinking something like Mr. Backlot and the trophy garden from Diamond/Pearl/Platinum
     

    jToTheAvacola

    Banned
    18
    Posts
    9
    Years
    • Seen Sep 4, 2016
    Heaps of ways to go about this, just think creatively. FBI's put up a snag ball routine, all you need to do is make the ball only activate on shadow pokemon. That can be done with comparing index numbers through a table etc.

    Thanks for the suggestion. I'll probably do this. I just didn't necessarily feel like having to make it a new ball because it wasn't that way in Colosseum and I'd have to think up a way for the player to get them that makes sense. It should be fine though.

    i'm not 100% sure if this requires asm, but is there a way to temporarily change what pokemon appear in the wild? i'm thinking something like Mr. Backlot and the trophy garden from Diamond/Pearl/Platinum

    You can use FBI's Swarm routine for that: http://www.pokecommunity.com/showpost.php?p=8535820&postcount=314
     
    534
    Posts
    11
    Years
    • Age 26
    • Seen Jul 24, 2023
    @FBI Agent - Thanks really. Hope you finish it soon. :)

    Oh and a few questions.

    1. Does the PSS Addon: Experience Gains have an on/off switch?
    2. (Even though it's not yet fixed, I believe) Does the BBT Addon: HP-Regen also regenerate the opponent's HP? Because it's kinda unfair if it doesn't. :)
    3. And lastly, I don't know if this involves ASM (if not, ignore it) but can we make it so that Trainers' Pokemon get levels according to the average level of your party (yes, as if it works with the Average Party Level routine)?

    Thanks! ^_^
     
    Last edited:
    7
    Posts
    9
    Years
    • Seen Mar 7, 2021
    I've already done your first request, it's somewhere in this thread. I haven't been updating the first post because I've been putting it off :P

    Oh, cool! Well, thanks :p

    Edit: Hey, I scanned the thread but couldn't seem to find it. Do you remember what you called it or a sentence from your post so I can search for it in an other way?

    Also, I just realized that there is a simpler way to achieve the same goal; Just remove the option to change the order of your Pokémon.
    Do you think you could do this? (I assume this must be a hell of a lot easier to do since it's just removing a feature instead of adding them, but I might be completely wrong on this.)
    Spoiler:
     
    Last edited:

    leyn09

    Truant Trainer
    84
    Posts
    12
    Years
  • Is there any easier way to disable the bag option during battle in Fire red? Like another asm besides bag deleter/restorer or hex editing to permanently disable it? Thanks! :D
     

    leyn09

    Truant Trainer
    84
    Posts
    12
    Years
  • Set static party level


    First of all, I need to mention that this routine works off percentage increases and decreases. So if you're planning to go from level 1 to 100 all in one go for 6 Pokemon it will take around 5 seconds to increment about 35 million experience points. The reason for the percentage increase is so that we don't go over. This was a pain to test, as in some occasions the percentage between levels 1-2 would be enough to set negative exp, and sometimes the levels 99 -100 would set exp over 100...it was just a huge pain. It now works off a lookup table and is quite spiffy now :3

    How to insert:

    Compile and insert into free space the following routine:

    Spoiler:


    Usage:
    setvar 0x8000 0x[Level you want Pokemon to be set to (in hex)]
    callasm 0x[this routine +1]

    That's it. I should mention, you should apply this as often as possible to speed up the computation time for next time.

    I would like to ask how to revert back their original levels after setting them to a certain level? Thanks a bunch! :)
     
    46
    Posts
    9
    Years
    • Seen Dec 16, 2015

    Roaming Pokemon!



    I can't seem to get the BattleByMove compiled. I'm getting an error message saying "bad instruction 'main'"at line 6, and also one at line 47 "junk at end of line, first unrecognized character is 0"

    Any idea why it would say this?
     

    kearnseyboy6

    Aussie's Toughest Mudder
    300
    Posts
    15
    Years
    • Seen Jun 22, 2019
    May I request custom moves for givepokemon. I feel this would really complete the player switching routines :)
     
    1,344
    Posts
    14
    Years
    • Seen Dec 10, 2021
    Not sure if you're still taking these, but I have a small request: a way to force set mode that can be toggled on/off. Would be very useful for battle frontier type places.
     
    46
    Posts
    9
    Years
    • Seen Dec 16, 2015
    Wild Pokemon custom moves routine works for give Pokemon too. Actually it works for every Pokemon generated, so it's just poorly named on my part. Should've called it "custom move generator" or something similar :c

    Yo schmohawk I asked you a question.
     
    534
    Posts
    11
    Years
    • Age 26
    • Seen Jul 24, 2023
    I can't seem to get the BattleByMove compiled. I'm getting an error message saying "bad instruction 'main'"at line 6, and also one at line 47 "junk at end of line, first unrecognized character is 0"

    Any idea why it would say this?

    Yo schmohawk I asked you a question.

    Please use this one from the post for the routine itself.

    Battle Modes!

    Battle Routine By Move:


    This routine will run, on average four times per turn. Once you select your move, once you use your move, once the opponents uses their move and at the end of the aftermath. This makes the routine a perfect branching place for an Oak-tutorial like battle.

    How to insert:
    Look at the routine below. The last line .table has an incomplete pointer. It says 0x[pointer to routine table]. Find enough free space (takes 4 byte per routine) in your ROM and set the pointer for .table to that. You do not add +1 to the pointer, nor is it in reverse hex. Once you've fixed the pointer, compile the routine into free space. The last pointer in the routine NEEDS to be 00 00 00 00.


    Spoiler:

    Now navigate to 0xE2E0 and insert the byte changes:
    Code:
    00 4D 28 47 XX  XX XX 08
    Where XX XX XX is the reverse hex pointer to your routine +1.



    Usage:
    The routine is toggled by flag 0x2FC. Activate the flag to toggle routines called by this routine. To add routines into the list of called routines, navigate to the pointer of freespace you made .table point to. Insert into that table pointers in reverse hex +1 to wherever you compiled the addon routines make sure they have the 0x8 prefix. The structure of the table should be: [routine pointer in reverse hex +1 (4 bytes)] for each pointer in the table. I.e if I put the addon at 0x740000, the pointer would read 01 00 74 08.
     
    180
    Posts
    10
    Years
    • Seen Jan 10, 2017
    How easy/difficult would it be to implement the blue and red texts on nature-boosted/weakened stats? The feature from Heart Gold/Soul Silver that makes it easier to tell what the Pokemon's nature actually does.
     
    417
    Posts
    9
    Years
    • Seen Nov 20, 2016
    This thread is pretty amazing, especially the compiled versions for those of us who can't compile! Thanks to everyone who has contributed, in particular FBI Agent for obvious reasons.

    I have two ideas for fire red that, although I know are longshots, would be very powerful features.

    1) Dynamic trainer battle. In case I'm using that word incorrectly, what I mean is that instead of using the trainer table, there is one special slot in the game for which you can call an asm command that fills that slot with trainer information, you battle them like a normal battle, then that information clears out again. Maybe a variable for things like trainer class and AI. The biggest part, of course, would be six variables that the script uses to read off of a giant table of 80 byte each Pokemon. This single feature, along with semi random calls, would be a huge step in building a Battle Tower from the ground floor up. And even a Battle Factory/Battle Dome for anyone who cares.

    2) This is even more of a long shot, but I'm curious. How many places does the game read nature, ability, and gender? Currently, all 3 are linked to personality value, making it tricky to alter one without possibly affecting the others. What if that weren't the case? Say we have a Pokemon with personality value [1234][5678].

    What if instead of the current system, the game reads the 567 to determine nature. 16x16x16 = 4096. That isn't perfectly divisible by 25, but you could just make 4 of the 5 useless natures like Hardy/Quirky sliiightly less common and I don't think anyone would lose any sleep.

    Gender value can range from 0 to 255, so just take two from the personality value and it works out fine.

    Finally, abilities. With one or more of the remaining parts of the personality value, you could get rid of the current even/odd determiner, which would allow for third abilities.

    Overall, wild and trainer Pokemon would still be just as random, so nothing would be needed to overhaul their random number calls, but it would be significantly easier to customize Pokemon for events and breeding changes.

    There are obviously other features to personality value, ranging from things some people care about like shiny pokemon to things almost no one cares about like the dots on Spinda or Wurmple.

    Sooo
    1) Dynamic trainers
    2) Completely reworking how the game reads personalities, gender, and abilities.
    Or am I just in fantasy land? :)
     
    Last edited:

    Touched

    Resident ASMAGICIAN
    625
    Posts
    9
    Years
    • Age 122
    • Seen Feb 1, 2018
    Sorry for the pedantism, but this really bothers me. Can we stop using "compiler", "compiled", etc. to refer to the process of assembly being converted into machine code? It's a assembly, so it's assembled by an assembler. Compiling has come to refer to higher level languages such as C. FBI, please use the right terminology in the OP at least :(

    Now to be helpful so I can't be deleted :x

    This thread is pretty amazing, especially the compiled versions for those of us who can't compile! Thanks to everyone who has contributed, in particular FBI Agent for obvious reasons.

    I have two ideas for fire red that, although I know are longshots, would be very powerful features.

    1) Dynamic trainer battle. In case I'm using that word incorrectly, what I mean is that instead of using the trainer table, there is one special slot in the game for which you can call an asm command that fills that slot with trainer information, you battle them like a normal battle, then that information clears out again. Maybe a variable for things like trainer class and AI. The biggest part, of course, would be six variables that the script uses to read off of a giant table of 80 byte each Pokemon. This single feature, along with semi random calls, would be a huge step in building a Battle Tower from the ground floor up. And even a Battle Factory/Battle Dome for anyone who cares.

    2) This is even more of a long shot, but I'm curious. How many places does the game read nature, ability, and gender? Currently, all 3 are linked to personality value, making it tricky to alter one without possibly affecting the others. What if that weren't the case? Say we have a Pokemon with personality value [1234][5678].

    What if instead of the current system, the game reads the 567 to determine nature. 16x16x16 = 4096. That isn't perfectly divisible by 25, but you could just make 4 of the 5 useless natures like Hardy/Quirky sliiightly less common and I don't think anyone would lose any sleep.

    Gender value can range from 0 to 255, so just take two from the personality value and it works out fine.

    Finally, abilities. With one or more of the remaining parts of the personality value, you could get rid of the current even/odd determiner, which would allow for third abilities.

    Overall, wild and trainer Pokemon would still be just as random, so nothing would be needed to overhaul their random number calls, but it would be significantly easier to customize Pokemon for events and breeding changes.

    There are obviously other features to personality value, ranging from things some people care about like shiny pokemon to things almost no one cares about like the dots on Spinda or Wurmple.

    Sooo
    1) Dynamic trainers
    2) Completely reworking how the game reads personalities, gender, and abilities.
    Or am I just in fantasy land? :)

    1) shouldn't be so bad. You'd probably have to modify the trainerbattle command though
    2) The "useless" natures round out the pairing. There is a nature for each combination of stats. The useless ones are basically the same stat being increased and decreased. I'm not so sure how changing that would affect balance. Currently, all places in the game that read these values are controlled by a single function call. Changing how it reads the personality value to calculate these things shouldn't be too complex, however, making it not read from the PID would be far more complicated. As for abilities, I did at one point make a hack that allowed a third ability. It just overrode the ability bit - I did meaning changing basically all the battle code however, so it conflicted with a large number of ability hacks.
     
    417
    Posts
    9
    Years
    • Seen Nov 20, 2016
    2) The "useless" natures round out the pairing. There is a nature for each combination of stats. The useless ones are basically the same stat being increased and decreased. I'm not so sure how changing that would affect balance. Currently, all places in the game that read these values are controlled by a single function call. Changing how it reads the personality value to calculate these things shouldn't be too complex, however, making it not read from the PID would be far more complicated. As for abilities, I did at one point make a hack that allowed a third ability. It just overrode the ability bit - I did meaning changing basically all the battle code however, so it conflicted with a large number of ability hacks.
    One of us doesn't understand what the other is trying to say. What I was trying to suggest was using three specific hex numbers from the PID to determine nature, rather than the last two in decimal form of the PID, which is harder to control. So you would have 4096 possibilities, but you wouldn't be eliminating a nature by any means. For example, 0x0 to 0xC7 inclusive is Hardy, 0xC8 to 018F inclusive is Lonely, 0x190 to 0x257 inclusive is Brave, all the way up to 0xF37 to 0xFFF inclusive is Quirky. It could be rearranged in a different way, but the point being that four neutral natures aren't done away with. Rather, they appear at a frequency of 199/4096 rather than 200/4096. And this isn't a locked idea. It was just an example of attempting to get rid of the connection that nature has to other things that the PID is used to decide.

    As far as the other things, it is great to hear that they may be reasonable, especially the trainer one!
     
    Last edited:

    Touched

    Resident ASMAGICIAN
    625
    Posts
    9
    Years
    • Age 122
    • Seen Feb 1, 2018
    One of us doesn't understand what the other is trying to say. What I was trying to suggest was using three specific hex numbers from the PID to determine nature, rather than the last two in decimal form of the PID, which is harder to control. So you would have 4096 possibilities, but you wouldn't be eliminating a nature by any means. For example, 0x0 to 0xC7 inclusive is Hardy, 0xC8 to 018F inclusive is Lonely, 0x190 to 0x257 inclusive is Brave, all the way up to 0xF37 to 0xFFF inclusive is Quirky. It could be rearranged in a different way, but the point being that four neutral natures aren't done away with. Rather, they appear at a frequency of 199/4096 rather than 200/4096. And this isn't a locked idea. It was just an example of attempting to get rid of the connection that nature has to other things that the PID is used to decide.

    As far as the other things, it is great to hear that they may be reasonable, especially the trainer one!

    Well, as long as you use the PID for the new calculation, I can't see why it shouldn't be easy to change. But I see what you're saying about easier to control. Right now if you want to force nature you have to keep generating new PIDs until it has the nature you want - this can take a lot of time if you need other criteria that are also PID controlled.
     
    218
    Posts
    10
    Years
    • Seen Nov 12, 2021
    Hi, I was battling some trainer in battle frontier and an idea just popped in my head.
    In the said Battle Frontier, we have possibility to record our last battle.
    Then I thought : what about make an event like the hero walk in the hack, an event comes "oh the good guys is fighting the bad guy !!".
    Here is the idea, using the Battle Frontier routine to make the player can be spectator of the fight.
    Good idea/bad idea ? Doable ?
     
    Back
    Top