Trying to get a stats about sprites (in core)

Hi.

With the script tools/gfx_tools/tileset_coverage.py, I am trying to get stats about the sprites.

But I don’t sure if the stats are correct (because the all objects change in the each tileset).

This is my tiny script:

#! /bin/bash

python3 tools/json_tools/table.py -f csv --nonestring ""\
 --tileset type id name description color looks_like "copy-from" longest_side \
 > all_game_ids.csv
python3 tools/json_tools/generate_overlay_ids.py \
 > all_overlay_ids.csv
for sprite_dir in $(find ./gfx/* -type d)
do
  sprite_name=${sprite_dir##*/}
  echo $sprite_name;
  python3 tools/gfx_tools/list_tileset_ids.py "$sprite_dir" > ${sprite_name}_tileset_ids.csv
  python3 tools/gfx_tools/tileset_coverage.py \
    all_game_ids.csv all_overlay_ids.csv ${sprite_name}_tileset_ids.csv \
    tileset_coverage_output.csv 2>/dev/null
  python3 -c "import pandas; a = pandas.read_csv('tileset_coverage_output.csv'); b=a.dropna(subset=['tileset_id']); print(f'{len(b)}/{len(a)} ({((len(a) - len(b))/len(a))*100:.2f}%)')"
done

And the output with the main branch is:

Altica
9446/30329 (68.85%)
ASCII_Overmap
9446/30329 (68.85%)
ASCIITileset
79/26999 (99.71%)
BrownLikeBears
5004/27953 (82.10%)
ChibiUltica
12091/31138 (61.17%)
Cuteclysm
4099/27987 (85.35%)
GiantDays
9772/30393 (67.85%)
HollowMoon
9772/30393 (67.85%)
Larwick_Overmap
6047/33016 (81.68%)
MshockXotto+
9902/30164 (67.17%)
NeoDaysTileset
10607/30728 (65.48%)
RetroDaysTileset
7314/29090 (74.86%)
SmashButton_iso
7314/29090 (74.86%)
SurveyorsMap
1061/28032 (96.22%)
Ultica_iso
7693/29653 (74.06%)
UltimateCataclysm
10970/31593 (65.28%)

is it correct?

Regards.

It’s probably roughly correct, some sprites are reused for multiple ids and I think the script ignores all Worn and Wielded overlays for items, and maybe the mutation overlays too