Sprite Graphics Editing
Page 1 of 3
Page 1 of 3 • 1, 2, 3
Sprite Graphics Editing
Hi everyone, I'm Darkprince909, one of the graphics editors for Zelda3C, and I've hit a snag. I need to be able to change which palette an individual sprite calls from the palette set without affecting other sprites that use that palette (meaning just changing the colors in the palette won't work.) I've wandered around the forums a bit, and I found the tutorial for the Graphics Schemes section of Hyrule Magic, which seems to be exactly what I'm looking for, but it's incomplete. If someone is willing to walk me through the process of changing these values, it would help all of us on this project a lot, because we wouldn't have to worry as much about making the new sprites fit existing palettes, or even the same palette as the original sprite.
By the way, these forums are sick! I didn't know there were so many other hacks in progress right now. And I'm glad to be invited to the party
By the way, these forums are sick! I didn't know there were so many other hacks in progress right now. And I'm glad to be invited to the party
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
Welcome to the forums Darkprince909! I remember seeing you on the message boards from GM's site and from what I hear you have redrawn the small pine tree.
As for your request you might want to ask SePH or someone else because I don't know much about the palettes.
As for your request you might want to ask SePH or someone else because I don't know much about the palettes.
Erockbrox- Since : 2013-02-05
Re: Sprite Graphics Editing
Hello Darkprince909 and welcome here! I just though of inviting you here after your email question since you're a part of the Quest for Calatia team afterall
I you wanna know how to edit the palettes sets, you should read my new compendium faq right here:
https://www.dropbox.com/s/ay6mm8nt3lbguld/Orochimaru%27s%20Zelda%203%20Hacking%20Compendium%20v1.8.4.pdf
Start reading from page 230 until 238 and you should find your answer! The graphics schemes aren't that hard when they have tutorials! The graphics schemes sections aren't all finished but I'll probably finish them after I'm done with my hack!
I you wanna know how to edit the palettes sets, you should read my new compendium faq right here:
https://www.dropbox.com/s/ay6mm8nt3lbguld/Orochimaru%27s%20Zelda%203%20Hacking%20Compendium%20v1.8.4.pdf
Start reading from page 230 until 238 and you should find your answer! The graphics schemes aren't that hard when they have tutorials! The graphics schemes sections aren't all finished but I'll probably finish them after I'm done with my hack!
Founder- Since : 2012-06-19
Re: Sprite Graphics Editing
Oh wow, that's a big guide. I found the Perfect Guide yesterday, but that didn't have nearly this much information. I'm going to finish working on the sprite I'm drawing now, then I'll read this section. Hopefully I can make sense of it. Thanks so much, SePH!
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
No worries, as long as it can help!
I hope you understand, but if you don't, the most basic way to say it is that you can attribute two different enemy colors per area or dungeon floor. Some enemies of course use a certain shared palette and you can't edit it without affecting other sprites if I recall correctly!
I'll look more into this request during my coming weekend (monday-tuesday-wednesday of every week)
But to give you an exemple of what is possible to do with new enemy palettes you can see my bosses videos in there: http://zeldix.forumotion.com/t20-overall-game-progression
I hope you understand, but if you don't, the most basic way to say it is that you can attribute two different enemy colors per area or dungeon floor. Some enemies of course use a certain shared palette and you can't edit it without affecting other sprites if I recall correctly!
I'll look more into this request during my coming weekend (monday-tuesday-wednesday of every week)
But to give you an exemple of what is possible to do with new enemy palettes you can see my bosses videos in there: http://zeldix.forumotion.com/t20-overall-game-progression
Founder- Since : 2012-06-19
Re: Sprite Graphics Editing
Okay, I understand how to change which palettes are available in a certain area, but how do I tell the sprite which palette to use? To use the guide's example, in the Desert Palace, it has a green palette and a purple palette, which are used for the Beamos, the Leevers, and the Rocklops. But how do they know which palette of the two to use? And how do the Debirandos and Tentacles use the red and blue soldier palettes when they aren't in the palette set? And what does the second set of enemy palettes do?
Hopefully that all makes sense
Edit: An example of a situation we'll run into when we're importing new enemies: Say we have a Deku Scrub that uses the green soldier's palette, and we want to overwrite an Octorok. If another enemy on screen uses the same palette as the original Octorok (like the Octobomb, the one that floats in the air and explodes), and we have green soldiers on the map too, both palettes will be available for the sprite to use. How do we tell the Deku scrub to use his palette, and not the Octorok's?
Hopefully that all makes sense
Edit: An example of a situation we'll run into when we're importing new enemies: Say we have a Deku Scrub that uses the green soldier's palette, and we want to overwrite an Octorok. If another enemy on screen uses the same palette as the original Octorok (like the Octobomb, the one that floats in the air and explodes), and we have green soldiers on the map too, both palettes will be available for the sprite to use. How do we tell the Deku scrub to use his palette, and not the Octorok's?
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
^ I think the red and blue soldier palettes are like hardcoded or universal because the soldiers can be used anywhere in the game and so apparently that's why they don't have an individual palette.
Someone correct me if I'm wrong.
Someone correct me if I'm wrong.
Erockbrox- Since : 2013-02-05
Re: Sprite Graphics Editing
Well that's incredibly good to hear! (If you're correct, which I hope) I would guess if that's the case, the red one is hardcoded as well? There's lots of enemies that use that one too. It seems most of my questions have been answered, save for making sure a specific sprite calls the right palette out of the set.
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
The soldiers don't have hardcoded palettes. To determine or set the pal of the new sprite it is all about the pixeling. It is importaint what pixel do you use in yy-chr. You have 16 of them, half of them repeat, so 8 colours for a sprite. The game will then load the global pal. For instance, you can repixel the blue bomb (sprite) into anything compatible to a global blue palette (8 colours), but red is not among them (belongs to global red pal).
So you have 3 parameters: set the pal with pixels (8 colours) in yy-chr, set the global pal (in hex), and also the main pal set in HM (pal editor). This last one is not really recommended to change, since it will change "all" colours. For instance green soldier set to yellow soldier, will also change the crab.
On the end you need to set the pal value in HM of the room (indoors) or area (outdoors), which can again manipulate the pal (but it affects the objects to).
So you have 3 parameters: set the pal with pixels (8 colours) in yy-chr, set the global pal (in hex), and also the main pal set in HM (pal editor). This last one is not really recommended to change, since it will change "all" colours. For instance green soldier set to yellow soldier, will also change the crab.
On the end you need to set the pal value in HM of the room (indoors) or area (outdoors), which can again manipulate the pal (but it affects the objects to).
Puzzledude- Since : 2012-06-20
Re: Sprite Graphics Editing
What you also can try is to change the hardcoded global palette table each sprite gets its palette from (this will not affect other sprites).
(1) take basis address pc: 06/B359
(2) check in Hyrule Magic the sprite number you want to change; Blue soldier is 41
(3) add this in HEX! to 06/B359:
06B359+41=06/B39A
(4) at pc 06/b39a you find the 19 which is blue for blue soldier. Change the palette according to the palette key below to your wishes (e.g., 19 is blue palette, 17 is red, 1b is green.
.
This works for every sprite so you can edit the palette specific to each sprite now!
Here's the palette key:
Here's when I change the 19 to 1d (all blue soldiers changed to golden):
(1) take basis address pc: 06/B359
(2) check in Hyrule Magic the sprite number you want to change; Blue soldier is 41
(3) add this in HEX! to 06/B359:
06B359+41=06/B39A
(4) at pc 06/b39a you find the 19 which is blue for blue soldier. Change the palette according to the palette key below to your wishes (e.g., 19 is blue palette, 17 is red, 1b is green.
.
This works for every sprite so you can edit the palette specific to each sprite now!
Here's the palette key:
Here's when I change the 19 to 1d (all blue soldiers changed to golden):
Last edited by Conn on Sat 19 Oct 2013 - 8:20; edited 1 time in total
Conn- Since : 2013-06-30
Re: Sprite Graphics Editing
Sweet zombie Jesus! That palette table is exactly what I was looking for when I started with this problem a week ago! You don't know how much trouble you've saved me, Conn. I'll start experimenting with it tonight when I have time.
One thing, can you elaborate a little bit on how the palette key works? What program is that in, and do I just look for whatever color is in the first slot of that palette in Hyrule Magic? If I were to follow the address for each sprite, would every sprite that uses the blue soldier palette be 19? Every green 1b? etc.
One thing, can you elaborate a little bit on how the palette key works? What program is that in, and do I just look for whatever color is in the first slot of that palette in Hyrule Magic? If I were to follow the address for each sprite, would every sprite that uses the blue soldier palette be 19? Every green 1b? etc.
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
You're welcome. The palette key is that pic I posted above..
Follow the red line at 19 and it will point to the blue used for the soldier. With this graphic key you can direct another color out of that key, e.g. 1d for gold. If your color isn't used you need to repixel the sprite.
Follow the red line at 19 and it will point to the blue used for the soldier. With this graphic key you can direct another color out of that key, e.g. 1d for gold. If your color isn't used you need to repixel the sprite.
Conn- Since : 2013-06-30
Re: Sprite Graphics Editing
I feel kind of dumb right now (Hex isn't my strong suit...). I was able to import a new enemy in just fine, but I don't understand the address you gave me for the palette table. I typed it into my hex editor, and it's giving me something competely different from what I'd imagine I should have. At 06B39A, I have FF 00 and and bunch of 03's... I'm probably missing something obvious.
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
You are exactly 200 bytes to short. You need to remove the header from the rom, to see the addresses correctly. In your case you would need to go to 6B59A (with header), but the actual value is 6B39A (when you remove the header).
The pal values start like so: 00 00 00 00 00 00 00 00 00 19 0B 1B 4B 41 41 41 4D 1D 01 1D 19 8D 1B 09 9D 3D 01 09 11 40 01 4D.
You can search for this series of bytes and you will find them at 6B550 in your current rom.
The pal values start like so: 00 00 00 00 00 00 00 00 00 19 0B 1B 4B 41 41 41 4D 1D 01 1D 19 8D 1B 09 9D 3D 01 09 11 40 01 4D.
You can search for this series of bytes and you will find them at 6B550 in your current rom.
Puzzledude- Since : 2012-06-20
Re: Sprite Graphics Editing
So is it better to have a header or not have a header for a hack? Mostly so I can find a rom without one if I need to, to make it easier to list the steps Zack would need to take once we're ready to do this on his end of things. I never thought the issue was because of the header, though. I'll watch out for that now.
Edit: I'm still having a bit of trouble. To start, I was able to replicate what you did with the blue soldier just fine, no problem. But right now, I'm trying to overwrite the Bushcrab with a Deku Scrub. While he has the bush on his head, he appears just fine, in the right palette (green soldier) and everything. But when I pull the bush off his head, his body switches to the blue soldier's palette. I followed the directions and found his palette byte, but it only alters the frames while he has the bush on his head. Nothing I've tried changes the bushless form's palette. How would I go about doing that? Do some sprites that have 2 stages (like this guy, or perhaps the Armos) have a second byte somewhere, or is there a second palette table?
(I'm a newbie when it comes to Zelda 3 hacking. I'm the graphics editor and not the hack creator for a reason. Please forgive me if I'm asking an obvious question.)
Edit: I'm still having a bit of trouble. To start, I was able to replicate what you did with the blue soldier just fine, no problem. But right now, I'm trying to overwrite the Bushcrab with a Deku Scrub. While he has the bush on his head, he appears just fine, in the right palette (green soldier) and everything. But when I pull the bush off his head, his body switches to the blue soldier's palette. I followed the directions and found his palette byte, but it only alters the frames while he has the bush on his head. Nothing I've tried changes the bushless form's palette. How would I go about doing that? Do some sprites that have 2 stages (like this guy, or perhaps the Armos) have a second byte somewhere, or is there a second palette table?
(I'm a newbie when it comes to Zelda 3 hacking. I'm the graphics editor and not the hack creator for a reason. Please forgive me if I'm asking an obvious question.)
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
I learned something new today! I knew this worked for the items recoloring but never though about doing the same thing for sprites! This will actually help me really much Puzzledude!Puzzledude wrote:The soldiers don't have hardcoded palettes. To determine or set the pal of the new sprite it is all about the pixeling. It is importaint what pixel do you use in yy-chr. You have 16 of them, half of them repeat, so 8 colours for a sprite. The game will then load the global pal. For instance, you can repixel the blue bomb (sprite) into anything compatible to a global blue palette (8 colours), but red is not among them (belongs to global red pal).
Conn's method is also a good thing to know, but repixeling is much easier on my part
Can't help you with that specific problem as I just read those posts from conn and PuzzleDude just now... but as for your header question...
...The only Zelda 3 tool I have which needs a header to work is zcompress (for decompressing and recompressing the graphics... otherwise most of the time it's better to work without a header! Also all hex addresses in the guide are for a rom without header along pretty much all posts in here!
Founder- Since : 2012-06-19
Re: Sprite Graphics Editing
I don't really understand the repixeling method, however maybe that's how I can fix the Deku if you could explain what the repeating part is to me.
On the hex addresses, I guess when I run across one, I'll just add 200 since my rom has a header and I'm too lazy to get one without a header.
On the hex addresses, I guess when I run across one, I'll just add 200 since my rom has a header and I'm too lazy to get one without a header.
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
It's really simple, SePH, it's just taking a calculator and add the sprite number to
06B359. Blue soldier is 41 (Hyrule Magic) so 06B359+41=06B39A.
At pc 06/B39A you find 19, this is the blue palette. Change it according to this palette key:
So, e.g., 06/B39A:19 -> 1d will change the blue to golden. If you need another color you still can repixel all gfx in this global palette
This has the advantage to switch the palette, e.g. from blue to green, red, whatever... (you are very limited with repixeling).
06B359. Blue soldier is 41 (Hyrule Magic) so 06B359+41=06B39A.
At pc 06/B39A you find 19, this is the blue palette. Change it according to this palette key:
So, e.g., 06/B39A:19 -> 1d will change the blue to golden. If you need another color you still can repixel all gfx in this global palette
This has the advantage to switch the palette, e.g. from blue to green, red, whatever... (you are very limited with repixeling).
Conn- Since : 2013-06-30
Re: Sprite Graphics Editing
I know Conn!! What I meant to say is that your method combined with Puzzledude's is the best of both worlds! We can finally make use of all the palettes! Including the ones on the right in your chart!!
Here's a visual guide to Puzzledude's repixeling method in question Darkprince!
It all begins with our good ol' yy-chr!
1- Open your decompressed graphics file with it.
2- Look at the three colored rectangles in the picture above
---red=the blue soldiers palette
---green=the palette we want the sprite to use instead
---blue= both palettes side to side ► pretty much as you see them in HM:
World colors 2 palette 0 being light world shared sprites and palette 1 being the dark world ones.
3- Copy the graphics set you want to edit (select the area using the right mouse button and then use the copy button at the top):
4-Paste it in your favorite graphics editor (like paint shop pro) and then start modifying the sprite to use the gold palette instead of the blue one:
5-When you're done you can safely paste it back in yy-chr, save and recompress in your game with zcompress!
Alternatively if you're familiar with yy-chr enough, you can edit the palette of the sprite directly in it!
Here's a visual guide to Puzzledude's repixeling method in question Darkprince!
It all begins with our good ol' yy-chr!
1- Open your decompressed graphics file with it.
2- Look at the three colored rectangles in the picture above
---red=the blue soldiers palette
---green=the palette we want the sprite to use instead
---blue= both palettes side to side ► pretty much as you see them in HM:
World colors 2 palette 0 being light world shared sprites and palette 1 being the dark world ones.
3- Copy the graphics set you want to edit (select the area using the right mouse button and then use the copy button at the top):
4-Paste it in your favorite graphics editor (like paint shop pro) and then start modifying the sprite to use the gold palette instead of the blue one:
5-When you're done you can safely paste it back in yy-chr, save and recompress in your game with zcompress!
Alternatively if you're familiar with yy-chr enough, you can edit the palette of the sprite directly in it!
Founder- Since : 2012-06-19
Re: Sprite Graphics Editing
Dang, it doesn't look like that'll do what I need it to do... I don't think Zack will mind if I post this one little thing about the Deku Scrub, since this is a closed forum. Here's my problem now, and I have now idea what to do:
The palette in the first picture works just fine. Once the bush gets pulled off, however, his stem, which should be green, turns blue, and his eyes turn red, which is not what I want. How do I change the palette uses by the bushless version? (The Deku replaces a bushcrab, in case that wasn't obvious.)
Zack is having trouble finding how to change the "awakend" Armos as well. The "sleeping" palettes are no problem, but changing the awake one eludes us.
In any case, you guys have already helped a lot, and I am really thankful.
The palette in the first picture works just fine. Once the bush gets pulled off, however, his stem, which should be green, turns blue, and his eyes turn red, which is not what I want. How do I change the palette uses by the bushless version? (The Deku replaces a bushcrab, in case that wasn't obvious.)
Zack is having trouble finding how to change the "awakend" Armos as well. The "sleeping" palettes are no problem, but changing the awake one eludes us.
In any case, you guys have already helped a lot, and I am really thankful.
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
Conn might need to look into it, as we've run into similar problems with editing the palettes of the items animations... like the rods for exemple, we changed one of them from red to green but the palette had to be changed at four different locations in hex, one for each of the directions.
Others items were affected in the same way. Now I'm not an expert at this, but this is my best guess!
Others items were affected in the same way. Now I'm not an expert at this, but this is my best guess!
Founder- Since : 2012-06-19
Re: Sprite Graphics Editing
Okay. I figured that there were probably more than one palette location. I just have no idea where it would be. There's no rush to find the location, just as long as we can figure something out sometime lol. Glad to know there likely is a way to fix it.
Edit: *sigh* another thing I don't know how to do...
I was importing the new Tektites, and when I went to change the palette, it seems the table calls up some other function to handle the palette swap depending on the X coordinate. There are other enemies like this in the game, and it seems they all abide by the same rules. How do I find their palette pointer?
Edit: *sigh* another thing I don't know how to do...
I was importing the new Tektites, and when I went to change the palette, it seems the table calls up some other function to handle the palette swap depending on the X coordinate. There are other enemies like this in the game, and it seems they all abide by the same rules. How do I find their palette pointer?
Darkprince909- Since : 2013-10-17
Re: Sprite Graphics Editing
Change at pc: 03/2915:09 -> 0b (unheadered!, headered should be 03/2b15) and repixel to get the green for the deku scrub.
09 is blue palette (similar as for the blue soldier is 19), 0b is green palette (similar as for green soldier is 1b).
You need to trace every monster in oam and in 7E0F50 region. Normally monster palettes are loaded when entering a screen, but as for this deku scrub it of course changes when lifting the bush, and above code is not a table it is extra coded.
I don't know what tektites are so please post a pic for remaining monsters
09 is blue palette (similar as for the blue soldier is 19), 0b is green palette (similar as for green soldier is 1b).
You need to trace every monster in oam and in 7E0F50 region. Normally monster palettes are loaded when entering a screen, but as for this deku scrub it of course changes when lifting the bush, and above code is not a table it is extra coded.
I don't know what tektites are so please post a pic for remaining monsters
Conn- Since : 2013-06-30
Re: Sprite Graphics Editing
So is it better to have a header or not have a header for a hack? Mostly so I can find a rom without one if I need to, to make it easier to list the steps Zack would need to take once we're ready to do this on his end of things. I never thought the issue was because of the header, though. I'll watch out for that now.
Always use No Header. A header are 200 bytes (in hex) or 512 in dec at the beginning of the rom as a leftover from the copier, which brought the cart into the smc file. It is used only by the copier and was not produced by original authors. The header is useless and will shift all addresses to a wrong location according to where pointers are pointing. But irronically you need the header when using zcompress (add 200 bytes back at the beginning).
On the hex addresses, I guess when I run across one, I'll just add 200 since my rom has a header and I'm too lazy to get one without a header.
You don't need to get it, just erase the first 200 bytes (in hex) in the hex editor of your current rom.
Do some sprites that have 2 stages (like this guy, or perhaps the Armos) have a second byte somewhere, or is there a second palette table?
Yes, they do. The 2 stage sprite is a problem, since you also need to find a hex location of the other state, usually done with tracing (as a part of asm).
Regarding the palettes. The repixeling is really not my method, it is just the first stage. For instance: when I was remodeling the Armos knight and give him legs, I needed to choose the pal for his clothes (I wanted brown). So I needed to choose the correct pixel first, which will then become the correct colour after the hex edit.
So it goes like this: choose a pixel (yychr) < choose global pal in hex, set the pal in HM (usually not changed), set the pal in area or a room using the pal value.
Puzzledude- Since : 2012-06-20
Page 1 of 3 • 1, 2, 3
Similar topics
» Reshaper's Sprite ASM Files
» Zelda 3 Sprite Editor
» Anya, a sprite in a gown.
» enemy sprite data
» Transfer sprite hex data Asm
» Zelda 3 Sprite Editor
» Anya, a sprite in a gown.
» enemy sprite data
» Transfer sprite hex data Asm
Page 1 of 3
Permissions in this forum:
You cannot reply to topics in this forum