News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: A problem I have when importing tilesets to SNES games  (Read 3873 times)

Kapikyo

  • Jr. Member
  • **
  • Posts: 18
  • Fail faster
    • View Profile
A problem I have when importing tilesets to SNES games
« on: March 01, 2016, 02:20:23 am »
I'm a sprite artist by nature, a lot of my romhacks incorporate my own sprite work because its what i do best. A big problem I have with importing these graphics is how tile editors mess up the palette of my work when i try to import it. I'll give an example.


This here is Pochaco. She's going to be in my mario kart hack.





If you've ever done sprite work for Super Mario Kart, you know there is an obnoxious amount of sprites you need to do in order for a character to appear as themselves at different distances. To shorten the import process of that many sprites at once, I tried to edit a sprite sheet from the game.

Here's the sprite sheet.





It uses the same palette that I use in my tile editor of choice, Tile Layer Pro (TLP)
However, when I import the bmp to tile layer pro, it ends up looking like this.





I've tried using similar methods in other tile editing software compatible with SNES roms, such as YYCHR, but I run into the same error. Despite having the exact same palette as the graphics I'm importing, the tile editors still always get the colours wrong. What am I doing wrong? Is it just impossible to import graphics this way? Am I taking a stupid, easy short-cut that doesn't exist? Any help would be appreciated.

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Re: A problem I have when importing tilesets to SNES games
« Reply #1 on: March 01, 2016, 04:07:31 am »
As admitted in that thread in the Newcomer's Board (the one no one has replied to yet because they are taking their time to compose the most informative post that will blow my mind in the most dick-shattering way), I am returning from a hiatus so my memory is faint.

But I have some faith that I remember some of this.

It uses the same palette that I use in my tile editor of choice, Tile Layer Pro (TLP)
However, when I import the bmp to tile layer pro, it ends up looking like this.



Okay, is the palette you are using taken straight from a ZSNES savestate?

Also, you might want to try Tile Molester.

If I were attempting this, I would try the following strategy.

Play the game in ZSNES, and when the graphics you want to edit appear, make a savestate in ".zst" format.

Load up the ROM in Tile Molester. It's been awhile, but IIRC SNES graphics in Tile Molester are 1-Dimensional 4bpp planar, composite (2x2bpp). Someone please correct me if I'm wrong.

Go exactly to where the graphics you want to edit in the ROM begin. The colors will be fux0red, because Tile Molester has not loaded the correct palette. Have Tile Molester load the palette from the ZSNES savestate you made. The colors might still look fux0red, so hit the arrows at sides of the palette box until you get the right colors.

*Struggling to remember the rest due to amnesia.*

Okay, if you got the correct colors to appear, Tile Molester should have the option to export what you see into ".bmp" format. I emphasize on "what you see", because it will not export the entire sprite sheet; only what you can see in the window. My advice to you would be to export the first set of sprites you see and save it as "[character]page1.bmp" or something. Then hit "Page Down" on your keyboard, export what you see next and save it as "[character]page2.bmp" or something, then hit hit "Page Down", export what you see next has "[character]page3.bmp" and so on. You should get the idea.

Now, the ".bmp" files you exported from Tile Molester are the graphics you should edit!

I recommend JASC Paint Shop Pro 9, but if you can find something better, more power to you. Use JASC Paint Shop Pro 9 (or whatever you think is better) to edit each page of sprites to your liking, but only use colors that are contained in the ".bmp" file's palette! If you use different colors, you will need to use SNESPal to change the ROM's palette to accommodate for this, and this is a whole separate headache that I don't want to go into, and neither do you!

When you are finished with your edits, load up your ROM into Tile Molester with the proper settings, go exactly to where the graphics you want to edit in the ROM begin (as you did before), then point Tile Molester to load the correct palette from the ".zst" savestate.

Open "[character]page1.bmp" or something in another window in Tile Molester. Select every thing you currently see on that "page" in the ROM, and clear it. Then, copy everything from "[character]page1.bmp" or something into that blank space. After this, right-click to "de-select" stuff, then press "Page Down" on your keyboard. Open "[character]page2.bmp" or something in another window in Tile Molester. Select every thing you currently see on that next "page" in the ROM, and clear it. Then, copy everything from "[character]page2.bmp" or something into that next blank space. You should get the gist of what I'm trying to tell you.

Again, I am recovering from a sort of ROM hacking amnesia. If anything is unclear, let me know!

And if I am incorrect, someone please correct me!
« Last Edit: March 01, 2016, 05:04:52 am by NERV Agent »

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2927
  • 2 + 2 = 5
    • View Profile
Re: A problem I have when importing tilesets to SNES games
« Reply #2 on: March 01, 2016, 04:12:24 am »
Quote
However, when I import the bmp to tile layer pro, it ends up looking like this.

This problem is common in A Link to the Past hacking. I'm not sure what it is but some programs have a way of corrupting the colors when importing/exporting graphics to and from hacking tools. As a consequence, if anyone wants to import/export graphics using some of the options in Hyrule Magic one of the only known programs that doesn't ruin the colors is old version of Paint Shop Pro (9). I'm guessing it's a short-coming of the hacking tools we use. Some of the options in YY-CHR (color swapping) are good at correcting this.
Cigarettes, ice-cream, figurines of the Virgin Mary...

dougeff

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
Re: A problem I have when importing tilesets to SNES games
« Reply #3 on: March 01, 2016, 03:13:00 pm »
This literally happens to me every time I import graphics. Yy-CHR has the color-replace tool, which I have to use EVERY TIME. It sucks, doesn't it?
nesdoug.com -- blog/tutorial on programming for the NES

Kapikyo

  • Jr. Member
  • **
  • Posts: 18
  • Fail faster
    • View Profile
Re: A problem I have when importing tilesets to SNES games
« Reply #4 on: March 01, 2016, 05:30:55 pm »
This literally happens to me every time I import graphics. Yy-CHR has the color-replace tool, which I have to use EVERY TIME. It sucks, doesn't it?

fuckin a. I feel like im complaining about nothing, though. It's still amazing that we live in a world where we can alter our childhood classics to be whatever the fuck we want them to be. I think I'll put up with colour replacement, if that's really the easiest way to do it. I think I was more worried I was just an idiot, but apparently everyone struggles with this, so I consider my inner conflict officially resolved.

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Re: A problem I have when importing tilesets to SNES games
« Reply #5 on: March 01, 2016, 06:29:28 pm »
About your issue, do the correct colors you want appear in-game?

Kapikyo

  • Jr. Member
  • **
  • Posts: 18
  • Fail faster
    • View Profile
Re: A problem I have when importing tilesets to SNES games
« Reply #6 on: March 01, 2016, 07:02:04 pm »
About your issue, do the correct colors you want appear in-game?

After I correct the colours in the tile editor/modify the palettes, yes.

Rotwang

  • Full Member
  • ***
  • Posts: 170
    • View Profile
Re: A problem I have when importing tilesets to SNES games
« Reply #7 on: March 07, 2016, 10:15:48 pm »
Here's how I do it: Create a 16 color image in Paint Shop Pro 7. Set your palette manually, either by copying an existing palette in a SNES game and entering the RGB values, or by creating your own palette from scratch. Draw your graphics. Save your image as a PCX file. Run it through pcx2sopt.exe using DOSBox. Inside the .SET file it generates will be your tiles converted using the correct palette assignments. As well, a .COL file will be outputted containing your PCX's palette in SNES RGB format and usually you can just copy/paste this into your ROM directly.