dshepsis / OkamiMap

Resource for the locations of items and other objects in the video game Okami
https://dshepsis.github.io/OkamiMap/
1 stars 1 forks source link

Implement direct links to rows for the Animals table #6

Closed dshepsis closed 3 years ago

dshepsis commented 3 years ago

I have implemented a way to use query strings to link directly to a row of the loot table (e.g. https://dshepsis.github.io/OkamiMap/?row=Map_263_at_-129_-329_141), but I didn't do this for the animals table. This change needs to be brought over to that table and all future tables, probably by making a more general template for these table views which can simply be configured for each dataset without having to duplicate the whole layout code.

zysim commented 3 years ago

You know for sure if the format of the tables would be exactly the same? Or would each data table be built different?

dshepsis commented 3 years ago

The main reason animals and treasures are in different tables is because of the different columns. In theory, it should be possible to generalize the code for the actual pages so that it automatically determines which columns to add to the table and in what order. Then, there would be no functional difference between the pages, and it would be as simple as switching which JSON file is loaded. I intend to do this eventually, which will make it much easier to add tables for other things, like Demon Scrolls or loading-zones/cutscene triggers.