SLADE: It's a Doom editor!
Let me know if the spoilers aren't working. I'm having trouble with them for some reason, and I'm not sure if its just on my end or not. There is no vital information contained in them.
While SLADE only has a very limited capacity to mod Daggerfall, I have found it to be a fairly helpful tool in the process of file renaming and sprite editing. This tutorial will cover the following:
→Setting up SLADE to be useful for editing Daggerfall image files extracted using Daggerfall imaging.
→Exporting as .png for use in Daggerfall Unity
While this tutorial seems very long, don't be dismayed. The instructions are simple and illustrated, so it should be a breeze! I'll be updating a "Possible Problems and Solutions" section at the bottom of this post in case you run into trouble. I'll also monitor this thread pretty frequently for the near future, so if you have questions, ask away!
So why use SLADE to edit sprites instead of GIMP?
The purpose of this tutorial isn't to show you how to replace GIMP with SLADE. SLADE simply doesn't have to ability to edit images like GIMP can. Rather, the two are complimentary. GIMP is fantastic for editing sprites and other 2D art related aspects of mod development, but I've found that it's ability to palette-ize sprites is rather lacking. Moreover, managing palettes in GIMP has been a massive pain in the rear for me, and it seems GIMP as no ability to do palette translations. SLADE, on the other hand, seems to do all this quite well and in a user-friendly manner to boot.
What is SLADE ?
For those aware of what Slade is, you can safely skip this section.
I'll save some writing and just quote the about page from Slade's website:
SLADE3 is a modern editor for Doom-engine based games and source ports. It has the ability to view, modify, and write many different game-specific formats, and even convert between some of them, or from/to other generic formats such as PNG.
While I'm not going to walk you through how to use your computer and install software, I'll point you in the right direction for acquiring SLADE.
The following link leads to the download page for SLADE:
Use the link above and choose the appropriate version for your Operating System. For windows users, the simplest route is to download the "Windows Installer (exe)" version under "Latest Stable Release." This way, you don't need to manage loose files or portable installations, etc...
Setting up SLADE
to be useful for editing Daggerfall image files
While SLADE itself can't view Daggerfall's native image format, Daggerfall Imaging can. Alas, Daggerfall Imaging falls outside the scope of this tutorial, but we'll be using images extracted from it in this tutorial. I suggest using .PNG format for images. However, png files loaded into SLADE aren't automatically palette-ized. We need to tell SLADE what the Daggerfall palette is.
I have provided a png image of the palette that should be 100% accurate to Daggerfall's original palette with two exceptions: Color 0, Daggerfall's transparency color, and color 255, a special color that glows yellow at night (used in Daggerfall's windows), have been changed to cyan (#00ffff). This is to prevent SLADE from using these colors in palette-izing images, as png already supports transparency and it would be an undesirable result for it to use these two colors, since it wouldn't be accurate to vanilla Daggerfall.
http://www.mediafire.com/file/vps4vap6l ... aggPal.png
The first thing we need to do is start SLADE.
Create a new ZIP archive by clicking the "New Zip Archive" button in the upper left hand corner.
Wait a second, and SLADE should now look something like this:
Now go to Archive→ New→ New PLAYPAL
Click the "OK" button on the resulting window
You should now have a file in your Archive called "playpal.lmp." This is our palette file, but that sure ain't no Daggerfall palette. Download the Daggerfall Palette png file from the link above, and save it somewhere you can remember. Right click "playpal.lmp" and go to Palette→ Import From...
Change your file type to "PNG File" and open the PNG you downloaded. Your playpal.lmp should now look like the png you just downloaded.
Now make sure you save it so you can re-use this file and not have to go through this process again!
Good job! The most complicated part is over and our palette should now be ready to go!
A quick note regarding how I generated my palette image:
If you don't want any technical info on the inner workings of this, you can skip this and be just fine.
For full transparency: the way I generated the palette image in the download link was by taking the image of the Daggerfall palette from http://images.uesp.net//f/f4/DF-Art_Pal.Col.Palette.png, opening it in GIMP, and shrinking down the image to be 16x16 with no interpolation. I have done numerous tests, and it has been 100% accurate to Daggerfall's colors.
Finally! We're getting to the good part!
Now that our palette is set up, palette-izing images is a piece of cake. Click the "Import files" button near the top of the screen.
Select any valid image files you want to palette-ize. (png, bmp, jpg, etc...) Once you've imported them into SLADE, right-click the entries you want palette-ize (you can select several with standard windows selection keys, Shift+click, and so on). Go to Graphics→ Convert to..., and the following windows should appear.
We are converting it from a standard image format to Doom's paletted image format. This will allow SLADE to preform palette translations on your image. Click convert, and you're done!
These images can be exported back into png by right clicking an entry and going to Graphic→ Export as PNG, or using the "Convert to..." menu.
Preforming Palette Translations
This is even easier than the previous parts of this guide.
Simply select the entries that have been converted into Doom's image format as described in the previous part, right click on them and go to Graphics→ Colour Remap. In the window, you have two sets of colors: Origin Range, and Target Range. Origin range describes the colors in the image that you wish to modify, target range describes what those colors will become. You can select colors in either by clicking and dragging. To avoid losing detail, make sure the size of your selection in both ranges is the same.
For instance, if you want to change 16 shades of blue in the origin range, then select 16 shades of another color in the target range.
Additional translations can be created with the plus and minus buttons in the upper left-hand corner of the menu. The best way to figure out how all of this works is to just play around with it and experiment.
Either they're praying, as good monks do, or listening to the heaviest of metal.
Renaming and Exporting Files
For this segment of the tutorial, you'll want to familiarize yourself with Daggerfall Unity's image naming format. An excellent explanation of it can be found here:
http://www.dfworkshop.net/projects/dagg ... /textures/
Recoloring stuff is great, but it if doesn't comply with Daggerfall Unity's image naming format, then it's not much use. The process of renaming files is straight forward, as with most things in SLADE. In my example, you can see that nothing here comes remotely close to the standard.
Start by selecting all images you want to rename. Right click your selection and click "rename."
If you're images are not sequential frames in an animation, i.e., you're replacing multiple static sprites in an archive file, you may find the "Rename Each" function more useful.
You'll get a window like this, perhaps with some gibberish in it. Enter the appropriate code to rename images. This is example demonstrates how to rename frames in animation.
You should end up with a result like this:
Occasionally, some entries will have their file extension still attached (".png," ".jpg," etc...). Just select those entries individually and remove it using one of the renaming functions.
To export the files as png, select all the images you wish to export, right click and go to Graphics → Export as PNG.
All you have to do from here is select a folder and click save, and you're done!
You're filename here doesn't matter, but using the name of an existing file may replace that file. The best practice is just to leave it as "ignored.png"
You now know how to use SLADE to manage and modify some of your Daggerfall Unity files. SLADE wasn't built specifically for this, so it certainly isn't a comprehensive tool set for modding Daggerfall Unity.
If you have any questions or are experiencing any difficulties, feel free to leave a post and I'll do my best to help you out! Point out my typos, too. I'm sure they're there!
I plan on adding comparisons between images palette-ized by GIMP and by SLADE so you can have a side-by-side of the two. This will come at a later (near future) date.
Possible Problems and Solutions
When I convert my image to Doom's file format, it doesn't palette-ize it correctly. The colors are strange.
Ensure that every step was followed accurately in the Setting up SLADE section of this tutorial. If that doesn't work, ensure your palette is set to "Existing/Global"
I will continue to update this section as issues arise.