Thealexbarney / XbTool

Tools to read, process and export data from Xenoblade games
42 stars 23 forks source link

Generating a database as an output type #3

Closed chuggafan closed 5 years ago

chuggafan commented 5 years ago

Looking at the tables you provide about the datamining, I would love to be able to see how it all relates to each-other in a SQL style database, specifically with XB2, where a lot of items seem to refer to each-other and it looks as if the game internally is using the "BDAT" file format you decrypt as if it were a relational database.

The reason for this is I would like to be able to build queries to determine groupings further than you can do with the basic tables that chrome gives you, such as filtering out all enemies that don't drop "LEGENDARY" items. Or only see enemies that spawn in a specific area. Or enemies that spawn under certain conditions, etc.

I'd love to see this as a feature, but I would understand why this would be incredibly difficult, as you'd have to manage foreign key support, seeing each table be generated and filled, etc. to properly be able to query it all. But considering how good the HTML stuff is about putting everything into table's, I would think it's do-able.

Thanks for your consideration of this (if at all).

Thealexbarney commented 5 years ago

The only problem is that the relationships aren't always that simple. You can deserialize the BDAT files into a BdatCollection and do query-type things with that.

Here's an example not of a single query, but of gathering all the information on everybody's affinity chart achievements.

chuggafan commented 5 years ago

Hmm, yes, that seems to be a trickier problem than I thought it would be due to the way the HTML tables look. I may look into doing it based on the already collected tables then, as what I really want to do is take enemy drops, localize them to enemies, then get the list of locations these enemies spawn... I think I'll look into doing that over the weekend, after the update comes out.

The affinity chart achievements specifically do seem to be one of the ones that makes the problem obvious, I think I'll look into how I'd try to serialize it automatically. But if I have to do the conversion by hand for a lot of these entries, I think I might do it, just so that other people can, well, figure out what enemy drops what in what area.

I think I'll leave this open to remind me of this so that I will setup a little SQLite file for it after the update is out. (hopefully) I can put it somewhere so that people can use it. Oh well, looks like the plan I had will take a lot more work than I originally thought it will. But I will do it, if only so other people don't have to.