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

[ASM & Hex✓] Custom var for Shinyzer routine?

Dr. Seuss

Will finish GS Chronicles, I swear!
523
Posts
10
Years
  • Here's the issue. I've inserted the Hackmew's routine for shiny encounters. It works fine with my rom hack. However the routine uses the var 0x8003 to determine shiny encounters. The problem is that var 8003 is being constantly used for several hacks I use in my game and as a result I end up finding plenty of Shiny Pokemon either in the wild and in trainer battles.

    I've checked the source code but I am unable to find exactly where the routine decides what var is used for the shiny encounters. Is it possible to change the var 0x8003 to a custom one? Thanks in advance.
     
    Last edited:
    1
    Posts
    4
    Years
    • Seen Feb 15, 2020
    Wait can you tell me how to start hacking to get shinies bc my way is just not working
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • You didn't say which game this is for, but based on your older posts I'm assuming this is for FR.

    At 0x406D4 there's a pointer to where you inserted the routine +1. Go to that location and add 0x88. There should be four bytes that read 'BE 70 03 02'. This is a pointer to 0x020370BE, which is the location of variable 0x8003 in FR's RAM. You can change it to one of the other static pointers in the RAM between 0x8000 and 0x8014 (except for 0x800C). For example, if I wanted to change it work off variable 0x8010, I would change the 0xBE byte to 0xD4. Just make sure the variable you choose isn't being used by yourself or the game for anything else, otherwise you'll still experience unwanted shinies.

    If you want to use a 0x40YY variable, you would need to reverse engineer the routine and alter it. That's beyond my abilities though~
     

    Dr. Seuss

    Will finish GS Chronicles, I swear!
    523
    Posts
    10
    Years
  • You didn't say which game this is for, but based on your older posts I'm assuming this is for FR.

    At 0x406D4 there's a pointer to where you inserted the routine +1. Go to that location and add 0x88. There should be four bytes that read 'BE 70 03 02'. This is a pointer to 0x020370BE, which is the location of variable 0x8003 in FR's RAM. You can change it to one of the other static pointers in the RAM between 0x8000 and 0x8014 (except for 0x800C). For example, if I wanted to change it work off variable 0x8010, I would change the 0xBE byte to 0xD4. Just make sure the variable you choose isn't being used by yourself or the game for anything else, otherwise you'll still experience unwanted shinies.

    If you want to use a 0x40YY variable, you would need to reverse engineer the routine and alter it. That's beyond my abilities though~

    How come I didn't realize about it before? I just changed it to 0x020370CC to point to 0x800A and now it works like a charm! My question has been resolved. Thanks a lot c:
     

    sylingga

    Red Everywhere
    86
    Posts
    10
    Years
    • Seen Apr 30, 2024
    Okay, as I promised... today I'm proud to present a brand new ASM lesson and brand new tool! I'd like to thank Gamer2020, Link_971 and >Dante< for helping testing the Shinyzer.

    The ASM lesson is for those that want to understand how things actually work. Otherwhise, if you just want a quick shiny, the Shinyzer will do it for you. Download it, load your ROM, find some free space (the Shinyzer will tell you how much exactly) and shinyze your game. Then:

    Hello, i'm tryng using shinyzer for my rom hack.
    But, it make my game crash.

    I used free space 800990, then add 1 become 800991.

    this is the script before (trainer on Route 3)
    Spoiler:


    i add
    callasm 0x800991
    setvar 0x8003 0x3F06
    before trainerbattle line, and the script compile become :

    Spoiler:


    After that, if i meet the trainer, my game become freeze.

    Did i do wrong?
     

    heyo

    HEYO!
    113
    Posts
    11
    Years
    • Seen Nov 24, 2023
    when a trainer notices you, the game crashes if trainer battle isn't the first line of text. the code would work if it were activated by an event script.

    if you want the trainer to have a shiny in a battle where you walk in front of them, i would put a couple event scripts before them.
    one closest to the trainer that would set the variable to 1 if it's at 0, and the other to set the variable to 0 if it's at 1. that way if you don't end up battling them, it doesn't make someone else's pokemon shiny instead.
    https://imgur.com/EfKq9oO
    sort of like this.

    hope that makes sense.
     

    sylingga

    Red Everywhere
    86
    Posts
    10
    Years
    • Seen Apr 30, 2024
    when a trainer notices you, the game crashes if trainer battle isn't the first line of text. the code would work if it were activated by an event script.

    if you want the trainer to have a shiny in a battle where you walk in front of them, i would put a couple event scripts before them.
    one closest to the trainer that would set the variable to 1 if it's at 0, and the other to set the variable to 0 if it's at 1. that way if you don't end up battling them, it doesn't make someone else's pokemon shiny instead.
    https://imgur.com/EfKq9oO
    sort of like this.

    hope that makes sense.

    ah, i see.
    thanks, thats why script on Rival Route 22 works, because it use event script before meet trainer.

    So script for trainer doesn't need to change, only make event script.
    Can i see / copy you event script? i want to learn it.
    I still dont know what script on event scripts

    thank you so much
     
    Last edited:

    heyo

    HEYO!
    113
    Posts
    11
    Years
    • Seen Nov 24, 2023
    event scripts are just scripts that activate when you step on them. i would make one:

    #dynamic 0x800000
    #org @script
    setvar 0x[your variable] 0x[what value activates the shiny]
    end

    and the other:

    #dynamic 0x800000
    #org @script
    setvar 0x[your variable] 0x[what value removes the shiny]
    end

    and make sure that if you add them via advance map that you set var number and var value on the event to something that's active. if you're not sure which ones are active in your hack, i would look at ones that already exist in the vanilla rom and use their var number/value from those.
     

    sylingga

    Red Everywhere
    86
    Posts
    10
    Years
    • Seen Apr 30, 2024
    event scripts are just scripts that activate when you step on them. i would make one:

    #dynamic 0x800000
    #org @script
    setvar 0x[your variable] 0x[what value activates the shiny]
    end

    and the other:

    #dynamic 0x800000
    #org @script
    setvar 0x[your variable] 0x[what value removes the shiny]
    end

    and make sure that if you add them via advance map that you set var number and var value on the event to something that's active. if you're not sure which ones are active in your hack, i would look at ones that already exist in the vanilla rom and use their var number/value from those.

    Thank you for the explanation.
    I'm still new on scripting, and dont really understand about var and value.

    The tutorial on youtube only making new trainerbattle, so the script on the trainer :
    https://www.youtube.com/watch?v=5bCg8pJ12hk&t=380s&ab_channel=Powerflare

    #dynamic 0x800036
    #org #start
    callasm 0x800101
    setvar 0x8003 0x705
    trainerbattle 0x0 0x22 0x0 @before @after
    msgbox @beaten 0x6
    cleartrainerflag 0x227
    release
    end


    setvar 0x8003 was default for shiny
    0x705 means it has 5 pokemon, and the 3rd,4th,5th pokemon shiny (7 means 00111)

    if I want to make an event script, how about the script?
    i dont know value for turn on and off shiny
     
    Last edited:
    Back
    Top