How would this be done??

I just had an idea.

Suppose there are two endings in a game. And the only way to get the second ending, is to beat the game and play through it a second time. And it requires an item, an item that you can only get at the very end of the first playthrough. 

What I'm asking is: how do I/can I make the game remember that a person is on their second playthrough and make them start a new game with an item in their inventory? 

I thought at first maybe events, switches, stuff like that could do it, but im thinking now obviously that scripts may be the only way.

Does anyone have any experience in this?
Yanfly has a New Game+, but I think that only carries your equip over. What I would do is, at the end of the game, save a file in the encrypted archive (using the save_data command), and then when you start a new game, check for the file (using load_data), and if it is there, set a switch to true.

I'm not sure how well that'd work without some modification, but that's how I'd do it.
Try using Yanfly's NewGame+

It has the option to save variables and switches... You can set specific switches or variables that will be carried over to the next game... so you just need to set a variable at the end, and make sure to set it as carried over... then on your new game, check that switch...

New Game+ is a great way to provide replay value for your game. It lets the player re-experience the game in a different way with either carried over items, to carried over party members, to carried over skills, switches, and variables even. There exists many options to change how New Game+ will work for your game.
I've moved this thread to vx ace support. Please be sure to post your threads in the correct forum next time. Thank you.
Also please give your threads meaningful titles.

Original thread: https://forums.rpgmakerweb.com/threads/how-would-this-be-done.15520/