It’s just a function library function
The project is huge, so can’t share it. I can make a fresh one with just the crucial bits in, but that will quite a lot of work. Do you think it’s what you’re looking for?
You don’t have to use the save game stuff, you can just type numbers if you want…