Creating a path oriented npc/party member

Hello! I'm brand new to RPG Maker, but I have had an itch to create a game based off of a book series I've been writing for 5 years.

The type of game I want to make is somewhat lofty, but I *think* with the right knowledge, I can do it.
Part of the game involves the player character consistently interacting and diverting the path of another character.

The whole point and premise of the game is that you're an alien clown trapped in a time loop, trying to prevent the death of your best and very squishy human friend.

I've spent that few days trying to familiarize myself with RPG Maker MZ, so I know I can use events to control the NPC's behavior so they react to the player character. What I would like to know is if there are any tutorials, plugins, or extra things I can do to make sure the NPC is also able to join as a party member, as an aspect of the game I want to include is the ability for you to inadvertently kill them during a battle.

Basically: PC can use NPC's health to revitalize themselves/vice versa and if the PC uses too much health, or conversely gets too "hungry", the NPC dies and you enter a fail state.
Each time the NPC dies, or the PC fails to manage their rescourxes, the game resets to square one, so the learning curve is the name of the game here [metaphorically]

So the NPC acting as "autonomously" as possible is ideal.

There are other parts of the game mechanics I want to do that are more in depth, like a day/night cycle with a calendar of sorts, which hopefully would make routing the NPC much easier given they'd have stuff to do on certain days that will autofail if not diverted at the right time by the PC.
Anyone with information or tips would be an absolute blessing!
If you want an NPC to join as a party member, make an actor in the database (don't put it in the starting party). Then when you talk to the NPC, you use the event command 'change party members' to add the actor to your party.

If you want the NPC to act automatically in battle, you can give the actor the 'auto battle' trait (you can also use a battle AI plugin to affect what the auto battler does).

You can make a skill that removes hp from the 'npc actor' and gives the same amount of hp to your main character actor.

You can also make a troop event that checks if the NPC is dead and if it is, turn on a switch and abort the battle. The switch controls a parallel autorun common event that transports you back to the beginning (and makes all other necessary modifications).
Don't know if it could work. But if I understood correctly, your mechanic, is about recruiting random people to your party?

The RPG Maker series, works with a database, which your characters are registered there. So, every character who participate in a battle, has an ID.
For this, to not make 100 different characters for every NPC. I suggest you, make at least 10 Blank IDs. For gender or Personality this NPC have for example:

ID 001 - You Main Character
ID 002 - Male Shy
ID 003 - Male Happy
ID 004 - Female Glasses

Making that, they are Blank actors on the database, so you can change their sprite, name, or change a little their state on the conversation to add to your party.

Now, in order to make "resets", If you wanna something like global switches and variables, so even in New Games, you save your precious ones. So, it could look more like a loop, instead a New Game.
I only know paid one, Visustella New Game Plus.

Original thread: https://forums.rpgmakerweb.com/threads/creating-a-path-oriented-npc-party-member.168725/