Jump to content

Photo

How do you replace the graphics with custom ones?


  • Please log in to reply
6 replies to this topic

#1 darkhog

darkhog

    Newbie

  • Members

Posted 07 April 2025 - 03:28 PM

I want to create my own Zelda-like using ZQuest, but to ensure it won't be taken down by you-know-who, I want to use 100% custom graphics and music. I can draw and do pixelart, so it won't be an issue for me to make custom graphics. The problem is I don't know what specifications should my custom graphics follow and how to get custom art (graphics, music, etc.) into the program once I make them. I plan to do it using 3.0 once it gets stable, so any info relevant to it would be great when there's any difference between how stuff is done in 2.x vs 3.0.



#2 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 07 April 2025 - 06:29 PM

Basically, it's a matter of ripping all your custom graphics in. Quest->Graphics->Tiles will bring you to the tile page, where you can use the grab button to rip. By default, the grab menu moves across your tilesheet in 16 pixel increments, but you can press "s" to change that. It'll rip the tiles in to the current cset, unless you press "b" to switch to 8 bit grabbing (which uses the full 256 color palette).

 

Palettes are going to be the other big thing. Quest->Graphics->Palettes->Main. Basically, ZQuest utilizes a 256 color palette, which is divided into 16 "csets" of 16 colors each. The same tile can be displayed in different csets for easy recoloring. Think about how the mountains in Zelda 1 were sometimes green, sometimes brown. That's accomplished by csets (in the classic tileset, there is a green color ramp on one cset, while a brown ramp sits in the same place in another). Tiles can also be made "8 bit"; that is, pulling from all 256 colors. The drawback to this is they can't swap csets, so it's not recommended for tiles you'll want to display in different colors. By default, csets 2-4 and 9 are level-specific. That is, they change based on the current area's palette, so they're used for most terrain objects (cliffs, trees, walls, statues, etc). Cset 6 is also special, as it's the player's cset, and can be changed with items (think about how Link's color scheme changes when he gets the blue and red rings in Z1). The remaining 11 csets are set - they're always the same. By convention, 0-1 and 5 are used for UI, 7-8 for enemies, 10-11 for whatever you want (12-15 weren't accessible prior to 2.55). In newer versions, there are quest rules that allow you to make some of the csets level-specific, like 2-4 and 9.

 

For music, if it's midi, just go to Quest->Audio->MIDI and you can load it in. For any other file type (basically any modern music, like an mp3 or ogg), the music isn't stored in the quest file. You load it via the dmap editor and have to package the music with your quest download, to be stored in the same directory as the quest file.


  • Rambly, coolgamer012345 and Riflezen like this

#3 darkhog

darkhog

    Newbie

  • Members

Posted 09 April 2025 - 07:04 AM

Okay, and how should I format my graphics before the import? Does that grab function require an indexed PNG, PNG with special colors used or something else? I know there's a built-in graphics editor, but it's very limited from what I saw (playing with 2.55 in the meantime to get used to the engine). 16 colors per tile is enough for me, by the way, as I'm going for that SNES-like look anyway.

 

//edit: Also it seems like you can export an entire page of tiles as a PNG. Can you also import an entire page worth of tiles? If not, that's honestly a missed opportunity.

//edit #2: Related Is it possible to do palette-based animations (color cycling) either by scripting or in the editor? That would save a lot of tiles for stuff that can be animated via color cycling, such as waterfalls, etc.


Edited by darkhog, 09 April 2025 - 07:12 AM.


#4 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 09 April 2025 - 03:25 PM

Generally speaking, an indexed png is the way to go. By default, ZQuest will rip in tiles perfectly if they have an indexed palette that matches the one in ZQuest. If not, ZQuest has a recolor tool (press R) that tries to match up colors, but it's not great and often results in color loss.

 

For ripping an entire page worth of tiles, you can hold shift to select a huge block to rip in at once. I think there's also a "leech" option, but I'll be honest, I've never used it and don't know how it works.

 

Palette cycling is possible, yes. That's done within the palette itself, Quest->Graphics->Palettes->Level. The setup is somewhat convoluted, but uses the bottom 8 rows of the level palette to store different colors, and then the options in the Cycle tab to select which colors will be replaced and at what speed they'll cycle. I'd suggest looking at a tileset that already has some cycling palettes set up as an example, since it's easier to see than to have it explained, honestly.


  • Rambly and coolgamer012345 like this

#5 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 09 April 2025 - 05:33 PM

Basically, it's a matter of ripping all your custom graphics in. Quest->Graphics->Tiles will bring you to the tile page, where you can use the grab button to rip. By default, the grab menu moves across your tilesheet in 16 pixel increments, but you can press "s" to change that. It'll rip the tiles in to the current cset, unless you press "b" to switch to 8 bit grabbing (which uses the full 256 color palette).

 

Palettes are going to be the other big thing. Quest->Graphics->Palettes->Main. Basically, ZQuest utilizes a 256 color palette, which is divided into 16 "csets" of 16 colors each. The same tile can be displayed in different csets for easy recoloring. Think about how the mountains in Zelda 1 were sometimes green, sometimes brown. That's accomplished by csets (in the classic tileset, there is a green color ramp on one cset, while a brown ramp sits in the same place in another). Tiles can also be made "8 bit"; that is, pulling from all 256 colors. The drawback to this is they can't swap csets, so it's not recommended for tiles you'll want to display in different colors. By default, csets 2-4 and 9 are level-specific. That is, they change based on the current area's palette, so they're used for most terrain objects (cliffs, trees, walls, statues, etc). Cset 6 is also special, as it's the player's cset, and can be changed with items (think about how Link's color scheme changes when he gets the blue and red rings in Z1). The remaining 11 csets are set - they're always the same. By convention, 0-1 and 5 are used for UI, 7-8 for enemies, 10-11 for whatever you want (12-15 weren't accessible prior to 2.55). In newer versions, there are quest rules that allow you to make some of the csets level-specific, like 2-4 and 9.

 

For music, if it's midi, just go to Quest->Audio->MIDI and you can load it in. For any other file type (basically any modern music, like an mp3 or ogg), the music isn't stored in the quest file. You load it via the dmap editor and have to package the music with your quest download, to be stored in the same directory as the quest file.

i don't have answers for the questions asked here but I wanted to say this is a fantastic explanation for how palettes/csets work. this should be documented somewhere for like an intro to zq tutorial.



#6 darkhog

darkhog

    Newbie

  • Members

Posted 11 April 2025 - 05:32 PM

Is it possible for the engine to import the palette from the indexed PNG instead? Would make it easier, especially since the pixel art editor I use (ProMotion NG) has palette tools that make stuff so much easier by e.g. allowing to generate color ramps with ease.



#7 Moosh

Moosh

    The Mush

  • Moderators

Posted 11 April 2025 - 10:19 PM

You can. From the palette editor (Quest->Graphics->Palettes->Main/Levels/Sprites) there's a "Grab" button which lets you grab palettes in 16 color slices. I definitely recommend using this over using the in editor tools for editing palettes as they're functional but not the fastest.

 

Also if you run into any problems with loading from PNG, try saving as a BMP. I've had issues with Aseprite PNG exports in the past where ZC got a little confused reading the palettes. BMP has never failed me.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users