Palette

From ZCWiki
Jump to: navigation, search

A palette is the group of colors that is used to draw the graphics in Zelda Classic. Different areas of a map can use different palettes, allowing quest designers to create, for example, an "Autumn" area and a "Spring" area that use the same Combos but are colored differently.

Basic Overview

The Main palette for the Classic tileset, highlighting CSet 2.
A palette contains 240 different colors. These colors are divided into 15 CSets, each CSet containing 16 colors. Notice that each CSet is an entire row in the palette. In the palette, CSets are numbered from 0 to 14, while the colors in the CSet are numbered from 0 to F (where A = 10, B = 11 ... F = 15). Since the Combos you use in your quest are assigned particular CSets, this means that even though you assign a single palette to an area of your quest, you still have the flexibility of using different CSets within the palette to acheive some color variation. For example, in the original Legend of Zelda, remember that in some areas the moutains and shrubs were green, and in other areas they were brown - this was acheived by using a single palette, but one CSet for for the green areas and a different CSet for the brown areas.

This is an important concept to remember if you edit or create tiles. If you want to maximize the use of your tiles, you need to consider how they will look in various CSets (or for more advanced quest designers, you need to consider how you lay out your CSets!).

Kinds of Palettes

Everything that is ever drawn on the screen in Zelda Classic requires a palette and a CSet, including such things as the borders in the Sub-screen, trees, keys and bombs, and Link himself. ZQuest provides several different kinds of palettes you can use in your quests to acheive these results.

Main Palette

The Main palette for the Classic tileset.
The Main Palette contains the colors used to draw Link, his enemies, the game’s items (heart containers, bombs, etc.), the game’s graphics (like the various borders, status icons, and so forth), and a few other random things. Generally speaking, the Csets in the Main Palette are used as shown in Table 1. Note that the descriptions given are based on the original Legend of Zelda tileset – there’s nothing stopping anyone from modifying the Main Palette to make green Octoroks and purple Heart Containers. Some new Cset concepts, which will be discussed momentarily, are introduced here.

Table 1: Csets in the Main Palette.

CSet Description Behavior
0 Used for various GUI items such as status icons. Constant
1 Used for various GUI items such as status icons. Constant
2 Used for overworld and dungeon graphics such as trees, walls, statues, etc. Palette dependent
3 Used for overworld and dungeon graphics such as trees, walls, statues, etc. Palette dependent
4 Used for overworld and dungeon graphics such as trees, walls, statues, etc. Palette dependent
5 Used for overworld and dungeon graphics such as trees, walls, statues, etc. Constant
6 Used for Link, the "Zelda" Guy and the "Merchant" Guy. Constant
7 Used for sprites, typically blue enemies such as the blue Octoroks and the blue Darknuts. Constant
8 Used for sprites and the remaining Guys. Typically used for red enemies such as the red Octoroks and the red Darknuts. Constant
9 Used for sprites whose color depends on the level. Palette dependent
10 Generally not used, but available for use by ZC to color various GUI items such as Link’s position indicator or the flashing triforce/boss indicator when Link has the compass (try Quest > Graphics > Misc Colors). Constant
11 Generally not used, but available for use by ZC to color various GUI items such as Link’s position indicator or the flashing triforce/boss indicator when Link has the compass (try Quest > Graphics > Misc Colors). Constant
12 Not used by ZC. You can do whatever you want with this Cset. Constant
13 Used for the GUI. Don't bother editing. Constant
14 Used for the GUI. Don't bother editing. Constant


There is only one Main Palette.

Level Palettes

There are multiple Level Palettes – you can define up to 255 of them. As their name indicates, Level Palettes are assigned to entire levels (a.k.a. DMaps). When you create or edit a Dmap, you select which Palette the Dmap will use. This, in turn, defines how all of your Combos will look for that particular Dmap.

An example of how you could use this to your advantage would be to have a "Spring" Palette, which makes all of your tree Combos green, and an "Autumn" Palette, which makes all the same tree Combos orange and red. Remember – you're not actually changing the tree combos, but since each Dmap can have its own Palette, you can use the same tree Combos in two different Dmaps and have their colors be different. That’s really the power behind the Palette system.

The caveat here is that only a handful of the CSets in a Level Palette can be used. These CSets are the ones marked as "Palette Dependent" in the table above.

Palette dependent versus constant Csets

