Welcome to Quiet-Sun's standard and tools!
This is a mirror of a
thread in the Tilesets and Graphics subforum, but I feel that this belongs in both boards.
The purpose of this thread is to provide the DF community with a set of tools that streamline the creation, resizing, merging, maintenance, and update of graphic sets. Although mainly oriented towards artists, players can use the tools provided here to resize their favorite tilesets and merge different graphic set in to a highly customized set of their preference.
For a tutorial showcasing the best features of these tools look at the first post.
What do I mean by a standard?By standard I mean a way to determine the location of every creature/position tile within a file structure based only on DF raws. Note that a standard can be flexible and adaptable, what is important is that the community understands how it is defined.
Why do we need a standard?The reality of a voluntary community is that contributors come and go and often leave their contribution unfinished. Furthermore, the creation of a full graphics set is a daunting task that likely puts off artists from making small contributions towards a better whole.
The definition of this standard (and supporting tools) allows for the easy integration, curation, and maintenance of artists contributions, be that a single tile or a full set.
Quiet-Sun's Standard1. Creatures are divided between major (defined by the user), sentient (non-major with the ANIMAL_PERSON and/or LOCAL_POPS tags), and non-sentient.
2. Each major race is assigned a separate png file.
3. Each creature text file in the raws is assigned a png for sentient creatures (if any present) and a png for non-sentient creatures.
4. Tiles for the professions used by major races are organized in rows according to groups defined by the user.
5. All professions in a group point to the same tile in for non-major sentient creatures. (this reduces the amount of tiles necessary to flesh out sentient races).
6. For non-major creature creatures (sentient and non-sentient), different columns in each png files indicate different creatures (in the same order found in the raws) and different rows indicate different categories/professions (in the order defined by the user).
Ideally, part of the standard involves agreeing on a set of major races, professions, and categories, but for the moment here are the lists I provide as templates:
MAJOR_RACES.txt:
DWARF
ELF
GOBLIN
KOBOLD
HUMAN
CATEGORIES_CREATURES.txt:
DEFAULT:AS_IS:DEFAULT
CHILD:AS_IS:DEFAULT
ANIMATED:AS_IS:DEFAULT
TRAINED_HUNTER:AS_IS:DEFAULT
TRAINED_WAR:AS_IS:DEFAULT
CATEGORIES_SENTIENT.txt (each group is separated by a dash "-" and all but the first item on ach group need to be indented):
DEFAULT:ADD_COLOR:DEFAULT
-
STANDARD:AS_IS:DEFAULT
-
CHILD:AS_IS:DEFAULT
-
BABY:AS_IS:DEFAULT
-
ANIMATED:AS_IS:DEFAULT
-
DRUNK:AS_IS:DEFAULT
-
GHOST:AS_IS:DEFAULT
-
PRISONER:AS_IS:DEFAULT
SLAVE:AS_IS:DEFAULT
-
THIEF:AS_IS:DEFAULT
MASTER_THIEF:AS_IS:DEFAULT
-
MINER:AS_IS:DEFAULT
-
WOODWORKER:AS_IS:DEFAULT
BOWYER:AS_IS:DEFAULT
CARPENTER:AS_IS:DEFAULT
WOODCUTTER:AS_IS:DEFAULT
-
STONEWORKER:AS_IS:DEFAULT
ENGRAVER:AS_IS:DEFAULT
MASON:AS_IS:DEFAULT
ARCHITECT:AS_IS:DEFAULT
-
RANGER:AS_IS:DEFAULT
HUNTER:AS_IS:DEFAULT
ANIMAL_CARETAKER:AS_IS:DEFAULT
ANIMAL_DISSECTOR:AS_IS:DEFAULT
ANIMAL_TRAINER:AS_IS:DEFAULT
TRAPPER:AS_IS:DEFAULT
SCOUT:AS_IS:DEFAULT
-
BLACKSMITH:AS_IS:DEFAULT
METALSMITH:AS_IS:DEFAULT
FURNACE_OPERATOR:AS_IS:DEFAULT
WEAPONSMITH:AS_IS:DEFAULT
ARMORER:AS_IS:DEFAULT
METALCRAFTER:AS_IS:DEFAULT
-
JEWELER:AS_IS:DEFAULT
GEM_CUTTER:AS_IS:DEFAULT
GEM_SETTER:AS_IS:DEFAULT
-
CRAFTSMAN:AS_IS:DEFAULT
BONE_CARVER:AS_IS:DEFAULT
CLOTHIER:AS_IS:DEFAULT
GLASSMAKER:AS_IS:DEFAULT
LEATHERWORKER:AS_IS:DEFAULT
STONECRAFTER:AS_IS:DEFAULT
WEAVER:AS_IS:DEFAULT
WOODCRAFTER:AS_IS:DEFAULT
STRAND_EXTRACTOR:AS_IS:DEFAULT
GLAZER:AS_IS:DEFAULT
POTTER:AS_IS:DEFAULT
WAX_WORKER:AS_IS:DEFAULT
-
FISHERMAN:AS_IS:DEFAULT
FISHERY_WORKER:AS_IS:DEFAULT
FISH_CLEANER:AS_IS:DEFAULT
FISH_DISSECTOR:AS_IS:DEFAULT
-
FARMER:AS_IS:DEFAULT
DYER:AS_IS:DEFAULT
HERBALIST:AS_IS:DEFAULT
LYE_MAKER:AS_IS:DEFAULT
MILKER:AS_IS:DEFAULT
MILLER:AS_IS:DEFAULT
PLANTER:AS_IS:DEFAULT
TANNER:AS_IS:DEFAULT
THRESHER:AS_IS:DEFAULT
WOOD_BURNER:AS_IS:DEFAULT
SHEARER:AS_IS:DEFAULT
SPINNER:AS_IS:DEFAULT
PRESSER:AS_IS:DEFAULT
BEEKEEPER:AS_IS:DEFAULT
GELDER:AS_IS:DEFAULT
POTASH_MAKER:AS_IS:DEFAULT
-
COOK:AS_IS:DEFAULT
TAVERN_KEEPER:AS_IS:DEFAULT
BREWER:AS_IS:DEFAULT
BUTCHER:AS_IS:DEFAULT
CHEESE_MAKER:AS_IS:DEFAULT
SOAP_MAKER:AS_IS:DEFAULT
-
MECHANIC:AS_IS:DEFAULT
PUMP_OPERATOR:AS_IS:DEFAULT
ENGINEER:AS_IS:DEFAULT
SIEGE_ENGINEER:AS_IS:DEFAULT
SIEGE_OPERATOR:AS_IS:DEFAULT
-
DOCTOR:AS_IS:DEFAULT
CHIEF_MEDICAL_DWARF:AS_IS:DEFAULT
DIAGNOSER:AS_IS:DEFAULT
BONE_SETTER:AS_IS:DEFAULT
SUTURER:AS_IS:DEFAULT
SURGEON:AS_IS:DEFAULT
-
CLERK:AS_IS:DEFAULT
ADMINISTRATOR:AS_IS:DEFAULT
TRADER:AS_IS:DEFAULT
MANAGER:AS_IS:DEFAULT
BOOKKEEPER:AS_IS:DEFAULT
BROKER:AS_IS:DEFAULT
FORCED_ADMINISTRATOR:AS_IS:DEFAULT
-
MAYOR:AS_IS:DEFAULT
DUKE:AS_IS:DEFAULT
DUKE_CONSORT:AS_IS:DEFAULT
MONARCH:AS_IS:DEFAULT
MONARCH_CONSORT:AS_IS:DEFAULT
BARON:AS_IS:DEFAULT
BARON_CONSORT:AS_IS:DEFAULT
COUNT:AS_IS:DEFAULT
COUNT_CONSORT:AS_IS:DEFAULT
-
PRIEST:AS_IS:DEFAULT
DRUID:AS_IS:DEFAULT
HIGH_PRIEST:AS_IS:DEFAULT
ACOLYTE:AS_IS:DEFAULT
-
SHERIFF:AS_IS:DEFAULT
CHAMPION:AS_IS:DEFAULT
GENERAL:AS_IS:DEFAULT
LIEUTENANT:AS_IS:DEFAULT
CAPTAIN:AS_IS:DEFAULT
MILITIA_COMMANDER:AS_IS:DEFAULT
MILITIA_CAPTAIN:AS_IS:DEFAULT
HAMMERER:AS_IS:DEFAULT
EXPEDITION_LEADER:AS_IS:DEFAULT
CAPTAIN_OF_THE_LAW_ENFORCE:AS_IS:DEFAULT
RANGER_CAPTAIN:AS_IS:DEFAULT
LEADER:AS_IS:DEFAULT
-
PERFORMER:AS_IS:DEFAULT
POET:AS_IS:DEFAULT
BARD:AS_IS:DEFAULT
DANCER:AS_IS:DEFAULT
-
SCHOLAR:AS_IS:DEFAULT
SAGE:AS_IS:DEFAULT
MATHEMATICIAN:AS_IS:DEFAULT
HISTORIAN:AS_IS:DEFAULT
ASTRONOMER:AS_IS:DEFAULT
NATURALIST:AS_IS:DEFAULT
CHEMIST:AS_IS:DEFAULT
GEOGRAPHER:AS_IS:DEFAULT
SCRIBE:AS_IS:DEFAULT
PAPERMAKER:AS_IS:DEFAULT
BOOKBINDER:AS_IS:DEFAULT
PHILOSOPHER:AS_IS:DEFAULT
ADVISOR:AS_IS:DEFAULT
ALCHEMIST:AS_IS:DEFAULT
-
MERCHANT:AS_IS:DEFAULT
MERCHANTPRINCE:AS_IS:DEFAULT
MERCHANTBARON:AS_IS:DEFAULT
GUILDREP:AS_IS:DEFAULT
DIPLOMAT:AS_IS:DEFAULT
OUTPOST_LIAISON:AS_IS:DEFAULT
SHOPKEEPER:AS_IS:DEFAULT
-
RECRUIT:AS_IS:DEFAULT
RECRUIT:AS_IS:LAW_ENFORCE
RECRUIT:AS_IS:TAX_ESCORT
-
WRESTLER:AS_IS:DEFAULT
MASTER_WRESTLER:AS_IS:DEFAULT
WRESTLER:AS_IS:LAW_ENFORCE
MASTER_WRESTLER:AS_IS:LAW_ENFORCE
WRESTLER:AS_IS:TAX_ESCORT
MASTER_WRESTLER:AS_IS:TAX_ESCORT
-
SPEARMAN:AS_IS:DEFAULT
MASTER_SPEARMAN:AS_IS:DEFAULT
SPEARMAN:AS_IS:LAW_ENFORCE
MASTER_SPEARMAN:AS_IS:LAW_ENFORCE
SPEARMAN:AS_IS:TAX_ESCORT
MASTER_SPEARMAN:AS_IS:TAX_ESCORT
-
SWORDSMAN:AS_IS:DEFAULT
MASTER_SWORDSMAN:AS_IS:DEFAULT
SWORDSMAN:AS_IS:LAW_ENFORCE
MASTER_SWORDSMAN:AS_IS:LAW_ENFORCE
SWORDSMAN:AS_IS:TAX_ESCORT
MASTER_SWORDSMAN:AS_IS:TAX_ESCORT
-
AXEMAN:AS_IS:DEFAULT
MASTER_AXEMAN:AS_IS:DEFAULT
AXEMAN:AS_IS:LAW_ENFORCE
MASTER_AXEMAN:AS_IS:LAW_ENFORCE
AXEMAN:AS_IS:TAX_ESCORT
MASTER_AXEMAN:AS_IS:TAX_ESCORT
-
HAMMERMAN:AS_IS:DEFAULT
MASTER_HAMMERMAN:AS_IS:DEFAULT
HAMMERMAN:AS_IS:LAW_ENFORCE
MASTER_HAMMERMAN:AS_IS:LAW_ENFORCE
HAMMERMAN:AS_IS:TAX_ESCORT
MASTER_HAMMERMAN:AS_IS:TAX_ESCORT
-
MACEMAN:AS_IS:DEFAULT
MASTER_MACEMAN:AS_IS:DEFAULT
MACEMAN:AS_IS:LAW_ENFORCE
MASTER_MACEMAN:AS_IS:LAW_ENFORCE
MACEMAN:AS_IS:TAX_ESCORT
MASTER_MACEMAN:AS_IS:TAX_ESCORT
-
CROSSBOWMAN:AS_IS:DEFAULT
MASTER_CROSSBOWMAN:AS_IS:DEFAULT
CROSSBOWMAN:AS_IS:LAW_ENFORCE
MASTER_CROSSBOWMAN:AS_IS:LAW_ENFORCE
CROSSBOWMAN:AS_IS:TAX_ESCORT
MASTER_CROSSBOWMAN:AS_IS:TAX_ESCORT
-
PIKEMAN:AS_IS:DEFAULT
MASTER_PIKEMAN:AS_IS:DEFAULT
PIKEMAN:AS_IS:LAW_ENFORCE
MASTER_PIKEMAN:AS_IS:LAW_ENFORCE
PIKEMAN:AS_IS:TAX_ESCORT
MASTER_PIKEMAN:AS_IS:TAX_ESCORT
-
BOWMAN:AS_IS:DEFAULT
MASTER_BOWMAN:AS_IS:DEFAULT
BOWMAN:AS_IS:LAW_ENFORCE
MASTER_BOWMAN:AS_IS:LAW_ENFORCE
BOWMAN:AS_IS:TAX_ESCORT
MASTER_BOWMAN:AS_IS:TAX_ESCORT
-
BLOWGUNMAN:AS_IS:DEFAULT
MASTER_BLOWGUNMAN:AS_IS:DEFAULT
BLOWGUNMAN:AS_IS:LAW_ENFORCE
MASTER_BLOWGUNMAN:AS_IS:LAW_ENFORCE
BLOWGUNMAN:AS_IS:TAX_ESCORT
MASTER_BLOWGUNMAN:AS_IS:TAX_ESCORT
-
LASHER:AS_IS:DEFAULT
MASTER_LASHER:AS_IS:DEFAULT
LASHER:LAW_ENFORCE
MASTER_LASHER:AS_IS:LAW_ENFORCE
LASHER:AS_IS:TAX_ESCORT
MASTER_LASHER:AS_IS:TAX_ESCORT
-
RECRUIT:AS_IS:ADVENTURER
-
WRESTLER:AS_IS:ADVENTURER
-
SPEARMAN:AS_IS:ADVENTURER
-
SWORDSMAN:AS_IS:ADVENTURER
-
AXEMAN:AS_IS:ADVENTURER
-
HAMMERMAN:AS_IS:ADVENTURER
-
MACEMAN:AS_IS:ADVENTURER
-
CROSSBOWMAN:AS_IS:ADVENTURER
-
PIKEMAN:AS_IS:ADVENTURER
-
BOWMAN:AS_IS:ADVENTURER
-
BLOWGUNMAN:AS_IS:ADVENTURER
-
LASHER:AS_IS:ADVENTURER
Quiet-Sun's ToolsThe cornerstone of the standard are the raws. This means that as the raws evolve (with each passing version of DF) so will the standard. In order to allow artists to easily update their sets to each DF version (and standardize their sets if they choose to), I coded the following tools:
The UpdaterThis tool compares the text files of a graphics set with a set of raws. It will attempt to identify and automatically correct creature name changes. It also writes report files that can be used to manually correct any remaining differences with ease.
A tool that no graphics-set-keeper should live without!
Typical Output:
Reference folder: D:\Mis Documentos\aaa DF\Graphics Standardization_Git\42.05 a DF objects
Graphics set folder: D:\Mis Documentos\aaa DF\Graphics Standardization_Git\42.05-Rally Ho
Output folder: 42.05-Rally Ho-Updated\
LION_GIANT->GIANT_LION in line 1555 of graphics_rallyho_animal.txt
LEOPARD_GIANT->GIANT_LEOPARD in line 1559 of graphics_rallyho_animal.txt
JAGUAR_GIANT->GIANT_JAGUAR in line 1563 of graphics_rallyho_animal.txt
TIGER_GIANT->GIANT_TIGER in line 1567 of graphics_rallyho_animal.txt
CHEETAH_GIANT->GIANT_CHEETAH in line 1571 of graphics_rallyho_animal.txt
TIGERMAN->TIGER_MAN in line 273 of graphics_rallyho_animalman.txt
The StandardizerThis tool takes all tiles in a given set and organizes them neatly in their corresponding png files. It also creates matching text files for all possible combinations of creatures/professions and comments out (removing the oppening bracket) those tiles that are not present in the set. This way, adding tiles to a set is simply a matter of adding the art and uncommenting the creature in the text file. If the user desires, this tool will also generate templates with creature/profession names for artists to fill at their own leasure. It will also modify the manifest.json and clean the folders so that it can be used immediately by DF.
Works better if used after the updater!
Typical Output:
The Set MergerThis tool is what makes the standard really shine. It can be used to create empty or filled png templates for you to fill, it can be used to create supporting text files based on a standardized set tiles that are filled with art, and it can be used to create custom graphics sets combining other sets in any way you want. The only condition is that it can only work with sets standardized using the same raws and the same user input files.
The customizer's paradise!!
Typical Output:
The Image ResizerThis is the tool that started it all. An alternative image resizer that allows you to upscale/downscale any set you want with one of these three algorithms:
- Lanczos3: Quick and dirty (minutes)
- HQx: Good compromise between speed and quality (less than an hour). Best for straight lines.
- Waifu2x: Very slow (more than an hour), but best for tiles with a high amount of non-straight lines and detail.
Additionally this tool changes your text files so that the result is ready to use by DF and TWBT. Furthermore, it can be used to switch back between tilesizes once a folder has been processed.
What's there not to love?!
Typical Output:

