Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Quiet-Sun's Standard and Tools: Updater, Standardizer, Merger, and Resizer  (Read 9457 times)

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org

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.
« Last Edit: March 04, 2016, 05:00:10 pm by Quiet-Sun »
Logged

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Quiet-Sun's Standard and Tools: Updater, Standardizer, Merger, and Resizer
« Reply #1 on: February 10, 2016, 12:18:22 pm »

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 raws

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


Then select Rally-Ho as the graphic set to update:
Spoiler (click to show/hide)


After the tool is done you will see a new folder inside the root folder with the same name but ending in -Updated:
Spoiler (click to show/hide)


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

- 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 Set

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

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

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

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

If you open the corresponding text file graphics_QS_ST_CRT_large_tropical.txt you will see it commented out:
Spoiler (click to show/hide)

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

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


Merging Sets

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

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

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

If you look inside its /raw/graphics/QS_ST folder you will notice the mixture of tiles and styles.


Creating an empty set of templates

Now 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 pngs

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

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

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

 
Resizing a Set

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

Now 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.
« Last Edit: March 04, 2016, 06:00:15 pm by Quiet-Sun »
Logged

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Quiet-Sun's Standard and Tools: Updater, Standardizer, Merger, and Resizer
« Reply #2 on: February 10, 2016, 12:20:30 pm »

Reserved
Logged

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: Quiet-Sun's Standard and Tools: Updater, Standardizer, Merger, and Resizer
« Reply #3 on: February 25, 2016, 02:39:10 pm »

Good afternoon!

I am very much looking forward to using this tool to help with my current project (rehabbing Chariot's graphics). The only problem (at the moment) is the sheer size of the MATLAB program, which is taking forever to download. Rest assured that as soon as I have the ability to do so, I'll be doing an actual project with your tools, and I'll give you detailed feedback. Thanks!

Rochndil, watching the MATLAB download waffle on either side of 1+ hours to go...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

jaked122

  • Bay Watcher
  • [PREFSTRING:Lurker tendancies]
    • View Profile
Re: Quiet-Sun's Standard and Tools: Updater, Standardizer, Merger, and Resizer
« Reply #4 on: February 25, 2016, 08:30:26 pm »

I don't think I've ever heard of someone doing a task like this through Matlab. Was it painful?


Also are you an engineer?

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Quiet-Sun's Standard and Tools: Updater, Standardizer, Merger, and Resizer
« Reply #5 on: February 25, 2016, 08:43:09 pm »

Good afternoon!

I am very much looking forward to using this tool to help with my current project (rehabbing Chariot's graphics). The only problem (at the moment) is the sheer size of the MATLAB program, which is taking forever to download. Rest assured that as soon as I have the ability to do so, I'll be doing an actual project with your tools, and I'll give you detailed feedback. Thanks!

Rochndil, watching the MATLAB download waffle on either side of 1+ hours to go...

Excellent! Thank you! Please let me know how it goes!


I don't think I've ever heard of someone doing a task like this through Matlab. Was it painful?


Also are you an engineer?

Not at all for me, it is my language of choice!  I am a Physicist, but I have an undergraduate degree in engineering that got me into using matlab (around 2001 uff! ;))
Logged

jaked122

  • Bay Watcher
  • [PREFSTRING:Lurker tendancies]
    • View Profile
Re: Quiet-Sun's Standard and Tools: Updater, Standardizer, Merger, and Resizer
« Reply #6 on: February 26, 2016, 04:04:27 pm »

Not at all for me, it is my language of choice!  I am a Physicist, but I have an undergraduate degree in engineering that got me into using matlab (around 2001 uff! ;) )


Really? I'd love to ask you about what you do with that degree, as the jobs that I've seen physicists getting are often quite interesting, but this isn't the right thread.


I'll have to try it with octave then.


Anyway, if I can figure out how the code works, I'll think about writing a python version for those of us who prefer that language, besides, if that's alright with you, it helps to have a standard which bridges languages.



Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org
Re: Quiet-Sun's Standard and Tools: Updater, Standardizer, Merger, and Resizer
« Reply #7 on: February 26, 2016, 04:08:20 pm »

Not at all for me, it is my language of choice!  I am a Physicist, but I have an undergraduate degree in engineering that got me into using matlab (around 2001 uff! ;) )


Really? I'd love to ask you about what you do with that degree, as the jobs that I've seen physicists getting are often quite interesting, but this isn't the right thread.


I'll have to try it with octave then.


Anyway, if I can figure out how the code works, I'll think about writing a python version for those of us who prefer that language, besides, if that's alright with you, it helps to have a standard which bridges languages.

I'm doing research on the solar cycle and, hopefully, will be hired this year as an assistant professor.   I will be very happy to help you translate to python.  I have been meaning to learn python and seen a translation of my code would help me get an idea of how it works.   We could set up a skype meeting next week, if you want, and we can go over the code and what it does.  Just send me a personal message (PM)
Logged

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: Quiet-Sun's Standard and Tools: Updater, Standardizer, Merger, and Resizer
« Reply #8 on: February 29, 2016, 10:06:04 am »

Good morning!

I've (mostly) completed the conversion process, and overall your tools worked just fine. I had two small issues, which would be good to document for other users.

1. The system needs to be rebooted after installing the MATLAB program, or your tools can't find it. It's also a little tricky to know if you HAVE successfully installed MATLAB, because it doesn't leave a lot of footprints in the system.

