The PokéCommunity Forums Fan Games ROM Hacking Tools, Tutorials & Resources
Tutorial Indexing sprites and inserting trainer sprites into your ROM

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Reply
 
Thread Tools
  #1    
Old April 14th, 2012 (8:40 AM). Edited April 14th, 2012 by bensgraphicdesign.
bensgraphicdesign bensgraphicdesign is offline
     
    Join Date: Apr 2012
    Gender: Male
    Posts: 48
    In this tutorial I will teach you how to index a trainer sprite (part 1) and insert it into your ROM! (part 2)

    What you will need:
    ______________________________________________________
    Indexing your sprite.

    Why do I need to index my sprite? You must index your sprite before inserting it into your ROM because a sprite on a ROM consists of a palette with 16 to 256 colours and unLZ will not insert it into the ROM and will just feed you the same error over and over explaining that you haven't indexed your sprite. The indexed sprite you produce from following this guide will leave you with the same looking sprite as you or someone else produced, just with a file size around six hundred to nine hundred bytes; around ten times smaller then the originally produced sprite.

    STEP 1
    ______________________________________________________

    Spoiler:
    Open up your sprite in paint.



    STEP 2
    ______________________________________________________

    Spoiler:
    Change the dimensions down to 64 x 64 by dragging the corners in. You may need to make some minor adjustments to youre sprite to keep it looking good while shrunk. (You should use a colour not used in your sprite, as you can see in my example; I have done a terrible job of this!)


    STEP 3
    ______________________________________________________

    Spoiler:
    Save it as a remembered file (try to keep all the files in one folder to keep it simple) make sure you save it as a .PNG and call it something like 'Sprite (unindexed)' this really doesn't matter though. The file size should be around one to two megabytes.


    STEP 4
    ______________________________________________________

    Spoiler:
    Open up IrfanView.


    STEP 5
    ______________________________________________________

    Spoiler:
    Open up your unindexed sprite in IrfanView.


    STEP 6
    ______________________________________________________

    Spoiler:
    Now you've opened your unindexed sprite, go to the 'Image' tab along the top and go to the thirteenth option down, 'Decrease colour depth'. Now a box shall appear, select the '16 Coulors (4 BPP)' option and click 'OK'.


    STEP 7
    ______________________________________________________

    Spoiler:
    Now go back to the 'Image' tab, but this time right at the bottom, hover over the 'Palette' option then click the 'Edit Palette', a box should appear.


    STEP 8
    ______________________________________________________

    Spoiler:
    If all is done correctly, the palette that appears should have 16 colours, the first colour (black) and the tenth colour (the colour that your background is, if it's not select the colour on the palette which is the same as your background) need to be swapped around.
    • Click on the first colour in the palette and copy down the values which are stated after the reading of 'Value: RGB ( ' then, the numbers need to be written down which follow this sequence ended with a '),' in my case, 16, 7, 16. (write these down on a notepad or something!)


    STEP 9
    ______________________________________________________

    Spoiler:
    Do the same with the background color, find the colour click it, write down the three values; in my case 244, 242, 244. Now you have these you are ready to switch the colours! View step ten for information!


    STEP 10
    ______________________________________________________

    Spoiler:
    So, now you have these written down, it's time to switch the palette over! Double click the black colour on the palette and a box called 'colour' pops up. In the bottom right above 'Add to Custom Colours' on the right next to Red, Green and Blue; type the 3 values in the same order as you should have written them down. And your colour will be selected on the colour square. In my case I have typed in 244, 242 and 244. Then click 'Add to Custom Colours', then 'OK'. You must now do the exact same with the other colour, in my case; I'd double click the light grey colour and type in 16, 17, and 16, click 'Add to Custom Coulors', then 'OK'. The image should look messed up before you think it's gone wrong! Then click 'OK' again.


    STEP 11
    ______________________________________________________

    Spoiler:
    Go file, save as and call it something different so you have a backup of the primary file. I would call it 'Sprite (indexed)' so I remember which one it is when it comes to it.


    STEP 12
    ______________________________________________________

    Spoiler:
    Now you must save the palette for needed future use, on IrfanView go the 'Image' tab along the top and go down to 'Palette' again, but this time select the option to 'Export Palette' and save it as anything you like, I will call it palette.pal


    STEP 13
    ______________________________________________________

    Spoiler:
    Open GIMP.


    STEP 14
    ______________________________________________________

    Spoiler:
    Open your indexed, but funny looking sprite up.


    STEP 15
    ______________________________________________________

    Spoiler:
    Keeping it open, open your bigger sized sprite, if it's not already open. Click Ctrl + A, then Ctrl + C. (the select all and copy process!) Paste it into GIMP.


    STEP 16
    ______________________________________________________

    Spoiler:
    Save it over your previous file, 'Sprite (indexed)' if you called it that. Or you can save it somewhere else, it's completely up to you.


    CONGRATULATIONS! YOU HAVE CORRECTLY INDEXED YOUR SPRITE!

    [INSERTING SPRITE INTO ROM TUTORIAL BEING ADDED ON SOON!]
    __________________
    Reply With Quote

    Relevant Advertising!

      #2    
    Old April 14th, 2012 (11:27 AM).
    esperance's Avatar
    esperance esperance is offline
    • Moderator
    • Platinum Tier
     
    Join Date: Mar 2010
    Location: Ohio
    Age: 20
    Gender: Male
    Nature: Relaxed
    Posts: 3,806
    Correction. You need to index a sprite because the images in the ROM use palettes of only 16 or 256 colors, and if it's not indexed it doesn't have a palette, and can't be inserted.
    __________________

    A Pokemon that is discriminated!
    Support squirtle and make it everyone's favourite.
    Reply With Quote
      #3    
    Old April 14th, 2012 (1:00 PM).
    bensgraphicdesign bensgraphicdesign is offline
       
      Join Date: Apr 2012
      Gender: Male
      Posts: 48
      Thanks a bunch dude, just trying to be of help... You know? Could you suggest a way of how I could change the title of this thread from 'wefws' to 'Indexing sprites and inserting trainer sprites into your ROM.' because I misnamed it while creating the thread...
      __________________
      Reply With Quote
        #4    
      Old April 14th, 2012 (4:05 PM).
      Diegoisawesome's Avatar
      Diegoisawesome Diegoisawesome is offline
      Oh god the bees
      • Silver Tier
       
      Join Date: Dec 2007
      Location: :noitacoL
      Age: 20
      Gender: Male
      Nature: Naive
      Posts: 1,032
      Quote:
      Originally Posted by bensgraphicdesign View Post
      Thanks a bunch dude, just trying to be of help... You know? Could you suggest a way of how I could change the title of this thread from 'wefws' to 'Indexing sprites and inserting trainer sprites into your ROM.' because I misnamed it while creating the thread...
      PM a ROM hacking section mod, tehy should be able to help you with it.
      __________________


      My other resources:
      My Website
      diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
      diegoisawesome's Miscellaneous Finds
      The Ruins of Alph Puzzles
      Diego's Miscellaneous Patches
      GBA Intro Manager
      The Secret Sauce: Triple-Layer Tiles
      Reply With Quote
        #5    
      Old April 20th, 2012 (6:09 AM).
      Mr.KoolAid Mr.KoolAid is offline
         
        Join Date: Mar 2012
        Gender: Female
        Posts: 27
        can use this to put in new overworld sprites. (i dont know if that is the correct term). But i am hacking a ruby rom, but i want team rocket and professor oak, as well as a few other characters from fire red.

        If not can you direct me to a tutorial that teaches me how to do that?
        Reply With Quote
        Reply
        Quick Reply

        Sponsored Links
        Thread Tools

        Posting Rules
        You may not post new threads
        You may not post replies
        You may not post attachments
        You may not edit your posts

        BB code is On
        Smilies are On
        [IMG] code is On
        HTML code is Off

        Forum Jump


        All times are GMT -8. The time now is 10:50 AM.