Weird Issues Importing Images with Tinke?

Discussion in 'NDS - ROM Hacking and Translations' started by PhantomGhost, Nov 21, 2016.

  1. PhantomGhost

    PhantomGhost Advanced Member

    Nov 12, 2016
    United Kingdom
    Hi! I'm trying to edit the graphics for the Kuroshitsuji/Black Butler NDS Game "Phantom and Ghost" The images are all stored as .obc/.bcg, so I've used an extractor, but I'm having some weird issues when importing images into Tinke.

    The first thing I tried to edit was the games Japanese name tags (for some reason they're stored as images, not text.) But when I did, it changed the whole system colours.
    I know this isn't a palette issue- the name tag looks fine, and the colours that have gone off aren't even in the file I edited.
    I managed to find a fix for this though- Using Crystal Tile 2 to edit them instead.
    The name tags are 4-bit, whilst most of the other images are 8-bit which I thought might be the cause, so I tried to edit an 8 bit image using Tinke and see how that worked out. Well, it came out fine.
    (Ignore the crude editing though lol.)
    Since that was working, I decided to edit more of the 8-bit images, but of course, it started acting weird again.
    (It's the top screen I've edited)
    One strange thing I've noticed, is that once you've reached the file that's causing the colour change, it changes all colours, even if you reload the game from the beginning.

    I guess the obvious thing to do is to edit all the files in Crystal Tile, but it can only edit the .NCGRs, and in the game, they're all really messed up.

    So I'd have to rearrange each one before editing, whereas in Tinke, you can open the .NSCR, extract the image how it's supposed to look (not-scrambled), edit it, and reinsert it without fussing (Well, when it's working correctly anyway.)

    I've tried Tile Molester and Tile Layer Pro, but Tinke and Crystal Tile are the only ones I really know how to use, so I'd really like to know if there's anyway to fix these issues?
    I'm using Tinke 0.8.1. I tested it 0.9.0, but it did't solve the colour problem (and it messed up the images more) so...
    I'm a huge n00b at ROM hacking, I can't try to edit the hex or anything :blink:

    I'd really appreciate it if you could even take a quick look! I'm so out of my depth :cry:
    Last edited by PhantomGhost, Nov 21, 2016
  2. PhantomGhost

    PhantomGhost Advanced Member

    Nov 12, 2016
    United Kingdom
    Update: I wanted to test a theory I had that the colour change only occurred when editing on top of black text (since so far it's only been the name tags that are affected), but it didn't solve anything.
    (I tried using both black and white fonts but it's still doing this.)
    The name tags are located in tobj>AdvCommonLow161
    The image that came out fine is bmp>sb1014
    and the one that I'm currently having issues with is bmp>sb01011

    The image extracter/inserter I'm using was written by the amazing DarthNemesis and can be downloaded here

    There's also some .xttn files that might be related? It seems they can be opened with Crystal Tile hex editor but like I said, technical stuff isn't really my area of knowledge ^^'''
    There's tex>st01011 which has the same name as the image I'm struggling with....
    Last edited by PhantomGhost, Nov 22, 2016
  3. Normmatt

    Normmatt Former AKAIO Programmer

    Dec 14, 2004
    New Zealand
    Sounds like the palette contains two colors that are the same (which are changed in game by code) but when exported to an image and re-imported get set to the first palette entry for that color instead of being seperate....

    Hopefully that makes sense...
  4. PhantomGhost

    PhantomGhost Advanced Member

    Nov 12, 2016
    United Kingdom
    Thanks for responding!!

    I think I get it.. sort of :rofl: So in the end it really is a technical/coding thing that needs sorting out..? Is there any use graphically trying to go through all the colours and seeing which is causing the issue or would that be a major waste of time? ^^'

    This is the palette that isn't working sb01011. vs the one that is sb01014. . There's 365 colours in both, but sb01011 only uses 125 and sb01014 uses 254.
    I know that some of the images are definitely working in Tinke as-is, so even if I couldn't fix the colour issues, it'd be good to know if there was some way to identify which are going to work, and which will need editing in Crystal Tile. I don't mind editing the broken ones in Crystal Tile, but if it came down to it, I guess I'd rather edit them all in CT to prevent any problems, rather than replaying the game 1000x trying to find which pics aren't working...
  5. rastsan

    rastsan 8 baller, Death Wizard,

    May 28, 2008
    generally any image you edited and inserted is probably going to need to be looked at again. (I have this same problem with about 9 other games).

    what it means is downgrading your edited images to only x number colors. Tinke does have options to replace the pallete file and NOT to replace the pallete. This is handy as it reminds you that you need to keep the images a certain way. One of the games I worked on has the same pallete file being used by over 500 other images in game. It was very fun finding out that I had to redo each image in just the one color range. Thankfully there are tools for this that allow you to swap pallete colors out or to (ah crap whats the word ... keep it within a certain range...)... for all those images...
    Either way you need the one that keeps all the images in just the one pallete file and to remember when editing no colors in the image that were not there already.

    nevermind- reread the whole thing...
    crystaltile does have nscr editing built in...
    also this just sounds like a flag in file has been tripped changing the priority of the pallete file.

    Are you saving new NSCR?
    If you don't need to why would you?

    try nsmbeditor or EFE everfileexplorere - One of the versions had nscr editing that saved me crap loads of trouble...
    but you are probably adding cells - I would do a file compare with one you don't add cells to just to see if you are tripping a flag. Look up nscr structure and take a look.
  6. PhantomGhost

    PhantomGhost Advanced Member

    Nov 12, 2016
    United Kingdom
    I messed around a lot and think I finally have a method that's working ^_^ Thank you for your advice!!! :D