Quiet-Sun's tools tutorial
This tutorial is meant to guide you through some of the things you can do with my tools
Making sure a set is current with a set of DF rawsFirst we are going to make sure Rally-Ho is current with 42.05. Run the updater and select the folder "42.05 a DF creature objects" as the reference folder:
Then select Rally-Ho as the graphic set to update:
After the tool is done you will see a new folder inside the root folder with the same name but ending in -Updated:
Inside it you will find three files (besides the log):
- Name_Changes.txt will tell you which names the tool thinks that have a slighly different name in the raws you are using. These names will have been changed in the -Updated output folder. You want to make sure they make sense.
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
- Names_in_Raws_not_in_Set.txt will tell you which names the set is missing. These would be the tiles you need to add if you want a complete set according to the raws.
- Names_in_Set_not_in_Raws.txt will tell you which things the set has that are not in the raws. These can be obsolete creatures, or name-changes that the updater didn't catch.
In this particular version of Rally-Ho, you can see that there is a name change that the code didn't catch. Names_in_Raws_not_in_Set.txt has:
creature_large_tropical.txt:
GIANT_VULTURE in line 3178
and Names_in_Set_not_in_Raws.txt has:
graphics_rallyho_animal.txt:
GIANT_BIRD_VULTURE in line 1240
These kind of issues will need to be fixed by hand. In this case, leave it alone so that it appears as a missing tile in the next step.
Standardizing a SetSo now that we know that there are no name changes lurking in the shadows we can standardize the set. Run the standardizer, select the folder "42.05 a DF creature objects" as the reference folder and 42.05-Rally Ho-Updated as the set to standardize. The code will ask you if your set uses magenta as a transparent color
This trigger a series of questions that allow you to define the way you want to deal with transparency. Incidentally, if your resizing algorithm is showing magenta borders, you can fix things using the standardizer and answering yes to this question. For this tutorial simply answer no.
The code will now ask you if you want templates:
This will create an additional folder with templates that are human friendly. Also say yes to the generation of txt files. This will ensure that you have a functional Rally-Ho at the end of the process. Most of the time you will want to generate the text files, but if you are simply standardizing a set for merging, there is no need.
After the tool is done you will see a new folder inside the root folder with the same initial name but ending in -Standard (so it should now have both -Updated and -Standard):
Inside you will find more files that will let you fix more problems with your set:
- Lines_with_problems.txt will note all lines that the tool could not follow to a viable tile. This can be because the original textfile points to a non-existing tile, or like in the case of this version of Rally-Ho:
Missing page title reference: Line 577 of graphics_rallyho_animalman.txt - [ANIMATED:RALLYHO:ANIMALMAN:14:16:DEFAULT]
Missing page title reference: Line 577 of graphics_rallyho_animalman.txt - [ANIMATED:RALLYHO:ANIMALMAN:2:17:DEFAULT]
Missing page title reference: Line 582 of graphics_rallyho_animalman.txt - [ANIMATED:RALLYHO:ANIMALMAN:5:17:DEFAULT]
Missing page title reference: Line 587 of graphics_rallyho_animalman.txt - [ANIMATED:RALLYHO:ANIMALMAN:8:17:DEFAULT]
Missing page title reference: Line 19 of graphics_rallyho_kobold.txt - [MASTER_THIEF:7:0:AS_IS:DEFAULT]
Because the lines have typos in the page-title deffinition or are missing a page-title altogether. For completeness, to fix Rally-Ho you need to change RALLYHO:ANIMALMAN to RALLYHO_ANIMALMAN and add the page title RALLYHO_KOBOLD to the MASTER_THIEF
- Professions_not_in_Standard.txt tells which professions in the set were not found in the CATEGORIES_SENTIENT.txt. I tried to have CATEGORIES_SENTIENT.txt as current as possible, but there is a lot of uncertainty as to which professions are really in the game. Until we do, your guess is as good as mine. Feel free to add as many to CATEGORIES_SENTIENT.txt if you want.
The resulting raw/graphics folder will have all the text files (QS_ST_CRT for non-sentient creatures, QS_ST_PRSN for sentient, and QS_ST_MJR for major races). The rest of the name matches the originating raw file. The files that DF uses are located inside the QS_ST folder and the templates inside QS_ST_TMP:
In the previous section we saw that GIANT_VULTURE is missing in creature_large_tropical.txt. If you open QS_ST_CRT_large_tropical_16x16.png inside either the QS_ST or QS_ST_TMP folder you will it as a missing column:
If you open the corresponding text file graphics_QS_ST_CRT_large_tropical.txt you will see it commented out:
!! CREATURE_GRAPHICS:GIANT_VULTURE]
! DEFAULT:CRT_LAR_TRO:38:0:AS_IS:DEFAULT]
! CHILD:CRT_LAR_TRO:38:1:AS_IS:DEFAULT]
! ANIMATED:CRT_LAR_TRO:38:2:AS_IS:DEFAULT]
! TRAINED_HUNTER:CRT_LAR_TRO:38:3:AS_IS:DEFAULT]
! TRAINED_WAR:CRT_LAR_TRO:38:4:AS_IS:DEFAULT]
Adding to the set will be simply a matter of adding the tile and uncommenting it (add the opening square brackets to both CREATURE_GRAPHICS: and the tile you add). Also, thanks to the templates it will be pretty obvious which tiles are missing in the set. If you open one of the templates of the major races (for example the dwarves):
you will notice a bunch of initials. These are the initials of the professions defined for each group in CATEGORIES_SENTIENT.txt. The names on the right match the first item of each group. Here they are for comparison:
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_GUARD: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:GUARD
RECRUIT:AS_IS:ROYALGUARD
-
WRESTLER:AS_IS:DEFAULT
MASTER_WRESTLER:AS_IS:DEFAULT
WRESTLER:AS_IS:GUARD
MASTER_WRESTLER:AS_IS:GUARD
WRESTLER:AS_IS:ROYALGUARD
MASTER_WRESTLER:AS_IS:ROYALGUARD
-
SPEARMAN:AS_IS:DEFAULT
MASTER_SPEARMAN:AS_IS:DEFAULT
SPEARMAN:AS_IS:GUARD
MASTER_SPEARMAN:AS_IS:GUARD
SPEARMAN:AS_IS:ROYALGUARD
MASTER_SPEARMAN:AS_IS:ROYALGUARD
-
SWORDSMAN:AS_IS:DEFAULT
MASTER_SWORDSMAN:AS_IS:DEFAULT
SWORDSMAN:AS_IS:GUARD
MASTER_SWORDSMAN:AS_IS:GUARD
SWORDSMAN:AS_IS:ROYALGUARD
MASTER_SWORDSMAN:AS_IS:ROYALGUARD
-
AXEMAN:AS_IS:DEFAULT
MASTER_AXEMAN:AS_IS:DEFAULT
AXEMAN:AS_IS:GUARD
MASTER_AXEMAN:AS_IS:GUARD
AXEMAN:AS_IS:ROYALGUARD
MASTER_AXEMAN:AS_IS:ROYALGUARD
-
HAMMERMAN:AS_IS:DEFAULT
MASTER_HAMMERMAN:AS_IS:DEFAULT
HAMMERMAN:AS_IS:GUARD
MASTER_HAMMERMAN:AS_IS:GUARD
HAMMERMAN:AS_IS:ROYALGUARD
MASTER_HAMMERMAN:AS_IS:ROYALGUARD
-
MACEMAN:AS_IS:DEFAULT
MASTER_MACEMAN:AS_IS:DEFAULT
MACEMAN:AS_IS:GUARD
MASTER_MACEMAN:AS_IS:GUARD
MACEMAN:AS_IS:ROYALGUARD
MASTER_MACEMAN:AS_IS:ROYALGUARD
-
CROSSBOWMAN:AS_IS:DEFAULT
MASTER_CROSSBOWMAN:AS_IS:DEFAULT
CROSSBOWMAN:AS_IS:GUARD
MASTER_CROSSBOWMAN:AS_IS:GUARD
CROSSBOWMAN:AS_IS:ROYALGUARD
MASTER_CROSSBOWMAN:AS_IS:ROYALGUARD
-
PIKEMAN:AS_IS:DEFAULT
MASTER_PIKEMAN:AS_IS:DEFAULT
PIKEMAN:AS_IS:GUARD
MASTER_PIKEMAN:AS_IS:GUARD
PIKEMAN:AS_IS:ROYALGUARD
MASTER_PIKEMAN:AS_IS:ROYALGUARD
-
BOWMAN:AS_IS:DEFAULT
MASTER_BOWMAN:AS_IS:DEFAULT
BOWMAN:AS_IS:GUARD
MASTER_BOWMAN:AS_IS:GUARD
BOWMAN:AS_IS:ROYALGUARD
MASTER_BOWMAN:AS_IS:ROYALGUARD
-
BLOWGUNMAN:AS_IS:DEFAULT
MASTER_BLOWGUNMAN:AS_IS:DEFAULT
BLOWGUNMAN:AS_IS:GUARD
MASTER_BLOWGUNMAN:AS_IS:GUARD
BLOWGUNMAN:AS_IS:ROYALGUARD
MASTER_BLOWGUNMAN:AS_IS:ROYALGUARD
-
LASHER:AS_IS:DEFAULT
MASTER_LASHER:AS_IS:DEFAULT
LASHER:GUARD
MASTER_LASHER:AS_IS:GUARD
LASHER:AS_IS:ROYALGUARD
MASTER_LASHER:AS_IS:ROYALGUARD
-
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
Merging SetsOk, we leave Rally-Ho for a moment to talk about merging sets. Inside the /MERGE folder you will find a bunch of pure art folders:
These are folders I separated and standardized for your convenience and enjoyment
Inside the root folder you will find a file called MERGING_FOLDERS.txt:
Pure-40.24-spacefox-Updated-Standard
Pure-40.24-afro-Updated-Standard
Pure-40.24-beefmo-Updated-Standard
Pure-40.24-jiripetru-Updated-Standard
Pure-40.24-kafine-Updated-Standard
Pure-40.24-magnut-Updated-Standard
Pure-40.24-nwkohaku-Updated-Standard
Pure-40.24-phoebus-Updated-Standard
Pure-40.24-sphr-Updated-Standard
These are the the folders that the merger tool uses to created the hybrid sets. If a folder name is included in this file (it must be inside the \MERGE folder) it will be used. The code looks in descending order for a viable tile for each creature and use it if found. If you look inside these folder you will see that most don't have text files. This is because the only thing that is important is that the names and order of the png files follow the same standard.
Go ahead and order the folder names in MERGING_FOLDERS.txt in any way you want and launch the merger. Make sure you choose the right reference folder! These sets are standardized to 40.24 so that's the one you should use or the code will crash. After the merging is done you are good to go! The output folder "Merged_Set" is located in the root directory:
If you look inside its /raw/graphics/QS_ST folder you will notice the mixture of tiles and styles.
Creating an empty set of templatesNow suppose that you want to start a graphics set from scratch. Simply make sure that MERGING_FOLDERS.txt is empty and run the merger. Choose the DF object folder you want and say yes to creating template files. Choose a 24px tilesize for the heck of it
You can say no to the supporting text files, we will soon learn how to make them automatically. The output will be found also inside the "Merged_Set" folder and will have erase whatever you had there, so be careful.
Creating supporting text files for a set of standard pngsOk now suppose you are done making your set. If you were using the templates with text, you need to first copy the grid into the files on the QS_ST folder. All my tools will ignore whatever is inside the QS_ST_TMP folder. That folder is for humans only.
What you need to do is copy the folder with your standard png files inside the MERGE folder, put its name in the MERGING_FOLDERS.txt, and run the merger. There cannot be other names in MERGING_FOLDERS.txt or the merger will add it with other sets.
For our exercise let's copy 42.05-Rally Ho-Updated-Standard into the MERGE folder and add its name to MERGING_FOLDERS.txt:
Now, before you run the merger, copy the QS_ST_CRT_large_tropical_16x16.png file I provided into the MERGE/42.05-Rally Ho-Updated-Standard/raw/graphics/QS_ST folder overwriting the one there. The file there shoudl look like this:
Note that this one has the GIANT_VULTURE in it! We are going to pretend that we filled it up
Also, for effect, go and erase all text files in the /raw/graphics/ folder of the Rally-Ho inside /MERGE. Now run the merger, chose the right DF raws (42.05 a DF creature objects), and make sure you say yes to generating the text files.
Now, if you look inside the Merged_Set folder you will see that in the corresponding text file graphics_QS_ST_CRT_large_tropical.txt, GIANT_VULTURE is no longer commented out!
[CREATURE_GRAPHICS:GIANT_VULTURE]
[DEFAULT:CRT_LAR_TRO:38:0:AS_IS:DEFAULT]
! CHILD:CRT_LAR_TRO:38:1:AS_IS:DEFAULT]
[ANIMATED:CRT_LAR_TRO:38:2:AS_IS:DEFAULT]
! TRAINED_HUNTER:CRT_LAR_TRO:38:3:AS_IS:DEFAULT]
! TRAINED_WAR:CRT_LAR_TRO:38:4:AS_IS:DEFAULT]
Resizing a SetOk so now we want to resize our set because our screen is 10000x10000, but we want to use a superresolution algorithm so that DF doesn't look like is runnign on a SNES. But first let's make sure that the code just upscales everything it finds. Open the file UPSCALING_EXEPTIONS.txt:
leoceanoverrides
mouse
Dorenitems
shadows.png
Inside it you can define files and partial names you want the code to ignore. Even a partial match will be enough to make the code ignore the file (is as if you had used *name* in a command line).
Now run the tile resizer and select either the Merged_Set of last step, or 42.05-Rally Ho-Updated-Standard:
- Select the output resolution you want
- Tell the code you want it to change the text files (this changes all txt files to point at the right png figures and having the right tilesize)
- Tell the code you want to scale your images (the first time you do it this is what you want to use. The purpose of this question will be evident later).
- Tell the code that you want to use Lanczos3 (the fastest, but lowest quality upscaling algorith)
The resulting upscaled set will be in the folder Merged_Set-Scaled. Note that the pngs in standardized sets always have the resolution appended to the name. If you are scaling a non-standardized set, the scaler will append the original tilesize to all files that do not have it. This enables the last feature which is switching resolutions.
Also note that if you asked the resizer to change the text files it will also try to change the init files for TWBT. This way your resized set is also ready to go right of the bat.
Changing TilesizeNow suppose you have resized a set to different resolutions. You can use the resizer to change between them. Just make sure you tell it to not resize your tiles and it will change the text files to match the new resolution.