Your basic quest idea is absolutely no problem - but to give them randomly and conditioned to available maps is a more tricky part.
First, you would need one key item "letter" for each possible destination, and each destination adress should have an event that reacts to that specific item, removes it from your inventory and adds +1 to a variable "letter delivered".
For each post office, you'll need an event that activates a switch "delivery active" to prevent additional quests until all letters have been delivered (if you allow for several such quests at the same time, you'll need more variables, more switches and need to be very carefull about your event logic).
If that switch is off and you go to the post office, it decides on the number of letters needed and stores that in one variable, then activates a common event that hands you that umber of random letters.
If the switch is ON, then it compares the variable of delivery needed with the variable of delivery done, and either sends you to continue or gives the rewards and deactivates the switch.
Now the tricky part is the common event giving you the key items "letters".
It needs a counter and loop for the number of deliveries needed, and for each letter randomly selects one of several possible letters.
And the "possibility" of a letter is conditioned on switches for explored areas - those switches would be activated whenever you enter a new map, which means you need a lot of switches for this, and the conditional branches would be very long.
So yes, it is possible - but a lot of work, and you need to prepare for it before making those maps...
To be honest I am not really sure what you mean.
When you say "you would need one key item "letter" for each possible destination" do you mean one letter for every person that can get one or one letter for every town / area?
one item type for every person who can get one, or the letters would count at the wrong destination.
There are other ways to do this with a single item for all deliveries, but then you would need more variables to keep track - and with one letter per person you could use the item description for the adress in case the player forgets where to deliver - that also is more difficult if you try to reduce the number of letters...
Thanks for the help so far.
I can get it to give me a random amount of one item, but I can't seem to figure out how to give me a random amount of different items.
Also would it not work better if the random number of letters generated also added that number to a "Delivery Active" variable? Then every time I deliver a letter it would -1 from it. The variable itself would activate a switch which would stop me from getting more letters unless it equals 0
On a side note I have decided to make it a bit easier by giving each region it's own Post Office which only delivers letters to (randomly chosen) people in it's designated area. That way the amount of letters each area has in its inventory is set and does not get more added when new regions are discovered.
Originally it was going to be
Discover Region 1
Region 1 has 5 potential ppl to deliver to
Post Office can hand out up to 1 - 5 random letters
Discover Region 2
Region 2 has 10 ppl
Post office can now hand out 1 - 15 random letters
now it will go
Region 1 Post Office hands out 1 - 5 letters
Region 2 Post Office hands out 1 - 15 letter
You will even be able to get letters from all post offices at the same time, but won't be able to get more from each one until you have completed your deliveries for each region.
Otherwise the conditional branches are going to be very very long
Once again thanks.
I am happy to say that I finally got it sorted and can now implement it in my game.
Now the only problem is stopping people from spamming this mechanic and making a ton of money in a short amount of time.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.