Author Topic: Missing Tile Checker -- A tool for tileset makers  (Read 32608 times)

Offline jcannon98188

  • NPC
  • **
  • Posts: 103
    • View Profile
Missing Tile Checker -- A tool for tileset makers
« on: November 09, 2013, 05:08:27 AM »
Download Here!



UPDATED TO VERSION 1.1
The program has been updated to Version 1.1 instead of comparing two tile_config.json files it now compares the tile set's tile_config.json file with all .json files located in data\json and data\json\items. This should provide better functionality, as well as make sure every single item id is accounted for.

(Version 1.1.1 released November 10, Fixed a bug where vehicle parts were not accurately checked. Reupped link)



I made this tool thanks to an idea from Natures Witness as a tool for tile set makers. What this program does is it looks at your tile set, and tells you what item id's you are missing from your tile set. This will allow you to quickly update your tile sets as the game updates and new items are added. The program was coded in C# using the .Net 4.0 framework. If request is there, I could maybe rewrite this as a command-line based python program to allow for cross-platform compatibility.


Download Here!



Use of this program is simple. Run the program. Select your tile set's tile_config.json and point the program to your data/json folder. Click check and the program will scan all relevant json files and create a "missing.txt" file for you. I believe I have it checking all relevant json files, but let me know if I missed one!

Here is a list of all files I check (and they are checked in order and written in order on missing.txt if it help you at all)

(click to show/hide)


Let me know if any bugs arise, or if there is any requested functionality.
« Last Edit: November 11, 2013, 07:55:13 PM by jcannon98188 »

Offline stone94

  • NPC
  • **
  • Posts: 152
  • Life is far too overpowered
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #1 on: November 09, 2013, 10:52:51 AM »
great work this has been much requested :P
You can call me anything you like, just don't call me late for supper.

Offline HRose

  • NPC
  • **
  • Posts: 106
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #2 on: November 09, 2013, 11:22:30 AM »
It doesn't even look like the "original tile_config.json file" has all the entries... so.

Offline Tsu

  • Zombie Food
  • *
  • Posts: 69
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #3 on: November 09, 2013, 04:19:03 PM »
Is there actually any .json file that has all the entries as of now? Because when I do the comparison it seems to list all the things I have added that the standard one does not have.

Offline Natures Witness

  • Survivor
  • ***
  • Posts: 287
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #4 on: November 09, 2013, 05:05:12 PM »
I think we're going to need to make a focused effort to create an accurate "master list" and keep it up-to-date.  BTW jcannon98188, a big thank-you from me and everybody else for making this, it's going to be a big asset to development.

Offline jcannon98188

  • NPC
  • **
  • Posts: 103
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #5 on: November 09, 2013, 06:51:11 PM »
Thanks for the feedback everyone! I am rewriting it so it scans all the json files in the json folder, and it will search them for all id's then check them against your tileset. I also will make it create a new masterlist will everything set to blank "fg: -1 bg:-1 rotates:false" but I will also make it check for multitiles (if I can) and include that. I should have this out in the next day or so if all goes according to plans.

Offline Tsu

  • Zombie Food
  • *
  • Posts: 69
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #6 on: November 09, 2013, 06:59:24 PM »
Sweet <3

Offline GalenEvil

  • NPC
  • **
  • Posts: 239
  • Freelance Programmer
    • View Profile
    • Portfolio Page!
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #7 on: November 09, 2013, 07:47:55 PM »
make sure to check the entry type, as vehicle parts need to have their tile definitions with a vp_ prefix on them. That should be the only major separation from the object definitions.
If you are on a non-Linux machine and wish to check out some of my projects: Portfolio!
Sorry to Linux users, Unity3D's webplayers do not work on Linux as far as I know.

Offline jcannon98188

  • NPC
  • **
  • Posts: 103
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #8 on: November 09, 2013, 08:53:27 PM »
Thanks for the heads up Galen! I will go ahead and pay attention to that. Question for the modders, how do you determine if something should be multi tile or not? I want to try make this program check those as well.



edit:

Ok, turns out I may be a little over ambitious. Changing the scope of the project once again. Rather than making a new master list, I will simply check the tileset against all .jsons instead. This should still help out though.
« Last Edit: November 09, 2013, 10:29:23 PM by jcannon98188 »

Offline GlyphGryph

  • Administrator
  • Survivor
  • *****
  • Posts: 1488
  • Kreaaaaa
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #9 on: November 10, 2013, 01:53:25 AM »
Stickying this.

Offline jcannon98188

  • NPC
  • **
  • Posts: 103
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #10 on: November 10, 2013, 06:31:55 AM »
Download Here!



UPDATED TO VERSION 1.1
The program has been updated to Version 1.1 instead of comparing two tile_config.json files it now compares the tile set's tile_config.json file with all .json files located in data\json and data\json\items. This should provide better functionality, as well as make sure every single item id is accounted for.



Updated original post and download link as well. As always, let me know if there is any bugs or feature requests. I will be happy to oblige, assuming I have the knowledge to implement. As long as new .json files are not added this program should provide an accurate list of all item id's missing from your tileset. I will eventually add functionality to be able to add additional .json files to be scanned but I want to look into how to do that a little more.

Oh, and thanks for the sticky. I am glad this is useful to people.

Offline GalenEvil

  • NPC
  • **
  • Posts: 239
  • Freelance Programmer
    • View Profile
    • Portfolio Page!
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #11 on: November 10, 2013, 08:39:47 AM »
If you look in the file_finder.cpp file you should be able to use/adapt that to get a list of json files to read from. Then, assuming you are checking the type information, make it ignore abstract types (vehicles, colordef, recipes, etc (also instruments since they are not actually spawned anywhere ever)). Then you would only need to update the read/ignore lists to include new types :D
If you are on a non-Linux machine and wish to check out some of my projects: Portfolio!
Sorry to Linux users, Unity3D's webplayers do not work on Linux as far as I know.

Offline jcannon98188

  • NPC
  • **
  • Posts: 103
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #12 on: November 10, 2013, 08:51:29 AM »
Hmmm, I am not seeing any of that information actually in file_finder.cpp or file_finder.h

What I actually did instead was look through every JSON and manually inspect it to find out if it was something that would have a tile, then had the program pull it's id and add it to a list. I also had it check if it is a vehicle part and added vp_ before the id in my list. Then I compared that list with the tile_config.json file and creates missing.txt next I will have it load the list from a text/json file and load it in, so it will be extendable in case of things like mods.

Offline GalenEvil

  • NPC
  • **
  • Posts: 239
  • Freelance Programmer
    • View Profile
    • Portfolio Page!
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #13 on: November 10, 2013, 09:31:24 AM »
file_finder::get_files_from_path(std::string extension, std::string root_path, bool recursive_search) -- the extension would be ".json", root_path would be "./data/json" or wherever the json files are located, and for this search recursive_search should be true. Calling it with those parameters would output a vector of all .json files starting from the root_path through its subdirectories. The only reason I mentioned it was so that you could dynamically populate the list of json files to read through instead of hardcoding it all.
If you are on a non-Linux machine and wish to check out some of my projects: Portfolio!
Sorry to Linux users, Unity3D's webplayers do not work on Linux as far as I know.

Offline jcannon98188

  • NPC
  • **
  • Posts: 103
    • View Profile
Re: Missing Tile Checker -- A tool for tileset makers
« Reply #14 on: November 10, 2013, 06:09:00 PM »
Ahhhh ok I get you now. The reason why I don't just have it search ever json file is because some files (for example martialarts.json) have a id field, but have no graphical representation and so I don't want to include those in the searches. Same with vehicles.json, skills.json, and the like.