• 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

218
Posts
10
Years
    • Seen Nov 12, 2021
    Oh sorry, my question was quite misleading. I know how to insert ASM. hehe. I was asking if the life orb will work if I just separately insert your LO boost and KDS' LO recoil? Or I should change a byte (the held item effect,maybe?) in your asm routine. Thanks!

    Oh ok. So yeah, they work seperatly, I edited my routine, the first "cmp 0x43" actually compare to held item effect of your life orb. I advice using an unused item effect.

    Note that the boost power I post is only for Emerald though
     

    leyn09

    Truant Trainer
    84
    Posts
    13
    Years
  • Oh ok. So yeah, they work seperatly, I edited my routine, the first "cmp 0x43" actually compare to held item effect of your life orb. I advice using an unused item effect.

    Note that the boost power I post is only for Emerald though

    Thanks! Oh, will the FR ver. be available soon? :D
     

    Mr.Pkmn

    Ordinary ASM Magician
    53
    Posts
    16
    Years
    • Seen Nov 17, 2023
    Can we have run-like speed for surf and mach bike speed in FR? Even better would be an arbitrary speed value!
     

    leyn09

    Truant Trainer
    84
    Posts
    13
    Years
  • Delete save and reset game after whiteout



    I tried getting it to delete the save file and to return to the titlescreen afterwards, but I couldn't get a brief flash of the pokécenter to disappear. I might fix it later, but as for now, here's a much more simple version using SoftReset:
    Code:
    Type 5F F1 53 FC 00 DF at 0807F5B6 and F1 E7 at 0807F5D0.

    Can its effectivity be toggled using flags?

    Also, Is there any way how to disable the usage of bag during battle? Thanks!
     

    DJTiki

    top 3 most uninteresting microcelebrities
    1,257
    Posts
    10
    Years
  • Bag Deletion and Restoration


    Bag Delete:


    Here's a compiled version:
    Code:
    FF B5 00 24 05 2C 1F D8 12 48 21 1C C9 00 40 18 05 1D 2D 78 03 68 00 26 AE 42 12 D2 1A 88 00 2A 0C D0 98 1C 7C B4 0C 4B 00 F0 0D F8 7C BC 01 1C 10 1C 7C B4 09 4B 00 F0 06 F8 7C BC 04 33 01 36 EA E7 01 34 DE E7 18 47 FF BD C0 46 8C 98 03 02 80 C2 03 02 8C 98 03 02 A1 9D 09 08 D9 A1 09 08

    That's funny because when I complied this twice to make sure I wasn't doing it wrong and I recieved this as the compiled version:

    Code:
    [COLOR="red"]7F[/COLOR] B5 00 24 05 2C 1F D8 12 48 21 1C C9 00 40 18 05 1D 2D 78 03 68 00 26 AE 42 12 D2 1A 88 00 2A 0C D0 98 1C 7C B4 0C 4B 00 F0 0D F8 7C BC 01 1C 10 1C 7C B4 09 4B 00 F0 06 F8 7C BC 04 33 01 36 EA E7 01 34 DE E7 18 47 FF BD C0 46 8C 98 03 02 80 C2 03 02 8C 98 03 02 A1 9D 09 08 D9 A1 09 08

    It's only one bit difference, but if I am correct, then you should probably edit your post to fix this typo since most people who don't know how to compile will use your code with the typo. But I'm most likely wrong. :)

    Thanks for the code!
     

    Exodrake

    The Manliest Chick that Ever Manlied
    163
    Posts
    10
    Years
    • Seen Nov 30, 2016
    I would like to request a modified Flash Fire which can be activated by another type as well as Fire. I didn't know where else to put this request since the Ability Resource Thread is for porting official ability effects and vanilla Flash Fire doesn't do this. The reason being my hack has an Oil type (0x18) which I'd like to activate Flash Fire, since we know what happens when you squirt oils onto a fire, but alas my brain refuses to comprehend ASM. It's worth noting that by default Fire is immune to Oil, so the ability would have to override that.
     

    MrDollSteak

    Formerly known as 11bayerf1
    858
    Posts
    15
    Years
  • I would like to request a modified Flash Fire which can be activated by another type as well as Fire. I didn't know where else to put this request since the Ability Resource Thread is for porting official ability effects and vanilla Flash Fire doesn't do this. The reason being my hack has an Oil type (0x18) which I'd like to activate Flash Fire, since we know what happens when you squirt oils onto a fire, but alas my brain refuses to comprehend ASM. It's worth noting that by default Fire is immune to Oil, so the ability would have to override that.

    If you look at the Ability Resource Thread, my most recent post deals with the Type Absorb abilities. Once I've posted the Fire Red ones you could either write a new routine that activates on both Fire and Oil and replace the pointer in the table.

    Alternatively you can navigate to the offsets of the routine and add a branch at the beginning of the routine and check for Oil there. You are right though, the immunity may prevent it from happening.
     

    Exodrake

    The Manliest Chick that Ever Manlied
    163
    Posts
    10
    Years
    • Seen Nov 30, 2016
    If you look at the Ability Resource Thread, my most recent post deals with the Type Absorb abilities. Once I've posted the Fire Red ones you could either write a new routine that activates on both Fire and Oil and replace the pointer in the table.

    Alternatively you can navigate to the offsets of the routine and add a branch at the beginning of the routine and check for Oil there. You are right though, the immunity may prevent it from happening.
    Flash Fire behaves differently than the other absorb abilities in that it strengthens moves of a specific type rather than just boosting an offensive stat. I have next to no ASM capabilities to begin with and I don't think I'd have any idea how to do that. I figured it could be grouped with the other absorb abilities though.
     
    48
    Posts
    9
    Years
    • Seen today
    oh i need you are help.i am do the"Preventing TMs from being consumed on use "for EM rom.And i have a trouble.
    I change 1B6EE0 to 90 make we "can use TM but can not to reduce number"
    but I can not remove the quantities showing up in thebag so I need help.Thanks
     
    275
    Posts
    8
    Years
  • oh i need you are help.i am do the"Preventing TMs from being consumed on use "for EM rom.And i have a trouble.
    I change 1B6EE0 to 90 make we "can use TM but can not to reduce number"
    but I can not remove the quantities showing up in thebag so I need help.Thanks

    - Open the ROM com o with HxD. Go to 0x124F78 and insert 00 00 00 00. Go to 0x125C80 and insert 00 00 00 00. This makes TMs not be consumed.
    - Go to 0x1326B8 and insert 00 00 17 E0. This makes TMs ungivable.
    - Go to some free space (I used 0x1BA540), select 36 FF e change them for (simply Ctrl + B in the first):
    00 2D 01 D1 05 4B 18 47 38 1C 08 21 22 1C 04 4E 00 F0 02 F8 01 4B 18 47 30 47 C0 46 FF 1E 13 08 B1 35 13 08
    - Go to 0x131EF4 and insert: 00 48 00 47 41 A5 1B 08
    - Insert E0 at 0x131EA5.
     
    48
    Posts
    9
    Years
    • Seen today
    - Open the ROM com o with HxD. Go to 0x124F78 and insert 00 00 00 00. Go to 0x125C80 and insert 00 00 00 00. This makes TMs not be consumed.
    - Go to 0x1326B8 and insert 00 00 17 E0. This makes TMs ungivable.
    - Go to some free space (I used 0x1BA540), select 36 FF e change them for (simply Ctrl + B in the first):
    00 2D 01 D1 05 4B 18 47 38 1C 08 21 22 1C 04 4E 00 F0 02 F8 01 4B 18 47 30 47 C0 46 FF 1E 13 08 B1 35 13 08
    - Go to 0x131EF4 and insert: 00 48 00 47 41 A5 1B 08
    - Insert E0 at 0x131EA5.

    It is from FR not EM :(
     

    Trainer 781

    Guest
    0
    Posts
    I don't get that part, could you explain what and how exactly I should go about it?

    There is a Battle Script command table at x25011c in FR. If you have repointed this to include Jambo's callasm and/or setword commands then you have to check it yourself.

    It is a table of pointers. Goto entry no. x3D (table starts from x0) and overwrite the pointer there with pointer to routine at YYYYYY.
     
    3,830
    Posts
    14
    Years
    • Age 27
    • OH
    • Seen Feb 26, 2024
    Whew~! I've gone through the entire thread and compiled a list of every routine. Expect an updated first post soon! :)

    EDIT: It is done.
     
    Last edited:
    794
    Posts
    10
    Years
  • Life Orb Recoil

    Spoiler:

    I'm having troubles implementing it. I replaced the end command, placed a hook, inserted all routines and a battle script but...nothing happens. No resets, no freezing, the game just continues without recoil damage. I'm sure my item effect byte is correct. Do you know why it would happen? Also, I'm using DollSteak's Patch.

    Damage Reduction Berries


    2. Assemble this routine and make bytes changes mentioned in the code
    Spoiler:

    I can't get this routine to compile. I get the following errors:
    48: Error: invalid offset, target not word aligned <0x000000E2>
    48: Error: invalid offset, value too big <0x0000009E>
    My index number of Chilian Berry is 0x00A0 but it doesn't matter as I've tried changing the value many times and I still got the errors.
     
    Last edited:

    Trainer 781

    Guest
    0
    Posts
    For life orb, make sure that you have replaced the end command in the repointed command table.

    I'll look into the Berry issue.
     
    794
    Posts
    10
    Years
  • For life orb, make sure that you have replaced the end command in the repointed command table.

    I'll look into the Berry issue.

    I did replace the command. It was this pointer: CD 2C 02 08 and I changed it to YY+1 YY YY 08.
     
    Back
    Top