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

Author Topic: Pokemon HGSS sprite question  (Read 1703 times)

Nayreel17

  • Newbie
  • *
  • Posts: 4
    • View Profile
Pokemon HGSS sprite question
« on: June 20, 2020, 06:11:20 am »
Hello,

I am new to this website, and I have a problem with rom hacking the sprites on my copy of Pokemon SoulSilver for DS.
My issue is with the back sprite of the protagonist during wild encounters specifically. You see, I have modified every single frame of the pokeball-throwing/calling-your-pokemon-into-battle animation using Tinke in the a/0/0/6 file directory. However, in game, during the first second or so in the animation (the part where the character slides from the right to the left and is kind of mingled with the grass animation), the colours are all messed up. That part of the animation corresponds to the first frame, which I have properly edited, as proven by the fact that once the character stops sliding and the rest of the animation rolls out, the first frame and all the other ones are normal.

I do not know if any of you have run into this specific problem yourselves. Any form of help would be greatly appreciated.

Thank you very much in advance.

EDIT: Grammar.

FAST6191

  • Hero Member
  • *****
  • Posts: 2813
    • View Profile
Re: Pokemon HGSS sprite question
« Reply #1 on: June 22, 2020, 05:06:08 am »
Not so many people play with the DS pokemon titles around here, or pokemon in general for that matter.

Anyway my first guess in such scenarios is the palette changed between the frame animations and you did not play to it -- I have seen several DS games cycle out the palette between frames of an animation (usually more when it is a frame list from videos but standard game style animations also see it from time to time).

Easy enough to test this as well. Use something like desmume and tell it to update the palette in real time. If you see a mess of changing colours between frames during those periods you have your answer. In that case you would find the other palettes and go from there.

I watched a video and it looks like alpha blended stuff rather than the grass is pre blended in an animation trick (I would not really expect to see that on a new game made for the DS either but I have been surprised in the past and it is an easier way of doing things in some ways for the devs, especially if you don't get to customise your character appearance). Still go to the VRAM/tile viewer of desmume or something and set it to update in real time. If it has your trainer in there with the grass rather than separate grass you have an answer.

After this we get to go to memory issues (unlikely but not impossible -- usually see it more for massive bits of pixel art), alpha issues (it is the grass with alpha rather than your edits so unlikely).

Any chance we can get either a screengrab of the error or even some video (even more so if you can have the VRAM and palette updating in real time in the background)?

Nayreel17

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Pokemon HGSS sprite question
« Reply #2 on: June 23, 2020, 01:16:23 pm »
 FAST6191,

Thank you for your timely reply. I am very new to rom hacking, and apart from sprites I have never dabbled with anything else, so a lot of what you explained I did not understand. How do I get the palette or the VRAM to update in real time in Desmume? What does that even mean? Don't palettes update in real time already?

I appreciate your troubleshooting, but as a noob, I'm unfortunately going to need more guidance... if that's not too much to ask.
In the meantime, here is a link to my video of the animation WITHOUT having changed anything on Desmume.

https://www.youtube.com/watch?v=iQ-CZZggkco (look at the description for more details) (in the end, the grass seems to move in a different way to the back sprite, so I would highly doubt that the two are programmed in "together".)

By the way, I must stress, this only happens during wild encounters! when I battle a NPC, the first frame properly shows up during the slide from right to left.
 

FAST6191

  • Hero Member
  • *****
  • Posts: 2813
    • View Profile
Re: Pokemon HGSS sprite question
« Reply #3 on: June 23, 2020, 05:06:04 pm »
Depending upon the version then one of the menus will have a palette viewer, memory viewer, VRAM viewer and a bunch of other things. Normally they are whatever was there when you loaded up the viewer but there will usually be an option to have it update in real time as it changes on the system (takes some more CPU to do so it is not there by default, not to mention some actually want it to just be what it was when they pressed view).
If you view things changing all the time as the animation occurs then

Anyway that almost looks like inverted colours in the video, or possibly a shadow overlay (the wild pokemon is covered in a shadow as well though looking at another video it is not on the player). I will also note the bottom text box appears to change colour (almost a fade from dark) similar to how your character appears. To that end it might be if you borrowed colours from elsewhere in the normal battle palette you thought were nice that they also happen to be the text box colours that were being faded in.

Nayreel17

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Pokemon HGSS sprite question
« Reply #4 on: June 24, 2020, 09:37:53 am »
I found a way of updating the palette in real time (I checked the "auto-update" box in the palette viewer. I'm not sure if that's all I had to do though, because there was no "save settings" option or anything.) I got it all on camera, here is the link:

https://www.youtube.com/watch?v=t1wZYn6l3Hw

Nothing seems to have changed, I don't know if that helps you. But then again I don't even know if I actually made it so it would update in real time. Did I miss something?

Also, I couldn't find a way of updating the memory or the VRAM in real time. In the "View Memory" option in "Tools" I couldn't find a "auto-update" check box like I had with the Palette, and as for the VRAM, I couldn't even find an option to look at it at all. By the way, I am using Desmume 0.9.7.

Regardless, Thank you very much for trying to help me. I'm almost done with editing every other sprites for the protagonist (Overworld sprites, trainer card sprites, battle sprites, etc) so I'd really love to have this part done too!

FAST6191

  • Hero Member
  • *****
  • Posts: 2813
    • View Profile
Re: Pokemon HGSS sprite question
« Reply #5 on: June 25, 2020, 09:31:09 am »
You only had the main screen BG (background) palette selected in that, also was not in shot during the timeframe where it would have been relevant. Forgot about that in these versions/emulator.

No save option is needed as anybody that wants it can select it and will have the window up anyway.

Nayreel17

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Pokemon HGSS sprite question
« Reply #6 on: June 27, 2020, 03:24:30 pm »
Hey, sorry for the late reply...

In the end, the problem goes much deeper than messed up colours, it would seem. It turns out the whole sprite is actually the original one, but using the palette with my custom colours. This means that when the protagonist slides from right to left in the very beginning of this animation, the game actually uses the ORIGINAL SPRITE. Since my custom sprite isn't that different (in terms of pixel placement), I couldn't even tell that it used the wrong sprite altogether. So this is a completely different issue.
As for the colours, I found a fix, because it turns out it all has to do with the order of the colours on my palette. I tried changing the order, and surely enough, the sprite used different colours in different areas. Then, all I had to do was find out in which order the sprite picks up the colours, and place the right colours in the right place on the palette. This is satisfying enough for me because my sprite is not too different to the original one aside from colour, but if for instance one was to replace their sprite with a COMPLETELY different-looking protagonist, then the issue would literally have nothing to do with colour and all to do with sprite usage.

I think my specific case can rest for now, however, to anyone who has some insight on this new information, you are welcome to continue the thread to help out people who actually need the sprite to change. I'm actually curious, tbh.

Thank you to the person who helped me investigate this issue further, FAST6191.

FAST6191

  • Hero Member
  • *****
  • Posts: 2813
    • View Profile
Re: Pokemon HGSS sprite question
« Reply #7 on: June 27, 2020, 08:19:44 pm »
Two identical sprites in an animation? That was way down on the list there for me -- it is a way to get a cheap extra animation in it all sometimes but completely redundant is new. Guess next time I will have to add stick a line down the middle of the sprite or drop some layers to confirm such things.

Glad you got it working.