View Single Post
Old October 7th, 2012 (9:19 PM). Edited October 8th, 2012 by Nerketur.
Nerketur's Avatar
Nerketur Nerketur is offline
    Join Date: Nov 2010
    Location: Cyberspace
    Gender: Male
    Nature: Quirky
    Posts: 104
    Originally Posted by droomph View Post
    She's focusing on doing the scripts first, so we're more than glad that you're willing to look into it!
    She? I'm no she. =P

    Originally Posted by VERGUNDAI View Post
    My progress...,
    - Just starting a program on editing the OW sprites
    and it's not editable yet because some sprites don't have correct pallete offsets...

    If anyone find sprite pallette offsets pm me /but I might find it soon..
    I'm not sure about palettes, but I do know a bit about how the SIR0 files (in the BIN files) are organized.

    All of the images of each Pokemon are in their own SIR0 file, and there are 593 of those. (The bin file is just a collection of those SIR0 files.

    Format of the images are in 8x8 blocks, 4 bits per pixel.
    How the image is laid out is shown right after the pixels. I do not know where the palette data is stored, though.

    Some type of data
    data for above picture
    (repeat above ad nauseum)
    some pointer data

    Picture data:
    12 bytes per part, followed by 12 0x0 bytes to signify the end.
    XXXX ???? YYYY ???? ZZZZ ????

    first 2 are a word showing pixel data (-0x29?)
    XXXX: if XXXX = 0, then we put blanks here
    otherwise, we put data
    YYYY = Length of the data to put. (in bytes)
    Note that because the data is in 8x8 blocks of pixels, and each pixel is 4 bits long (16 colors), this will ALWAYS be a multiple of 0x20 (8*4)
    ZZZZ: All I know about this is that it can be 0, or 1. I assume it refers to Z indexing, but I'm likely wrong.

    Note on how data is arranged:
    ALL data is arranged on 32x32 blocks. We only put the data on the full blocks.
    So, lets say an image looked like:
    1 2
    7 8
    (Here, the numbers represent 8x8 sections)

    The data would be laid out as:
    (1 addr) 0x0000 0x0020 0x0000 0x0000 0x0000
    0x0000 0x0000 0x0020 0x0000 0x0000 0x0000
    (2 addr) 0x0000 0x0020 0x0000 0x0000 0x0000
    0x0000 0x0000 0x0020 0x0000 0x0000 0x0000
    (3 addr) 0x0000 0x00A0 0x0000 0x0000 0x0000
    0x0000 0x0000 0x0020 0x0000 0x0000 0x0000
    (8 addr) 0x0000 0x0020 0x0000 0x0000 0x0000
    0x0000 0x0000 0x00A0 0x0000 0x0000 0x0000
    0x0000 0x0000 0x0000 0x0000 0x0000 0x0000

    More notes on how Data is arranged:
    Everything is based on a 32x32 block, as follows:
        If there are more, the second block is always to the right of the  first.
        For example, if the hexadecimal numbers represent 32x32 blocks,  they are laid out in this order.
        The smallest image is technically a 32x32 block, with "blanks"  appended.
        So, as a more concrete example, this image (in 8x8 blocks)
            1 2
            6 7
        Really looks like this to the game ('.' represents a blank 8x8 tile):

    I also looked a little into the format, and noticed the near end of file's offsets, -(0xF7), give you the correct offsets to the pictures. But that's all I know, and that's also as far as I'll look into it for now =) If someone wants to figure it out from there, be my guest. =D

    Edit: I may as well mention, the sprites for the Pokémon are in m_ground.bin, in the MONSTER folder
    , if you unpacked the ROM. And I only know the offsets are true for the Bulbasaur file. It may or may not be the same for the others.
    Want my help in PokéScripting? PM me =)
    I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
    Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

    Hacks I support 100% (MUST SEE!):

    Very well made hacks:

    My work:
    Figuring out scripting in PMD
    Entire script map of LeafGreen
    PMDSE (Pokémon Mystery Dungeon Script Editor)
    Reply With Quote