to

VERSION CHANGES AND UPDATING SETSUpdating a set is simply a matter of running the standardizer again

Changes in version 1.1
- Windows 32-Bit binaries included.
- GUARD/ROYALGUARD changed to LAW_ENFORCE/TAX_ESCORT (Thank you Burned!).
- File structure changed to make standard sets compatible with Rubble (png files in the same place as the txt files. All names in small case).
- The updater now deals properly with magenta pixels giving the user the option to keep them that way, or create a transparency layer.
DOWNLOADOk, here is where the bad news start. Unfortunately these tools work only for Windows 64-bit and they are written in Matlab. This means that not everyone will be able to use them until some kind sould helps me translate the source to another language (and/or make binaries for other systems)
I have created standalone executables for all of them (so that you don't need to own matlab), but in order to use them you first need the Windows 64-bit version of the MATLAB Runtime for R2015b, which you can find here:
http://www.mathworks.com/products/compiler/mcr/index.htmlOnce you have this installed (
AND AFTER REBOOTING YOUR COMPUTER), you can download the tools here:
- GitHub
- DF File DepotThey include:
- Binaries and supporting files.
- Binaries of the
HQx and
Weifu2x scaling algorithms.
-
Rally-Ho 42.05 Non-TWBT Version This version is from Jan-2016 and has problems. I'll keep this version to show how to use the tools to correct problems.
- Folders with pure standardized versions of the art of Afro, Beefmo, Jiripetru, Kafine, Magnut, Nwkohaku, Phoebus, Spacefux and Sphr
MOD Support and Troubleshooting- If you don't use Windows and want your graphics set standardized I'll be happy to help. Just put the request on this thread.
- So far I have only used my tools with the vanilla files, but I think that they can handle any mod without problems. I'll be very happy to help if you need guidance standardizing a mod structure.
- All tools produce a very detailed log inside the output folder. If the application fails, let me know what were the last files in the log and if you got an error message from Matlab in the console.
- Sometimes the applications don't start right away, or freeze. Kill them and try again.
- My Norton antivirus had a huge problem with the HQx binary, but I think it was a false positive. Let me know if your anti virus complains about anything.
Quick Sheet of Possible Actions
- Update to new Raws:
1. Run Updater (select target DF raws. Creates folder with name SAMENAME-Updated).
2. Run Standardizer (select same target DF raws and the output folder of the Update step)
3. Output is in a folder is called SAMENAME-Updated-Standard (or SAMENAME-Standard if you didn't use the updater).
- Merge different graphic sets:
1. Update and standardize each set separately.
2. Copy all sets you want to merge inside the /MERGE folder.
3. Add the names of the folders you want to merge to the MERGING_FOLDERS.txt in descending order of priority.
4. If you want even more control, erase png files you don't want from the folders inside the MERGE folder.
5. Run Merger
6. Output is in a folder called /Merged_Set.
- Create blank template pngs based on a set of raws:
1. Make sure that MERGING_FOLDERS.txt is empty.
2. Run Merger (choose not to generate supporting files).
3. Output is in a folder called /Merged_Set.
- Create supporting text for a set of standardized pngs:
1. Place pngs in a folder inside the MERGE folder
2. Make sure that the only name listed in MERGING_FOLDERS.txt is the one you want to create files for (otherwise it will merge in other sets).
3. Run Merger.
4. Output is in a folder called /Merged_Set.
- Scale tileset:
1. If you want the resizer to ignore files, add their names to UPSCALING_EXEPTIONS.txt (partial names are possible too and will make the resizer ignore all files containing the string you added).
2. Run image resizer, choose algorithm, and dissasembly of images.
3. Output is in a folder is called SAMENAME-Scaled
- Switch Tileset sizes:
1. This only works on a folder that has already been scaled at least once.
2. Run image resizer, chose the folder and choose NOT to scale, only change text files.
3. Output is the same input folder.
ACKNOWLEDGEMENTS- Huge thanks to Burned who keep me company all along the development of the tool and help me betatest the first versions.
- Huge thanks to Burned, CLA, Rydel, and Button for helping me understand how DF works.
- Huge thanks to PeridexisErrant for writing the guide that got me into DF.
- Huge thanks to Fricy for doing a heroic effort to keep all the different tilesets alive and current. These tools are mainly meant to make his life easier.
- Huge thanks to Toady and Threetoe for making an awesome game.