Advanced advancements detection

Hi there, I created many advancement trees for all my games, i actually have 1343 advancements. I created a stat book that, when taken, displays the number of advancements done for each minigame... But i had to reaaaally hardcore everything for this : each advancement need to be detected and adds a score, than the book will resolve then. This makes the file huge. Example : execute if entity @s[advancements={cas:wanted8=true}] run scoreboard players add KroSuccessCasino KroTime 1 execute if entity @s[advancements={cas:tradeall=true}] run scoreboard players add KroSuccessCasino KroTime 1 execute if entity @s[advancements={phasmophobia:tomb=true}] run scoreboard players add KroSuccessPhasmo KroTime 1 The book displays each different score depending the minigame and the total is the sum of all the scores. Is there an optimized way to store how much advancements from the same tree, path or total have been done ?
Continue to help post