• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

[Other] Offsets for Scripting and Sprite Replacement

Bliss

Part-time Pegasister, Part-time PokéFreak
  • 415
    Posts
    11
    Years
    So I'm in the process of making a hack (check signature) and unfortunately, there is quite a hefty amount of stuff I just don't know yet.

    First, I'd like to give a bit of information regarding this hack:
    Spoiler:

    My first script is at the offset 0x1000000 and I want to make sure that setting a script 256 bytes ahead (at 0x1000100) won't cause any problems.

    Basically, I want to make sure that each script has enough space that I don't run into any issues. Should I just run FSF after adding each script, or is there a rule of thumb that I'm unaware of?

    As for the sprite replacement.. It's a story hack. A friend of mine is making some sprites and I have no idea how to add them to the game. If someone has a link to a tutorial I would greatly appreciate it. (If there is a tool for replacing trainer sprites, that would probably be even better)

    The sprites in question are OW sprites and in-battle sprites. Do they use the same method? Or will I need a separate tutorial for each? I don't plan to add any Fakemon to this hack, but I do plan to add them to another hack I'm working on in the future.

    A bit more information, if needed:
    Spoiler:
     
    I'm assuming you'd know this by now, but you really shouldn't use A-map 1.95 :/
    Also, I believe some scripts take more space than others, depends on the commands used or something, but I always start on 800000, leave 256 space and I do fine ;)
     
    I'm assuming you'd know this by now, but you really shouldn't use A-map 1.95 :/
    Also, I believe some scripts take more space than others, depends on the commands used or something, but I always start on 800000, leave 256 space and I do fine ;)
    I couldn't be bothered to find a link to AMap 1.92 when I was starting out, because I had assumed that MEH would be updated quite often and we would have a near-perfect Beta version ready before I finally got around to starting CoG. (I usually don't get started for a few months after I get an idea going) After that I just never got around to downloading 1.92, I'll head over and do that now.

    I did a FSF search from start of ROM and that's where it put me, in terms of offsets, so that's where I started, since I was using a 'scrubbed' ROM.

    The only script I'm worried about taking more than 256 bytes is the givepokemon script I plan to make. I want it to be dynamic, and give a few options. (through dialogue, instead of items on a desk) But that could change if I don't figure a few things out lol. I even played with the idea of creating a sort of Safari Zone setting where you could catch your first Pokemon as a means of proving yourself worthy.. But I really have no idea how to set that up. (I saw a similar set up in a hack some time ago, but I have no idea who the creator was, since it was in a pack of like 50+ patches)

    Regardless, thank you for the reply, and I'll definitely be switching to 1.92.
     
    o__O''

    If you're using XSE for scripting, you don't need to specify your own offset or use FSF, at all. At the top of your script use "#dynamic 0x740000" (or 800000, if you want) and then instead of using actual pointers use names with an @symbol.

    IE

    #dynamic 0x740000

    #org @start
    ...
    goto @next

    etc.

    If you go about just skipping 256 bytes you're wasting a tonne of space - simple scripts will only take up a tiny amount of space anyway. This method means that scripts will not overlap, as long as you repoint any scripts that you insert and later extend.
     
    o__O''

    If you're using XSE for scripting, you don't need to specify your own offset or use FSF, at all. At the top of your script use "#dynamic 0x740000" (or 800000, if you want) and then instead of using actual pointers use names with an @symbol.

    IE



    If you go about just skipping 256 bytes you're wasting a tonne of space - simple scripts will only take up a tiny amount of space anyway. This method means that scripts will not overlap, as long as you repoint any scripts that you insert and later extend.
    Lol I know this. I meant for the next script I'm making.

    And the givepokemon Script I just used had pointers all over the place, the last one was 0x8004DF which is way over 256 bytes, considering it started at 0x800000.

    Currently I'm using this program to edit sprites:
    https://www.pokecommunity.com/showthread.php?t=253701
    Maybe in future you'll use: unLZ-GBA, Advanced Palette Editor, Tile Molester and others.
    I already tried that NSE, both classic and 2.x, I wasn't able to do anything except ruin the sprites for a couple of characters. (These will be replaced as soon as I can find the original sprites)
     
    Last edited:
    Back
    Top