Your very own SQL database

Have you ever wondered what would it be like if you took all of the JSON from Cataclysm:DDA and stuffed them into a snappy little SQLite database?

Well, wonder no more!
Assuming you have python, grab https://github.com/Catacstone/sqliteclysm and generate your very own SQL database full of Cataclysm:DDA goodness today!

This tool converts JSON to SQL and back, although I’d advise against full file filtration of e.g. recipes.json -> sql -> recipes.json; you’re more than likely to break things.

Did you know there are currently 462 recipes in Cataclysm?
[sub](excluding disassembly; select count(result) from recipes where category not like ‘%CRAFT%’:wink:
[/sub]

Did you know that 112 of those recipes use cooking as a skill?
[sub](select COUNT(result) from recipes where skill_used like ‘%cooking%’;)[/sub]

Did you know that 17 of cooking recipes need 5 or more levels of cooking skill?
[sub]select count(result) from recipes where skill_used like ‘%cooking%’ and difficulty > 5;[/sub]

This tool also contains some basic search helper functions so no need to write SQL queries all the time.

At this juncture certain recipes.json has a certain straggling “}” in the end of the file, so remove that and the script’ll run through.

Sounds cool!

Ok, querying it, I thought you were proposing putting all that stuff in a SQLite DB for use by the game, in which case I was going to have to spend the next hour looking for a big enough NO.gif :wink:

Querying it is cool though, I have some basic tools for searching/narrowing the json files, but this would be better, if I was familliar with SQL anyway :stuck_out_tongue:

he means it as a developer tool and possibly as a fan tool as well. this is a very good idea. we are adding so many things, it will be easier to track them in a DB.