• 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

204
Posts
9
Years
    • Seen Jul 26, 2021
    I have an idea about limiting the amounts of items that one can carry. however i wouldnjt like it to be like in red or silver. I would like it to be that you have a maximum of kg you can carry and hat each item weighs a diffrent amount of kg. for example a bike could weittgh 10 kg(or some other unit) and pokeball 1 kg. If the limit of the bag is 100 kg, you could be carry either 100 pokeballs or 90 pokeballs and one bike.


    Another idea would be like the "game over when whiting out" thing, with the differnce, that the whiting out does occur after your last Pokemon died, or in other words that you dont go to game over after whiting out, aslong as one has pokemons in the box or pension.


    I'd totally appreciate someone implementing these ideas! And thx for all the stuff that is already there!
     

    El Diabeetus

    Amateur Voice Actor / ROM Editor ('Hacker')
    1,064
    Posts
    17
    Years
    • Age 30
    • Seen Jun 10, 2020
    Hm, just thought of another potential thing that hasn't been done. May not be do able, but what about Critical Capture?
     

    RuFF

    Hope you're having a RuFF day!
    365
    Posts
    11
    Years
  • I don't know if i'm the only one requesting a routine for pokemon ruby
    I don't have something to contribute because i don't know how to asm
    well i have 2 requests I hope you don't mind

    1. You know when it's raining on the overworld it's raining in a pokemon battle. I'd like to see routine that when it's snowing/ashesfalling it's hailing in pokemon battle.

    2. And a routine just like in JPAN's Hacked engine where you can make your own items that work with your custom scripts.

    it's okay for me if this is not answered because i know that most of you hack fire red now
     
    416
    Posts
    11
    Years
    • Seen Feb 10, 2024
    2. And a routine just like in JPAN's Hacked engine where you can make your own items that work with your custom scripts.
    This has been done... infact, complete item editor does it for you... super simple to implement
     
    33
    Posts
    10
    Years
    • Seen Sep 23, 2022
    Thanks for the No EXP Routine. This will really help to extract the salt of players who think they can level up mid Gym-Battle and get a advantage or something.
     

    TheRabbit

    Banned
    69
    Posts
    9
    Years
    • Seen Jan 1, 2015
    FBI - I know you said you aren't developing routines anymore but I was just looking for some insight. Have you ever looked into changing the events that affect the player's trainer card in FR?

    As an example, if I wanted to make it so finishing a new event gives a trainer card star instead of that stupid Doduo game. How would I do this?
     

    kearnseyboy6

    Aussie's Toughest Mudder
    300
    Posts
    15
    Years
    • Seen Jun 22, 2019
    FBI - I know you said you aren't developing routines anymore but I was just looking for some insight. Have you ever looked into changing the events that affect the player's trainer card in FR?

    As an example, if I wanted to make it so finishing a new event gives a trainer card star instead of that stupid Doduo game. How would I do this?

    I'm pretty sure it's either a variable or flag that affects the trainer card. Just make your own events that change these variables.
     
    5,256
    Posts
    16
    Years
  • FBI - I know you said you aren't developing routines anymore but I was just looking for some insight. Have you ever looked into changing the events that affect the player's trainer card in FR?

    As an example, if I wanted to make it so finishing a new event gives a trainer card star instead of that stupid Doduo game. How would I do this?

    I'm pretty sure it's either a variable or flag that affects the trainer card. Just make your own events that change these variables.

    Just a reminder guys, not necessarily targeted only at you two, that this is for ASM resources, and so questions don't belong here. Instead, post in the ASM & Disassembly Help Thread in the future. Thanks!
     
    794
    Posts
    10
    Years
  • Hey, I've got a simple request.
    Could you change the boost that held items such as mystic water, charcoal, magnet, twisted spoon etc. give from 10% to 20%.
     

    Lance32497

    LanceKoijer of Pokemon_Addicts
    792
    Posts
    9
    Years
  • Battle Modes!


    In this post, we will be implementing a base skeleton structure to allow the hacker to add in their own battle modes, I'll also be including some example "add-ons" so you know how to do it yourself. The post currently contains possibilities for the hacker to implement routines which run once at the end of each turn (perfect for tournament clauses) and a routine which runs once every move is chosen and used (perfect for trainer sliding *hint hint danillS*).

    I'm calling it a skeleton, but it's actually more like a hook into a routine which runs your routines!
    It works like this:
    1) Hook from original to routine which runs routines
    2) If flag is set, routine runs the routines it's told to run
    3) Returns back to hooking location

    So all you really need to do to add new battle modes, is add to the list of routines we call (Which is simple, I'll explain in detail later). I should also mention that these routines are called in ALL types of battle including wild, trainer, and scripted. Happy hacking!

    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.

    why I got this error?
    ASM Resource Thread


    help please

    Battle by turn addons:


    Sleeping clause:
    Spoiler:


    Battle end by turn:
    Spoiler:

    Hi, if flag 0x2f8 has been set, will Sleeping clause and battle by end turn function simultaneously?
     
    Last edited:
    199
    Posts
    12
    Years
    • Seen Jul 18, 2016
    Hey, I've got a simple request.
    Could you change the boost that held items such as mystic water, charcoal, magnet, twisted spoon etc. give from 10% to 20%.

    This can be done in nearly any item editor. Just change the second special value to whatever you want.
     
    794
    Posts
    10
    Years
  • Hey. I've got some ideas that could make the game more similar to the newer ones. I don't know if they're all doable in ASM or if they could be done without it. If so, sorry. Anyway, here's my ideas:
    - Electric types are immune to paralysis.
    - Sturdy negates all hits that would OHKO-ed them and leaves Pokemon with 1 HP
    - Grass types' immunity to powder moves i.e spore, poison powder etc.
    - New items such as toxic orb, flame orb, focus sash, scope lens etc.
     

    Lance32497

    LanceKoijer of Pokemon_Addicts
    792
    Posts
    9
    Years
  • Use special 0x9F to select the Pokemon then callasm.


    EV Reducing berries


    Speaking of special 0x9F, I finished EV reducing berries which was rather easy.
    First of all, follow this tutorial: https://www.pokecommunity.com/showthread.php?t=258426
    until you get to the part where you have to give the item an effect via script.

    Compile and insert into free space the following routine:
    Spoiler:


    For the part of inserting a script to give your item functionality, you need to insert this script.
    Code:
    #dyn 0x740000
    #org @start
    special 0x9f
    waitspecial
    storepartypokemon 0x0 0x8004 'bufferpokemon2 in xse
    setvar LASTRESULT 0x[EV to modify]
    setvar 0x8000 0x[amount to decrease EV by]
    callasm 0x[routine +1]
    compare LASTRESULT 0xFF
    if == jump @failed
    storevar 0x1 0x800F 'buffervar in xse
    msgbox @gain
    callstd MSG_NORMAL
    removeitem 0x[ID] 0x1
    release
    end
    
    #org @failed
    msgbox @noEffect
    callstd MSG_NORMAL
    release
    end
    
    #org @noEffect
    = It would have no effect!
    
    #org @gain
    = \v\h02 gained \v\h03\nInsert the EV your berry gives

    In variable 0x8000 put the amount the EV is to decrease by.
    In variable 0x800D put which EV you want to modify, in this format:
    0x1A - HP EV
    0x1B - Attack EV
    0x1C - Defence EV
    0x1D - Speed EV
    0x1E - Sp. Attack EV
    0x1F - Sp. Defence EV

    Tried and tested but it doesnt work
     
    88
    Posts
    13
    Years
    • Seen Jun 18, 2020

    Adjusting Shiny encounter chance


    [...]

    After you've done that, compile and insert the following routine into free space:

    Spoiler:



    [...]


    I have two questions :

    First, what did you forget after the bne in calcChance ? I don't really understand what this check does.

    Also, if I want to change the shiny encounter chance (without the shiny charm), I have to change this two lines, right ?

    Code:
    mov r0, #0x20
    lsl r0, r0, #0x7 @1/4096 chance normally

    For example,

    Code:
    mov r0, #0x2
    lsl r0, r0, #0x0

    With this code, I have one chance on two to find a shiny Pokemon ?

    Thanks ! :)
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • You need to put .word before the 0xpointerToTable I think.

    Yeah, you're right. I miss some stuff from time to time when I port them from my computer to the site :x

    Tried and tested but it doesnt work

    I know 2 confirmed people who've gotten it working. Uhhh...maybe you inserted it incorrectly or something.

    I have two questions :

    First, what did you forget after the bne in calcChance ? I don't really understand what this check does.

    Also, if I want to change the shiny encounter chance (without the shiny charm), I have to change this two lines, right ?

    Code:
    mov r0, #0x20
    lsl r0, r0, #0x7 @1/4096 chance normally

    For example,

    Code:
    mov r0, #0x2
    lsl r0, r0, #0x0

    With this code, I have one chance on two to find a shiny Pokemon ?

    Thanks ! :)

    That should say, "bne end" sorry. Yes, your version would make it 50% chance for a shiny (though at that point you don't need the lsl)
     
    88
    Posts
    13
    Years
    • Seen Jun 18, 2020
    That should say, "bne end" sorry. Yes, your version would make it 50% chance for a shiny (though at that point you don't need the lsl)

    Okay, so I was right, but it doesn't work. I compile the 3 routines correctly, and it works only if I set the variable 8002 to 0xFF. But if I don't set the var to this value, the wild Pokemon isn't shiny. I tryed to set a great probability to encounter a shiny in the routine (1/2), but the wild Pokemon is still normal, not shiny...
     
    Back
    Top