Dispatch missions/Can't figure a better name

Hello all and thank you for reading this!

Right now I'm working on a project that has dispatch missions similar to FF tactics where you send away your party members to do missions without you. What I can't figure out is how to actually run the missions. I can't explain it very well so here is an example:

1. You'd go up to a job board and select from a list then select a party member. ( I already figured that out. )

2. Said party member would leave the party ( Figured this out )

3. When you click on the bed to advance a day the NPC would do the mission. ( this is what I cant figure out)

So say the NPC had to go steal an apple, how would I calculate if he succeeds or fails and how do I set it up so that I start the event at the job board but not actually run it till I get to the bed? On top of that how could I get it so that the bed event runs whichever job I pick that day and not just all jobs at once?

I'm not afraid of plugins but I'm no coder. Thanks for reading this google failed me ):
By definition an NPC (non playable character) can't do anything except follow the specific commands you give. Am I correct in thinking that what you are referring to is the party member who has left the party?

If so, although to the player it should look like the member has left the party, in reality it is the party who has left the member.

What you need to do is in the bed event, remove all other actors from the party. That leaves just the particular member as the only playable character. If you want to see the rest of the party just standing around, then you use sprites as if they are 'ordinary' NPCs.

As the playable character, the member goes off and does whatever, in your example steals an apple. When they get the apple, you turn a switch ON (name the switch so that you don't acccidentally use it for something else). You can then use a conditional check on the reward giver (or whatever method you are using) - is the switch ON? If yes, then do your mission complete stuff, if no, then the member is told to go back out and do it.

As for having the bed event, that depends on exactly how you have set up your missions and whether you want to give the player complete freedom to do them in any order, as long as it is only one at a time. I assume from your question that it is possible to collect more than one mission at a time. (Maybe that's the bit you might want to reconsider). One way would be to use a switch for each mission.

The player interacts with the bed - fade out, do your "next day" stuff, then have a choices command set up where the player picks a particular task. Let us say for the sake of the example that stealing the apple is mission 2. When the player picks that mission, turn on the switch Mission Two.

Each choice should have a conditional within it to check which mission switches are already on. If any switch other than its own is on, give a message saying "One job at a time" or whatever.

The player goes off to steal the apple. The apple is not stealable until mission switch 2 is on. All other missions (e.g. collect the letter from the baker) will also be unplayable until their particular mission switch is on.
And if those missions are meant to be without player input, just to give the party and player added gold or items or XP as a result, then you don't do them directly.

Instead you use control variable commands with the random option and conditional branches for checking the results to determine what the player gets.
specify, for the mission, whom is attacking, and whom is defending.
you'll only need to fix whom is defending (the boss), and leave variable whom is attacking (the NPC).
however you work out the battle logic (either plain random chance, or stat-based comparison, or a mix of both) is up to you.
...... but that, is a given.

with the defender specified, the success of the mission will depend on whom is the attacker.

you'll need a function dedicated purely to processing that battle, whatever it might be, between whatever opponents, but specifically processed when you go to bed.
save all the data into variables, bring them into that function, and call that function from the bed object,.... voila! instant side quest.

Original thread: https://forums.rpgmakerweb.com/threads/dispatch-missions-cant-figure-a-better-name.86213/