Tracking which endings have been achieved across playthroughs

Twine Version: Twine 2 (desktop program)
Story Format: Harlowe 3.1.0

Hey everyone, first time Twine-r and poster here. Finishing up my first text adventure, but there is one feature I want to add but can’t figure out. I want to add a section to the bottom of my title screen that tracks which of the ten endings the player has achieved. I initially thought this would be straightforward–adding each ending name to an array and then using (print:) or something.

But my issue (and maybe it isn’t an issue?) is that I’m also using a checkpoint/save system that loads a “blank” slot whenever the player starts a new game, to overwrite their previous game’s (history:) and reset variables. Starting a new game will wipe out the tracked endings, right? That’d make the whole system pointless.

The checkpoint and save/load system has been working fine, but I feel like it is limiting my options to add the ending tracking? I’ve been neck-deep in this game for a while now, so I wouldn’t be surprised if there’s an easy solution/workaround I just can’t see. Has anyone else had luck creating this kind of ending tracking system?

For clarity, here is the code I’m using for my New Game and Load Game options. “GameStart” is the clean slate file that has initialized variables and nothing in (history:).

(if: (saved-games:) contains "File A")[(Link: "<u>NEW GAME</u>")[()[(load-game: "GameStart")]]](else:)[[[<u>NEW GAME</u>->New Game 0]]] (will overwrite current save)

(if: (saved-games:) contains "File A")[(Link: "<u>LOAD GAME</u>")[()[(load-game: "File A")]]](else:)[]

Any help or thoughts would be greatly appreciated! Hope this makes sense!

SOLVED: using the achievements macros in Chapel’s Custom Macro API. Great resource, never knew it existed! Link.