If you attempt to edit a Level Palette, you’ll notice something odd: you only see four of the fifteen Csets: 2, 3, 4, and 9. These are the four Csets noted as being "palette dependent" in the table above.

The Level 1 palette for the Classic tileset.
When you assign a Level Palette to a Dmap, you're essentially saying, "use the Main Palette to draw everything, except use Csets 2, 3, 4, and 9 from the Level Palette I assigned." It might be easier to imagine that when you assign a Level Palette to a Dmap, Csets 2, 3, 4, and 9 get copied from that Level Palette to the corresponding Csets in the Main Palette, and the Zelda Classic just uses that new, "merged" Main Palette.

The results of this are subtle but very important. For instance, Link is always drawn using CSet 6. Since CSet 6 is not one of the level dependent CSets, this means that Link will look the same throughout all the different DMaps he might travel through, regardless of the Level Palettes they use. The same is true for some of the enemies - remember that that Darknuts were always red or blue no matter what dungeon they were in. Conversly, some of the enemies - Gels, for instance - were different colors in different dungeons. This is because they are set to use CSet 9, which is one of the palette dependent CSets.

Map and Screen Navigator Palette Dependency

In the bottom left of the ZQuest editor there is by default a black rectangle. This is the navigator which you can use to move between Maps and Screens. Pressing the (,) and (.) key will navigate to the previous or next map respectively, and you can move between screens with the arrow keys or mouse clicking.

This navigation window has a slight palette dependency as well. By default, each screen is set to show the base palette as mentioned above. You can switch the palette which will show in the ZQuest editor only, unless the corresponding DMap palette is also changed. However when you set the palette by screen, the colour of the corresponding screen's square in the editor may change, and this change in colour is palette dependent.

Palettes besides main use CSet 2's third colour (2,2), and CSet 3's second colour (3,1), to set the colour of the square in the navigator, if these colours are the same the square will be a solid colour, but if CSet 3's first colour is different, it will show up as a smaller square in the center. If you want to have distinct ares of a Map so you do not get lost while editing your quest, changing the palette colours will be beneficial to you.

Note that you can set the screen palette to be different from it's DMap palette solely for the purpose of ZQuest navigation, and not have it carry over into your playable quest.

Sprite Palettes

Sprite palettes contain a few extra CSets you can use to color sprites. There are 30 extra sprite palettes labelled 0-29.

Page 1
  • 0- The default palette for the Aquamentus enemies.
  • 1- The default palette for the Normal Gleeok enemies.
  • 2- The default palette for Digdoggers and BS Dodongos.
NOTE: In pre-enemy editor versions, the BS Patra enemy also used ESP 2, though the manual said it used ESP 15.
  • 3- The default palette for Ganon.
  • 4- The hard-coded stunned palette for Ganon.
  • 5- The hard-coded dead palette for Ganon.
  • 6- The default palette for Link with a blue ring.
  • 7- The default palette for Link with a red ring.
  • 8- The default palette for Link with a golden ring.
  • 9- The hard-coded game icon palette for Link with no ring.
  • 10- The hard-coded game icon palette for Link with a blue ring.
  • 11- The hard-coded game icon palette for Link with a red ring.
  • 12- The hard-coded game icon palette for Link with a golden ring.
  • 13- The default palette for the Fire Gleeok enemies.
  • 14- Currently unused. Do not use this palette as it may be reserved for future expansion.
Page 2
  • 15-29: These palettes are typically unused, but they have 2 purposes:
1- Setting an enemy's Pal CSet if the Use Pal CSet flag is checked.
2- A ring item's Misc. 1 determines what ESP Link will use upon picking up the ring item.
NOTE: Although the manual for pre-enemy editor versions said the BS Patra enemy used ESP 15, this has been proven false as this enemy actually used ESP 2.

Selecting and Using Palettes

As noted earlier palettes are assigned to entire DMaps. To do this, select Quest > DMaps from the ZQuest menu. Then select the DMap you wish to edit, and click the Edit button. On the Appearance tab, select the Level Palette you want to use in the Color drop-down box.

Note that this will not change the appearance of the DMap in Zquest, but the changes will appear when you play the quest in Zelda Classic.

To preview your screens in ZQuest with the selected palette, you must set each screen's palette using one of the following methods:

  • pressing a number key or Shift+(0-4)
  • use Data > Palette or press the F4 function key.

Note that previewing the palette in ZQuest using these methods does not set the palette for the DMap, so the changes will not affect how the DMap appears when you play the quest in Zelda Classic.

See Also