Hi! I'm only about 90% sure this is the right forum, so please correct me if I'm wrong-
My game is meant to have a mechanic where you have to get every single bad ending in order to unlock the one good one, but I'm not quite sure how to do that, since from what I've seen, each playthrough is separate and doesn't affect other ones. Is there a way to do this in the base game or, if there is one that's meant for this, do I have to use a plugin?
There are plugins that add meta variables (variables that exist cross-save/playthrough), but, honestly? Most games that do this have a "game-clear" save to make it clear the player has more to do. AKA, you'd technically be on the same playthrough, but you can reset all the levels, exp, items variables and switches to restart from the beginning. Resetting all self-switches might be a little bit of a pain, but you can make loops for it. All you'd need to keep the same are the variables that check which endings have been achieved and whatever other data you want to transfer.
Moderator note: Moving to Plugin Requests
You are after a plugin for either New Game +, or Global Variables (or Global Switches). Both will let you create a new data file that lives where your save files are, that will be shared between all save files. So you can update these variables or switches each time a bad ending is achieved, and the next game can check them to determine whether or not to allow the "good" ending.
I'd be wary with this idea though - unless each playthrough is unique in some way, I doubt a lot of people will want to play more than two or three times, especially if the game is long and/or the "bad" endings leave them feeling sad or disappointed.
As far as the concept goes, it's been done extremely well in a few games and... I won't even mention them because every game it's done well in it's a major spoiler. But, anyway, you do have to make it so that there's new content to sniff out in each playthrough, whether that's another route with different content, characters/interactions, or the events happening differently enough nearly right away to tip the player off that something's up. And I'd suggest not making each route particularly long.
Also, being able to skip seen content would help.