• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

New to Romhacking, Have Many Small and Specific Questions

  • 1
    Posts
    16
    Years
    • Seen Jul 16, 2020
    The last time I opened a ROM to hack it was when I was 11 years old, using only Advance Map and Notepad for scripting while likely filling my dad's computer with viruses. A decade later and I've discovered hex-editing and how it can be used to do almost anything you want to these games. So far I've downloaded HexManiacAdvance and karatekid's THUMB editor and compiler. I've skimmed several tutorials pertaining to ASM syntax and injection, hex-editing, and scripting just to gauge how doable what I want to accomplish is, and I feel like there are some gaps in my basic understanding of how these things work together to even get started. The entirety of what I'm looking to do is fundamentally change the combat system of Pokemon Firered, including turn manipulation, removing accuracy, removing IVs, changing how EVs are accumulated, and changing move effects drastically. I believe the version I am working with is 1.0, despite not specifying that in the filename. I don't expect answers to all these questions, but even one would be tremendously helpful:

    1. When would one use an ASM routine versus a script? From what I've seen so far, ASM routines are how you can implement fundamental changes like the PSS, a day/night system in FR, etc. while scripting is more so manipulating what's already there and creating events like dialogue and trainer battles. Is this correct?

    2. What is the difference between a script and a "BattleScript"? Is it simply that one runs outside of battle and the other during?

    3. At 0x0023F0 in the hex editor, I am seeing a normal script, a "BattleScript" and what looks like a portion of an ASM routine all within the same two bytes. Are they all the same thing but translated differently for me by the hex editor? Or are 3 separate things stored in those two bytes?

    4. In a BattleScript I was viewing within the hex editor (at 0x0023F0), I saw lines like "jumpifnopursuitswitchdmg 00980146" and "accuracycheck 9C054680 9906". These sound like function names. What is/are the number(s) that follow them? If I want to view what these functions do, where can I find them? I did see them called in the Firered disassembly as well. Is it the same as everything else where you just kinda have to keep looking and hope somebody else has already found it and posted it online?

    5. What is the purpose of the Firered disassembly with regard to hacking and editing? My first thought was that one could just change the code and re-assemble the ROM with the desired changes, but I expect most functions to be dependent on one another in some way, so just changing something that way could have a disastrous domino effect. Is it just meant to be a reference to study?

    6. Is there any basic tutorial for just reading everything? Looking at the BattleScript with function call after function call is quite daunting.

    7. What is the structure of a table with regard to a single address? For instance, there are several pointers to the movedata "table", but once I follow one of those pointers to the respective anchor, how can I tell where the table starts and ends? How does the table structure work? If this one is too big/too much to answer I understand.

    8. For what I want to accomplish, where should I start? I figured I didn't need many tools since I won't be changing any sprite, map or music data, but I'm honestly not sure if I'm missing anything crucial. I'll probably have to edit trainers' and wild Pokemon to properly re-balance the game around my changes, so there's that. I was also looking into getting XSE.

    I have experience programming in several different languages, assembly included. I think I would be able to figure out how to code what I want to code, but I feel like I can't reach that point yet with my current knowledge. Again, I don't expect all these questions to be answered and I'm very grateful if anyone takes the time to respond to any of them, let alone read them. Thank you for your time! I wanted to post links to the pages of the tools I was referring to, but I'm not allowed to post links with my account yet.
     
    Hey, I don't know a lick of coding, but I've played around a fair bit with the pokecrystal disassembly, so hopefully what I'm about to say can apply to pokefirered (or you could try pokecrystal, if that would also meet your goals).

    First of all, when you ask specific questions about tables and such, are they pertaining to what you've been seeing in various tools or in the actual disassembly? I'm assuming the former since you don't know much about pokefirered, but you may want to clear it up. Anyway, I can only really answer one question for you:

    5. When you reassemble the ROM in cygwin, it'll indicate an error and fail to assemble the ROM if there's a critical error and display the culpable files (it'll still assemble for minor ones, but you'll see which files are wonky). Since I don't know much about coding, when I'm doing anything beyond copying tuts or simply changing data, I just leave the file open in Notepad++ so that I can easily undo my trial and errors (get it? not sure if this qualifies as a joke lol), as shown in cygwin upon attempting reassembly. Besides, a lot of reference files are shown in the disassembly (e.g. "include data/trainer_constants.asm"), at least for crystal and stuff is more or less easy to find. You can always check the github for the pret discord link if you need help. If I haven't messed anything up royally yet, you'll be just fine.

    Idk much about FireRed hacking in general (although that's what I plan to use for my next project, which will be an original story in the same world), but for Crystal, there's literally no reason not to use pokecrystal. Idk how good the github tuts are for pokefirered or if there's crucial work left to be done on the disassembly, but it'll probably be your best bet going forward, if not right now. I hope something I said here helps.

    MA
     
    Back
    Top