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

Help Thread: Quick Questions & Answers

Status
Not open for further replies.
3,830
Posts
14
Years
    • Age 27
    • OH
    • Seen May 10, 2024
    Hello,

    I am currently playing around with several hacking tools, settings and generally everything to get to know ROM hacking and prepare to start my own hack.
    I had lots of trouble though with editing Pokemon data/Evolutions etc. but I finally found Pokemon Gen 3 Hacking Suite which works fine for me, with just one flaw.
    The abilities are loaded as \x, meaning I cant find the right ones for the Pokemon.
    My ROM is a german Firered and I used a copied ini file to get it to work with G3HS.
    Any ideas on how to fix the ability names?

    Regards

    If you're saying that all the ability names are listed as "\x" then it sounds like the .ini is pointing to the wrong location for ability names. You need to make sure the .ini has the correct offset, and if it doesn't you should try and find the correct one so that it will list abilities correctly.
     
    4
    Posts
    8
    Years
    • Seen Mar 19, 2016
    If you're saying that all the ability names are listed as "\x" then it sounds like the .ini is pointing to the wrong location for ability names. You need to make sure the .ini has the correct offset, and if it doesn't you should try and find the correct one so that it will list abilities correctly.

    Thanks for the kind reply! I already searched the internet for the correct offset, couldnt find anything though :/
    Any tips how I can find the correct one by myself?
    Currently the ability stuff looks like this in the ini:
    abilities = 0x8DDB24
    numberofabilities = 0x4E
    abiltiesnamelength = 0xD
    Dunno if that helps :)

    Thanks for helping me!
     
    3,830
    Posts
    14
    Years
    • Age 27
    • OH
    • Seen May 10, 2024
    Thanks for the kind reply! I already searched the internet for the correct offset, couldnt find anything though :/
    Any tips how I can find the correct one by myself?
    Currently the ability stuff looks like this in the ini:
    abilities = 0x8DDB24
    numberofabilities = 0x4E
    abiltiesnamelength = 0xD
    Dunno if that helps :)

    Thanks for helping me!

    If you're familiar with editing text via hex editor, that's usually a good place to start. You can load up your ROM in the hex editor and search for an ability name, which will bring you to the list of abilities. From there it's a simple matter to find the name of the first ability in the list and set that as the offset in the .ini.
     

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • So I managed to open the firered.idb file. If I understand it well, knizz has documented most of the ROM but... are there any tutorials on how to hack using it? On FBI's ASM tutorials he mentions that using it is essencial to make bigger projects, but I haven't found anything on actually doing something using it.
    I understand this must be a really noob question, but I'm used to pokered disassembly and this seems completely different.

    Ah, the IDA with knizz's idb serves as a good reference tool. It's near as useful as commented code, but mainly it's just a database of the functions/data structures in FireRed given names based on functionality. When comparing to raw ASM code, it's easier to understand what's happening. Here are some keyboard shortcuts to make life easier:
    x - Pulls up a list of x-references
    alt + t - search, supports regular expressions
    g - goto address. Include prefix
    F5 - attempts to convert ASM to C, as close as possible (sometimes it comes out wrong)

    In general, it just makes certain aspects of ASM hacking easier, for example finding things, debugging, and just viewing raw ASM. While I haven't exactly made any tutorials on the subject, I figure it's fairly easy to use once you get started.
     
    4
    Posts
    8
    Years
    • Seen Mar 19, 2016
    If you're familiar with editing text via hex editor, that's usually a good place to start. You can load up your ROM in the hex editor and search for an ability name, which will bring you to the list of abilities. From there it's a simple matter to find the name of the first ability in the list and set that as the offset in the .ini.

    As I could not figure out how to search for an abilities name (tried with normal text, text in hex values, different character sets) I looked in the .ini files of the other programs I used and found the offset for ability names there. I put them in the .ini file of G3HS, still the \x stuff :/
     

    C me

    Creator of Pokemon League Of Legends
    681
    Posts
    10
    Years
    • Seen Apr 9, 2021
    How do you add a Pokemon as seen in the Pokedex in Emerad? It's special 0x163 in FireRed but that doesn't work for Emerald.
     

    destinedjagold

    You can contact me in PC's discord server...
    8,593
    Posts
    16
    Years
    • Seen Dec 23, 2023
    Can anyone point me to that tutorial wherein we can add custom scripts to an item? I've been looking for a while but I cannot seem to find it. Thanks~
     
    794
    Posts
    10
    Years
  • How do you add a Pokemon as seen in the Pokedex in Emerad? It's special 0x163 in FireRed but that doesn't work for Emerald.

    There probably isn't a special for that in Emerald. A simple callasm does the job anyway.

    Code:
    .text
    .thumb
    .thumb_func
    .align 2
    
    main:
        push {lr}
        ldr r0, var_8004
        ldrh r0, [r0]
        mov r1, #2 @you can change it to  0 - get if seen
                    @                  1 - get if caught
                    @                  2 - set seen
                    @                  3 - set caught
        ldr r2, get_or_set_pokedex
        bl callviar2
        pop {pc}
        
    callviar2:
        bx r2
        
    .align 2
    var_8004: .word 0x020375E0
    get_or_set_pokedex: .word 0x080C0665
    Set var 8004 to a national dex number of poke and then call this asm.
     

    C me

    Creator of Pokemon League Of Legends
    681
    Posts
    10
    Years
    • Seen Apr 9, 2021
    There probably isn't a special for that in Emerald. A simple callasm does the job anyway.

    Code:
    .text
    .thumb
    .thumb_func
    .align 2
    
    main:
        push {lr}
        ldr r0, var_8004
        ldrh r0, [r0]
        mov r1, #2 @you can change it to  0 - get if seen
                    @                  1 - get if caught
                    @                  2 - set seen
                    @                  3 - set caught
        ldr r2, get_or_set_pokedex
        bl callviar2
        pop {pc}
        
    callviar2:
        bx r2
        
    .align 2
    var_8004: .word 0x020375E0
    get_or_set_pokedex: .word 0x080C0665
    Set var 8004 to a national dex number of poke and then call this asm.

    This deserves a quick R&D post.
     
    109
    Posts
    8
    Years
    • Seen Apr 2, 2018
    Are set flags not allowed to be the same? Like I can never use setflag 0x1023 because another script can check it and see it has x1023? I think I am overthinking it .-.
     
    Last edited by a moderator:

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • Are set flags not allowed to be the same? Like I can never use setflag 0x1023 because another script can check it and see it has x1023? I think I am overthinking it .-.

    Think of flags as just on/off switches. So whenever you're checking a flag, you're essentially saying, "is this switch on?". If you've turned the switch on somewhere else for an alternative purpose, then you can see how this check will not fullfill it's intended results.

    But what if your game didn't use the default switch checks? You'd be free to reuse them as you'd like. So to answer your question, unless you're reusing game scripts or you're editing important flags checked by game code (i.e gym, pokedex enable flags ect.) then you are fine to re-purpose any flags you wish.
     
    109
    Posts
    8
    Years
    • Seen Apr 2, 2018
    Think of flags as just on/off switches. So whenever you're checking a flag, you're essentially saying, "is this switch on?". If you've turned the switch on somewhere else for an alternative purpose, then you can see how this check will not fullfill it's intended results.

    But what if your game didn't use the default switch checks? You'd be free to reuse them as you'd like. So to answer your question, unless you're reusing game scripts or you're editing important flags checked by game code (i.e gym, pokedex enable flags ect.) then you are fine to re-purpose any flags you wish.
    Okay so in my fire red game I just want to do it where multiple people reappear after moving into another room. (However before that you don't see them in that room, you see them in the beginning room.) I wouldn't have to worry right?
     
    1,682
    Posts
    8
    Years
    • Seen yesterday
    Alright, everytime I try compiling a new script on a script I already made, it keeps reverting. Is there any way to fix this?

    It's not reverting, there is no more space at the location you are inserting at. If you used the Dynamic offset feature XSE has, it won't overwrite the old script, it will find free space and insert the script there instead. You need to clear the old script before you can reinsert at the same location.
     
    23
    Posts
    8
    Years
  • It's not reverting, there is no more space at the location you are inserting at. If you used the Dynamic offset feature XSE has, it won't overwrite the old script, it will find free space and insert the script there instead. You need to clear the old script before you can reinsert at the same location.

    How do I go about erasing it?
     
    Status
    Not open for further replies.
    Back
    Top