Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Quiet-Sun

Pages: [1]
1
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 Standard

1. 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:
Spoiler (click to show/hide)

CATEGORIES_CREATURES.txt:
Spoiler (click to show/hide)

CATEGORIES_SENTIENT.txt (each group is separated by a dash "-" and all but the first item on ach group need to be indented):
Spoiler (click to show/hide)



Quiet-Sun's Tools

The 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 Updater
This 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:
Spoiler (click to show/hide)
 

The Standardizer
This 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:
Spoiler (click to show/hide)


The Set Merger
This 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:
Spoiler (click to show/hide)


The Image Resizer
This 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:
Spoiler (click to show/hide)



VERSION CHANGES AND UPDATING SETS

Updating a set is simply a matter of running the standardizer again :)

Spoiler (click to show/hide)



DOWNLOAD

Ok, 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.html

Once you have this installed (AND AFTER REBOOTING YOUR COMPUTER), you can download the tools here:

- GitHub
- DF File Depot


They 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

Spoiler (click to show/hide)



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.

2
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 Standard

1. 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:
Spoiler (click to show/hide)

CATEGORIES_CREATURES.txt:
Spoiler (click to show/hide)

CATEGORIES_SENTIENT.txt (each group is separated by a dash "-" and all but the first item on ach group need to be indented):
Spoiler (click to show/hide)



Quiet-Sun's Tools

The 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 Updater
This 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:
Spoiler (click to show/hide)
 

The Standardizer
This 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:
Spoiler (click to show/hide)


The Set Merger
This 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:
Spoiler (click to show/hide)


The Image Resizer
This 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:
Spoiler (click to show/hide)



VERSION CHANGES AND UPDATING SETS

Updating a set is simply a matter of running the standardizer again :)

Spoiler (click to show/hide)



DOWNLOAD

Ok, 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.html

Once you have this installed (AND AFTER REBOOTING YOUR COMPUTER), you can download the tools here:

- GitHub
- DF File Depot


They 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

Spoiler (click to show/hide)



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.

Pages: [1]