2. In order to process properly, the graphics mod files need to be in /dirname/raw/graphics or the tool(s) won't "see" them and just go through the motions.

Both are easily corrected by documenting. Preventing user failures (and frustration) is always a good thing.

Now, once I got things actually working, your instructions were pretty much right on the money, and while I did have problems, they were on my end. It would be helpful, if possible, to have a little error-checking in your program. The main problem I had was the file-references for my PNG files were wrong in my TXT files, but the program never identified the problem, and therefore didn't LOG anything about it. If your tools could add lines to the output "icon referenced in file(x) line(n), but image not found" it would have saved me a lot of time and head-scratching.

Other than that, everything went fine. I need to try a merger next, and if I encounter anything else noteworthy I'll let you know. Thanks for the great tools, you saved me hours, if not days, of work.

Rochndil, still working on updating Chariot's classic graphics...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile

Good afternoon!

I'm basically done with the "purist" version of Chariot's graphics, but have an odd error. Everything seems to work just fine, EXCEPT that the Dwarf graphics are being rendered with their magenta backgrounds, while the creature graphics are not. I did an experiment and flattened a copy of the Dwarf file so I could set the transparency, which worked. I'm a bit mystified why that was ONLY necessary with that file.

I can, of course, do the same with all the race files, but I'd like to know what happened to cause the problem in the first place, and either avoid it in the future (if it was something I did) or submit it as a bug (to improve the program).

Here's the archive, updated and standardized: http://dffd.bay12games.com/file.php?id=11824

Once I know what's going on, I'll fix the error and post a final copy.

On a different note, I did find that the "couldn't find find the file" error log I was looking for WAS in the "Lines_with_problems.txt" file, but I didn't notice it at first.

Please let me know what you find. I'll work on some other things in the meantime.

Rochndil, with many irons in the fire...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org

Hi Rochndil!!

Thank you very much for your feedback and suggestions!  I'm going to look at your files and let you know what I find.  I need to make a small update so I will combine both things if I find a problem.  I will also be sure to include the need to reboot in the instructions.   

I'll look at this now and hopefully have something soon to tell.

EDIT:  I just looked at the original files and their magenta background is visible.  I will ask Burned who is a master of DF graphics moding to see if he knows anything about it.  If not, I will have the code turn magenta pixels transparent.  I'll let you know when I have an update
« Last Edit: March 04, 2016, 01:00:49 am by Quiet-Sun »
Logged

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile

Good morning!

Thanks for looking into the issue. The thing that's odd is that ALL the graphics in this set have the old-school magenta background, but ONLY the Dwarf graphics are showing the background. The files (that I've been using for years) did NOT show this behavior before conversion, and all the creature graphics (that I saw in testing) worked fine. It seems fairly unlikely that the original files were different in some way, but not impossible. I suspect there's a difference in the way the race/major files are being processed, supported by the fact that their tile pages are rendered differently than the creature/mans files (horizontal instead of vertical).

A couple of small things to add.

First, a bug/issue. The GUARD/ROYALGUARD tags are deprecated now, and should instead be LAW_ENFORCE and TAX_ESCORT respectively. An easy enough thing to fix in the output, but better to have it right from the start.

Second, I'd like to suggest an enhancement. I take the output from your process, and run it through the Rubble process. The difficulty is that, first, Rubble has issues with mixed-case filenames. So I had to convert all the filenames, AND REFERENCES, to lowercase. In addition, Rubble also wants the TXT files and the PNG files in the same directory, which means updating all the PNG references in the TXT files. Exporting everything in lowercase consistently wouldn't really change anything (other than the processing inside your code), but would save a lot of modding time on the other end. Changing the references to eliminate the subdirectory is pretty trivial, so if you want to leave that off (I can see that it could introduce issues with the subdirectory structure you use).

All that said, your program has performed an amazing amount of work for me. The process took longer than it probably should have, but that's largely my fault, since I broke some stuff and had to fix it the hard way. Even with that, if I were doing the whole thing by hand I'd probably STILL be working on it, not looking at an almost-completely-perfect update/conversion.

Rochndil, fiddle-poking at stuff to see what breaks...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org

Thank you for your suggestions Rochndil!  The LAW_ENFORCE/TAX_ESCORT was also reported by Burned.  That is the first thing to change in my next update.   I will also make sure everything is in lower case and that all PNG files are on the same folder.  Not a problem at all!  Thank you very much again for your feedback!
Logged

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org

Ok Rochndil!  As I was expecting, Burned knew the answer to the mystery.  If the png doesn't have a transparency layer, magenta becomes transparent.  If it does have a transparency layer, it uses it.  My code is treating magenta as a non-transparent color and thus I make it non-transparent.   I think I'm going to add an option for the user to choose whether to keep magenta as the transparency color, or transfer this information to a black, or white transparency layer.   The advantage of shifting to a transparency layer is that magenta borders won't materialize if the tiles are re-scaled.   I'll try to get that done today.
Logged

Quiet-Sun

  • Bay Watcher
  • Escaped Lunatic
    • View Profile
    • www.solardynamo.org

Ok! Version 1.1 is now up!  Here are the changes:

- 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.

@Rochndil, let me know if things work out for you.  Also, I will be very happy to help you make the code friendlier and more versatile, so before you start manually changing file names, file structure, or transparency please let me know to see if I can do something about it!
Logged