# Trying to get a stats about sprites (in core)

**URL:** <https://discourse.cataclysmdda.org/t/trying-to-get-a-stats-about-sprites-in-core/29276>\
**Category:** The Garage\
**Tags:** tileset\
**Created:** [June 5, 2024, 3:59pm UTC](https://discourse.cataclysmdda.org/t/trying-to-get-a-stats-about-sprites-in-core/29276 "2024-06-05T15:59:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdtrooper](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mdtrooper/32/1524_2.png) [@mdtrooper](https://discourse.cataclysmdda.org/u/mdtrooper)\
**Post date:** [June 5, 2024, 3:59pm UTC](https://discourse.cataclysmdda.org/t/trying-to-get-a-stats-about-sprites-in-core/29276/1 "2024-06-05T15:59:43Z")

</div>

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:

```bash
#! /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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![Fris0uman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/fris0uman/32/8607_2.png) [@Fris0uman](https://discourse.cataclysmdda.org/u/Fris0uman)\
**Post date:** [June 7, 2024, 8:37am UTC](https://discourse.cataclysmdda.org/t/trying-to-get-a-stats-about-sprites-in-core/29276/2 "2024-06-07T08:37:15Z")

</div>

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
